From 494037dee5cb8a7082b421352c851adad78ad701 Mon Sep 17 00:00:00 2001 From: Hitonabi Date: Fri, 3 Jul 2026 20:23:13 +0200 Subject: [PATCH] MC2 Final (D16 f): Voice-Metrik-Reste raus + README auf Final-Stand (C15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit f) Lucy/Voice-Reste aus dem MC2-Web-UI entfernt (kein "Sprechen"-Tab mehr): VoiceLatencyCard + Sprach-Latenz-Plumbing (queries/api-Typen) und der Backend-Leseendpoint /voice/metrics raus. Der Proaktivität-/Alarm-Kanal (/voice/announce, /alarm) und die STT/TTS/chat-Proxys bleiben unberührt. C15) README auf den Final-/Autonomie-Stand aktualisiert (Mem0 statt SQLite-MCP, live+eingefroren, Lucy als eigenes Repo, Fangnetz-Updates/Werkstatt). Co-Authored-By: Claude Opus 4.8 --- README.md | 56 ++-- backend/routers/voice.py | 9 +- ...View-CCAApGf_.js => GraphView-U6KSfAcr.js} | 2 +- ...{index-DQJ4LntK.css => index-BPiDiqMB.css} | 2 +- .../{index-B0tHcMp_.js => index-DZPeq_n9.js} | 276 +++++++++--------- frontend/dist/index.html | 4 +- .../components/dashboard/VoiceLatencyCard.tsx | 81 ----- frontend/src/lib/api.ts | 11 - frontend/src/lib/queries.ts | 5 - frontend/src/mc3/Mc3Start.tsx | 2 - frontend/src/views/DashboardView.tsx | 6 +- 11 files changed, 174 insertions(+), 280 deletions(-) rename frontend/dist/assets/{GraphView-CCAApGf_.js => GraphView-U6KSfAcr.js} (99%) rename frontend/dist/assets/{index-DQJ4LntK.css => index-BPiDiqMB.css} (59%) rename frontend/dist/assets/{index-B0tHcMp_.js => index-DZPeq_n9.js} (52%) delete mode 100644 frontend/src/components/dashboard/VoiceLatencyCard.tsx diff --git a/README.md b/README.md index d037b0b..5d23062 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,41 @@ # Mission Control 2.0 -Komponierbarer Local-AI-Stack für den Bosgame M5. Greenfield-Neuaufbau — -siehe Architektur-Plan (`docs/` bzw. der genehmigte Plan). +Komponierbarer Local-AI-Stack für den Bosgame M5 (Strix Halo). Läuft **live auf der Box** +als sudo-freier systemd-User-Dienst (`:9001`) und ist als **Final-Version eingefroren** — +Pflege übernehmen ab jetzt die selbst-wartenden Box-KIs (Auto-Update mit Fangnetz + die +„Werkstatt"), nicht mehr manuelle Releases. -**Schichten:** Engine (llama-swap, **Vulkan/RADV** auf Strix Halo) · **Builtin-Routing-Gateway** -in MC2 (`model: auto`, kein externer LiteLLM-Dienst — scheitert auf Python 3.14) · -Mission Control 2.0 (FastAPI + React/shadcn) · Hermes Agent + hermes-webui · -Shared Memory (SQLite via MCP). Jede Schicht hinter stabilem Vertrag austauschbar. +**Schichten:** Engine (llama.cpp **Vulkan/RADV** auf Strix Halo) · Router (**llama-swap**, +Ko-Residenz-Warm-Set) · **Builtin-Routing-Gateway** in MC2 (`model: auto`, kein externer +LiteLLM — scheitert auf Python 3.14) · Mission Control 2.0 (FastAPI + React/shadcn) · +**Hermes Agent** (api_server-Gateway :8642, Tools/MCP/Telegram/cron) · auto-lernendes +**Gedächtnis** (Mem0-Sidecar, semantisch). Jede Schicht hinter stabilem Vertrag austauschbar. -## Status: Phasen 0–5 ✅ · MC2 **live auf der Box** (:9001) · Modelle/Hermes-Wiring + Cutover offen +> **Sprachassistentin Lucy** (Voice + 3D-Avatar) ist in ein **eigenes Repo** ausgelagert +> (`Hitonabi/lucy`) und spricht über den Hermes-Gateway. Aus MC2 selbst sind die Voice-/ +> Web-Reste entfernt — MC2 ist die Steuerzentrale, kein Sprach-Frontend. -Fortschritt & Resume-Guide: siehe [`docs/STATUS.md`](docs/STATUS.md). +## Status: **live + eingefroren (MC2 Final)** -- **Phase 0** — FastAPI-Skeleton + React/shadcn-Shell (Cmd+K, Dark, PWA). -- **Phase 1** — Compute-Module (fit/caps/sources, portiert), **Discover** (live HF + Fit + Caps), - **Engine-Write** (register + `groups`/Ko-Residenz + vocab-geprüfte Spec-Drafts), - **Builtin-Gateway** (`model: auto` + Fallbacks), Frontend **Modelle & Routing** (Caps-Chips, Fit, Discover, Routing-View). +Der ganze Stack ist auf der Box in Betrieb und auf **Autonomie** ausgelegt (Ziel: läuft auch +ohne Betreuung monatelang weiter): -- **Phase 2** — System-Status (CPU/RAM/GPU/Disk), Wartung (restart/self-update, sudo-frei), - **Connect** (saubere IDE-Snippets → Gateway `model:auto`, LAN-IP-Override). -- **Phase 3** — Geteiltes **Gedächtnis** (SQLite/WAL, 5 Kategorien, Dedupe-Kurator) + **MCP-Server** - (`mcp/mcp_memory.py` shared, `mcp/mcp_mc.py` Stack-Management für Hermes), MemoryView. +- **Modelle & Routing** — Discover (live HF + Fit/Caps), Engine-Write (register, `groups`/ + Ko-Residenz, vocab-geprüfte Spec-Drafts), Gateway `model: auto` + Fallbacks. +- **System & Wartung** — Status (CPU/RAM/GPU/Disk), **ehrliche Speicher-Zahlen** (echte KV-Bytes + aus GGUF-Architektur), Logs mit Fehler-Filter, Dienst-Neustart (sudo-frei). +- **Updates mit Fangnetz** — OS/Engine/Router/Hermes per Timer: Backup → Update → Postcheck → + bei Fehler **Auto-Rollback + Pin**; verständliche Zusammenfassung („Musst du etwas tun?") in + Lucys Stimme. Eigene Software wird eingefroren, nicht geupdatet. +- **Gedächtnis** — Mem0-Sidecar (auto-lernend, semantisch), 4 Kategorien, Auto-Dedupe. +- **Selbsterhaltung** — Health-Wächter (`sentry`), Warm-Set-Wächter (`warmer`), tägliche + Self-Smokes, Lucy-Watchdog + Alarmkette; **Werkstatt** (Hermes wartet den Stack via Gitea- + Branch → Gate → Deploy selbst). -- **Phase 4** — Hermes-**Agent-Status** (`/api/agent/status`, AgentView mit Tiles + „Hermes öffnen"), - `deploy/hermes-webui.service`, **Box-Runbook** [`docs/HERMES_SETUP.md`](docs/HERMES_SETUP.md) - (hermes-webui, Brain=`auto`, Tools/MCP-Verdrahtung). Box-Ausführung steht noch aus. - -- **Phase 5** — **Backup** (Memory + Configs), **Services-Health** + Observability-Links, - **Theme-Toggle** (Hell/Dunkel). Box-Deploy/-Wiring + Cutover (Phase 6) brauchen die Box. - -API: `health · models · discover · fit · models/register · groups · routing · system/* · connect · -memory/* · agent/status` (Details in `docs/STATUS.md`). MCP: `mcp/` (siehe `mcp/requirements.txt`). -Box-Runbooks: `docs/HERMES_SETUP.md` + `deploy/` (Units, deploy.sh, backup.sh). +API: `health · models · discover · fit · models/register · groups · routing · system/* · +maintenance/* · connect · memory/* · agent/* · voice/announce · reminders/*`. MCP: `mcp/`. +Box-Runbooks: [`docs/HERMES_SETUP.md`](docs/HERMES_SETUP.md), [`docs/RUNBOOK.md`](docs/RUNBOOK.md), +[`docs/BEDIENUNG.md`](docs/BEDIENUNG.md) + `deploy/` (Units, `deploy.sh`, `backup.sh`, `warmup.sh`). ## Entwickeln diff --git a/backend/routers/voice.py b/backend/routers/voice.py index a50ef4e..4f33f02 100644 --- a/backend/routers/voice.py +++ b/backend/routers/voice.py @@ -20,7 +20,7 @@ from pydantic import BaseModel from config import HERMES_API_KEY, HERMES_API_MODEL, HERMES_API_URL, LLAMA_SWAP_URL, VOICE_SERVICE_URL from services import announce -from services.voice_metrics import Timer, get_metrics, record_stage # Per-Stage-Latenz (C2) +from services.voice_metrics import Timer, record_stage # Per-Stage-Latenz (intern) # Injection-Schutz (Stufe 0): guard.py liegt im mcp/-Verzeichnis. Per Pfad laden (eigene MC2-Venv). import sys as _sys @@ -140,13 +140,6 @@ def voice_announcements(after: int | None = None, limit: int = 20) -> dict: return announce.list_after(after, limit) -@router.get("/voice/metrics") -def voice_metrics() -> dict: - """Per-Stage-Latenz (STT/Vision/Chat-TTFB/TTS) — rollende Statistik, macht die Voice-Pipeline - messbar (C2). Anzeige im Frontend-Overhaul (E).""" - return get_metrics() - - @router.get("/voice/health") def voice_health() -> dict: """Erreichbarkeit des Voice-Sidecars + ob der Hermes-API-Key gesetzt ist.""" diff --git a/frontend/dist/assets/GraphView-CCAApGf_.js b/frontend/dist/assets/GraphView-U6KSfAcr.js similarity index 99% rename from frontend/dist/assets/GraphView-CCAApGf_.js rename to frontend/dist/assets/GraphView-U6KSfAcr.js index af8aec9..2f08986 100644 --- a/frontend/dist/assets/GraphView-CCAApGf_.js +++ b/frontend/dist/assets/GraphView-U6KSfAcr.js @@ -1,4 +1,4 @@ -import{g as bi,r as ce,j as H,R as rr,S as nr,a as Ut,T as ar}from"./index-B0tHcMp_.js";var et={exports:{}},zt;function or(){if(zt)return et.exports;zt=1;var n=typeof Reflect=="object"?Reflect:null,i=n&&typeof n.apply=="function"?n.apply:function(b,R,A){return Function.prototype.apply.call(b,R,A)},t;n&&typeof n.ownKeys=="function"?t=n.ownKeys:Object.getOwnPropertySymbols?t=function(b){return Object.getOwnPropertyNames(b).concat(Object.getOwnPropertySymbols(b))}:t=function(b){return Object.getOwnPropertyNames(b)};function e(p){console&&console.warn&&console.warn(p)}var r=Number.isNaN||function(b){return b!==b};function a(){a.init.call(this)}et.exports=a,et.exports.once=D,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(p){if(typeof p!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof p)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(p){if(typeof p!="number"||p<0||r(p))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+p+".");o=p}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(b){if(typeof b!="number"||b<0||r(b))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+b+".");return this._maxListeners=b,this};function u(p){return p._maxListeners===void 0?a.defaultMaxListeners:p._maxListeners}a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(b){for(var R=[],A=1;A0&&(P=R[0]),P instanceof Error)throw P;var V=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw V.context=P,V}var z=F[b];if(z===void 0)return!1;if(typeof z=="function")i(z,this,R);else for(var g=z.length,K=y(z,g),A=0;A0&&P.length>G&&!P.warned){P.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");V.name="MaxListenersExceededWarning",V.emitter=p,V.type=b,V.count=P.length,e(V)}return p}a.prototype.addListener=function(b,R){return h(this,b,R,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(b,R){return h(this,b,R,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(p,b,R){var A={fired:!1,wrapFn:void 0,target:p,type:b,listener:R},G=d.bind(A);return G.listener=R,A.wrapFn=G,G}a.prototype.once=function(b,R){return s(R),this.on(b,l(this,b,R)),this},a.prototype.prependOnceListener=function(b,R){return s(R),this.prependListener(b,l(this,b,R)),this},a.prototype.removeListener=function(b,R){var A,G,F,P,V;if(s(R),G=this._events,G===void 0)return this;if(A=G[b],A===void 0)return this;if(A===R||A.listener===R)--this._eventsCount===0?this._events=Object.create(null):(delete G[b],G.removeListener&&this.emit("removeListener",b,A.listener||R));else if(typeof A!="function"){for(F=-1,P=A.length-1;P>=0;P--)if(A[P]===R||A[P].listener===R){V=A[P].listener,F=P;break}if(F<0)return this;F===0?A.shift():w(A,F),A.length===1&&(G[b]=A[0]),G.removeListener!==void 0&&this.emit("removeListener",b,V||R)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(b){var R,A,G;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[b]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[b]),this;if(arguments.length===0){var F=Object.keys(A),P;for(G=0;G=0;G--)this.removeListener(b,R[G]);return this};function f(p,b,R){var A=p._events;if(A===void 0)return[];var G=A[b];return G===void 0?[]:typeof G=="function"?R?[G.listener||G]:[G]:R?T(G):y(G,G.length)}a.prototype.listeners=function(b){return f(this,b,!0)},a.prototype.rawListeners=function(b){return f(this,b,!1)},a.listenerCount=function(p,b){return typeof p.listenerCount=="function"?p.listenerCount(b):c.call(p,b)},a.prototype.listenerCount=c;function c(p){var b=this._events;if(b!==void 0){var R=b[p];if(typeof R=="function")return 1;if(R!==void 0)return R.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function y(p,b){for(var R=new Array(b),A=0;An++}function me(){const n=arguments;let i=null,t=-1;return{[Symbol.iterator](){return this},next(){let e=null;do{if(i===null){if(t++,t>=n.length)return{done:!0};i=n[t][Symbol.iterator]()}if(e=i.next(),e.done){i=null;continue}break}while(!0);return e}}}function Le(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class Lt extends Error{constructor(i){super(),this.name="GraphError",this.message=i}}class k extends Lt{constructor(i){super(i),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,k.prototype.constructor)}}class C extends Lt{constructor(i){super(i),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,C.prototype.constructor)}}class I extends Lt{constructor(i){super(i),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,I.prototype.constructor)}}function _i(n,i){this.key=n,this.attributes=i,this.clear()}_i.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function Ti(n,i){this.key=n,this.attributes=i,this.clear()}Ti.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function Si(n,i){this.key=n,this.attributes=i,this.clear()}Si.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function Ge(n,i,t,e,r){this.key=i,this.attributes=r,this.undirected=n,this.source=t,this.target=e}Ge.prototype.attach=function(){let n="out",i="in";this.undirected&&(n=i="undirected");const t=this.source.key,e=this.target.key;this.source[n][e]=this,!(this.undirected&&t===e)&&(this.target[i][t]=this)};Ge.prototype.attachMulti=function(){let n="out",i="in";const t=this.source.key,e=this.target.key;this.undirected&&(n=i="undirected");const r=this.source[n],a=r[e];if(typeof a>"u"){r[e]=this,this.undirected&&t===e||(this.target[i][t]=this);return}a.previous=this,this.next=a,r[e]=this,this.target[i][t]=this};Ge.prototype.detach=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),delete this.source[t][i],delete this.target[e][n]};Ge.prototype.detachMulti=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[t][i],delete this.target[e][n]):(this.next.previous=void 0,this.source[t][i]=this.next,this.target[e][n]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const Ri=0,Ai=1,hr=2,xi=3;function ye(n,i,t,e,r,a,o){let s,u,h,d;if(e=""+e,t===Ri){if(s=n._nodes.get(e),!s)throw new C(`Graph.${i}: could not find the "${e}" node in the graph.`);h=r,d=a}else if(t===xi){if(r=""+r,u=n._edges.get(r),!u)throw new C(`Graph.${i}: could not find the "${r}" edge in the graph.`);const l=u.source.key,f=u.target.key;if(e===l)s=u.target;else if(e===f)s=u.source;else throw new C(`Graph.${i}: the "${e}" node is not attached to the "${r}" edge (${l}, ${f}).`);h=a,d=o}else{if(u=n._edges.get(e),!u)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`);t===Ai?s=u.source:s=u.target,h=r,d=a}return[s,h,d]}function dr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);return o.attributes[s]}}function lr(n,i,t){n.prototype[i]=function(e,r){const[a]=ye(this,i,t,e,r);return a.attributes}}function cr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);return o.attributes.hasOwnProperty(s)}}function fr(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ye(this,i,t,e,r,a,o);return s.attributes[u]=h,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function gr(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ye(this,i,t,e,r,a,o);if(typeof h!="function")throw new k(`Graph.${i}: updater should be a function.`);const d=s.attributes,l=h(d[u]);return d[u]=l,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function pr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);return delete o.attributes[s],this.emit("nodeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:s}),this}}function vr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);if(!J(s))throw new k(`Graph.${i}: provided attributes are not a plain object.`);return o.attributes=s,this.emit("nodeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function mr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);if(!J(s))throw new k(`Graph.${i}: provided attributes are not a plain object.`);return Z(o.attributes,s),this.emit("nodeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:s}),this}}function yr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);if(typeof s!="function")throw new k(`Graph.${i}: provided updater is not a function.`);return o.attributes=s(o.attributes),this.emit("nodeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const br=[{name:n=>`get${n}Attribute`,attacher:dr},{name:n=>`get${n}Attributes`,attacher:lr},{name:n=>`has${n}Attribute`,attacher:cr},{name:n=>`set${n}Attribute`,attacher:fr},{name:n=>`update${n}Attribute`,attacher:gr},{name:n=>`remove${n}Attribute`,attacher:pr},{name:n=>`replace${n}Attributes`,attacher:vr},{name:n=>`merge${n}Attributes`,attacher:mr},{name:n=>`update${n}Attributes`,attacher:yr}];function wr(n){br.forEach(function({name:i,attacher:t}){t(n,i("Node"),Ri),t(n,i("Source"),Ai),t(n,i("Target"),hr),t(n,i("Opposite"),xi)})}function Er(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes[r]}}function _r(n,i,t){n.prototype[i]=function(e){let r;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,o=""+arguments[1];if(r=oe(this,a,o,t),!r)throw new C(`Graph.${i}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,r=this._edges.get(e),!r)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return r.attributes}}function Tr(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes.hasOwnProperty(r)}}function Sr(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=oe(this,s,u,t),!o)throw new C(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return o.attributes[r]=a,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function Rr(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=oe(this,s,u,t),!o)throw new C(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof a!="function")throw new k(`Graph.${i}: updater should be a function.`);return o.attributes[r]=a(o.attributes[r]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function Ar(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return delete a.attributes[r],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:r}),this}}function xr(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!J(r))throw new k(`Graph.${i}: provided attributes are not a plain object.`);return a.attributes=r,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function Cr(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!J(r))throw new k(`Graph.${i}: provided attributes are not a plain object.`);return Z(a.attributes,r),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:r}),this}}function kr(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof r!="function")throw new k(`Graph.${i}: provided updater is not a function.`);return a.attributes=r(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const Dr=[{name:n=>`get${n}Attribute`,attacher:Er},{name:n=>`get${n}Attributes`,attacher:_r},{name:n=>`has${n}Attribute`,attacher:Tr},{name:n=>`set${n}Attribute`,attacher:Sr},{name:n=>`update${n}Attribute`,attacher:Rr},{name:n=>`remove${n}Attribute`,attacher:Ar},{name:n=>`replace${n}Attributes`,attacher:xr},{name:n=>`merge${n}Attributes`,attacher:Cr},{name:n=>`update${n}Attributes`,attacher:kr}];function Lr(n){Dr.forEach(function({name:i,attacher:t}){t(n,i("Edge"),"mixed"),t(n,i("DirectedEdge"),"directed"),t(n,i("UndirectedEdge"),"undirected")})}const Gr=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Fr(n,i,t,e){let r=!1;for(const a in i){if(a===e)continue;const o=i[a];if(r=t(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),n&&r)return o.key}}function Nr(n,i,t,e){let r,a,o,s=!1;for(const u in i)if(u!==e){r=i[u];do{if(a=r.source,o=r.target,s=t(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected),n&&s)return r.key;r=r.next}while(r!==void 0)}}function lt(n,i){const t=Object.keys(n),e=t.length;let r,a=0;return{[Symbol.iterator](){return this},next(){do if(r)r=r.next;else{if(a>=e)return{done:!0};const o=t[a++];if(o===i){r=void 0;continue}r=n[o]}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}}}function Pr(n,i,t,e){const r=i[t];if(!r)return;const a=r.source,o=r.target;if(e(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected)&&n)return r.key}function Ir(n,i,t,e){let r=i[t];if(!r)return;let a=!1;do{if(a=e(r.key,r.attributes,r.source.key,r.target.key,r.source.attributes,r.target.attributes,r.undirected),n&&a)return r.key;r=r.next}while(r!==void 0)}function ct(n,i){let t=n[i];if(t.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!t)return{done:!0};const r={edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected};return t=t.next,{done:!1,value:r}}};let e=!1;return{[Symbol.iterator](){return this},next(){return e===!0?{done:!0}:(e=!0,{done:!1,value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected}})}}}function Or(n,i){if(n.size===0)return[];if(i==="mixed"||i===n.type)return Array.from(n._edges.keys());const t=i==="undirected"?n.undirectedSize:n.directedSize,e=new Array(t),r=i==="undirected",a=n._edges.values();let o=0,s,u;for(;s=a.next(),s.done!==!0;)u=s.value,u.undirected===r&&(e[o++]=u.key);return e}function Ci(n,i,t,e){if(i.size===0)return;const r=t!=="mixed"&&t!==i.type,a=t==="undirected";let o,s,u=!1;const h=i._edges.values();for(;o=h.next(),o.done!==!0;){if(s=o.value,r&&s.undirected!==a)continue;const{key:d,attributes:l,source:f,target:c}=s;if(u=e(d,l,f.key,c.key,f.attributes,c.attributes,s.undirected),n&&u)return d}}function Ur(n,i){if(n.size===0)return Le();const t=i!=="mixed"&&i!==n.type,e=i==="undirected",r=n._edges.values();return{[Symbol.iterator](){return this},next(){let a,o;for(;;){if(a=r.next(),a.done)return a;if(o=a.value,!(t&&o.undirected!==e))break}return{value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected},done:!1}}}}function Gt(n,i,t,e,r,a){const o=i?Nr:Fr;let s;if(t!=="undirected"&&(e!=="out"&&(s=o(n,r.in,a),n&&s)||e!=="in"&&(s=o(n,r.out,a,e?void 0:r.key),n&&s))||t!=="directed"&&(s=o(n,r.undirected,a),n&&s))return s}function zr(n,i,t,e){const r=[];return Gt(!1,n,i,t,e,function(a){r.push(a)}),r}function $r(n,i,t){let e=Le();return n!=="undirected"&&(i!=="out"&&typeof t.in<"u"&&(e=me(e,lt(t.in))),i!=="in"&&typeof t.out<"u"&&(e=me(e,lt(t.out,i?void 0:t.key)))),n!=="directed"&&typeof t.undirected<"u"&&(e=me(e,lt(t.undirected))),e}function Ft(n,i,t,e,r,a,o){const s=t?Ir:Pr;let u;if(i!=="undirected"&&(typeof r.in<"u"&&e!=="out"&&(u=s(n,r.in,a,o),n&&u)||typeof r.out<"u"&&e!=="in"&&(e||r.key!==a)&&(u=s(n,r.out,a,o),n&&u))||i!=="directed"&&typeof r.undirected<"u"&&(u=s(n,r.undirected,a,o),n&&u))return u}function Br(n,i,t,e,r){const a=[];return Ft(!1,n,i,t,e,r,function(o){a.push(o)}),a}function Mr(n,i,t,e){let r=Le();return n!=="undirected"&&(typeof t.in<"u"&&i!=="out"&&e in t.in&&(r=me(r,ct(t.in,e))),typeof t.out<"u"&&i!=="in"&&e in t.out&&(i||t.key!==e)&&(r=me(r,ct(t.out,e)))),n!=="directed"&&typeof t.undirected<"u"&&e in t.undirected&&(r=me(r,ct(t.undirected,e))),r}function Hr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a,o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];if(!arguments.length)return Or(this,e);if(arguments.length===1){a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new C(`Graph.${t}: could not find the "${a}" node in the graph.`);return zr(this.multi,e==="mixed"?this.type:e,r,s)}if(arguments.length===2){a=""+a,o=""+o;const s=this._nodes.get(a);if(!s)throw new C(`Graph.${t}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(o))throw new C(`Graph.${t}: could not find the "${o}" target node in the graph.`);return Br(e,this.multi,r,s,o)}throw new k(`Graph.${t}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function Wr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d,l){if(!(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)){if(arguments.length===1)return l=h,Ci(!1,this,e,l);if(arguments.length===2){h=""+h,l=d;const f=this._nodes.get(h);if(typeof f>"u")throw new C(`Graph.${a}: could not find the "${h}" node in the graph.`);return Gt(!1,this.multi,e==="mixed"?this.type:e,r,f,l)}if(arguments.length===3){h=""+h,d=""+d;const f=this._nodes.get(h);if(!f)throw new C(`Graph.${a}: could not find the "${h}" source node in the graph.`);if(!this._nodes.has(d))throw new C(`Graph.${a}: could not find the "${d}" target node in the graph.`);return Ft(!1,e,this.multi,r,f,d,l)}throw new k(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop();let l;if(h.length===0){let f=0;e!=="directed"&&(f+=this.undirectedSize),e!=="undirected"&&(f+=this.directedSize),l=new Array(f);let c=0;h.push((y,w,T,D,m,S,p)=>{l[c++]=d(y,w,T,D,m,S,p)})}else l=[],h.push((f,c,y,w,T,D,m)=>{l.push(d(f,c,y,w,T,D,m))});return this[a].apply(this,h),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop(),l=[];return h.push((f,c,y,w,T,D,m)=>{d(f,c,y,w,T,D,m)&&l.push(f)}),this[a].apply(this,h),l};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(){let h=Array.prototype.slice.call(arguments);if(h.length<2||h.length>4)throw new k(`Graph.${u}: invalid number of arguments (expecting 2, 3 or 4 and got ${h.length}).`);if(typeof h[h.length-1]=="function"&&typeof h[h.length-2]!="function")throw new k(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let d,l;h.length===2?(d=h[0],l=h[1],h=[]):h.length===3?(d=h[1],l=h[2],h=[h[0]]):h.length===4&&(d=h[2],l=h[3],h=[h[0],h[1]]);let f=l;return h.push((c,y,w,T,D,m,S)=>{f=d(f,c,y,w,T,D,m,S)}),this[a].apply(this,h),f}}function jr(n,i){const{name:t,type:e,direction:r}=i,a="find"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(u,h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return!1;if(arguments.length===1)return d=u,Ci(!0,this,e,d);if(arguments.length===2){u=""+u,d=h;const l=this._nodes.get(u);if(typeof l>"u")throw new C(`Graph.${a}: could not find the "${u}" node in the graph.`);return Gt(!0,this.multi,e==="mixed"?this.type:e,r,l,d)}if(arguments.length===3){u=""+u,h=""+h;const l=this._nodes.get(u);if(!l)throw new C(`Graph.${a}: could not find the "${u}" source node in the graph.`);if(!this._nodes.has(h))throw new C(`Graph.${a}: could not find the "${h}" target node in the graph.`);return Ft(!0,e,this.multi,r,l,h,d)}throw new k(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const o="some"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[o]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((l,f,c,y,w,T,D)=>h(l,f,c,y,w,T,D)),!!this[a].apply(this,u)};const s="every"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((l,f,c,y,w,T,D)=>!h(l,f,c,y,w,T,D)),!this[a].apply(this,u)}}function Vr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o,s){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return Le();if(!arguments.length)return Ur(this,e);if(arguments.length===1){o=""+o;const u=this._nodes.get(o);if(!u)throw new C(`Graph.${a}: could not find the "${o}" node in the graph.`);return $r(e,r,u)}if(arguments.length===2){o=""+o,s=""+s;const u=this._nodes.get(o);if(!u)throw new C(`Graph.${a}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(s))throw new C(`Graph.${a}: could not find the "${s}" target node in the graph.`);return Mr(e,r,u,s)}throw new k(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function qr(n){Gr.forEach(i=>{Hr(n,i),Wr(n,i),jr(n,i),Vr(n,i)})}const Kr=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function ut(){this.A=null,this.B=null}ut.prototype.wrap=function(n){this.A===null?this.A=n:this.B===null&&(this.B=n)};ut.prototype.has=function(n){return this.A!==null&&n in this.A||this.B!==null&&n in this.B};function Oe(n,i,t,e,r){for(const a in e){const o=e[a],s=o.source,u=o.target,h=s===t?u:s;if(i&&i.has(h.key))continue;const d=r(h.key,h.attributes);if(n&&d)return h.key}}function Nt(n,i,t,e,r){if(i!=="mixed"){if(i==="undirected")return Oe(n,null,e,e.undirected,r);if(typeof t=="string")return Oe(n,null,e,e[t],r)}const a=new ut;let o;if(i!=="undirected"){if(t!=="out"){if(o=Oe(n,null,e,e.in,r),n&&o)return o;a.wrap(e.in)}if(t!=="in"){if(o=Oe(n,a,e,e.out,r),n&&o)return o;a.wrap(e.out)}}if(i!=="directed"&&(o=Oe(n,a,e,e.undirected,r),n&&o))return o}function Yr(n,i,t){if(n!=="mixed"){if(n==="undirected")return Object.keys(t.undirected);if(typeof i=="string")return Object.keys(t[i])}const e=[];return Nt(!1,n,i,t,function(r){e.push(r)}),e}function Ue(n,i,t){const e=Object.keys(t),r=e.length;let a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=r)return n&&n.wrap(t),{done:!0};const s=t[e[a++]],u=s.source,h=s.target;if(o=u===i?h:u,n&&n.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function Zr(n,i,t){if(n!=="mixed"){if(n==="undirected")return Ue(null,t,t.undirected);if(typeof i=="string")return Ue(null,t,t[i])}let e=Le();const r=new ut;return n!=="undirected"&&(i!=="out"&&(e=me(e,Ue(r,t,t.in))),i!=="in"&&(e=me(e,Ue(r,t,t.out)))),n!=="directed"&&(e=me(e,Ue(r,t,t.undirected))),e}function Xr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];a=""+a;const o=this._nodes.get(a);if(typeof o>"u")throw new C(`Graph.${t}: could not find the "${a}" node in the graph.`);return Yr(e==="mixed"?this.type:e,r,o)}}function Jr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const l=this._nodes.get(h);if(typeof l>"u")throw new C(`Graph.${a}: could not find the "${h}" node in the graph.`);Nt(!1,e==="mixed"?this.type:e,r,l,d)};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(h,d){const l=[];return this[a](h,(f,c)=>{l.push(d(f,c))}),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(h,d){const l=[];return this[a](h,(f,c)=>{d(f,c)&&l.push(f)}),l};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(h,d,l){if(arguments.length<3)throw new k(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let f=l;return this[a](h,(c,y)=>{f=d(f,c,y)}),f}}function Qr(n,i){const{name:t,type:e,direction:r}=i,a=t[0].toUpperCase()+t.slice(1,-1),o="find"+a;n.prototype[o]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const l=this._nodes.get(h);if(typeof l>"u")throw new C(`Graph.${o}: could not find the "${h}" node in the graph.`);return Nt(!0,e==="mixed"?this.type:e,r,l,d)};const s="some"+a;n.prototype[s]=function(h,d){return!!this[o](h,d)};const u="every"+a;n.prototype[u]=function(h,d){return!this[o](h,(f,c)=>!d(f,c))}}function en(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return Le();o=""+o;const s=this._nodes.get(o);if(typeof s>"u")throw new C(`Graph.${a}: could not find the "${o}" node in the graph.`);return Zr(e==="mixed"?this.type:e,r,s)}}function tn(n){Kr.forEach(i=>{Xr(n,i),Jr(n,i),Qr(n,i),en(n,i)})}function tt(n,i,t,e,r){const a=e._nodes.values(),o=e.type;let s,u,h,d,l,f;for(;s=a.next(),s.done!==!0;){let c=!1;if(u=s.value,o!=="undirected"){d=u.out;for(h in d){l=d[h];do f=l.target,c=!0,r(u.key,f.key,u.attributes,f.attributes,l.key,l.attributes,l.undirected),l=l.next;while(l)}}if(o!=="directed"){d=u.undirected;for(h in d)if(!(i&&u.key>h)){l=d[h];do f=l.target,f.key!==h&&(f=l.source),c=!0,r(u.key,f.key,u.attributes,f.attributes,l.key,l.attributes,l.undirected),l=l.next;while(l)}}t&&!c&&r(u.key,null,u.attributes,null,null,null,null)}}function rn(n,i){const t={key:n};return Ei(i.attributes)||(t.attributes=Z({},i.attributes)),t}function nn(n,i,t){const e={key:i,source:t.source.key,target:t.target.key};return Ei(t.attributes)||(e.attributes=Z({},t.attributes)),n==="mixed"&&t.undirected&&(e.undirected=!0),e}function an(n){if(!J(n))throw new k('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in n))throw new k("Graph.import: serialized node is missing its key.");if("attributes"in n&&(!J(n.attributes)||n.attributes===null))throw new k("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function on(n){if(!J(n))throw new k('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in n))throw new k("Graph.import: serialized edge is missing its source.");if(!("target"in n))throw new k("Graph.import: serialized edge is missing its target.");if("attributes"in n&&(!J(n.attributes)||n.attributes===null))throw new k("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in n&&typeof n.undirected!="boolean")throw new k("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const sn=ur(),un=new Set(["directed","undirected","mixed"]),Bt=new Set(["domain","_events","_eventsCount","_maxListeners"]),hn=[{name:n=>`${n}Edge`,generateKey:!0},{name:n=>`${n}DirectedEdge`,generateKey:!0,type:"directed"},{name:n=>`${n}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:n=>`${n}EdgeWithKey`},{name:n=>`${n}DirectedEdgeWithKey`,type:"directed"},{name:n=>`${n}UndirectedEdgeWithKey`,type:"undirected"}],dn={allowSelfLoops:!0,multi:!1,type:"mixed"};function ln(n,i,t){if(t&&!J(t))throw new k(`Graph.addNode: invalid attributes. Expecting an object but got "${t}"`);if(i=""+i,t=t||{},n._nodes.has(i))throw new I(`Graph.addNode: the "${i}" node already exist in the graph.`);const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function Mt(n,i,t){const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function ki(n,i,t,e,r,a,o,s){if(!e&&n.type==="undirected")throw new I(`Graph.${i}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new I(`Graph.${i}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!J(s))throw new k(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`);if(a=""+a,o=""+o,s=s||{},!n.allowSelfLoops&&a===o)throw new I(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const u=n._nodes.get(a),h=n._nodes.get(o);if(!u)throw new C(`Graph.${i}: source node "${a}" not found.`);if(!h)throw new C(`Graph.${i}: target node "${o}" not found.`);const d={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new I(`Graph.${i}: the "${r}" edge already exists in the graph.`);if(!n.multi&&(e?typeof u.undirected[o]<"u":typeof u.out[o]<"u"))throw new I(`Graph.${i}: an edge linking "${a}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const l=new Ge(e,r,u,h,s);n._edges.set(r,l);const f=a===o;return e?(u.undirectedDegree++,h.undirectedDegree++,f&&(u.undirectedLoops++,n._undirectedSelfLoopCount++)):(u.outDegree++,h.inDegree++,f&&(u.directedLoops++,n._directedSelfLoopCount++)),n.multi?l.attachMulti():l.attach(),e?n._undirectedSize++:n._directedSize++,d.key=r,n.emit("edgeAdded",d),r}function cn(n,i,t,e,r,a,o,s,u){if(!e&&n.type==="undirected")throw new I(`Graph.${i}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new I(`Graph.${i}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s){if(u){if(typeof s!="function")throw new k(`Graph.${i}: invalid updater function. Expecting a function but got "${s}"`)}else if(!J(s))throw new k(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`)}a=""+a,o=""+o;let h;if(u&&(h=s,s=void 0),!n.allowSelfLoops&&a===o)throw new I(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let d=n._nodes.get(a),l=n._nodes.get(o),f,c;if(!t&&(f=n._edges.get(r),f)){if((f.source.key!==a||f.target.key!==o)&&(!e||f.source.key!==o||f.target.key!==a))throw new I(`Graph.${i}: inconsistency detected when attempting to merge the "${r}" edge with "${a}" source & "${o}" target vs. ("${f.source.key}", "${f.target.key}").`);c=f}if(!c&&!n.multi&&d&&(c=e?d.undirected[o]:d.out[o]),c){const m=[c.key,!1,!1,!1];if(u?!h:!s)return m;if(u){const S=c.attributes;c.attributes=h(S),n.emit("edgeAttributesUpdated",{type:"replace",key:c.key,attributes:c.attributes})}else Z(c.attributes,s),n.emit("edgeAttributesUpdated",{type:"merge",key:c.key,attributes:c.attributes,data:s});return m}s=s||{},u&&h&&(s=h(s));const y={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new I(`Graph.${i}: the "${r}" edge already exists in the graph.`);let w=!1,T=!1;d||(d=Mt(n,a,{}),w=!0,a===o&&(l=d,T=!0)),l||(l=Mt(n,o,{}),T=!0),f=new Ge(e,r,d,l,s),n._edges.set(r,f);const D=a===o;return e?(d.undirectedDegree++,l.undirectedDegree++,D&&(d.undirectedLoops++,n._undirectedSelfLoopCount++)):(d.outDegree++,l.inDegree++,D&&(d.directedLoops++,n._directedSelfLoopCount++)),n.multi?f.attachMulti():f.attach(),e?n._undirectedSize++:n._directedSize++,y.key=r,n.emit("edgeAdded",y),[r,!0,w,T]}function xe(n,i){n._edges.delete(i.key);const{source:t,target:e,attributes:r}=i,a=i.undirected,o=t===e;a?(t.undirectedDegree--,e.undirectedDegree--,o&&(t.undirectedLoops--,n._undirectedSelfLoopCount--)):(t.outDegree--,e.inDegree--,o&&(t.directedLoops--,n._directedSelfLoopCount--)),n.multi?i.detachMulti():i.detach(),a?n._undirectedSize--:n._directedSize--,n.emit("edgeDropped",{key:i.key,attributes:r,source:t.key,target:e.key,undirected:a})}class j extends wi.EventEmitter{constructor(i){if(super(),i=Z({},dn,i),typeof i.multi!="boolean")throw new k(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${i.multi}".`);if(!un.has(i.type))throw new k(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${i.type}".`);if(typeof i.allowSelfLoops!="boolean")throw new k(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${i.allowSelfLoops}".`);const t=i.type==="mixed"?_i:i.type==="directed"?Ti:Si;ae(this,"NodeDataClass",t);const e="geid_"+sn()+"_";let r=0;const a=()=>{let o;do o=e+r++;while(this._edges.has(o));return o};ae(this,"_attributes",{}),ae(this,"_nodes",new Map),ae(this,"_edges",new Map),ae(this,"_directedSize",0),ae(this,"_undirectedSize",0),ae(this,"_directedSelfLoopCount",0),ae(this,"_undirectedSelfLoopCount",0),ae(this,"_edgeKeyGenerator",a),ae(this,"_options",i),Bt.forEach(o=>ae(this,o,this[o])),he(this,"order",()=>this._nodes.size),he(this,"size",()=>this._edges.size),he(this,"directedSize",()=>this._directedSize),he(this,"undirectedSize",()=>this._undirectedSize),he(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),he(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),he(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),he(this,"multi",this._options.multi),he(this,"type",this._options.type),he(this,"allowSelfLoops",this._options.allowSelfLoops),he(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(i){return this._nodes.has(""+i)}hasDirectedEdge(i,t){if(this.type==="undirected")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&!r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.out.hasOwnProperty(t):!1}throw new k(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(i,t){if(this.type==="directed")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.undirected.hasOwnProperty(t):!1}throw new k(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(i,t){if(arguments.length===1){const e=""+i;return this._edges.has(e)}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?typeof e.out<"u"&&e.out.hasOwnProperty(t)||typeof e.undirected<"u"&&e.undirected.hasOwnProperty(t):!1}throw new k(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(i,t){if(this.type==="undirected")return;if(i=""+i,t=""+t,this.multi)throw new I("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const e=this._nodes.get(i);if(!e)throw new C(`Graph.directedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new C(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||void 0;if(r)return r.key}undirectedEdge(i,t){if(this.type==="directed")return;if(i=""+i,t=""+t,this.multi)throw new I("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const e=this._nodes.get(i);if(!e)throw new C(`Graph.undirectedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new C(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const r=e.undirected&&e.undirected[t]||void 0;if(r)return r.key}edge(i,t){if(this.multi)throw new I("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.edge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new C(`Graph.edge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||e.undirected&&e.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areDirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in||t in e.out}areOutNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areOutNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.out}areInNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areInNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in}areUndirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areUndirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="directed"?!1:t in e.undirected}areNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&(t in e.in||t in e.out)||this.type!=="directed"&&t in e.undirected}areInboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areInboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.in||this.type!=="directed"&&t in e.undirected}areOutboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areOutboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.out||this.type!=="directed"&&t in e.undirected}inDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.inDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree}outDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.outDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree}directedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.directedDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree}undirectedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.undirectedDegree: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree}inboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.inboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree),e}outboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.outboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.outDegree),e}degree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.degree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree),e}inDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.inDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.outDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.directedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree,r+=t.directedLoops),e-r}outboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.outDegree,r+=t.directedLoops),e-r}degreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.degreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree,r+=t.directedLoops*2),e-r}source(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.source: could not find the "${i}" edge in the graph.`);return t.source.key}target(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.target: could not find the "${i}" edge in the graph.`);return t.target.key}extremities(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.extremities: could not find the "${i}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(i,t){i=""+i,t=""+t;const e=this._edges.get(t);if(!e)throw new C(`Graph.opposite: could not find the "${t}" edge in the graph.`);const r=e.source.key,a=e.target.key;if(i===r)return a;if(i===a)return r;throw new C(`Graph.opposite: the "${i}" node is not attached to the "${t}" edge (${r}, ${a}).`)}hasExtremity(i,t){i=""+i,t=""+t;const e=this._edges.get(i);if(!e)throw new C(`Graph.hasExtremity: could not find the "${i}" edge in the graph.`);return e.source.key===t||e.target.key===t}isUndirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.isUndirected: could not find the "${i}" edge in the graph.`);return t.undirected}isDirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.isDirected: could not find the "${i}" edge in the graph.`);return!t.undirected}isSelfLoop(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.isSelfLoop: could not find the "${i}" edge in the graph.`);return t.source===t.target}addNode(i,t){return ln(this,i,t).key}mergeNode(i,t){if(t&&!J(t))throw new k(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);i=""+i,t=t||{};let e=this._nodes.get(i);return e?(t&&(Z(e.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:i,attributes:e.attributes,data:t})),[i,!1]):(e=new this.NodeDataClass(i,t),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:t}),[i,!0])}updateNode(i,t){if(t&&typeof t!="function")throw new k(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);i=""+i;let e=this._nodes.get(i);if(e){if(t){const a=e.attributes;e.attributes=t(a),this.emit("nodeAttributesUpdated",{type:"replace",key:i,attributes:e.attributes})}return[i,!1]}const r=t?t({}):{};return e=new this.NodeDataClass(i,r),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:r}),[i,!0]}dropNode(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.dropNode: could not find the "${i}" node in the graph.`);let e;if(this.type!=="undirected"){for(const r in t.out){e=t.out[r];do xe(this,e),e=e.next;while(e)}for(const r in t.in){e=t.in[r];do xe(this,e),e=e.next;while(e)}}if(this.type!=="directed")for(const r in t.undirected){e=t.undirected[r];do xe(this,e),e=e.next;while(e)}this._nodes.delete(i),this.emit("nodeDropped",{key:i,attributes:t.attributes})}dropEdge(i){let t;if(arguments.length>1){const e=""+arguments[0],r=""+arguments[1];if(t=oe(this,e,r,this.type),!t)throw new C(`Graph.dropEdge: could not find the "${e}" -> "${r}" edge in the graph.`)}else if(i=""+i,t=this._edges.get(i),!t)throw new C(`Graph.dropEdge: could not find the "${i}" edge in the graph.`);return xe(this,t),this}dropDirectedEdge(i,t){if(arguments.length<2)throw new I("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new I("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");i=""+i,t=""+t;const e=oe(this,i,t,"directed");if(!e)throw new C(`Graph.dropDirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return xe(this,e),this}dropUndirectedEdge(i,t){if(arguments.length<2)throw new I("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new I("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const e=oe(this,i,t,"undirected");if(!e)throw new C(`Graph.dropUndirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return xe(this,e),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const i=this._nodes.values();let t;for(;t=i.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(i){return this._attributes[i]}getAttributes(){return this._attributes}hasAttribute(i){return this._attributes.hasOwnProperty(i)}setAttribute(i,t){return this._attributes[i]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}updateAttribute(i,t){if(typeof t!="function")throw new k("Graph.updateAttribute: updater should be a function.");const e=this._attributes[i];return this._attributes[i]=t(e),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}removeAttribute(i){return delete this._attributes[i],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:i}),this}replaceAttributes(i){if(!J(i))throw new k("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=i,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(i){if(!J(i))throw new k("Graph.mergeAttributes: provided attributes are not a plain object.");return Z(this._attributes,i),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:i}),this}updateAttributes(i){if(typeof i!="function")throw new k("Graph.updateAttributes: provided updater is not a function.");return this._attributes=i(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(i,t){if(typeof i!="function")throw new k("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!$t(t))throw new k("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._nodes.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,a.attributes=i(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(i,t){if(typeof i!="function")throw new k("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!$t(t))throw new k("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._edges.values();let r,a,o,s;for(;r=e.next(),r.done!==!0;)a=r.value,o=a.source,s=a.target,a.attributes=i(a.key,a.attributes,o.key,s.key,o.attributes,s.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(i){if(typeof i!="function")throw new k("Graph.forEachAdjacencyEntry: expecting a callback.");tt(!1,!1,!1,this,i)}forEachAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new k("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");tt(!1,!1,!0,this,i)}forEachAssymetricAdjacencyEntry(i){if(typeof i!="function")throw new k("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");tt(!1,!0,!1,this,i)}forEachAssymetricAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new k("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");tt(!1,!0,!0,this,i)}nodes(){return Array.from(this._nodes.keys())}forEachNode(i){if(typeof i!="function")throw new k("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)}findNode(i){if(typeof i!="function")throw new k("Graph.findNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return r.key}mapNodes(i){if(typeof i!="function")throw new k("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let e,r;const a=new Array(this.order);let o=0;for(;e=t.next(),e.done!==!0;)r=e.value,a[o++]=i(r.key,r.attributes);return a}someNode(i){if(typeof i!="function")throw new k("Graph.someNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return!0;return!1}everyNode(i){if(typeof i!="function")throw new k("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,!i(r.key,r.attributes))return!1;return!0}filterNodes(i){if(typeof i!="function")throw new k("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let e,r;const a=[];for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)&&a.push(r.key);return a}reduceNodes(i,t){if(typeof i!="function")throw new k("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new k("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let e=t;const r=this._nodes.values();let a,o;for(;a=r.next(),a.done!==!0;)o=a.value,e=i(e,o.key,o.attributes);return e}nodeEntries(){const i=this._nodes.values();return{[Symbol.iterator](){return this},next(){const t=i.next();if(t.done)return t;const e=t.value;return{value:{node:e.key,attributes:e.attributes},done:!1}}}}export(){const i=new Array(this._nodes.size);let t=0;this._nodes.forEach((r,a)=>{i[t++]=rn(a,r)});const e=new Array(this._edges.size);return t=0,this._edges.forEach((r,a)=>{e[t++]=nn(this.type,a,r)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:i,edges:e}}import(i,t=!1){if(i instanceof j)return i.forEachNode((u,h)=>{t?this.mergeNode(u,h):this.addNode(u,h)}),i.forEachEdge((u,h,d,l,f,c,y)=>{t?y?this.mergeUndirectedEdgeWithKey(u,d,l,h):this.mergeDirectedEdgeWithKey(u,d,l,h):y?this.addUndirectedEdgeWithKey(u,d,l,h):this.addDirectedEdgeWithKey(u,d,l,h)}),this;if(!J(i))throw new k("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(i.attributes){if(!J(i.attributes))throw new k("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(i.attributes):this.replaceAttributes(i.attributes)}let e,r,a,o,s;if(i.nodes){if(a=i.nodes,!Array.isArray(a))throw new k("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=a.length;e{const a=Z({},e.attributes);e=new t.NodeDataClass(r,a),t._nodes.set(r,e)}),t}copy(i){if(i=i||{},typeof i.type=="string"&&i.type!==this.type&&i.type!=="mixed")throw new I(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${i.type}" because this would mean losing information about the current graph.`);if(typeof i.multi=="boolean"&&i.multi!==this.multi&&i.multi!==!0)throw new I("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof i.allowSelfLoops=="boolean"&&i.allowSelfLoops!==this.allowSelfLoops&&i.allowSelfLoops!==!0)throw new I("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(i),e=this._edges.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,ki(t,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,Z({},a.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const i={};this._nodes.forEach((a,o)=>{i[o]=a.attributes});const t={},e={};this._edges.forEach((a,o)=>{const s=a.undirected?"--":"->";let u="",h=a.source.key,d=a.target.key,l;a.undirected&&h>d&&(l=h,h=d,d=l);const f=`(${h})${s}(${d})`;o.startsWith("geid_")?this.multi&&(typeof e[f]>"u"?e[f]=0:e[f]++,u+=`${e[f]}. `):u+=`[${o}]: `,u+=f,t[u]=a.attributes});const r={};for(const a in this)this.hasOwnProperty(a)&&!Bt.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(r[a]=this[a]);return r.attributes=this._attributes,r.nodes=i,r.edges=t,ae(r,"constructor",this.constructor),r}}typeof Symbol<"u"&&(j.prototype[Symbol.for("nodejs.util.inspect.custom")]=j.prototype.inspect);hn.forEach(n=>{["add","merge","update"].forEach(i=>{const t=n.name(i),e=i==="add"?ki:cn;n.generateKey?j.prototype[t]=function(r,a,o){return e(this,t,!0,(n.type||this.type)==="undirected",null,r,a,o,i==="update")}:j.prototype[t]=function(r,a,o,s){return e(this,t,!1,(n.type||this.type)==="undirected",r,a,o,s,i==="update")}})});wr(j);Lr(j);qr(j);tn(j);class Di extends j{constructor(i){const t=Z({type:"directed"},i);if("multi"in t&&t.multi!==!1)throw new k("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="directed")throw new k('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Li extends j{constructor(i){const t=Z({type:"undirected"},i);if("multi"in t&&t.multi!==!1)throw new k("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="undirected")throw new k('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Gi extends j{constructor(i){const t=Z({multi:!0},i);if("multi"in t&&t.multi!==!0)throw new k("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}}class Fi extends j{constructor(i){const t=Z({type:"directed",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new k("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="directed")throw new k('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Ni extends j{constructor(i){const t=Z({type:"undirected",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new k("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="undirected")throw new k('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function Fe(n){n.from=function(i,t){const e=Z({},i.options,t),r=new n(e);return r.import(i),r}}Fe(j);Fe(Di);Fe(Li);Fe(Gi);Fe(Fi);Fe(Ni);j.Graph=j;j.DirectedGraph=Di;j.UndirectedGraph=Li;j.MultiGraph=Gi;j.MultiDirectedGraph=Fi;j.MultiUndirectedGraph=Ni;j.InvalidArgumentsGraphError=k;j.NotFoundGraphError=C;j.UsageGraphError=I;var ft,Ht;function Pi(){return Ht||(Ht=1,ft=function(i){return i!==null&&typeof i=="object"&&typeof i.addUndirectedEdgeWithKey=="function"&&typeof i.dropNode=="function"&&typeof i.multi=="boolean"}),ft}var ze={},Wt;function fn(){if(Wt)return ze;Wt=1;function n(e){return typeof e!="number"||isNaN(e)?1:e}function i(e,r){var a={},o=function(h){return typeof h>"u"?r:h};typeof r=="function"&&(o=r);var s=function(h){return o(h[e])},u=function(){return o(void 0)};return typeof e=="string"?(a.fromAttributes=s,a.fromGraph=function(h,d){return s(h.getNodeAttributes(d))},a.fromEntry=function(h,d){return s(d)}):typeof e=="function"?(a.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},a.fromGraph=function(h,d){return o(e(d,h.getNodeAttributes(d)))},a.fromEntry=function(h,d){return o(e(h,d))}):(a.fromAttributes=u,a.fromGraph=u,a.fromEntry=u),a}function t(e,r){var a={},o=function(h){return typeof h>"u"?r:h};typeof r=="function"&&(o=r);var s=function(h){return o(h[e])},u=function(){return o(void 0)};return typeof e=="string"?(a.fromAttributes=s,a.fromGraph=function(h,d){return s(h.getEdgeAttributes(d))},a.fromEntry=function(h,d){return s(d)},a.fromPartialEntry=a.fromEntry,a.fromMinimalEntry=a.fromEntry):typeof e=="function"?(a.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},a.fromGraph=function(h,d){var l=h.extremities(d);return o(e(d,h.getEdgeAttributes(d),l[0],l[1],h.getNodeAttributes(l[0]),h.getNodeAttributes(l[1]),h.isUndirected(d)))},a.fromEntry=function(h,d,l,f,c,y,w){return o(e(h,d,l,f,c,y,w))},a.fromPartialEntry=function(h,d,l,f){return o(e(h,d,l,f))},a.fromMinimalEntry=function(h,d){return o(e(h,d))}):(a.fromAttributes=u,a.fromGraph=u,a.fromEntry=u,a.fromMinimalEntry=u),a}return ze.createNodeValueGetter=i,ze.createEdgeValueGetter=t,ze.createEdgeWeightGetter=function(e){return t(e,n)},ze}var gt,jt;function gn(){if(jt)return gt;jt=1;var n=0,i=1,t=2,e=3,r=4,a=5,o=6,s=7,u=8,h=9,d=0,l=1,f=2,c=0,y=1,w=2,T=3,D=4,m=5,S=6,p=7,b=8,R=3,A=10,G=3,F=9,P=10;return gt=function(z,g,K){var te,x,v,$,W,X,ie,Y,N,Ne,re=g.length,tr=K.length,Pe=z.adjustSizes,ir=z.barnesHutTheta*z.barnesHutTheta,qe,q,B,M,fe,U,O,E=[];for(v=0;vYe?(Ee-=(Ke-Ye)/2,Re=Ee+Ke):(we-=(Ye-Ke)/2,Se=we+Ye),E[0+c]=-1,E[0+y]=(we+Se)/2,E[0+w]=(Ee+Re)/2,E[0+T]=Math.max(Se-we,Re-Ee),E[0+D]=-1,E[0+m]=-1,E[0+S]=0,E[0+p]=0,E[0+b]=0,te=1,v=0;v=0){g[v+n]=0)if(U=Math.pow(g[v+n]-E[x+p],2)+Math.pow(g[v+i]-E[x+b],2),Ne=E[x+T],4*Ne*Ne/U0?(O=q*g[v+o]*E[x+S]/U,g[v+t]+=B*O,g[v+e]+=M*O):U<0&&(O=-q*g[v+o]*E[x+S]/Math.sqrt(U),g[v+t]+=B*O,g[v+e]+=M*O):U>0&&(O=q*g[v+o]*E[x+S]/U,g[v+t]+=B*O,g[v+e]+=M*O),x=E[x+D],x<0)break;continue}else{x=E[x+m];continue}else{if(X=E[x+c],X>=0&&X!==v&&(B=g[v+n]-g[X+n],M=g[v+i]-g[X+i],U=B*B+M*M,Pe===!0?U>0?(O=q*g[v+o]*g[X+o]/U,g[v+t]+=B*O,g[v+e]+=M*O):U<0&&(O=-q*g[v+o]*g[X+o]/Math.sqrt(U),g[v+t]+=B*O,g[v+e]+=M*O):U>0&&(O=q*g[v+o]*g[X+o]/U,g[v+t]+=B*O,g[v+e]+=M*O)),x=E[x+D],x<0)break;continue}else for(q=z.scalingRatio,$=0;$0?(O=q*g[$+o]*g[W+o]/U/U,g[$+t]+=B*O,g[$+e]+=M*O,g[W+t]-=B*O,g[W+e]-=M*O):U<0&&(O=100*q*g[$+o]*g[W+o],g[$+t]+=B*O,g[$+e]+=M*O,g[W+t]-=B*O,g[W+e]-=M*O)):(U=Math.sqrt(B*B+M*M),U>0&&(O=q*g[$+o]*g[W+o]/U/U,g[$+t]+=B*O,g[$+e]+=M*O,g[W+t]-=B*O,g[W+e]-=M*O));for(N=z.gravity/z.scalingRatio,q=z.scalingRatio,v=0;v0&&(O=q*g[v+o]*N):U>0&&(O=q*g[v+o]*N/U),g[v+t]-=B*O,g[v+e]-=M*O;for(q=1*(z.outboundAttractionDistribution?qe:1),ie=0;ie0&&(O=-q*fe*Math.log(1+U)/U/g[$+o]):U>0&&(O=-q*fe*Math.log(1+U)/U):z.outboundAttractionDistribution?U>0&&(O=-q*fe/g[$+o]):U>0&&(O=-q*fe)):(U=Math.sqrt(Math.pow(B,2)+Math.pow(M,2)),z.linLogMode?z.outboundAttractionDistribution?U>0&&(O=-q*fe*Math.log(1+U)/U/g[$+o]):U>0&&(O=-q*fe*Math.log(1+U)/U):z.outboundAttractionDistribution?(U=1,O=-q*fe/g[$+o]):(U=1,O=-q*fe)),U>0&&(g[$+t]+=B*O,g[$+e]+=M*O,g[W+t]-=B*O,g[W+e]-=M*O);var Ze,Ie,Xe,_e,Je,Qe;if(Pe===!0)for(v=0;vP&&(g[v+t]=g[v+t]*P/Ze,g[v+e]=g[v+e]*P/Ze),Ie=g[v+o]*Math.sqrt((g[v+r]-g[v+t])*(g[v+r]-g[v+t])+(g[v+a]-g[v+e])*(g[v+a]-g[v+e])),Xe=Math.sqrt((g[v+r]+g[v+t])*(g[v+r]+g[v+t])+(g[v+a]+g[v+e])*(g[v+a]+g[v+e]))/2,_e=.1*Math.log(1+Xe)/(1+Math.sqrt(Ie)),Je=g[v+n]+g[v+t]*(_e/z.slowDown),g[v+n]=Je,Qe=g[v+i]+g[v+e]*(_e/z.slowDown),g[v+i]=Qe);else for(v=0;v=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in t&&typeof t.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in t&&!(typeof t.gravity=="number"&&t.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in t&&!(typeof t.slowDown=="number"||t.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in t&&typeof t.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in t&&!(typeof t.barnesHutTheta=="number"&&t.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},ge.graphToByteArrays=function(t,e){var r=t.order,a=t.size,o={},s,u=new Float32Array(r*n),h=new Float32Array(a*i);return s=0,t.forEachNode(function(d,l){o[d]=s,u[s]=l.x,u[s+1]=l.y,u[s+2]=0,u[s+3]=0,u[s+4]=0,u[s+5]=0,u[s+6]=1,u[s+7]=1,u[s+8]=l.size||1,u[s+9]=l.fixed?1:0,s+=n}),s=0,t.forEachEdge(function(d,l,f,c,y,w,T){var D=o[f],m=o[c],S=e(d,l,f,c,y,w,T);u[D+6]+=S,u[m+6]+=S,h[s]=D,h[s+1]=m,h[s+2]=S,s+=i}),{nodes:u,edges:h}},ge.assignLayoutChanges=function(t,e,r){var a=0;t.updateEachNodeAttributes(function(o,s){return s.x=e[a],s.y=e[a+1],a+=n,r?r(o,s):s})},ge.readGraphPositions=function(t,e){var r=0;t.forEachNode(function(a,o){e[r]=o.x,e[r+1]=o.y,r+=n})},ge.collectLayoutChanges=function(t,e,r){for(var a=t.nodes(),o={},s=0,u=0,h=e.length;s2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(h)}}var s=a.bind(null,!1);return s.assign=a.bind(null,!0),s.inferSettings=o,vt=s,vt}var yn=mn();const it=bi(yn);function bn(n,i){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var e=t.call(n,i);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function je(n){var i=bn(n,"string");return typeof i=="symbol"?i:i+""}function Q(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function Yt(n,i){for(var t=0;tn.length)&&(i=n.length);for(var t=0,e=Array(i);t0&&(P=R[0]),P instanceof Error)throw P;var V=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw V.context=P,V}var z=F[b];if(z===void 0)return!1;if(typeof z=="function")i(z,this,R);else for(var g=z.length,K=y(z,g),A=0;A0&&P.length>G&&!P.warned){P.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");V.name="MaxListenersExceededWarning",V.emitter=p,V.type=b,V.count=P.length,e(V)}return p}a.prototype.addListener=function(b,R){return h(this,b,R,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(b,R){return h(this,b,R,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(p,b,R){var A={fired:!1,wrapFn:void 0,target:p,type:b,listener:R},G=d.bind(A);return G.listener=R,A.wrapFn=G,G}a.prototype.once=function(b,R){return s(R),this.on(b,l(this,b,R)),this},a.prototype.prependOnceListener=function(b,R){return s(R),this.prependListener(b,l(this,b,R)),this},a.prototype.removeListener=function(b,R){var A,G,F,P,V;if(s(R),G=this._events,G===void 0)return this;if(A=G[b],A===void 0)return this;if(A===R||A.listener===R)--this._eventsCount===0?this._events=Object.create(null):(delete G[b],G.removeListener&&this.emit("removeListener",b,A.listener||R));else if(typeof A!="function"){for(F=-1,P=A.length-1;P>=0;P--)if(A[P]===R||A[P].listener===R){V=A[P].listener,F=P;break}if(F<0)return this;F===0?A.shift():w(A,F),A.length===1&&(G[b]=A[0]),G.removeListener!==void 0&&this.emit("removeListener",b,V||R)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(b){var R,A,G;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[b]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[b]),this;if(arguments.length===0){var F=Object.keys(A),P;for(G=0;G=0;G--)this.removeListener(b,R[G]);return this};function f(p,b,R){var A=p._events;if(A===void 0)return[];var G=A[b];return G===void 0?[]:typeof G=="function"?R?[G.listener||G]:[G]:R?T(G):y(G,G.length)}a.prototype.listeners=function(b){return f(this,b,!0)},a.prototype.rawListeners=function(b){return f(this,b,!1)},a.listenerCount=function(p,b){return typeof p.listenerCount=="function"?p.listenerCount(b):c.call(p,b)},a.prototype.listenerCount=c;function c(p){var b=this._events;if(b!==void 0){var R=b[p];if(typeof R=="function")return 1;if(R!==void 0)return R.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function y(p,b){for(var R=new Array(b),A=0;An++}function me(){const n=arguments;let i=null,t=-1;return{[Symbol.iterator](){return this},next(){let e=null;do{if(i===null){if(t++,t>=n.length)return{done:!0};i=n[t][Symbol.iterator]()}if(e=i.next(),e.done){i=null;continue}break}while(!0);return e}}}function Le(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class Lt extends Error{constructor(i){super(),this.name="GraphError",this.message=i}}class k extends Lt{constructor(i){super(i),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,k.prototype.constructor)}}class C extends Lt{constructor(i){super(i),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,C.prototype.constructor)}}class I extends Lt{constructor(i){super(i),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,I.prototype.constructor)}}function _i(n,i){this.key=n,this.attributes=i,this.clear()}_i.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function Ti(n,i){this.key=n,this.attributes=i,this.clear()}Ti.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function Si(n,i){this.key=n,this.attributes=i,this.clear()}Si.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function Ge(n,i,t,e,r){this.key=i,this.attributes=r,this.undirected=n,this.source=t,this.target=e}Ge.prototype.attach=function(){let n="out",i="in";this.undirected&&(n=i="undirected");const t=this.source.key,e=this.target.key;this.source[n][e]=this,!(this.undirected&&t===e)&&(this.target[i][t]=this)};Ge.prototype.attachMulti=function(){let n="out",i="in";const t=this.source.key,e=this.target.key;this.undirected&&(n=i="undirected");const r=this.source[n],a=r[e];if(typeof a>"u"){r[e]=this,this.undirected&&t===e||(this.target[i][t]=this);return}a.previous=this,this.next=a,r[e]=this,this.target[i][t]=this};Ge.prototype.detach=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),delete this.source[t][i],delete this.target[e][n]};Ge.prototype.detachMulti=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[t][i],delete this.target[e][n]):(this.next.previous=void 0,this.source[t][i]=this.next,this.target[e][n]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const Ri=0,Ai=1,hr=2,xi=3;function ye(n,i,t,e,r,a,o){let s,u,h,d;if(e=""+e,t===Ri){if(s=n._nodes.get(e),!s)throw new C(`Graph.${i}: could not find the "${e}" node in the graph.`);h=r,d=a}else if(t===xi){if(r=""+r,u=n._edges.get(r),!u)throw new C(`Graph.${i}: could not find the "${r}" edge in the graph.`);const l=u.source.key,f=u.target.key;if(e===l)s=u.target;else if(e===f)s=u.source;else throw new C(`Graph.${i}: the "${e}" node is not attached to the "${r}" edge (${l}, ${f}).`);h=a,d=o}else{if(u=n._edges.get(e),!u)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`);t===Ai?s=u.source:s=u.target,h=r,d=a}return[s,h,d]}function dr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);return o.attributes[s]}}function lr(n,i,t){n.prototype[i]=function(e,r){const[a]=ye(this,i,t,e,r);return a.attributes}}function cr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);return o.attributes.hasOwnProperty(s)}}function fr(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ye(this,i,t,e,r,a,o);return s.attributes[u]=h,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function gr(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ye(this,i,t,e,r,a,o);if(typeof h!="function")throw new k(`Graph.${i}: updater should be a function.`);const d=s.attributes,l=h(d[u]);return d[u]=l,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function pr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);return delete o.attributes[s],this.emit("nodeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:s}),this}}function vr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);if(!J(s))throw new k(`Graph.${i}: provided attributes are not a plain object.`);return o.attributes=s,this.emit("nodeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function mr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);if(!J(s))throw new k(`Graph.${i}: provided attributes are not a plain object.`);return Z(o.attributes,s),this.emit("nodeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:s}),this}}function yr(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ye(this,i,t,e,r,a);if(typeof s!="function")throw new k(`Graph.${i}: provided updater is not a function.`);return o.attributes=s(o.attributes),this.emit("nodeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const br=[{name:n=>`get${n}Attribute`,attacher:dr},{name:n=>`get${n}Attributes`,attacher:lr},{name:n=>`has${n}Attribute`,attacher:cr},{name:n=>`set${n}Attribute`,attacher:fr},{name:n=>`update${n}Attribute`,attacher:gr},{name:n=>`remove${n}Attribute`,attacher:pr},{name:n=>`replace${n}Attributes`,attacher:vr},{name:n=>`merge${n}Attributes`,attacher:mr},{name:n=>`update${n}Attributes`,attacher:yr}];function wr(n){br.forEach(function({name:i,attacher:t}){t(n,i("Node"),Ri),t(n,i("Source"),Ai),t(n,i("Target"),hr),t(n,i("Opposite"),xi)})}function Er(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes[r]}}function _r(n,i,t){n.prototype[i]=function(e){let r;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,o=""+arguments[1];if(r=oe(this,a,o,t),!r)throw new C(`Graph.${i}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,r=this._edges.get(e),!r)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return r.attributes}}function Tr(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes.hasOwnProperty(r)}}function Sr(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=oe(this,s,u,t),!o)throw new C(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return o.attributes[r]=a,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function Rr(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=oe(this,s,u,t),!o)throw new C(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof a!="function")throw new k(`Graph.${i}: updater should be a function.`);return o.attributes[r]=a(o.attributes[r]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function Ar(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return delete a.attributes[r],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:r}),this}}function xr(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!J(r))throw new k(`Graph.${i}: provided attributes are not a plain object.`);return a.attributes=r,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function Cr(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!J(r))throw new k(`Graph.${i}: provided attributes are not a plain object.`);return Z(a.attributes,r),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:r}),this}}function kr(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new I(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new I(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=oe(this,o,s,t),!a)throw new C(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new I(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new C(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof r!="function")throw new k(`Graph.${i}: provided updater is not a function.`);return a.attributes=r(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const Dr=[{name:n=>`get${n}Attribute`,attacher:Er},{name:n=>`get${n}Attributes`,attacher:_r},{name:n=>`has${n}Attribute`,attacher:Tr},{name:n=>`set${n}Attribute`,attacher:Sr},{name:n=>`update${n}Attribute`,attacher:Rr},{name:n=>`remove${n}Attribute`,attacher:Ar},{name:n=>`replace${n}Attributes`,attacher:xr},{name:n=>`merge${n}Attributes`,attacher:Cr},{name:n=>`update${n}Attributes`,attacher:kr}];function Lr(n){Dr.forEach(function({name:i,attacher:t}){t(n,i("Edge"),"mixed"),t(n,i("DirectedEdge"),"directed"),t(n,i("UndirectedEdge"),"undirected")})}const Gr=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Fr(n,i,t,e){let r=!1;for(const a in i){if(a===e)continue;const o=i[a];if(r=t(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),n&&r)return o.key}}function Nr(n,i,t,e){let r,a,o,s=!1;for(const u in i)if(u!==e){r=i[u];do{if(a=r.source,o=r.target,s=t(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected),n&&s)return r.key;r=r.next}while(r!==void 0)}}function lt(n,i){const t=Object.keys(n),e=t.length;let r,a=0;return{[Symbol.iterator](){return this},next(){do if(r)r=r.next;else{if(a>=e)return{done:!0};const o=t[a++];if(o===i){r=void 0;continue}r=n[o]}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}}}function Pr(n,i,t,e){const r=i[t];if(!r)return;const a=r.source,o=r.target;if(e(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected)&&n)return r.key}function Ir(n,i,t,e){let r=i[t];if(!r)return;let a=!1;do{if(a=e(r.key,r.attributes,r.source.key,r.target.key,r.source.attributes,r.target.attributes,r.undirected),n&&a)return r.key;r=r.next}while(r!==void 0)}function ct(n,i){let t=n[i];if(t.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!t)return{done:!0};const r={edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected};return t=t.next,{done:!1,value:r}}};let e=!1;return{[Symbol.iterator](){return this},next(){return e===!0?{done:!0}:(e=!0,{done:!1,value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected}})}}}function Or(n,i){if(n.size===0)return[];if(i==="mixed"||i===n.type)return Array.from(n._edges.keys());const t=i==="undirected"?n.undirectedSize:n.directedSize,e=new Array(t),r=i==="undirected",a=n._edges.values();let o=0,s,u;for(;s=a.next(),s.done!==!0;)u=s.value,u.undirected===r&&(e[o++]=u.key);return e}function Ci(n,i,t,e){if(i.size===0)return;const r=t!=="mixed"&&t!==i.type,a=t==="undirected";let o,s,u=!1;const h=i._edges.values();for(;o=h.next(),o.done!==!0;){if(s=o.value,r&&s.undirected!==a)continue;const{key:d,attributes:l,source:f,target:c}=s;if(u=e(d,l,f.key,c.key,f.attributes,c.attributes,s.undirected),n&&u)return d}}function Ur(n,i){if(n.size===0)return Le();const t=i!=="mixed"&&i!==n.type,e=i==="undirected",r=n._edges.values();return{[Symbol.iterator](){return this},next(){let a,o;for(;;){if(a=r.next(),a.done)return a;if(o=a.value,!(t&&o.undirected!==e))break}return{value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected},done:!1}}}}function Gt(n,i,t,e,r,a){const o=i?Nr:Fr;let s;if(t!=="undirected"&&(e!=="out"&&(s=o(n,r.in,a),n&&s)||e!=="in"&&(s=o(n,r.out,a,e?void 0:r.key),n&&s))||t!=="directed"&&(s=o(n,r.undirected,a),n&&s))return s}function zr(n,i,t,e){const r=[];return Gt(!1,n,i,t,e,function(a){r.push(a)}),r}function $r(n,i,t){let e=Le();return n!=="undirected"&&(i!=="out"&&typeof t.in<"u"&&(e=me(e,lt(t.in))),i!=="in"&&typeof t.out<"u"&&(e=me(e,lt(t.out,i?void 0:t.key)))),n!=="directed"&&typeof t.undirected<"u"&&(e=me(e,lt(t.undirected))),e}function Ft(n,i,t,e,r,a,o){const s=t?Ir:Pr;let u;if(i!=="undirected"&&(typeof r.in<"u"&&e!=="out"&&(u=s(n,r.in,a,o),n&&u)||typeof r.out<"u"&&e!=="in"&&(e||r.key!==a)&&(u=s(n,r.out,a,o),n&&u))||i!=="directed"&&typeof r.undirected<"u"&&(u=s(n,r.undirected,a,o),n&&u))return u}function Br(n,i,t,e,r){const a=[];return Ft(!1,n,i,t,e,r,function(o){a.push(o)}),a}function Mr(n,i,t,e){let r=Le();return n!=="undirected"&&(typeof t.in<"u"&&i!=="out"&&e in t.in&&(r=me(r,ct(t.in,e))),typeof t.out<"u"&&i!=="in"&&e in t.out&&(i||t.key!==e)&&(r=me(r,ct(t.out,e)))),n!=="directed"&&typeof t.undirected<"u"&&e in t.undirected&&(r=me(r,ct(t.undirected,e))),r}function Hr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a,o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];if(!arguments.length)return Or(this,e);if(arguments.length===1){a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new C(`Graph.${t}: could not find the "${a}" node in the graph.`);return zr(this.multi,e==="mixed"?this.type:e,r,s)}if(arguments.length===2){a=""+a,o=""+o;const s=this._nodes.get(a);if(!s)throw new C(`Graph.${t}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(o))throw new C(`Graph.${t}: could not find the "${o}" target node in the graph.`);return Br(e,this.multi,r,s,o)}throw new k(`Graph.${t}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function Wr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d,l){if(!(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)){if(arguments.length===1)return l=h,Ci(!1,this,e,l);if(arguments.length===2){h=""+h,l=d;const f=this._nodes.get(h);if(typeof f>"u")throw new C(`Graph.${a}: could not find the "${h}" node in the graph.`);return Gt(!1,this.multi,e==="mixed"?this.type:e,r,f,l)}if(arguments.length===3){h=""+h,d=""+d;const f=this._nodes.get(h);if(!f)throw new C(`Graph.${a}: could not find the "${h}" source node in the graph.`);if(!this._nodes.has(d))throw new C(`Graph.${a}: could not find the "${d}" target node in the graph.`);return Ft(!1,e,this.multi,r,f,d,l)}throw new k(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop();let l;if(h.length===0){let f=0;e!=="directed"&&(f+=this.undirectedSize),e!=="undirected"&&(f+=this.directedSize),l=new Array(f);let c=0;h.push((y,w,T,D,m,S,p)=>{l[c++]=d(y,w,T,D,m,S,p)})}else l=[],h.push((f,c,y,w,T,D,m)=>{l.push(d(f,c,y,w,T,D,m))});return this[a].apply(this,h),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop(),l=[];return h.push((f,c,y,w,T,D,m)=>{d(f,c,y,w,T,D,m)&&l.push(f)}),this[a].apply(this,h),l};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(){let h=Array.prototype.slice.call(arguments);if(h.length<2||h.length>4)throw new k(`Graph.${u}: invalid number of arguments (expecting 2, 3 or 4 and got ${h.length}).`);if(typeof h[h.length-1]=="function"&&typeof h[h.length-2]!="function")throw new k(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let d,l;h.length===2?(d=h[0],l=h[1],h=[]):h.length===3?(d=h[1],l=h[2],h=[h[0]]):h.length===4&&(d=h[2],l=h[3],h=[h[0],h[1]]);let f=l;return h.push((c,y,w,T,D,m,S)=>{f=d(f,c,y,w,T,D,m,S)}),this[a].apply(this,h),f}}function jr(n,i){const{name:t,type:e,direction:r}=i,a="find"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(u,h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return!1;if(arguments.length===1)return d=u,Ci(!0,this,e,d);if(arguments.length===2){u=""+u,d=h;const l=this._nodes.get(u);if(typeof l>"u")throw new C(`Graph.${a}: could not find the "${u}" node in the graph.`);return Gt(!0,this.multi,e==="mixed"?this.type:e,r,l,d)}if(arguments.length===3){u=""+u,h=""+h;const l=this._nodes.get(u);if(!l)throw new C(`Graph.${a}: could not find the "${u}" source node in the graph.`);if(!this._nodes.has(h))throw new C(`Graph.${a}: could not find the "${h}" target node in the graph.`);return Ft(!0,e,this.multi,r,l,h,d)}throw new k(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const o="some"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[o]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((l,f,c,y,w,T,D)=>h(l,f,c,y,w,T,D)),!!this[a].apply(this,u)};const s="every"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((l,f,c,y,w,T,D)=>!h(l,f,c,y,w,T,D)),!this[a].apply(this,u)}}function Vr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o,s){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return Le();if(!arguments.length)return Ur(this,e);if(arguments.length===1){o=""+o;const u=this._nodes.get(o);if(!u)throw new C(`Graph.${a}: could not find the "${o}" node in the graph.`);return $r(e,r,u)}if(arguments.length===2){o=""+o,s=""+s;const u=this._nodes.get(o);if(!u)throw new C(`Graph.${a}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(s))throw new C(`Graph.${a}: could not find the "${s}" target node in the graph.`);return Mr(e,r,u,s)}throw new k(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function qr(n){Gr.forEach(i=>{Hr(n,i),Wr(n,i),jr(n,i),Vr(n,i)})}const Kr=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function ut(){this.A=null,this.B=null}ut.prototype.wrap=function(n){this.A===null?this.A=n:this.B===null&&(this.B=n)};ut.prototype.has=function(n){return this.A!==null&&n in this.A||this.B!==null&&n in this.B};function Oe(n,i,t,e,r){for(const a in e){const o=e[a],s=o.source,u=o.target,h=s===t?u:s;if(i&&i.has(h.key))continue;const d=r(h.key,h.attributes);if(n&&d)return h.key}}function Nt(n,i,t,e,r){if(i!=="mixed"){if(i==="undirected")return Oe(n,null,e,e.undirected,r);if(typeof t=="string")return Oe(n,null,e,e[t],r)}const a=new ut;let o;if(i!=="undirected"){if(t!=="out"){if(o=Oe(n,null,e,e.in,r),n&&o)return o;a.wrap(e.in)}if(t!=="in"){if(o=Oe(n,a,e,e.out,r),n&&o)return o;a.wrap(e.out)}}if(i!=="directed"&&(o=Oe(n,a,e,e.undirected,r),n&&o))return o}function Yr(n,i,t){if(n!=="mixed"){if(n==="undirected")return Object.keys(t.undirected);if(typeof i=="string")return Object.keys(t[i])}const e=[];return Nt(!1,n,i,t,function(r){e.push(r)}),e}function Ue(n,i,t){const e=Object.keys(t),r=e.length;let a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=r)return n&&n.wrap(t),{done:!0};const s=t[e[a++]],u=s.source,h=s.target;if(o=u===i?h:u,n&&n.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function Zr(n,i,t){if(n!=="mixed"){if(n==="undirected")return Ue(null,t,t.undirected);if(typeof i=="string")return Ue(null,t,t[i])}let e=Le();const r=new ut;return n!=="undirected"&&(i!=="out"&&(e=me(e,Ue(r,t,t.in))),i!=="in"&&(e=me(e,Ue(r,t,t.out)))),n!=="directed"&&(e=me(e,Ue(r,t,t.undirected))),e}function Xr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];a=""+a;const o=this._nodes.get(a);if(typeof o>"u")throw new C(`Graph.${t}: could not find the "${a}" node in the graph.`);return Yr(e==="mixed"?this.type:e,r,o)}}function Jr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const l=this._nodes.get(h);if(typeof l>"u")throw new C(`Graph.${a}: could not find the "${h}" node in the graph.`);Nt(!1,e==="mixed"?this.type:e,r,l,d)};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(h,d){const l=[];return this[a](h,(f,c)=>{l.push(d(f,c))}),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(h,d){const l=[];return this[a](h,(f,c)=>{d(f,c)&&l.push(f)}),l};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(h,d,l){if(arguments.length<3)throw new k(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let f=l;return this[a](h,(c,y)=>{f=d(f,c,y)}),f}}function Qr(n,i){const{name:t,type:e,direction:r}=i,a=t[0].toUpperCase()+t.slice(1,-1),o="find"+a;n.prototype[o]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const l=this._nodes.get(h);if(typeof l>"u")throw new C(`Graph.${o}: could not find the "${h}" node in the graph.`);return Nt(!0,e==="mixed"?this.type:e,r,l,d)};const s="some"+a;n.prototype[s]=function(h,d){return!!this[o](h,d)};const u="every"+a;n.prototype[u]=function(h,d){return!this[o](h,(f,c)=>!d(f,c))}}function en(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return Le();o=""+o;const s=this._nodes.get(o);if(typeof s>"u")throw new C(`Graph.${a}: could not find the "${o}" node in the graph.`);return Zr(e==="mixed"?this.type:e,r,s)}}function tn(n){Kr.forEach(i=>{Xr(n,i),Jr(n,i),Qr(n,i),en(n,i)})}function tt(n,i,t,e,r){const a=e._nodes.values(),o=e.type;let s,u,h,d,l,f;for(;s=a.next(),s.done!==!0;){let c=!1;if(u=s.value,o!=="undirected"){d=u.out;for(h in d){l=d[h];do f=l.target,c=!0,r(u.key,f.key,u.attributes,f.attributes,l.key,l.attributes,l.undirected),l=l.next;while(l)}}if(o!=="directed"){d=u.undirected;for(h in d)if(!(i&&u.key>h)){l=d[h];do f=l.target,f.key!==h&&(f=l.source),c=!0,r(u.key,f.key,u.attributes,f.attributes,l.key,l.attributes,l.undirected),l=l.next;while(l)}}t&&!c&&r(u.key,null,u.attributes,null,null,null,null)}}function rn(n,i){const t={key:n};return Ei(i.attributes)||(t.attributes=Z({},i.attributes)),t}function nn(n,i,t){const e={key:i,source:t.source.key,target:t.target.key};return Ei(t.attributes)||(e.attributes=Z({},t.attributes)),n==="mixed"&&t.undirected&&(e.undirected=!0),e}function an(n){if(!J(n))throw new k('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in n))throw new k("Graph.import: serialized node is missing its key.");if("attributes"in n&&(!J(n.attributes)||n.attributes===null))throw new k("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function on(n){if(!J(n))throw new k('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in n))throw new k("Graph.import: serialized edge is missing its source.");if(!("target"in n))throw new k("Graph.import: serialized edge is missing its target.");if("attributes"in n&&(!J(n.attributes)||n.attributes===null))throw new k("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in n&&typeof n.undirected!="boolean")throw new k("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const sn=ur(),un=new Set(["directed","undirected","mixed"]),Bt=new Set(["domain","_events","_eventsCount","_maxListeners"]),hn=[{name:n=>`${n}Edge`,generateKey:!0},{name:n=>`${n}DirectedEdge`,generateKey:!0,type:"directed"},{name:n=>`${n}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:n=>`${n}EdgeWithKey`},{name:n=>`${n}DirectedEdgeWithKey`,type:"directed"},{name:n=>`${n}UndirectedEdgeWithKey`,type:"undirected"}],dn={allowSelfLoops:!0,multi:!1,type:"mixed"};function ln(n,i,t){if(t&&!J(t))throw new k(`Graph.addNode: invalid attributes. Expecting an object but got "${t}"`);if(i=""+i,t=t||{},n._nodes.has(i))throw new I(`Graph.addNode: the "${i}" node already exist in the graph.`);const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function Mt(n,i,t){const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function ki(n,i,t,e,r,a,o,s){if(!e&&n.type==="undirected")throw new I(`Graph.${i}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new I(`Graph.${i}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!J(s))throw new k(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`);if(a=""+a,o=""+o,s=s||{},!n.allowSelfLoops&&a===o)throw new I(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const u=n._nodes.get(a),h=n._nodes.get(o);if(!u)throw new C(`Graph.${i}: source node "${a}" not found.`);if(!h)throw new C(`Graph.${i}: target node "${o}" not found.`);const d={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new I(`Graph.${i}: the "${r}" edge already exists in the graph.`);if(!n.multi&&(e?typeof u.undirected[o]<"u":typeof u.out[o]<"u"))throw new I(`Graph.${i}: an edge linking "${a}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const l=new Ge(e,r,u,h,s);n._edges.set(r,l);const f=a===o;return e?(u.undirectedDegree++,h.undirectedDegree++,f&&(u.undirectedLoops++,n._undirectedSelfLoopCount++)):(u.outDegree++,h.inDegree++,f&&(u.directedLoops++,n._directedSelfLoopCount++)),n.multi?l.attachMulti():l.attach(),e?n._undirectedSize++:n._directedSize++,d.key=r,n.emit("edgeAdded",d),r}function cn(n,i,t,e,r,a,o,s,u){if(!e&&n.type==="undirected")throw new I(`Graph.${i}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new I(`Graph.${i}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s){if(u){if(typeof s!="function")throw new k(`Graph.${i}: invalid updater function. Expecting a function but got "${s}"`)}else if(!J(s))throw new k(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`)}a=""+a,o=""+o;let h;if(u&&(h=s,s=void 0),!n.allowSelfLoops&&a===o)throw new I(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let d=n._nodes.get(a),l=n._nodes.get(o),f,c;if(!t&&(f=n._edges.get(r),f)){if((f.source.key!==a||f.target.key!==o)&&(!e||f.source.key!==o||f.target.key!==a))throw new I(`Graph.${i}: inconsistency detected when attempting to merge the "${r}" edge with "${a}" source & "${o}" target vs. ("${f.source.key}", "${f.target.key}").`);c=f}if(!c&&!n.multi&&d&&(c=e?d.undirected[o]:d.out[o]),c){const m=[c.key,!1,!1,!1];if(u?!h:!s)return m;if(u){const S=c.attributes;c.attributes=h(S),n.emit("edgeAttributesUpdated",{type:"replace",key:c.key,attributes:c.attributes})}else Z(c.attributes,s),n.emit("edgeAttributesUpdated",{type:"merge",key:c.key,attributes:c.attributes,data:s});return m}s=s||{},u&&h&&(s=h(s));const y={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new I(`Graph.${i}: the "${r}" edge already exists in the graph.`);let w=!1,T=!1;d||(d=Mt(n,a,{}),w=!0,a===o&&(l=d,T=!0)),l||(l=Mt(n,o,{}),T=!0),f=new Ge(e,r,d,l,s),n._edges.set(r,f);const D=a===o;return e?(d.undirectedDegree++,l.undirectedDegree++,D&&(d.undirectedLoops++,n._undirectedSelfLoopCount++)):(d.outDegree++,l.inDegree++,D&&(d.directedLoops++,n._directedSelfLoopCount++)),n.multi?f.attachMulti():f.attach(),e?n._undirectedSize++:n._directedSize++,y.key=r,n.emit("edgeAdded",y),[r,!0,w,T]}function xe(n,i){n._edges.delete(i.key);const{source:t,target:e,attributes:r}=i,a=i.undirected,o=t===e;a?(t.undirectedDegree--,e.undirectedDegree--,o&&(t.undirectedLoops--,n._undirectedSelfLoopCount--)):(t.outDegree--,e.inDegree--,o&&(t.directedLoops--,n._directedSelfLoopCount--)),n.multi?i.detachMulti():i.detach(),a?n._undirectedSize--:n._directedSize--,n.emit("edgeDropped",{key:i.key,attributes:r,source:t.key,target:e.key,undirected:a})}class j extends wi.EventEmitter{constructor(i){if(super(),i=Z({},dn,i),typeof i.multi!="boolean")throw new k(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${i.multi}".`);if(!un.has(i.type))throw new k(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${i.type}".`);if(typeof i.allowSelfLoops!="boolean")throw new k(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${i.allowSelfLoops}".`);const t=i.type==="mixed"?_i:i.type==="directed"?Ti:Si;ae(this,"NodeDataClass",t);const e="geid_"+sn()+"_";let r=0;const a=()=>{let o;do o=e+r++;while(this._edges.has(o));return o};ae(this,"_attributes",{}),ae(this,"_nodes",new Map),ae(this,"_edges",new Map),ae(this,"_directedSize",0),ae(this,"_undirectedSize",0),ae(this,"_directedSelfLoopCount",0),ae(this,"_undirectedSelfLoopCount",0),ae(this,"_edgeKeyGenerator",a),ae(this,"_options",i),Bt.forEach(o=>ae(this,o,this[o])),he(this,"order",()=>this._nodes.size),he(this,"size",()=>this._edges.size),he(this,"directedSize",()=>this._directedSize),he(this,"undirectedSize",()=>this._undirectedSize),he(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),he(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),he(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),he(this,"multi",this._options.multi),he(this,"type",this._options.type),he(this,"allowSelfLoops",this._options.allowSelfLoops),he(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(i){return this._nodes.has(""+i)}hasDirectedEdge(i,t){if(this.type==="undirected")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&!r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.out.hasOwnProperty(t):!1}throw new k(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(i,t){if(this.type==="directed")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.undirected.hasOwnProperty(t):!1}throw new k(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(i,t){if(arguments.length===1){const e=""+i;return this._edges.has(e)}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?typeof e.out<"u"&&e.out.hasOwnProperty(t)||typeof e.undirected<"u"&&e.undirected.hasOwnProperty(t):!1}throw new k(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(i,t){if(this.type==="undirected")return;if(i=""+i,t=""+t,this.multi)throw new I("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const e=this._nodes.get(i);if(!e)throw new C(`Graph.directedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new C(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||void 0;if(r)return r.key}undirectedEdge(i,t){if(this.type==="directed")return;if(i=""+i,t=""+t,this.multi)throw new I("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const e=this._nodes.get(i);if(!e)throw new C(`Graph.undirectedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new C(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const r=e.undirected&&e.undirected[t]||void 0;if(r)return r.key}edge(i,t){if(this.multi)throw new I("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.edge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new C(`Graph.edge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||e.undirected&&e.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areDirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in||t in e.out}areOutNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areOutNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.out}areInNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areInNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in}areUndirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areUndirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="directed"?!1:t in e.undirected}areNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&(t in e.in||t in e.out)||this.type!=="directed"&&t in e.undirected}areInboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areInboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.in||this.type!=="directed"&&t in e.undirected}areOutboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new C(`Graph.areOutboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.out||this.type!=="directed"&&t in e.undirected}inDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.inDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree}outDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.outDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree}directedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.directedDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree}undirectedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.undirectedDegree: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree}inboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.inboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree),e}outboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.outboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.outDegree),e}degree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.degree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree),e}inDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.inDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.outDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.directedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree,r+=t.directedLoops),e-r}outboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.outDegree,r+=t.directedLoops),e-r}degreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.degreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree,r+=t.directedLoops*2),e-r}source(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.source: could not find the "${i}" edge in the graph.`);return t.source.key}target(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.target: could not find the "${i}" edge in the graph.`);return t.target.key}extremities(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.extremities: could not find the "${i}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(i,t){i=""+i,t=""+t;const e=this._edges.get(t);if(!e)throw new C(`Graph.opposite: could not find the "${t}" edge in the graph.`);const r=e.source.key,a=e.target.key;if(i===r)return a;if(i===a)return r;throw new C(`Graph.opposite: the "${i}" node is not attached to the "${t}" edge (${r}, ${a}).`)}hasExtremity(i,t){i=""+i,t=""+t;const e=this._edges.get(i);if(!e)throw new C(`Graph.hasExtremity: could not find the "${i}" edge in the graph.`);return e.source.key===t||e.target.key===t}isUndirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.isUndirected: could not find the "${i}" edge in the graph.`);return t.undirected}isDirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.isDirected: could not find the "${i}" edge in the graph.`);return!t.undirected}isSelfLoop(i){i=""+i;const t=this._edges.get(i);if(!t)throw new C(`Graph.isSelfLoop: could not find the "${i}" edge in the graph.`);return t.source===t.target}addNode(i,t){return ln(this,i,t).key}mergeNode(i,t){if(t&&!J(t))throw new k(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);i=""+i,t=t||{};let e=this._nodes.get(i);return e?(t&&(Z(e.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:i,attributes:e.attributes,data:t})),[i,!1]):(e=new this.NodeDataClass(i,t),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:t}),[i,!0])}updateNode(i,t){if(t&&typeof t!="function")throw new k(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);i=""+i;let e=this._nodes.get(i);if(e){if(t){const a=e.attributes;e.attributes=t(a),this.emit("nodeAttributesUpdated",{type:"replace",key:i,attributes:e.attributes})}return[i,!1]}const r=t?t({}):{};return e=new this.NodeDataClass(i,r),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:r}),[i,!0]}dropNode(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new C(`Graph.dropNode: could not find the "${i}" node in the graph.`);let e;if(this.type!=="undirected"){for(const r in t.out){e=t.out[r];do xe(this,e),e=e.next;while(e)}for(const r in t.in){e=t.in[r];do xe(this,e),e=e.next;while(e)}}if(this.type!=="directed")for(const r in t.undirected){e=t.undirected[r];do xe(this,e),e=e.next;while(e)}this._nodes.delete(i),this.emit("nodeDropped",{key:i,attributes:t.attributes})}dropEdge(i){let t;if(arguments.length>1){const e=""+arguments[0],r=""+arguments[1];if(t=oe(this,e,r,this.type),!t)throw new C(`Graph.dropEdge: could not find the "${e}" -> "${r}" edge in the graph.`)}else if(i=""+i,t=this._edges.get(i),!t)throw new C(`Graph.dropEdge: could not find the "${i}" edge in the graph.`);return xe(this,t),this}dropDirectedEdge(i,t){if(arguments.length<2)throw new I("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new I("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");i=""+i,t=""+t;const e=oe(this,i,t,"directed");if(!e)throw new C(`Graph.dropDirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return xe(this,e),this}dropUndirectedEdge(i,t){if(arguments.length<2)throw new I("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new I("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const e=oe(this,i,t,"undirected");if(!e)throw new C(`Graph.dropUndirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return xe(this,e),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const i=this._nodes.values();let t;for(;t=i.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(i){return this._attributes[i]}getAttributes(){return this._attributes}hasAttribute(i){return this._attributes.hasOwnProperty(i)}setAttribute(i,t){return this._attributes[i]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}updateAttribute(i,t){if(typeof t!="function")throw new k("Graph.updateAttribute: updater should be a function.");const e=this._attributes[i];return this._attributes[i]=t(e),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}removeAttribute(i){return delete this._attributes[i],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:i}),this}replaceAttributes(i){if(!J(i))throw new k("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=i,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(i){if(!J(i))throw new k("Graph.mergeAttributes: provided attributes are not a plain object.");return Z(this._attributes,i),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:i}),this}updateAttributes(i){if(typeof i!="function")throw new k("Graph.updateAttributes: provided updater is not a function.");return this._attributes=i(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(i,t){if(typeof i!="function")throw new k("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!$t(t))throw new k("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._nodes.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,a.attributes=i(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(i,t){if(typeof i!="function")throw new k("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!$t(t))throw new k("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._edges.values();let r,a,o,s;for(;r=e.next(),r.done!==!0;)a=r.value,o=a.source,s=a.target,a.attributes=i(a.key,a.attributes,o.key,s.key,o.attributes,s.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(i){if(typeof i!="function")throw new k("Graph.forEachAdjacencyEntry: expecting a callback.");tt(!1,!1,!1,this,i)}forEachAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new k("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");tt(!1,!1,!0,this,i)}forEachAssymetricAdjacencyEntry(i){if(typeof i!="function")throw new k("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");tt(!1,!0,!1,this,i)}forEachAssymetricAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new k("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");tt(!1,!0,!0,this,i)}nodes(){return Array.from(this._nodes.keys())}forEachNode(i){if(typeof i!="function")throw new k("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)}findNode(i){if(typeof i!="function")throw new k("Graph.findNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return r.key}mapNodes(i){if(typeof i!="function")throw new k("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let e,r;const a=new Array(this.order);let o=0;for(;e=t.next(),e.done!==!0;)r=e.value,a[o++]=i(r.key,r.attributes);return a}someNode(i){if(typeof i!="function")throw new k("Graph.someNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return!0;return!1}everyNode(i){if(typeof i!="function")throw new k("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,!i(r.key,r.attributes))return!1;return!0}filterNodes(i){if(typeof i!="function")throw new k("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let e,r;const a=[];for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)&&a.push(r.key);return a}reduceNodes(i,t){if(typeof i!="function")throw new k("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new k("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let e=t;const r=this._nodes.values();let a,o;for(;a=r.next(),a.done!==!0;)o=a.value,e=i(e,o.key,o.attributes);return e}nodeEntries(){const i=this._nodes.values();return{[Symbol.iterator](){return this},next(){const t=i.next();if(t.done)return t;const e=t.value;return{value:{node:e.key,attributes:e.attributes},done:!1}}}}export(){const i=new Array(this._nodes.size);let t=0;this._nodes.forEach((r,a)=>{i[t++]=rn(a,r)});const e=new Array(this._edges.size);return t=0,this._edges.forEach((r,a)=>{e[t++]=nn(this.type,a,r)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:i,edges:e}}import(i,t=!1){if(i instanceof j)return i.forEachNode((u,h)=>{t?this.mergeNode(u,h):this.addNode(u,h)}),i.forEachEdge((u,h,d,l,f,c,y)=>{t?y?this.mergeUndirectedEdgeWithKey(u,d,l,h):this.mergeDirectedEdgeWithKey(u,d,l,h):y?this.addUndirectedEdgeWithKey(u,d,l,h):this.addDirectedEdgeWithKey(u,d,l,h)}),this;if(!J(i))throw new k("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(i.attributes){if(!J(i.attributes))throw new k("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(i.attributes):this.replaceAttributes(i.attributes)}let e,r,a,o,s;if(i.nodes){if(a=i.nodes,!Array.isArray(a))throw new k("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=a.length;e{const a=Z({},e.attributes);e=new t.NodeDataClass(r,a),t._nodes.set(r,e)}),t}copy(i){if(i=i||{},typeof i.type=="string"&&i.type!==this.type&&i.type!=="mixed")throw new I(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${i.type}" because this would mean losing information about the current graph.`);if(typeof i.multi=="boolean"&&i.multi!==this.multi&&i.multi!==!0)throw new I("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof i.allowSelfLoops=="boolean"&&i.allowSelfLoops!==this.allowSelfLoops&&i.allowSelfLoops!==!0)throw new I("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(i),e=this._edges.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,ki(t,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,Z({},a.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const i={};this._nodes.forEach((a,o)=>{i[o]=a.attributes});const t={},e={};this._edges.forEach((a,o)=>{const s=a.undirected?"--":"->";let u="",h=a.source.key,d=a.target.key,l;a.undirected&&h>d&&(l=h,h=d,d=l);const f=`(${h})${s}(${d})`;o.startsWith("geid_")?this.multi&&(typeof e[f]>"u"?e[f]=0:e[f]++,u+=`${e[f]}. `):u+=`[${o}]: `,u+=f,t[u]=a.attributes});const r={};for(const a in this)this.hasOwnProperty(a)&&!Bt.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(r[a]=this[a]);return r.attributes=this._attributes,r.nodes=i,r.edges=t,ae(r,"constructor",this.constructor),r}}typeof Symbol<"u"&&(j.prototype[Symbol.for("nodejs.util.inspect.custom")]=j.prototype.inspect);hn.forEach(n=>{["add","merge","update"].forEach(i=>{const t=n.name(i),e=i==="add"?ki:cn;n.generateKey?j.prototype[t]=function(r,a,o){return e(this,t,!0,(n.type||this.type)==="undirected",null,r,a,o,i==="update")}:j.prototype[t]=function(r,a,o,s){return e(this,t,!1,(n.type||this.type)==="undirected",r,a,o,s,i==="update")}})});wr(j);Lr(j);qr(j);tn(j);class Di extends j{constructor(i){const t=Z({type:"directed"},i);if("multi"in t&&t.multi!==!1)throw new k("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="directed")throw new k('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Li extends j{constructor(i){const t=Z({type:"undirected"},i);if("multi"in t&&t.multi!==!1)throw new k("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="undirected")throw new k('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Gi extends j{constructor(i){const t=Z({multi:!0},i);if("multi"in t&&t.multi!==!0)throw new k("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}}class Fi extends j{constructor(i){const t=Z({type:"directed",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new k("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="directed")throw new k('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Ni extends j{constructor(i){const t=Z({type:"undirected",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new k("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="undirected")throw new k('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function Fe(n){n.from=function(i,t){const e=Z({},i.options,t),r=new n(e);return r.import(i),r}}Fe(j);Fe(Di);Fe(Li);Fe(Gi);Fe(Fi);Fe(Ni);j.Graph=j;j.DirectedGraph=Di;j.UndirectedGraph=Li;j.MultiGraph=Gi;j.MultiDirectedGraph=Fi;j.MultiUndirectedGraph=Ni;j.InvalidArgumentsGraphError=k;j.NotFoundGraphError=C;j.UsageGraphError=I;var ft,Ht;function Pi(){return Ht||(Ht=1,ft=function(i){return i!==null&&typeof i=="object"&&typeof i.addUndirectedEdgeWithKey=="function"&&typeof i.dropNode=="function"&&typeof i.multi=="boolean"}),ft}var ze={},Wt;function fn(){if(Wt)return ze;Wt=1;function n(e){return typeof e!="number"||isNaN(e)?1:e}function i(e,r){var a={},o=function(h){return typeof h>"u"?r:h};typeof r=="function"&&(o=r);var s=function(h){return o(h[e])},u=function(){return o(void 0)};return typeof e=="string"?(a.fromAttributes=s,a.fromGraph=function(h,d){return s(h.getNodeAttributes(d))},a.fromEntry=function(h,d){return s(d)}):typeof e=="function"?(a.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},a.fromGraph=function(h,d){return o(e(d,h.getNodeAttributes(d)))},a.fromEntry=function(h,d){return o(e(h,d))}):(a.fromAttributes=u,a.fromGraph=u,a.fromEntry=u),a}function t(e,r){var a={},o=function(h){return typeof h>"u"?r:h};typeof r=="function"&&(o=r);var s=function(h){return o(h[e])},u=function(){return o(void 0)};return typeof e=="string"?(a.fromAttributes=s,a.fromGraph=function(h,d){return s(h.getEdgeAttributes(d))},a.fromEntry=function(h,d){return s(d)},a.fromPartialEntry=a.fromEntry,a.fromMinimalEntry=a.fromEntry):typeof e=="function"?(a.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},a.fromGraph=function(h,d){var l=h.extremities(d);return o(e(d,h.getEdgeAttributes(d),l[0],l[1],h.getNodeAttributes(l[0]),h.getNodeAttributes(l[1]),h.isUndirected(d)))},a.fromEntry=function(h,d,l,f,c,y,w){return o(e(h,d,l,f,c,y,w))},a.fromPartialEntry=function(h,d,l,f){return o(e(h,d,l,f))},a.fromMinimalEntry=function(h,d){return o(e(h,d))}):(a.fromAttributes=u,a.fromGraph=u,a.fromEntry=u,a.fromMinimalEntry=u),a}return ze.createNodeValueGetter=i,ze.createEdgeValueGetter=t,ze.createEdgeWeightGetter=function(e){return t(e,n)},ze}var gt,jt;function gn(){if(jt)return gt;jt=1;var n=0,i=1,t=2,e=3,r=4,a=5,o=6,s=7,u=8,h=9,d=0,l=1,f=2,c=0,y=1,w=2,T=3,D=4,m=5,S=6,p=7,b=8,R=3,A=10,G=3,F=9,P=10;return gt=function(z,g,K){var te,x,v,$,W,X,ie,Y,N,Ne,re=g.length,tr=K.length,Pe=z.adjustSizes,ir=z.barnesHutTheta*z.barnesHutTheta,qe,q,B,M,fe,U,O,E=[];for(v=0;vYe?(Ee-=(Ke-Ye)/2,Re=Ee+Ke):(we-=(Ye-Ke)/2,Se=we+Ye),E[0+c]=-1,E[0+y]=(we+Se)/2,E[0+w]=(Ee+Re)/2,E[0+T]=Math.max(Se-we,Re-Ee),E[0+D]=-1,E[0+m]=-1,E[0+S]=0,E[0+p]=0,E[0+b]=0,te=1,v=0;v=0){g[v+n]=0)if(U=Math.pow(g[v+n]-E[x+p],2)+Math.pow(g[v+i]-E[x+b],2),Ne=E[x+T],4*Ne*Ne/U0?(O=q*g[v+o]*E[x+S]/U,g[v+t]+=B*O,g[v+e]+=M*O):U<0&&(O=-q*g[v+o]*E[x+S]/Math.sqrt(U),g[v+t]+=B*O,g[v+e]+=M*O):U>0&&(O=q*g[v+o]*E[x+S]/U,g[v+t]+=B*O,g[v+e]+=M*O),x=E[x+D],x<0)break;continue}else{x=E[x+m];continue}else{if(X=E[x+c],X>=0&&X!==v&&(B=g[v+n]-g[X+n],M=g[v+i]-g[X+i],U=B*B+M*M,Pe===!0?U>0?(O=q*g[v+o]*g[X+o]/U,g[v+t]+=B*O,g[v+e]+=M*O):U<0&&(O=-q*g[v+o]*g[X+o]/Math.sqrt(U),g[v+t]+=B*O,g[v+e]+=M*O):U>0&&(O=q*g[v+o]*g[X+o]/U,g[v+t]+=B*O,g[v+e]+=M*O)),x=E[x+D],x<0)break;continue}else for(q=z.scalingRatio,$=0;$0?(O=q*g[$+o]*g[W+o]/U/U,g[$+t]+=B*O,g[$+e]+=M*O,g[W+t]-=B*O,g[W+e]-=M*O):U<0&&(O=100*q*g[$+o]*g[W+o],g[$+t]+=B*O,g[$+e]+=M*O,g[W+t]-=B*O,g[W+e]-=M*O)):(U=Math.sqrt(B*B+M*M),U>0&&(O=q*g[$+o]*g[W+o]/U/U,g[$+t]+=B*O,g[$+e]+=M*O,g[W+t]-=B*O,g[W+e]-=M*O));for(N=z.gravity/z.scalingRatio,q=z.scalingRatio,v=0;v0&&(O=q*g[v+o]*N):U>0&&(O=q*g[v+o]*N/U),g[v+t]-=B*O,g[v+e]-=M*O;for(q=1*(z.outboundAttractionDistribution?qe:1),ie=0;ie0&&(O=-q*fe*Math.log(1+U)/U/g[$+o]):U>0&&(O=-q*fe*Math.log(1+U)/U):z.outboundAttractionDistribution?U>0&&(O=-q*fe/g[$+o]):U>0&&(O=-q*fe)):(U=Math.sqrt(Math.pow(B,2)+Math.pow(M,2)),z.linLogMode?z.outboundAttractionDistribution?U>0&&(O=-q*fe*Math.log(1+U)/U/g[$+o]):U>0&&(O=-q*fe*Math.log(1+U)/U):z.outboundAttractionDistribution?(U=1,O=-q*fe/g[$+o]):(U=1,O=-q*fe)),U>0&&(g[$+t]+=B*O,g[$+e]+=M*O,g[W+t]-=B*O,g[W+e]-=M*O);var Ze,Ie,Xe,_e,Je,Qe;if(Pe===!0)for(v=0;vP&&(g[v+t]=g[v+t]*P/Ze,g[v+e]=g[v+e]*P/Ze),Ie=g[v+o]*Math.sqrt((g[v+r]-g[v+t])*(g[v+r]-g[v+t])+(g[v+a]-g[v+e])*(g[v+a]-g[v+e])),Xe=Math.sqrt((g[v+r]+g[v+t])*(g[v+r]+g[v+t])+(g[v+a]+g[v+e])*(g[v+a]+g[v+e]))/2,_e=.1*Math.log(1+Xe)/(1+Math.sqrt(Ie)),Je=g[v+n]+g[v+t]*(_e/z.slowDown),g[v+n]=Je,Qe=g[v+i]+g[v+e]*(_e/z.slowDown),g[v+i]=Qe);else for(v=0;v=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in t&&typeof t.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in t&&!(typeof t.gravity=="number"&&t.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in t&&!(typeof t.slowDown=="number"||t.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in t&&typeof t.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in t&&!(typeof t.barnesHutTheta=="number"&&t.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},ge.graphToByteArrays=function(t,e){var r=t.order,a=t.size,o={},s,u=new Float32Array(r*n),h=new Float32Array(a*i);return s=0,t.forEachNode(function(d,l){o[d]=s,u[s]=l.x,u[s+1]=l.y,u[s+2]=0,u[s+3]=0,u[s+4]=0,u[s+5]=0,u[s+6]=1,u[s+7]=1,u[s+8]=l.size||1,u[s+9]=l.fixed?1:0,s+=n}),s=0,t.forEachEdge(function(d,l,f,c,y,w,T){var D=o[f],m=o[c],S=e(d,l,f,c,y,w,T);u[D+6]+=S,u[m+6]+=S,h[s]=D,h[s+1]=m,h[s+2]=S,s+=i}),{nodes:u,edges:h}},ge.assignLayoutChanges=function(t,e,r){var a=0;t.updateEachNodeAttributes(function(o,s){return s.x=e[a],s.y=e[a+1],a+=n,r?r(o,s):s})},ge.readGraphPositions=function(t,e){var r=0;t.forEachNode(function(a,o){e[r]=o.x,e[r+1]=o.y,r+=n})},ge.collectLayoutChanges=function(t,e,r){for(var a=t.nodes(),o={},s=0,u=0,h=e.length;s2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(h)}}var s=a.bind(null,!1);return s.assign=a.bind(null,!0),s.inferSettings=o,vt=s,vt}var yn=mn();const it=bi(yn);function bn(n,i){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var e=t.call(n,i);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function je(n){var i=bn(n,"string");return typeof i=="symbol"?i:i+""}function Q(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function Yt(n,i){for(var t=0;tn.length)&&(i=n.length);for(var t=0,e=Array(i);t>>16,t=(n&65280)>>>8,e=n&255,r=255,a=zi(i,t,e,r);return bt[n]=a,a}function Zt(n,i,t,e){return t+(i<<8)+(n<<16)}function Xt(n,i,t,e,r,a){var o=Math.floor(t/a*r),s=Math.floor(n.drawingBufferHeight/a-e/a*r),u=new Uint8Array(4);n.bindFramebuffer(n.FRAMEBUFFER,i),n.readPixels(o,s,1,1,n.RGBA,n.UNSIGNED_BYTE,u);var h=De(u,4),d=h[0],l=h[1],f=h[2],c=h[3];return[d,l,f,c]}function _(n,i,t){return(i=je(i))in n?Object.defineProperty(n,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[i]=t,n}function Jt(n,i){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);i&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,e)}return t}function L(n){for(var i=1;i: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-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-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-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * 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}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}: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-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.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-0{border-style:var(--tw-border-style);border-width:0}.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-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.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-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/50{border-color:color-mix(in oklab,var(--color-amber-500) 50%,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\/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\/70{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/70{border-color:color-mix(in oklab,hsl(var(--border)) 70%,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\/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\/25{border-color:#00bb7f40}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/25{border-color:color-mix(in oklab,var(--color-emerald-500) 25%,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-fuchsia-500\/25{border-color:#e12afb40}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/25{border-color:color-mix(in oklab,var(--color-fuchsia-500) 25%,transparent)}}.border-fuchsia-500\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/30{border-color:color-mix(in oklab,var(--color-fuchsia-500) 30%,transparent)}}.border-fuchsia-500\/40{border-color:#e12afb66}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/40{border-color:color-mix(in oklab,var(--color-fuchsia-500) 40%,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-neutral-700{border-color:var(--color-neutral-700)}.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-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\/25{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/25{border-color:color-mix(in oklab,hsl(var(--primary)) 25%,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-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500) 40%,transparent)}}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500) 50%,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-t-primary\/70{border-top-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-t-primary\/70{border-top-color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.border-t-violet-500\/70{border-top-color:#8d54ffb3}@supports (color:color-mix(in lab,red,red)){.border-t-violet-500\/70{border-top-color:color-mix(in oklab,var(--color-violet-500) 70%,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-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-\[\#070a0f\]{background-color:#070a0f}.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-amber-500\/\[0\.06\]{background-color:#f99c000f}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/\[0\.06\]{background-color:color-mix(in oklab,var(--color-amber-500) 6%,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\/15{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/15{background-color:color-mix(in oklab,hsl(var(--background)) 15%,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\/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-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,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-border\/30{background-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.bg-border\/30{background-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.bg-card,.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\/40{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/40{background-color:color-mix(in oklab,hsl(var(--card)) 40%,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\/70{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/70{background-color:color-mix(in oklab,hsl(var(--card)) 70%,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-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\/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-emerald-500\/\[0\.07\]{background-color:#00bb7f12}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/\[0\.07\]{background-color:color-mix(in oklab,var(--color-emerald-500) 7%,transparent)}}.bg-fuchsia-500\/10{background-color:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/10{background-color:color-mix(in oklab,var(--color-fuchsia-500) 10%,transparent)}}.bg-fuchsia-500\/15{background-color:#e12afb26}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/15{background-color:color-mix(in oklab,var(--color-fuchsia-500) 15%,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{background-color:hsl(var(--muted))}.bg-muted-foreground\/40{background-color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/40{background-color:color-mix(in oklab,hsl(var(--muted-foreground)) 40%,transparent)}}.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-neutral-800{background-color:var(--color-neutral-800)}.bg-neutral-950{background-color:var(--color-neutral-950)}.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\/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,.bg-popover\/95{background-color:hsl(var(--popover))}@supports (color:color-mix(in lab,red,red)){.bg-popover\/95{background-color:color-mix(in oklab,hsl(var(--popover)) 95%,transparent)}}.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\/\[0\.06\]{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/\[0\.06\]{background-color:color-mix(in oklab,hsl(var(--primary)) 6%,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{background-color:var(--color-teal-500)}.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\/5{background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/5{background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.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\/15{--tw-gradient-from:#00baa726}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/15{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.from-teal-500\/15{--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\/10{--tw-gradient-via:#625fff1a}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 10%, transparent)}}.via-indigo-500\/10{--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-indigo-500{--tw-gradient-to: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))}.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\/15{--tw-gradient-to:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/15{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.to-purple-500\/15{--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-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)}}.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-8{padding:calc(var(--spacing) * 8)}.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-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.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-10{padding-block:calc(var(--spacing) * 10)}.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-24{padding-top:calc(var(--spacing) * 24)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.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)}.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-8{padding-left:calc(var(--spacing) * 8)}.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-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.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-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.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\/80{color:#53eafdcc}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/80{color:color-mix(in oklab,var(--color-cyan-300) 80%,transparent)}}.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-emerald-400\/90{color:#00d294e6}@supports (color:color-mix(in lab,red,red)){.text-emerald-400\/90{color:color-mix(in oklab,var(--color-emerald-400) 90%,transparent)}}.text-foreground,.text-foreground\/80{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,hsl(var(--foreground)) 80%,transparent)}}.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-fuchsia-300{color:var(--color-fuchsia-300)}.text-fuchsia-400{color:var(--color-fuchsia-400)}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/40{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,hsl(var(--muted-foreground)) 40%,transparent)}}.text-muted-foreground\/45{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/45{color:color-mix(in oklab,hsl(var(--muted-foreground)) 45%,transparent)}}.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\/55{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/55{color:color-mix(in oklab,hsl(var(--muted-foreground)) 55%,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\/65{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/65{color:color-mix(in oklab,hsl(var(--muted-foreground)) 65%,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-neutral-200{color:var(--color-neutral-200)}.text-neutral-400{color:var(--color-neutral-400)}.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-rose-400{color:var(--color-rose-400)}.text-sky-400{color:var(--color-sky-400)}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-200\/90{color:#ddd6ffe6}@supports (color:color-mix(in lab,red,red)){.text-violet-200\/90{color:color-mix(in oklab,var(--color-violet-200) 90%,transparent)}}.text-violet-300{color:var(--color-violet-300)}.text-violet-300\/80{color:#c4b4ffcc}@supports (color:color-mix(in lab,red,red)){.text-violet-300\/80{color:color-mix(in oklab,var(--color-violet-300) 80%,transparent)}}.text-violet-400{color:var(--color-violet-400)}.text-violet-400\/70{color:#a685ffb3}@supports (color:color-mix(in lab,red,red)){.text-violet-400\/70{color:color-mix(in oklab,var(--color-violet-400) 70%,transparent)}}.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-30{opacity:.3}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.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)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--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)}.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-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-black\/25{--tw-shadow-color:#00000040}@supports (color:color-mix(in lab,red,red)){.shadow-black\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 25%, 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-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)}}.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}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.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-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\: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))}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:border-border:hover{border-color:hsl(var(--border))}.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-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab,var(--color-amber-500) 20%,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-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-fuchsia-500\/20:hover{background-color:#e12afb33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-fuchsia-500\/20:hover{background-color:color-mix(in oklab,var(--color-fuchsia-500) 20%,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-neutral-700:hover{background-color:var(--color-neutral-700)}.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\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover,.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,.focus\:border-primary\/50:focus{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:border-primary\/50:focus{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.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\:ring-violet-500\/50:focus{--tw-ring-color:#8d54ff80}@supports (color:color-mix(in lab,red,red)){.focus\:ring-violet-500\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-violet-500) 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\:cursor-default:disabled{cursor:default}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.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-36{width:calc(var(--spacing) * 36)}.sm\:w-\[640px\]{width:640px}.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\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}.sm\:p-10{padding:calc(var(--spacing) * 10)}}@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\:grid-cols-\[170px_1fr\]{grid-template-columns:170px 1fr}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:w-40{width:calc(var(--spacing) * 40)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[1fr_300px\]{grid-template-columns:1fr 300px}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:items-stretch{align-items:stretch}}}: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;color-scheme:dark}.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%;color-scheme:light}@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)}:focus-visible{outline:2px solid hsl(var(--primary) / .7);outline-offset:2px}@media(prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}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:transform .3s cubic-bezier(.4,0,.2,1),background-color .3s cubic-bezier(.4,0,.2,1),border-color .3s cubic-bezier(.4,0,.2,1),box-shadow .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:background-color .2s,border-color .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 a[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 a[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}@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}}}@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-400:oklch(74.6% .16 232.661);--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-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--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-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-rose-400:oklch(71.2% .194 13.428);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-neutral-200:oklch(92.2% 0 0);--color-neutral-400:oklch(70.8% 0 0);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-800:oklch(26.9% 0 0);--color-neutral-950:oklch(14.5% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--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-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--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-in:cubic-bezier(.4, 0, 1, 1);--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-0\.5{top:calc(var(--spacing) * -.5)}.top-0{top:0}.top-1\/2{top:50%}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-3{top:calc(var(--spacing) * 3)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.right-0{right:0}.right-3{right:calc(var(--spacing) * 3)}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-\[-10\%\]{bottom:-10%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.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-50{z-index:50}.z-\[60\]{z-index:60}.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}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-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-0\.5{margin-right:calc(var(--spacing) * .5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.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-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-44{height:calc(var(--spacing) * 44)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-\[150px\]{height:150px}.h-\[480px\]{height:480px}.h-\[calc\(100vh-13rem\)\]{height:calc(100vh - 13rem)}.h-full{height:100%}.h-px{height:1px}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[80vh\]{max-height:80vh}.min-h-\[68vh\]{min-height:68vh}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.min-h-\[560px\]{min-height:560px}.min-h-screen{min-height:100vh}.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-6{width:calc(var(--spacing) * 6)}.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-11{width:calc(var(--spacing) * 11)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-24{width:calc(var(--spacing) * 24)}.w-40{width:calc(var(--spacing) * 40)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.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-2xl{max-width:var(--container-2xl)}.max-w-\[120px\]{max-width:120px}.max-w-\[180px\]{max-width:180px}.max-w-\[250px\]{max-width:250px}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.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-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)}.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-default{cursor:default}.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}.scroll-mt-20{scroll-margin-top:calc(var(--spacing) * 20)}.scrollbar-thin{scrollbar-width:thin}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.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-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-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-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * 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}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}: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-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.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-0{border-style:var(--tw-border-style);border-width:0}.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-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.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-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/50{border-color:color-mix(in oklab,var(--color-amber-500) 50%,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\/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\/70{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/70{border-color:color-mix(in oklab,hsl(var(--border)) 70%,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\/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\/25{border-color:#00bb7f40}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/25{border-color:color-mix(in oklab,var(--color-emerald-500) 25%,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-fuchsia-500\/25{border-color:#e12afb40}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/25{border-color:color-mix(in oklab,var(--color-fuchsia-500) 25%,transparent)}}.border-fuchsia-500\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/30{border-color:color-mix(in oklab,var(--color-fuchsia-500) 30%,transparent)}}.border-fuchsia-500\/40{border-color:#e12afb66}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/40{border-color:color-mix(in oklab,var(--color-fuchsia-500) 40%,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-neutral-700{border-color:var(--color-neutral-700)}.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-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\/25{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/25{border-color:color-mix(in oklab,hsl(var(--primary)) 25%,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-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500) 40%,transparent)}}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500) 50%,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-t-primary\/70{border-top-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-t-primary\/70{border-top-color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.border-t-violet-500\/70{border-top-color:#8d54ffb3}@supports (color:color-mix(in lab,red,red)){.border-t-violet-500\/70{border-top-color:color-mix(in oklab,var(--color-violet-500) 70%,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-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-\[\#070a0f\]{background-color:#070a0f}.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-amber-500\/\[0\.06\]{background-color:#f99c000f}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/\[0\.06\]{background-color:color-mix(in oklab,var(--color-amber-500) 6%,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\/15{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/15{background-color:color-mix(in oklab,hsl(var(--background)) 15%,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\/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-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,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-border\/30{background-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.bg-border\/30{background-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.bg-card,.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\/40{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/40{background-color:color-mix(in oklab,hsl(var(--card)) 40%,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\/70{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/70{background-color:color-mix(in oklab,hsl(var(--card)) 70%,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-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\/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-emerald-500\/\[0\.07\]{background-color:#00bb7f12}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/\[0\.07\]{background-color:color-mix(in oklab,var(--color-emerald-500) 7%,transparent)}}.bg-fuchsia-500\/10{background-color:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/10{background-color:color-mix(in oklab,var(--color-fuchsia-500) 10%,transparent)}}.bg-fuchsia-500\/15{background-color:#e12afb26}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/15{background-color:color-mix(in oklab,var(--color-fuchsia-500) 15%,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{background-color:hsl(var(--muted))}.bg-muted-foreground\/40{background-color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/40{background-color:color-mix(in oklab,hsl(var(--muted-foreground)) 40%,transparent)}}.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-neutral-800{background-color:var(--color-neutral-800)}.bg-neutral-950{background-color:var(--color-neutral-950)}.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\/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,.bg-popover\/95{background-color:hsl(var(--popover))}@supports (color:color-mix(in lab,red,red)){.bg-popover\/95{background-color:color-mix(in oklab,hsl(var(--popover)) 95%,transparent)}}.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\/\[0\.06\]{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/\[0\.06\]{background-color:color-mix(in oklab,hsl(var(--primary)) 6%,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{background-color:var(--color-teal-500)}.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\/5{background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/5{background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.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\/15{--tw-gradient-from:#00baa726}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/15{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.from-teal-500\/15{--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\/10{--tw-gradient-via:#625fff1a}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 10%, transparent)}}.via-indigo-500\/10{--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-indigo-500{--tw-gradient-to: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))}.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\/15{--tw-gradient-to:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/15{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.to-purple-500\/15{--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-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)}}.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-8{padding:calc(var(--spacing) * 8)}.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-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.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-10{padding-block:calc(var(--spacing) * 10)}.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-24{padding-top:calc(var(--spacing) * 24)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.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)}.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-8{padding-left:calc(var(--spacing) * 8)}.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-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.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-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.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\/80{color:#53eafdcc}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/80{color:color-mix(in oklab,var(--color-cyan-300) 80%,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-emerald-400\/90{color:#00d294e6}@supports (color:color-mix(in lab,red,red)){.text-emerald-400\/90{color:color-mix(in oklab,var(--color-emerald-400) 90%,transparent)}}.text-foreground,.text-foreground\/80{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,hsl(var(--foreground)) 80%,transparent)}}.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-fuchsia-300{color:var(--color-fuchsia-300)}.text-fuchsia-400{color:var(--color-fuchsia-400)}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/40{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,hsl(var(--muted-foreground)) 40%,transparent)}}.text-muted-foreground\/45{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/45{color:color-mix(in oklab,hsl(var(--muted-foreground)) 45%,transparent)}}.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\/55{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/55{color:color-mix(in oklab,hsl(var(--muted-foreground)) 55%,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\/65{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/65{color:color-mix(in oklab,hsl(var(--muted-foreground)) 65%,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-neutral-200{color:var(--color-neutral-200)}.text-neutral-400{color:var(--color-neutral-400)}.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-rose-400{color:var(--color-rose-400)}.text-sky-400{color:var(--color-sky-400)}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-200\/90{color:#ddd6ffe6}@supports (color:color-mix(in lab,red,red)){.text-violet-200\/90{color:color-mix(in oklab,var(--color-violet-200) 90%,transparent)}}.text-violet-300{color:var(--color-violet-300)}.text-violet-300\/80{color:#c4b4ffcc}@supports (color:color-mix(in lab,red,red)){.text-violet-300\/80{color:color-mix(in oklab,var(--color-violet-300) 80%,transparent)}}.text-violet-400{color:var(--color-violet-400)}.text-violet-400\/70{color:#a685ffb3}@supports (color:color-mix(in lab,red,red)){.text-violet-400\/70{color:color-mix(in oklab,var(--color-violet-400) 70%,transparent)}}.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-30{opacity:.3}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.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)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--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)}.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-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-black\/25{--tw-shadow-color:#00000040}@supports (color:color-mix(in lab,red,red)){.shadow-black\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 25%, 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-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)}}.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}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.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-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\: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))}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:border-border:hover{border-color:hsl(var(--border))}.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-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab,var(--color-amber-500) 20%,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-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-fuchsia-500\/20:hover{background-color:#e12afb33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-fuchsia-500\/20:hover{background-color:color-mix(in oklab,var(--color-fuchsia-500) 20%,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-neutral-700:hover{background-color:var(--color-neutral-700)}.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\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover,.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,.focus\:border-primary\/50:focus{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:border-primary\/50:focus{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.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\:ring-violet-500\/50:focus{--tw-ring-color:#8d54ff80}@supports (color:color-mix(in lab,red,red)){.focus\:ring-violet-500\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-violet-500) 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\:cursor-default:disabled{cursor:default}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.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-36{width:calc(var(--spacing) * 36)}.sm\:w-\[640px\]{width:640px}.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\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}.sm\:p-10{padding:calc(var(--spacing) * 10)}}@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\:grid-cols-\[170px_1fr\]{grid-template-columns:170px 1fr}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:w-40{width:calc(var(--spacing) * 40)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[1fr_300px\]{grid-template-columns:1fr 300px}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:items-stretch{align-items:stretch}}}: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;color-scheme:dark}.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%;color-scheme:light}@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)}:focus-visible{outline:2px solid hsl(var(--primary) / .7);outline-offset:2px}@media(prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}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:transform .3s cubic-bezier(.4,0,.2,1),background-color .3s cubic-bezier(.4,0,.2,1),border-color .3s cubic-bezier(.4,0,.2,1),box-shadow .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:background-color .2s,border-color .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 a[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 a[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}@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-B0tHcMp_.js b/frontend/dist/assets/index-DZPeq_n9.js similarity index 52% rename from frontend/dist/assets/index-B0tHcMp_.js rename to frontend/dist/assets/index-DZPeq_n9.js index 8acd829..35723e2 100644 --- a/frontend/dist/assets/index-B0tHcMp_.js +++ b/frontend/dist/assets/index-DZPeq_n9.js @@ -1,4 +1,4 @@ -var XM=Object.defineProperty;var V1=e=>{throw TypeError(e)};var ZM=(e,t,r)=>t in e?XM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qo=(e,t,r)=>ZM(e,typeof t!="symbol"?t+"":t,r),Bp=(e,t,r)=>t.has(e)||V1("Cannot "+r);var L=(e,t,r)=>(Bp(e,t,"read from private field"),r?r.call(e):t.get(e)),Re=(e,t,r)=>t.has(e)?V1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ye=(e,t,r,n)=>(Bp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ue=(e,t,r)=>(Bp(e,t,"access private method"),r);var md=(e,t,r,n)=>({set _(i){ye(e,t,i,r)},get _(){return L(e,t,n)}});function JM(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function cy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Up={exports:{}},Hl={},Hp={exports:{}},Fe={};/** +var V3=Object.defineProperty;var K1=e=>{throw TypeError(e)};var q3=(e,t,r)=>t in e?V3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qo=(e,t,r)=>q3(e,typeof t!="symbol"?t+"":t,r),Fp=(e,t,r)=>t.has(e)||K1("Cannot "+r);var L=(e,t,r)=>(Fp(e,t,"read from private field"),r?r.call(e):t.get(e)),Re=(e,t,r)=>t.has(e)?K1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ye=(e,t,r,n)=>(Fp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ue=(e,t,r)=>(Fp(e,t,"access private method"),r);var md=(e,t,r,n)=>({set _(a){ye(e,t,a,r)},get _(){return L(e,t,n)}});function Q3(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function ly(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bp={exports:{}},Hl={},Up={exports:{}},Fe={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var XM=Object.defineProperty;var V1=e=>{throw TypeError(e)};var ZM=(e,t,r)=>t in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var q1;function e3(){if(q1)return Fe;q1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function S(I,M,H){this.props=I,this.context=M,this.refs=k,this.updater=H||b}S.prototype.isReactComponent={},S.prototype.setState=function(I,M){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,M,"setState")},S.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function N(){}N.prototype=S.prototype;function E(I,M,H){this.props=I,this.context=M,this.refs=k,this.updater=H||b}var A=E.prototype=new N;A.constructor=E,j(A,S.prototype),A.isPureReactComponent=!0;var P=Array.isArray,_=Object.prototype.hasOwnProperty,O={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function B(I,M,H){var ne,Z={},me=null,pe=null;if(M!=null)for(ne in M.ref!==void 0&&(pe=M.ref),M.key!==void 0&&(me=""+M.key),M)_.call(M,ne)&&!D.hasOwnProperty(ne)&&(Z[ne]=M[ne]);var Oe=arguments.length-2;if(Oe===1)Z.children=H;else if(1{throw TypeError(e)};var ZM=(e,t,r)=>t in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Y1;function t3(){if(Y1)return Hl;Y1=1;var e=Ws(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function u(c,f,h){var m,g={},v=null,b=null;h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(b=f.ref);for(m in f)n.call(f,m)&&!o.hasOwnProperty(m)&&(g[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)g[m]===void 0&&(g[m]=f[m]);return{$$typeof:t,type:c,key:v,ref:b,props:g,_owner:i.current}}return Hl.Fragment=r,Hl.jsx=u,Hl.jsxs=u,Hl}var X1;function r3(){return X1||(X1=1,Up.exports=t3()),Up.exports}var l=r3(),y=Ws();const dy=cy(y),Zf=JM({__proto__:null,default:dy},[y]);var pd={},Wp={exports:{}},br={},Kp={exports:{}},Gp={};/** + */var q1;function X3(){if(q1)return Hl;q1=1;var e=Ws(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function u(c,f,h){var m,g={},v=null,b=null;h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(b=f.ref);for(m in f)n.call(f,m)&&!o.hasOwnProperty(m)&&(g[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)g[m]===void 0&&(g[m]=f[m]);return{$$typeof:t,type:c,key:v,ref:b,props:g,_owner:a.current}}return Hl.Fragment=r,Hl.jsx=u,Hl.jsxs=u,Hl}var Q1;function Z3(){return Q1||(Q1=1,Bp.exports=X3()),Bp.exports}var l=Z3(),y=Ws();const uy=ly(y),Xf=Q3({__proto__:null,default:uy},[y]);var pd={},Hp={exports:{}},br={},Wp={exports:{}},Kp={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var XM=Object.defineProperty;var V1=e=>{throw TypeError(e)};var ZM=(e,t,r)=>t in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Z1;function n3(){return Z1||(Z1=1,(function(e){function t(X,te){var J=X.length;X.push(te);e:for(;0>>1,M=X[I];if(0>>1;Ii(Z,J))mei(pe,Z)?(X[I]=pe,X[me]=J,I=me):(X[I]=Z,X[ne]=J,I=ne);else if(mei(pe,J))X[I]=pe,X[me]=J,I=me;else break e}}return te}function i(X,te){var J=X.sortIndex-te.sortIndex;return J!==0?J:X.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var f=[],h=[],m=1,g=null,v=3,b=!1,j=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(X){for(var te=r(h);te!==null;){if(te.callback===null)n(h);else if(te.startTime<=X)n(h),te.sortIndex=te.expirationTime,t(f,te);else break;te=r(h)}}function P(X){if(k=!1,A(X),!j)if(r(f)!==null)j=!0,ie(_);else{var te=r(h);te!==null&&se(P,te.startTime-X)}}function _(X,te){j=!1,k&&(k=!1,N(B),B=-1),b=!0;var J=v;try{for(A(te),g=r(f);g!==null&&(!(g.expirationTime>te)||X&&!Y());){var I=g.callback;if(typeof I=="function"){g.callback=null,v=g.priorityLevel;var M=I(g.expirationTime<=te);te=e.unstable_now(),typeof M=="function"?g.callback=M:g===r(f)&&n(f),A(te)}else n(f);g=r(f)}if(g!==null)var H=!0;else{var ne=r(h);ne!==null&&se(P,ne.startTime-te),H=!1}return H}finally{g=null,v=J,b=!1}}var O=!1,D=null,B=-1,F=5,z=-1;function Y(){return!(e.unstable_now()-zX||125I?(X.sortIndex=J,t(h,X),r(f)===null&&X===r(h)&&(k?(N(B),B=-1):k=!0,se(P,J-I))):(X.sortIndex=M,t(f,X),j||b||(j=!0,ie(_))),X},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(X){var te=v;return function(){var J=v;v=te;try{return X.apply(this,arguments)}finally{v=J}}}})(Gp)),Gp}var J1;function i3(){return J1||(J1=1,Kp.exports=n3()),Kp.exports}/** + */var Y1;function J3(){return Y1||(Y1=1,(function(e){function t(X,te){var J=X.length;X.push(te);e:for(;0>>1,M=X[I];if(0>>1;Ia(Z,J))mea(pe,Z)?(X[I]=pe,X[me]=J,I=me):(X[I]=Z,X[ne]=J,I=ne);else if(mea(pe,J))X[I]=pe,X[me]=J,I=me;else break e}}return te}function a(X,te){var J=X.sortIndex-te.sortIndex;return J!==0?J:X.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var f=[],h=[],m=1,g=null,v=3,b=!1,j=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(X){for(var te=r(h);te!==null;){if(te.callback===null)n(h);else if(te.startTime<=X)n(h),te.sortIndex=te.expirationTime,t(f,te);else break;te=r(h)}}function P(X){if(k=!1,A(X),!j)if(r(f)!==null)j=!0,ie(_);else{var te=r(h);te!==null&&se(P,te.startTime-X)}}function _(X,te){j=!1,k&&(k=!1,N(B),B=-1),b=!0;var J=v;try{for(A(te),g=r(f);g!==null&&(!(g.expirationTime>te)||X&&!Y());){var I=g.callback;if(typeof I=="function"){g.callback=null,v=g.priorityLevel;var M=I(g.expirationTime<=te);te=e.unstable_now(),typeof M=="function"?g.callback=M:g===r(f)&&n(f),A(te)}else n(f);g=r(f)}if(g!==null)var H=!0;else{var ne=r(h);ne!==null&&se(P,ne.startTime-te),H=!1}return H}finally{g=null,v=J,b=!1}}var O=!1,D=null,B=-1,F=5,z=-1;function Y(){return!(e.unstable_now()-zX||125I?(X.sortIndex=J,t(h,X),r(f)===null&&X===r(h)&&(k?(N(B),B=-1):k=!0,se(P,J-I))):(X.sortIndex=M,t(f,X),j||b||(j=!0,ie(_))),X},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(X){var te=v;return function(){var J=v;v=te;try{return X.apply(this,arguments)}finally{v=J}}}})(Kp)),Kp}var X1;function eM(){return X1||(X1=1,Wp.exports=J3()),Wp.exports}/** * @license React * react-dom.production.min.js * @@ -30,69 +30,69 @@ var XM=Object.defineProperty;var V1=e=>{throw TypeError(e)};var ZM=(e,t,r)=>t in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ew;function a3(){if(ew)return br;ew=1;var e=Ws(),t=i3();function r(a){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},g={};function v(a){return f.call(g,a)?!0:f.call(m,a)?!1:h.test(a)?g[a]=!0:(m[a]=!0,!1)}function b(a,s,d,p){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return p?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function j(a,s,d,p){if(s===null||typeof s>"u"||b(a,s,d,p))return!0;if(p)return!1;if(d!==null)switch(d.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(a,s,d,p,x,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=p,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=a,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){S[a]=new k(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var s=a[0];S[s]=new k(s,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){S[a]=new k(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){S[a]=new k(a,2,!1,a,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(a){S[a]=new k(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){S[a]=new k(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){S[a]=new k(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){S[a]=new k(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){S[a]=new k(a,5,!1,a.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(a){return a[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(a){var s=a.replace(N,E);S[s]=new k(s,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var s=a.replace(N,E);S[s]=new k(s,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var s=a.replace(N,E);S[s]=new k(s,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){S[a]=new k(a,1,!1,a.toLowerCase(),null,!1,!1)}),S.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){S[a]=new k(a,1,!1,a.toLowerCase(),null,!0,!0)});function A(a,s,d,p){var x=S.hasOwnProperty(s)?S[s]:null;(x!==null?x.type!==0:p||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},g={};function v(i){return f.call(g,i)?!0:f.call(m,i)?!1:h.test(i)?g[i]=!0:(m[i]=!0,!1)}function b(i,s,d,p){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return p?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function j(i,s,d,p){if(s===null||typeof s>"u"||b(i,s,d,p))return!0;if(p)return!1;if(d!==null)switch(d.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,d,p,x,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=p,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];S[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new k(i,2,!1,i,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(i){S[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(i){return i[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(i){var s=i.replace(N,E);S[s]=new k(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(N,E);S[s]=new k(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(N,E);S[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function A(i,s,d,p){var x=S.hasOwnProperty(s)?S[s]:null;(x!==null?x.type!==0:p||!(2T||x[C]!==w[T]){var R=` -`+x[C].replace(" at new "," at ");return a.displayName&&R.includes("")&&(R=R.replace("",a.displayName)),R}while(1<=C&&0<=T);break}}}finally{H=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?M(a):""}function Z(a){switch(a.tag){case 5:return M(a.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return a=ne(a.type,!1),a;case 11:return a=ne(a.type.render,!1),a;case 1:return a=ne(a.type,!0),a;default:return""}}function me(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case D:return"Fragment";case O:return"Portal";case F:return"Profiler";case B:return"StrictMode";case he:return"Suspense";case ue:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case Y:return(a.displayName||"Context")+".Consumer";case z:return(a._context.displayName||"Context")+".Provider";case U:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case ge:return s=a.displayName||null,s!==null?s:me(a.type)||"Memo";case ie:s=a._payload,a=a._init;try{return me(a(s))}catch{}}return null}function pe(a){var s=a.type;switch(a.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=s.render,a=a.displayName||a.name||"",s.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(s);case 8:return s===B?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Oe(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function re(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function we(a){var s=re(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,s),p=""+a[s];if(!a.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,w=d.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return x.call(this)},set:function(C){p=""+C,w.call(this,C)}}),Object.defineProperty(a,s,{enumerable:d.enumerable}),{getValue:function(){return p},setValue:function(C){p=""+C},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function _e(a){a._valueTracker||(a._valueTracker=we(a))}function ae(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var d=s.getValue(),p="";return a&&(p=re(a)?a.checked?"true":"false":a.value),a=p,a!==d?(s.setValue(a),!0):!1}function et(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Be(a,s){var d=s.checked;return J({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function Pe(a,s){var d=s.defaultValue==null?"":s.defaultValue,p=s.checked!=null?s.checked:s.defaultChecked;d=Oe(s.value!=null?s.value:d),a._wrapperState={initialChecked:p,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function vt(a,s){s=s.checked,s!=null&&A(a,"checked",s,!1)}function Yt(a,s){vt(a,s);var d=Oe(s.value),p=s.type;if(d!=null)p==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(p==="submit"||p==="reset"){a.removeAttribute("value");return}s.hasOwnProperty("value")?Ae(a,s.type,d):s.hasOwnProperty("defaultValue")&&Ae(a,s.type,Oe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(a.defaultChecked=!!s.defaultChecked)}function K(a,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var p=s.type;if(!(p!=="submit"&&p!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+a._wrapperState.initialValue,d||s===a.value||(a.value=s),a.defaultValue=s}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function Ae(a,s,d){(s!=="number"||et(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var Se=Array.isArray;function qe(a,s,d,p){if(a=a.options,s){s={};for(var x=0;x"+s.valueOf().toString()+"",s=oc.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;s.firstChild;)a.appendChild(s.firstChild)}});function al(a,s){if(s){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=s;return}}a.textContent=s}var ol={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},t_=["Webkit","ms","Moz","O"];Object.keys(ol).forEach(function(a){t_.forEach(function(s){s=s+a.charAt(0).toUpperCase()+a.substring(1),ol[s]=ol[a]})});function lx(a,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||ol.hasOwnProperty(a)&&ol[a]?(""+s).trim():s+"px"}function ux(a,s){a=a.style;for(var d in s)if(s.hasOwnProperty(d)){var p=d.indexOf("--")===0,x=lx(d,s[d],p);d==="float"&&(d="cssFloat"),p?a.setProperty(d,x):a[d]=x}}var r_=J({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 Jh(a,s){if(s){if(r_[a]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function em(a,s){if(a.indexOf("-")===-1)return typeof s.is=="string";switch(a){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 tm=null;function rm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var nm=null,So=null,No=null;function cx(a){if(a=Cl(a)){if(typeof nm!="function")throw Error(r(280));var s=a.stateNode;s&&(s=Pc(s),nm(a.stateNode,a.type,s))}}function dx(a){So?No?No.push(a):No=[a]:So=a}function fx(){if(So){var a=So,s=No;if(No=So=null,cx(a),s)for(a=0;a>>=0,a===0?32:31-(h_(a)/m_|0)|0}var dc=64,fc=4194304;function cl(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function hc(a,s){var d=a.pendingLanes;if(d===0)return 0;var p=0,x=a.suspendedLanes,w=a.pingedLanes,C=d&268435455;if(C!==0){var T=C&~x;T!==0?p=cl(T):(w&=C,w!==0&&(p=cl(w)))}else C=d&~x,C!==0?p=cl(C):w!==0&&(p=cl(w));if(p===0)return 0;if(s!==0&&s!==p&&(s&x)===0&&(x=p&-p,w=s&-s,x>=w||x===16&&(w&4194240)!==0))return s;if((p&4)!==0&&(p|=d&16),s=a.entangledLanes,s!==0)for(a=a.entanglements,s&=p;0d;d++)s.push(a);return s}function dl(a,s,d){a.pendingLanes|=s,s!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,s=31-rn(s),a[s]=d}function y_(a,s){var d=a.pendingLanes&~s;a.pendingLanes=s,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=s,a.mutableReadLanes&=s,a.entangledLanes&=s,s=a.entanglements;var p=a.eventTimes;for(a=a.expirationTimes;0=xl),Fx=" ",Bx=!1;function Ux(a,s){switch(a){case"keyup":return G_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hx(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Co=!1;function q_(a,s){switch(a){case"compositionend":return Hx(s);case"keypress":return s.which!==32?null:(Bx=!0,Fx);case"textInput":return a=s.data,a===Fx&&Bx?null:a;default:return null}}function Q_(a,s){if(Co)return a==="compositionend"||!wm&&Ux(a,s)?(a=Tx(),yc=pm=Oi=null,Co=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:d,offset:s-a};a=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Yx(d)}}function Zx(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Zx(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function Jx(){for(var a=window,s=et();s instanceof a.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)a=s.contentWindow;else break;s=et(a.document)}return s}function Sm(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}function iM(a){var s=Jx(),d=a.focusedElem,p=a.selectionRange;if(s!==d&&d&&d.ownerDocument&&Zx(d.ownerDocument.documentElement,d)){if(p!==null&&Sm(d)){if(s=p.start,a=p.end,a===void 0&&(a=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(a,d.value.length);else if(a=(s=d.ownerDocument||document)&&s.defaultView||window,a.getSelection){a=a.getSelection();var x=d.textContent.length,w=Math.min(p.start,x);p=p.end===void 0?w:Math.min(p.end,x),!a.extend&&w>p&&(x=p,p=w,w=x),x=Xx(d,w);var C=Xx(d,p);x&&C&&(a.rangeCount!==1||a.anchorNode!==x.node||a.anchorOffset!==x.offset||a.focusNode!==C.node||a.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(x.node,x.offset),a.removeAllRanges(),w>p?(a.addRange(s),a.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),a.addRange(s)))}}for(s=[],a=d;a=a.parentNode;)a.nodeType===1&&s.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d=document.documentMode,Po=null,Nm=null,jl=null,Em=!1;function eb(a,s,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Em||Po==null||Po!==et(p)||(p=Po,"selectionStart"in p&&Sm(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),jl&&kl(jl,p)||(jl=p,p=Ec(Nm,"onSelect"),0To||(a.current=$m[To],$m[To]=null,To--)}function tt(a,s){To++,$m[To]=a.current,a.current=s}var Ti={},Zt=Ii(Ti),pr=Ii(!1),wa=Ti;function Do(a,s){var d=a.type.contextTypes;if(!d)return Ti;var p=a.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var x={},w;for(w in d)x[w]=s[w];return p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=s,a.__reactInternalMemoizedMaskedChildContext=x),x}function gr(a){return a=a.childContextTypes,a!=null}function Oc(){it(pr),it(Zt)}function pb(a,s,d){if(Zt.current!==Ti)throw Error(r(168));tt(Zt,s),tt(pr,d)}function gb(a,s,d){var p=a.stateNode;if(s=s.childContextTypes,typeof p.getChildContext!="function")return d;p=p.getChildContext();for(var x in p)if(!(x in s))throw Error(r(108,pe(a)||"Unknown",x));return J({},d,p)}function _c(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ti,wa=Zt.current,tt(Zt,a),tt(pr,pr.current),!0}function vb(a,s,d){var p=a.stateNode;if(!p)throw Error(r(169));d?(a=gb(a,s,wa),p.__reactInternalMemoizedMergedChildContext=a,it(pr),it(Zt),tt(Zt,a)):it(pr),tt(pr,d)}var Qn=null,Mc=!1,zm=!1;function yb(a){Qn===null?Qn=[a]:Qn.push(a)}function gM(a){Mc=!0,yb(a)}function Di(){if(!zm&&Qn!==null){zm=!0;var a=0,s=Ze;try{var d=Qn;for(Ze=1;a>=C,x-=C,Yn=1<<32-rn(s)+x|d<Le?(Mt=De,De=null):Mt=De.sibling;var Qe=oe(W,De,V[Le],fe);if(Qe===null){De===null&&(De=Mt);break}a&&De&&Qe.alternate===null&&s(W,De),$=w(Qe,$,Le),Te===null?Ce=Qe:Te.sibling=Qe,Te=Qe,De=Mt}if(Le===V.length)return d(W,De),lt&&ja(W,Le),Ce;if(De===null){for(;LeLe?(Mt=De,De=null):Mt=De.sibling;var Wi=oe(W,De,Qe.value,fe);if(Wi===null){De===null&&(De=Mt);break}a&&De&&Wi.alternate===null&&s(W,De),$=w(Wi,$,Le),Te===null?Ce=Wi:Te.sibling=Wi,Te=Wi,De=Mt}if(Qe.done)return d(W,De),lt&&ja(W,Le),Ce;if(De===null){for(;!Qe.done;Le++,Qe=V.next())Qe=ce(W,Qe.value,fe),Qe!==null&&($=w(Qe,$,Le),Te===null?Ce=Qe:Te.sibling=Qe,Te=Qe);return lt&&ja(W,Le),Ce}for(De=p(W,De);!Qe.done;Le++,Qe=V.next())Qe=ve(De,W,Le,Qe.value,fe),Qe!==null&&(a&&Qe.alternate!==null&&De.delete(Qe.key===null?Le:Qe.key),$=w(Qe,$,Le),Te===null?Ce=Qe:Te.sibling=Qe,Te=Qe);return a&&De.forEach(function(YM){return s(W,YM)}),lt&&ja(W,Le),Ce}function xt(W,$,V,fe){if(typeof V=="object"&&V!==null&&V.type===D&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case _:e:{for(var Ce=V.key,Te=$;Te!==null;){if(Te.key===Ce){if(Ce=V.type,Ce===D){if(Te.tag===7){d(W,Te.sibling),$=x(Te,V.props.children),$.return=W,W=$;break e}}else if(Te.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ie&&Sb(Ce)===Te.type){d(W,Te.sibling),$=x(Te,V.props),$.ref=Pl(W,Te,V),$.return=W,W=$;break e}d(W,Te);break}else s(W,Te);Te=Te.sibling}V.type===D?($=_a(V.props.children,W.mode,fe,V.key),$.return=W,W=$):(fe=od(V.type,V.key,V.props,null,W.mode,fe),fe.ref=Pl(W,$,V),fe.return=W,W=fe)}return C(W);case O:e:{for(Te=V.key;$!==null;){if($.key===Te)if($.tag===4&&$.stateNode.containerInfo===V.containerInfo&&$.stateNode.implementation===V.implementation){d(W,$.sibling),$=x($,V.children||[]),$.return=W,W=$;break e}else{d(W,$);break}else s(W,$);$=$.sibling}$=Rp(V,W.mode,fe),$.return=W,W=$}return C(W);case ie:return Te=V._init,xt(W,$,Te(V._payload),fe)}if(Se(V))return ke(W,$,V,fe);if(te(V))return Ne(W,$,V,fe);Rc(W,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,$!==null&&$.tag===6?(d(W,$.sibling),$=x($,V),$.return=W,W=$):(d(W,$),$=Dp(V,W.mode,fe),$.return=W,W=$),C(W)):d(W,$)}return xt}var zo=Nb(!0),Eb=Nb(!1),Lc=Ii(null),$c=null,Fo=null,Km=null;function Gm(){Km=Fo=$c=null}function Vm(a){var s=Lc.current;it(Lc),a._currentValue=s}function qm(a,s,d){for(;a!==null;){var p=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),a===d)break;a=a.return}}function Bo(a,s){$c=a,Km=Fo=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&s)!==0&&(vr=!0),a.firstContext=null)}function Br(a){var s=a._currentValue;if(Km!==a)if(a={context:a,memoizedValue:s,next:null},Fo===null){if($c===null)throw Error(r(308));Fo=a,$c.dependencies={lanes:0,firstContext:a}}else Fo=Fo.next=a;return s}var Sa=null;function Qm(a){Sa===null?Sa=[a]:Sa.push(a)}function Ab(a,s,d,p){var x=s.interleaved;return x===null?(d.next=d,Qm(s)):(d.next=x.next,x.next=d),s.interleaved=d,Zn(a,p)}function Zn(a,s){a.lanes|=s;var d=a.alternate;for(d!==null&&(d.lanes|=s),d=a,a=a.return;a!==null;)a.childLanes|=s,d=a.alternate,d!==null&&(d.childLanes|=s),d=a,a=a.return;return d.tag===3?d.stateNode:null}var Ri=!1;function Ym(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cb(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Jn(a,s){return{eventTime:a,lane:s,tag:0,payload:null,callback:null,next:null}}function Li(a,s,d){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(Ve&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,Zn(a,d)}return x=p.interleaved,x===null?(s.next=s,Qm(p)):(s.next=x.next,x.next=s),p.interleaved=s,Zn(a,d)}function zc(a,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var p=s.lanes;p&=a.pendingLanes,d|=p,s.lanes=d,cm(a,d)}}function Pb(a,s){var d=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var x=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?x=w=C:w=w.next=C,d=d.next}while(d!==null);w===null?x=w=s:w=w.next=s}else x=w=s;d={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,effects:p.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=s:a.next=s,d.lastBaseUpdate=s}function Fc(a,s,d,p){var x=a.updateQueue;Ri=!1;var w=x.firstBaseUpdate,C=x.lastBaseUpdate,T=x.shared.pending;if(T!==null){x.shared.pending=null;var R=T,Q=R.next;R.next=null,C===null?w=Q:C.next=Q,C=R;var le=a.alternate;le!==null&&(le=le.updateQueue,T=le.lastBaseUpdate,T!==C&&(T===null?le.firstBaseUpdate=Q:T.next=Q,le.lastBaseUpdate=R))}if(w!==null){var ce=x.baseState;C=0,le=Q=R=null,T=w;do{var oe=T.lane,ve=T.eventTime;if((p&oe)===oe){le!==null&&(le=le.next={eventTime:ve,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var ke=a,Ne=T;switch(oe=s,ve=d,Ne.tag){case 1:if(ke=Ne.payload,typeof ke=="function"){ce=ke.call(ve,ce,oe);break e}ce=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Ne.payload,oe=typeof ke=="function"?ke.call(ve,ce,oe):ke,oe==null)break e;ce=J({},ce,oe);break e;case 2:Ri=!0}}T.callback!==null&&T.lane!==0&&(a.flags|=64,oe=x.effects,oe===null?x.effects=[T]:oe.push(T))}else ve={eventTime:ve,lane:oe,tag:T.tag,payload:T.payload,callback:T.callback,next:null},le===null?(Q=le=ve,R=ce):le=le.next=ve,C|=oe;if(T=T.next,T===null){if(T=x.shared.pending,T===null)break;oe=T,T=oe.next,oe.next=null,x.lastBaseUpdate=oe,x.shared.pending=null}}while(!0);if(le===null&&(R=ce),x.baseState=R,x.firstBaseUpdate=Q,x.lastBaseUpdate=le,s=x.shared.interleaved,s!==null){x=s;do C|=x.lane,x=x.next;while(x!==s)}else w===null&&(x.shared.lanes=0);Aa|=C,a.lanes=C,a.memoizedState=ce}}function Ob(a,s,d){if(a=s.effects,s.effects=null,a!==null)for(s=0;sd?d:4,a(!0);var p=tp.transition;tp.transition={};try{a(!1),s()}finally{Ze=d,tp.transition=p}}function Qb(){return Ur().memoizedState}function bM(a,s,d){var p=Bi(a);if(d={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null},Yb(a))Xb(s,d);else if(d=Ab(a,s,d,p),d!==null){var x=ur();un(d,a,p,x),Zb(d,s,p)}}function wM(a,s,d){var p=Bi(a),x={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null};if(Yb(a))Xb(s,x);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,T=w(C,d);if(x.hasEagerState=!0,x.eagerState=T,nn(T,C)){var R=s.interleaved;R===null?(x.next=x,Qm(s)):(x.next=R.next,R.next=x),s.interleaved=x;return}}catch{}finally{}d=Ab(a,s,x,p),d!==null&&(x=ur(),un(d,a,p,x),Zb(d,s,p))}}function Yb(a){var s=a.alternate;return a===ft||s!==null&&s===ft}function Xb(a,s){Il=Hc=!0;var d=a.pending;d===null?s.next=s:(s.next=d.next,d.next=s),a.pending=s}function Zb(a,s,d){if((d&4194240)!==0){var p=s.lanes;p&=a.pendingLanes,d|=p,s.lanes=d,cm(a,d)}}var Gc={readContext:Br,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},kM={readContext:Br,useCallback:function(a,s){return Sn().memoizedState=[a,s===void 0?null:s],a},useContext:Br,useEffect:Bb,useImperativeHandle:function(a,s,d){return d=d!=null?d.concat([a]):null,Wc(4194308,4,Wb.bind(null,s,a),d)},useLayoutEffect:function(a,s){return Wc(4194308,4,a,s)},useInsertionEffect:function(a,s){return Wc(4,2,a,s)},useMemo:function(a,s){var d=Sn();return s=s===void 0?null:s,a=a(),d.memoizedState=[a,s],a},useReducer:function(a,s,d){var p=Sn();return s=d!==void 0?d(s):s,p.memoizedState=p.baseState=s,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:s},p.queue=a,a=a.dispatch=bM.bind(null,ft,a),[p.memoizedState,a]},useRef:function(a){var s=Sn();return a={current:a},s.memoizedState=a},useState:zb,useDebugValue:lp,useDeferredValue:function(a){return Sn().memoizedState=a},useTransition:function(){var a=zb(!1),s=a[0];return a=xM.bind(null,a[1]),Sn().memoizedState=a,[s,a]},useMutableSource:function(){},useSyncExternalStore:function(a,s,d){var p=ft,x=Sn();if(lt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),_t===null)throw Error(r(349));(Ea&30)!==0||Tb(p,s,d)}x.memoizedState=d;var w={value:d,getSnapshot:s};return x.queue=w,Bb(Rb.bind(null,p,w,a),[a]),p.flags|=2048,Rl(9,Db.bind(null,p,w,d,s),void 0,null),d},useId:function(){var a=Sn(),s=_t.identifierPrefix;if(lt){var d=Xn,p=Yn;d=(p&~(1<<32-rn(p)-1)).toString(32)+d,s=":"+s+"R"+d,d=Tl++,0")&&(R=R.replace("",i.displayName)),R}while(1<=C&&0<=T);break}}}finally{H=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?M(i):""}function Z(i){switch(i.tag){case 5:return M(i.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return i=ne(i.type,!1),i;case 11:return i=ne(i.type.render,!1),i;case 1:return i=ne(i.type,!0),i;default:return""}}function me(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case D:return"Fragment";case O:return"Portal";case F:return"Profiler";case B:return"StrictMode";case he:return"Suspense";case ue:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Y:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case U:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ge:return s=i.displayName||null,s!==null?s:me(i.type)||"Memo";case ie:s=i._payload,i=i._init;try{return me(i(s))}catch{}}return null}function pe(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(s);case 8:return s===B?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Oe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function re(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function we(i){var s=re(i)?"checked":"value",d=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),p=""+i[s];if(!i.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,w=d.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return x.call(this)},set:function(C){p=""+C,w.call(this,C)}}),Object.defineProperty(i,s,{enumerable:d.enumerable}),{getValue:function(){return p},setValue:function(C){p=""+C},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function _e(i){i._valueTracker||(i._valueTracker=we(i))}function ae(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var d=s.getValue(),p="";return i&&(p=re(i)?i.checked?"true":"false":i.value),i=p,i!==d?(s.setValue(i),!0):!1}function et(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Be(i,s){var d=s.checked;return J({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??i._wrapperState.initialChecked})}function Pe(i,s){var d=s.defaultValue==null?"":s.defaultValue,p=s.checked!=null?s.checked:s.defaultChecked;d=Oe(s.value!=null?s.value:d),i._wrapperState={initialChecked:p,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function vt(i,s){s=s.checked,s!=null&&A(i,"checked",s,!1)}function Yt(i,s){vt(i,s);var d=Oe(s.value),p=s.type;if(d!=null)p==="number"?(d===0&&i.value===""||i.value!=d)&&(i.value=""+d):i.value!==""+d&&(i.value=""+d);else if(p==="submit"||p==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Ae(i,s.type,d):s.hasOwnProperty("defaultValue")&&Ae(i,s.type,Oe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function K(i,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var p=s.type;if(!(p!=="submit"&&p!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,d||s===i.value||(i.value=s),i.defaultValue=s}d=i.name,d!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,d!==""&&(i.name=d)}function Ae(i,s,d){(s!=="number"||et(i.ownerDocument)!==i)&&(d==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+d&&(i.defaultValue=""+d))}var Se=Array.isArray;function qe(i,s,d,p){if(i=i.options,s){s={};for(var x=0;x"+s.valueOf().toString()+"",s=oc.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function al(i,s){if(s){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=s;return}}i.textContent=s}var ol={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},XO=["Webkit","ms","Moz","O"];Object.keys(ol).forEach(function(i){XO.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ol[s]=ol[i]})});function ox(i,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||ol.hasOwnProperty(i)&&ol[i]?(""+s).trim():s+"px"}function sx(i,s){i=i.style;for(var d in s)if(s.hasOwnProperty(d)){var p=d.indexOf("--")===0,x=ox(d,s[d],p);d==="float"&&(d="cssFloat"),p?i.setProperty(d,x):i[d]=x}}var ZO=J({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 Zh(i,s){if(s){if(ZO[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Jh(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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 em=null;function tm(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var rm=null,So=null,No=null;function lx(i){if(i=Cl(i)){if(typeof rm!="function")throw Error(r(280));var s=i.stateNode;s&&(s=Pc(s),rm(i.stateNode,i.type,s))}}function ux(i){So?No?No.push(i):No=[i]:So=i}function cx(){if(So){var i=So,s=No;if(No=So=null,lx(i),s)for(i=0;i>>=0,i===0?32:31-(u_(i)/c_|0)|0}var dc=64,fc=4194304;function cl(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function hc(i,s){var d=i.pendingLanes;if(d===0)return 0;var p=0,x=i.suspendedLanes,w=i.pingedLanes,C=d&268435455;if(C!==0){var T=C&~x;T!==0?p=cl(T):(w&=C,w!==0&&(p=cl(w)))}else C=d&~x,C!==0?p=cl(C):w!==0&&(p=cl(w));if(p===0)return 0;if(s!==0&&s!==p&&(s&x)===0&&(x=p&-p,w=s&-s,x>=w||x===16&&(w&4194240)!==0))return s;if((p&4)!==0&&(p|=d&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=p;0d;d++)s.push(i);return s}function dl(i,s,d){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-rn(s),i[s]=d}function m_(i,s){var d=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var p=i.eventTimes;for(i=i.expirationTimes;0=xl),$x=" ",zx=!1;function Fx(i,s){switch(i){case"keyup":return U_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Co=!1;function W_(i,s){switch(i){case"compositionend":return Bx(s);case"keypress":return s.which!==32?null:(zx=!0,$x);case"textInput":return i=s.data,i===$x&&zx?null:i;default:return null}}function K_(i,s){if(Co)return i==="compositionend"||!bm&&Fx(i,s)?(i=Mx(),yc=mm=Oi=null,Co=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:d,offset:s-i};i=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=qx(d)}}function Yx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Yx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Xx(){for(var i=window,s=et();s instanceof i.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)i=s.contentWindow;else break;s=et(i.document)}return s}function jm(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function e3(i){var s=Xx(),d=i.focusedElem,p=i.selectionRange;if(s!==d&&d&&d.ownerDocument&&Yx(d.ownerDocument.documentElement,d)){if(p!==null&&jm(d)){if(s=p.start,i=p.end,i===void 0&&(i=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(i,d.value.length);else if(i=(s=d.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var x=d.textContent.length,w=Math.min(p.start,x);p=p.end===void 0?w:Math.min(p.end,x),!i.extend&&w>p&&(x=p,p=w,w=x),x=Qx(d,w);var C=Qx(d,p);x&&C&&(i.rangeCount!==1||i.anchorNode!==x.node||i.anchorOffset!==x.offset||i.focusNode!==C.node||i.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(x.node,x.offset),i.removeAllRanges(),w>p?(i.addRange(s),i.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),i.addRange(s)))}}for(s=[],i=d;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d=document.documentMode,Po=null,Sm=null,jl=null,Nm=!1;function Zx(i,s,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Nm||Po==null||Po!==et(p)||(p=Po,"selectionStart"in p&&jm(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),jl&&kl(jl,p)||(jl=p,p=Ec(Sm,"onSelect"),0To||(i.current=Lm[To],Lm[To]=null,To--)}function tt(i,s){To++,Lm[To]=i.current,i.current=s}var Ti={},Zt=Ii(Ti),pr=Ii(!1),wa=Ti;function Do(i,s){var d=i.type.contextTypes;if(!d)return Ti;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var x={},w;for(w in d)x[w]=s[w];return p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=x),x}function gr(i){return i=i.childContextTypes,i!=null}function Oc(){it(pr),it(Zt)}function hb(i,s,d){if(Zt.current!==Ti)throw Error(r(168));tt(Zt,s),tt(pr,d)}function mb(i,s,d){var p=i.stateNode;if(s=s.childContextTypes,typeof p.getChildContext!="function")return d;p=p.getChildContext();for(var x in p)if(!(x in s))throw Error(r(108,pe(i)||"Unknown",x));return J({},d,p)}function _c(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ti,wa=Zt.current,tt(Zt,i),tt(pr,pr.current),!0}function pb(i,s,d){var p=i.stateNode;if(!p)throw Error(r(169));d?(i=mb(i,s,wa),p.__reactInternalMemoizedMergedChildContext=i,it(pr),it(Zt),tt(Zt,i)):it(pr),tt(pr,d)}var Qn=null,Mc=!1,$m=!1;function gb(i){Qn===null?Qn=[i]:Qn.push(i)}function f3(i){Mc=!0,gb(i)}function Di(){if(!$m&&Qn!==null){$m=!0;var i=0,s=Ze;try{var d=Qn;for(Ze=1;i>=C,x-=C,Yn=1<<32-rn(s)+x|d<Le?(Mt=De,De=null):Mt=De.sibling;var Qe=oe(W,De,V[Le],fe);if(Qe===null){De===null&&(De=Mt);break}i&&De&&Qe.alternate===null&&s(W,De),$=w(Qe,$,Le),Te===null?Ce=Qe:Te.sibling=Qe,Te=Qe,De=Mt}if(Le===V.length)return d(W,De),lt&&ja(W,Le),Ce;if(De===null){for(;LeLe?(Mt=De,De=null):Mt=De.sibling;var Wi=oe(W,De,Qe.value,fe);if(Wi===null){De===null&&(De=Mt);break}i&&De&&Wi.alternate===null&&s(W,De),$=w(Wi,$,Le),Te===null?Ce=Wi:Te.sibling=Wi,Te=Wi,De=Mt}if(Qe.done)return d(W,De),lt&&ja(W,Le),Ce;if(De===null){for(;!Qe.done;Le++,Qe=V.next())Qe=ce(W,Qe.value,fe),Qe!==null&&($=w(Qe,$,Le),Te===null?Ce=Qe:Te.sibling=Qe,Te=Qe);return lt&&ja(W,Le),Ce}for(De=p(W,De);!Qe.done;Le++,Qe=V.next())Qe=ve(De,W,Le,Qe.value,fe),Qe!==null&&(i&&Qe.alternate!==null&&De.delete(Qe.key===null?Le:Qe.key),$=w(Qe,$,Le),Te===null?Ce=Qe:Te.sibling=Qe,Te=Qe);return i&&De.forEach(function(G3){return s(W,G3)}),lt&&ja(W,Le),Ce}function xt(W,$,V,fe){if(typeof V=="object"&&V!==null&&V.type===D&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case _:e:{for(var Ce=V.key,Te=$;Te!==null;){if(Te.key===Ce){if(Ce=V.type,Ce===D){if(Te.tag===7){d(W,Te.sibling),$=x(Te,V.props.children),$.return=W,W=$;break e}}else if(Te.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ie&&kb(Ce)===Te.type){d(W,Te.sibling),$=x(Te,V.props),$.ref=Pl(W,Te,V),$.return=W,W=$;break e}d(W,Te);break}else s(W,Te);Te=Te.sibling}V.type===D?($=_a(V.props.children,W.mode,fe,V.key),$.return=W,W=$):(fe=od(V.type,V.key,V.props,null,W.mode,fe),fe.ref=Pl(W,$,V),fe.return=W,W=fe)}return C(W);case O:e:{for(Te=V.key;$!==null;){if($.key===Te)if($.tag===4&&$.stateNode.containerInfo===V.containerInfo&&$.stateNode.implementation===V.implementation){d(W,$.sibling),$=x($,V.children||[]),$.return=W,W=$;break e}else{d(W,$);break}else s(W,$);$=$.sibling}$=Dp(V,W.mode,fe),$.return=W,W=$}return C(W);case ie:return Te=V._init,xt(W,$,Te(V._payload),fe)}if(Se(V))return ke(W,$,V,fe);if(te(V))return Ne(W,$,V,fe);Rc(W,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,$!==null&&$.tag===6?(d(W,$.sibling),$=x($,V),$.return=W,W=$):(d(W,$),$=Tp(V,W.mode,fe),$.return=W,W=$),C(W)):d(W,$)}return xt}var zo=jb(!0),Sb=jb(!1),Lc=Ii(null),$c=null,Fo=null,Wm=null;function Km(){Wm=Fo=$c=null}function Gm(i){var s=Lc.current;it(Lc),i._currentValue=s}function Vm(i,s,d){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===d)break;i=i.return}}function Bo(i,s){$c=i,Wm=Fo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(vr=!0),i.firstContext=null)}function Br(i){var s=i._currentValue;if(Wm!==i)if(i={context:i,memoizedValue:s,next:null},Fo===null){if($c===null)throw Error(r(308));Fo=i,$c.dependencies={lanes:0,firstContext:i}}else Fo=Fo.next=i;return s}var Sa=null;function qm(i){Sa===null?Sa=[i]:Sa.push(i)}function Nb(i,s,d,p){var x=s.interleaved;return x===null?(d.next=d,qm(s)):(d.next=x.next,x.next=d),s.interleaved=d,Zn(i,p)}function Zn(i,s){i.lanes|=s;var d=i.alternate;for(d!==null&&(d.lanes|=s),d=i,i=i.return;i!==null;)i.childLanes|=s,d=i.alternate,d!==null&&(d.childLanes|=s),d=i,i=i.return;return d.tag===3?d.stateNode:null}var Ri=!1;function Qm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Eb(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Jn(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Li(i,s,d){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(Ge&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,Zn(i,d)}return x=p.interleaved,x===null?(s.next=s,qm(p)):(s.next=x.next,x.next=s),p.interleaved=s,Zn(i,d)}function zc(i,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var p=s.lanes;p&=i.pendingLanes,d|=p,s.lanes=d,um(i,d)}}function Ab(i,s){var d=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var x=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?x=w=C:w=w.next=C,d=d.next}while(d!==null);w===null?x=w=s:w=w.next=s}else x=w=s;d={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,effects:p.effects},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=s:i.next=s,d.lastBaseUpdate=s}function Fc(i,s,d,p){var x=i.updateQueue;Ri=!1;var w=x.firstBaseUpdate,C=x.lastBaseUpdate,T=x.shared.pending;if(T!==null){x.shared.pending=null;var R=T,Q=R.next;R.next=null,C===null?w=Q:C.next=Q,C=R;var le=i.alternate;le!==null&&(le=le.updateQueue,T=le.lastBaseUpdate,T!==C&&(T===null?le.firstBaseUpdate=Q:T.next=Q,le.lastBaseUpdate=R))}if(w!==null){var ce=x.baseState;C=0,le=Q=R=null,T=w;do{var oe=T.lane,ve=T.eventTime;if((p&oe)===oe){le!==null&&(le=le.next={eventTime:ve,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var ke=i,Ne=T;switch(oe=s,ve=d,Ne.tag){case 1:if(ke=Ne.payload,typeof ke=="function"){ce=ke.call(ve,ce,oe);break e}ce=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Ne.payload,oe=typeof ke=="function"?ke.call(ve,ce,oe):ke,oe==null)break e;ce=J({},ce,oe);break e;case 2:Ri=!0}}T.callback!==null&&T.lane!==0&&(i.flags|=64,oe=x.effects,oe===null?x.effects=[T]:oe.push(T))}else ve={eventTime:ve,lane:oe,tag:T.tag,payload:T.payload,callback:T.callback,next:null},le===null?(Q=le=ve,R=ce):le=le.next=ve,C|=oe;if(T=T.next,T===null){if(T=x.shared.pending,T===null)break;oe=T,T=oe.next,oe.next=null,x.lastBaseUpdate=oe,x.shared.pending=null}}while(!0);if(le===null&&(R=ce),x.baseState=R,x.firstBaseUpdate=Q,x.lastBaseUpdate=le,s=x.shared.interleaved,s!==null){x=s;do C|=x.lane,x=x.next;while(x!==s)}else w===null&&(x.shared.lanes=0);Aa|=C,i.lanes=C,i.memoizedState=ce}}function Cb(i,s,d){if(i=s.effects,s.effects=null,i!==null)for(s=0;sd?d:4,i(!0);var p=ep.transition;ep.transition={};try{i(!1),s()}finally{Ze=d,ep.transition=p}}function Vb(){return Ur().memoizedState}function g3(i,s,d){var p=Bi(i);if(d={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null},qb(i))Qb(s,d);else if(d=Nb(i,s,d,p),d!==null){var x=ur();un(d,i,p,x),Yb(d,s,p)}}function v3(i,s,d){var p=Bi(i),x={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null};if(qb(i))Qb(s,x);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,T=w(C,d);if(x.hasEagerState=!0,x.eagerState=T,nn(T,C)){var R=s.interleaved;R===null?(x.next=x,qm(s)):(x.next=R.next,R.next=x),s.interleaved=x;return}}catch{}finally{}d=Nb(i,s,x,p),d!==null&&(x=ur(),un(d,i,p,x),Yb(d,s,p))}}function qb(i){var s=i.alternate;return i===ft||s!==null&&s===ft}function Qb(i,s){Il=Hc=!0;var d=i.pending;d===null?s.next=s:(s.next=d.next,d.next=s),i.pending=s}function Yb(i,s,d){if((d&4194240)!==0){var p=s.lanes;p&=i.pendingLanes,d|=p,s.lanes=d,um(i,d)}}var Gc={readContext:Br,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},y3={readContext:Br,useCallback:function(i,s){return Sn().memoizedState=[i,s===void 0?null:s],i},useContext:Br,useEffect:zb,useImperativeHandle:function(i,s,d){return d=d!=null?d.concat([i]):null,Wc(4194308,4,Ub.bind(null,s,i),d)},useLayoutEffect:function(i,s){return Wc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Wc(4,2,i,s)},useMemo:function(i,s){var d=Sn();return s=s===void 0?null:s,i=i(),d.memoizedState=[i,s],i},useReducer:function(i,s,d){var p=Sn();return s=d!==void 0?d(s):s,p.memoizedState=p.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},p.queue=i,i=i.dispatch=g3.bind(null,ft,i),[p.memoizedState,i]},useRef:function(i){var s=Sn();return i={current:i},s.memoizedState=i},useState:Lb,useDebugValue:sp,useDeferredValue:function(i){return Sn().memoizedState=i},useTransition:function(){var i=Lb(!1),s=i[0];return i=p3.bind(null,i[1]),Sn().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,d){var p=ft,x=Sn();if(lt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),_t===null)throw Error(r(349));(Ea&30)!==0||Mb(p,s,d)}x.memoizedState=d;var w={value:d,getSnapshot:s};return x.queue=w,zb(Tb.bind(null,p,w,i),[i]),p.flags|=2048,Rl(9,Ib.bind(null,p,w,d,s),void 0,null),d},useId:function(){var i=Sn(),s=_t.identifierPrefix;if(lt){var d=Xn,p=Yn;d=(p&~(1<<32-rn(p)-1)).toString(32)+d,s=":"+s+"R"+d,d=Tl++,0<\/script>",a=a.removeChild(a.firstChild)):typeof p.is=="string"?a=C.createElement(d,{is:p.is}):(a=C.createElement(d),d==="select"&&(C=a,p.multiple?C.multiple=!0:p.size&&(C.size=p.size))):a=C.createElementNS(a,d),a[kn]=s,a[Al]=p,y1(a,s,!1,!1),s.stateNode=a;e:{switch(C=em(d,p),d){case"dialog":nt("cancel",a),nt("close",a),x=p;break;case"iframe":case"object":case"embed":nt("load",a),x=p;break;case"video":case"audio":for(x=0;xGo&&(s.flags|=128,p=!0,Ll(w,!1),s.lanes=4194304)}else{if(!p)if(a=Bc(C),a!==null){if(s.flags|=128,p=!0,d=a.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),Ll(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!lt)return er(s),null}else 2*yt()-w.renderingStartTime>Go&&d!==1073741824&&(s.flags|=128,p=!0,Ll(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(d=w.last,d!==null?d.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=yt(),s.sibling=null,d=dt.current,tt(dt,p?d&1|2:d&1),s):(er(s),null);case 22:case 23:return Mp(),p=s.memoizedState!==null,a!==null&&a.memoizedState!==null!==p&&(s.flags|=8192),p&&(s.mode&1)!==0?(Pr&1073741824)!==0&&(er(s),s.subtreeFlags&6&&(s.flags|=8192)):er(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function OM(a,s){switch(Bm(s),s.tag){case 1:return gr(s.type)&&Oc(),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Uo(),it(pr),it(Zt),ep(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 5:return Zm(s),null;case 13:if(it(dt),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));$o()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return it(dt),null;case 4:return Uo(),null;case 10:return Vm(s.type._context),null;case 22:case 23:return Mp(),null;case 24:return null;default:return null}}var Yc=!1,tr=!1,_M=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Wo(a,s){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(p){ht(a,s,p)}else d.current=null}function bp(a,s,d){try{d()}catch(p){ht(a,s,p)}}var w1=!1;function MM(a,s){if(Mm=gc,a=Jx(),Sm(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var C=0,T=-1,R=-1,Q=0,le=0,ce=a,oe=null;t:for(;;){for(var ve;ce!==d||x!==0&&ce.nodeType!==3||(T=C+x),ce!==w||p!==0&&ce.nodeType!==3||(R=C+p),ce.nodeType===3&&(C+=ce.nodeValue.length),(ve=ce.firstChild)!==null;)oe=ce,ce=ve;for(;;){if(ce===a)break t;if(oe===d&&++Q===x&&(T=C),oe===w&&++le===p&&(R=C),(ve=ce.nextSibling)!==null)break;ce=oe,oe=ce.parentNode}ce=ve}d=T===-1||R===-1?null:{start:T,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(Im={focusedElem:a,selectionRange:d},gc=!1,xe=s;xe!==null;)if(s=xe,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,xe=a;else for(;xe!==null;){s=xe;try{var ke=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Ne=ke.memoizedProps,xt=ke.memoizedState,W=s.stateNode,$=W.getSnapshotBeforeUpdate(s.elementType===s.type?Ne:on(s.type,Ne),xt);W.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(fe){ht(s,s.return,fe)}if(a=s.sibling,a!==null){a.return=s.return,xe=a;break}xe=s.return}return ke=w1,w1=!1,ke}function $l(a,s,d){var p=s.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&a)===a){var w=x.destroy;x.destroy=void 0,w!==void 0&&bp(s,d,w)}x=x.next}while(x!==p)}}function Xc(a,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&a)===a){var p=d.create;d.destroy=p()}d=d.next}while(d!==s)}}function wp(a){var s=a.ref;if(s!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof s=="function"?s(a):s.current=a}}function k1(a){var s=a.alternate;s!==null&&(a.alternate=null,k1(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&(delete s[kn],delete s[Al],delete s[Lm],delete s[mM],delete s[pM])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function j1(a){return a.tag===5||a.tag===3||a.tag===4}function S1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||j1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function kp(a,s,d){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(a,s):d.insertBefore(a,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(a,d)):(s=d,s.appendChild(a)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Cc));else if(p!==4&&(a=a.child,a!==null))for(kp(a,s,d),a=a.sibling;a!==null;)kp(a,s,d),a=a.sibling}function jp(a,s,d){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?d.insertBefore(a,s):d.appendChild(a);else if(p!==4&&(a=a.child,a!==null))for(jp(a,s,d),a=a.sibling;a!==null;)jp(a,s,d),a=a.sibling}var Ft=null,sn=!1;function $i(a,s,d){for(d=d.child;d!==null;)N1(a,s,d),d=d.sibling}function N1(a,s,d){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(cc,d)}catch{}switch(d.tag){case 5:tr||Wo(d,s);case 6:var p=Ft,x=sn;Ft=null,$i(a,s,d),Ft=p,sn=x,Ft!==null&&(sn?(a=Ft,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Ft.removeChild(d.stateNode));break;case 18:Ft!==null&&(sn?(a=Ft,d=d.stateNode,a.nodeType===8?Rm(a.parentNode,d):a.nodeType===1&&Rm(a,d),gl(a)):Rm(Ft,d.stateNode));break;case 4:p=Ft,x=sn,Ft=d.stateNode.containerInfo,sn=!0,$i(a,s,d),Ft=p,sn=x;break;case 0:case 11:case 14:case 15:if(!tr&&(p=d.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){x=p=p.next;do{var w=x,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&bp(d,s,C),x=x.next}while(x!==p)}$i(a,s,d);break;case 1:if(!tr&&(Wo(d,s),p=d.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=d.memoizedProps,p.state=d.memoizedState,p.componentWillUnmount()}catch(T){ht(d,s,T)}$i(a,s,d);break;case 21:$i(a,s,d);break;case 22:d.mode&1?(tr=(p=tr)||d.memoizedState!==null,$i(a,s,d),tr=p):$i(a,s,d);break;default:$i(a,s,d)}}function E1(a){var s=a.updateQueue;if(s!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new _M),s.forEach(function(p){var x=BM.bind(null,a,p);d.has(p)||(d.add(p),p.then(x,x))})}}function ln(a,s){var d=s.deletions;if(d!==null)for(var p=0;px&&(x=C),p&=~w}if(p=x,p=yt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*TM(p/1960))-p,10a?16:a,Fi===null)var p=!1;else{if(a=Fi,Fi=null,rd=0,(Ve&6)!==0)throw Error(r(331));var x=Ve;for(Ve|=4,xe=a.current;xe!==null;){var w=xe,C=w.child;if((xe.flags&16)!==0){var T=w.deletions;if(T!==null){for(var R=0;Ryt()-Ep?Pa(a,0):Np|=d),xr(a,s)}function z1(a,s){s===0&&((a.mode&1)===0?s=1:(s=fc,fc<<=1,(fc&130023424)===0&&(fc=4194304)));var d=ur();a=Zn(a,s),a!==null&&(dl(a,s,d),xr(a,d))}function FM(a){var s=a.memoizedState,d=0;s!==null&&(d=s.retryLane),z1(a,d)}function BM(a,s){var d=0;switch(a.tag){case 13:var p=a.stateNode,x=a.memoizedState;x!==null&&(d=x.retryLane);break;case 19:p=a.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(s),z1(a,d)}var F1;F1=function(a,s,d){if(a!==null)if(a.memoizedProps!==s.pendingProps||pr.current)vr=!0;else{if((a.lanes&d)===0&&(s.flags&128)===0)return vr=!1,CM(a,s,d);vr=(a.flags&131072)!==0}else vr=!1,lt&&(s.flags&1048576)!==0&&xb(s,Tc,s.index);switch(s.lanes=0,s.tag){case 2:var p=s.type;Qc(a,s),a=s.pendingProps;var x=Do(s,Zt.current);Bo(s,d),x=np(null,s,p,a,x,d);var w=ip();return s.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,gr(p)?(w=!0,_c(s)):w=!1,s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,Ym(s),x.updater=Vc,s.stateNode=x,x._reactInternals=s,cp(s,p,a,d),s=mp(null,s,p,!0,w,d)):(s.tag=0,lt&&w&&Fm(s),lr(null,s,x,d),s=s.child),s;case 16:p=s.elementType;e:{switch(Qc(a,s),a=s.pendingProps,x=p._init,p=x(p._payload),s.type=p,x=s.tag=HM(p),a=on(p,a),x){case 0:s=hp(null,s,p,a,d);break e;case 1:s=f1(null,s,p,a,d);break e;case 11:s=s1(null,s,p,a,d);break e;case 14:s=l1(null,s,p,on(p.type,a),d);break e}throw Error(r(306,p,""))}return s;case 0:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),hp(a,s,p,x,d);case 1:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),f1(a,s,p,x,d);case 3:e:{if(h1(s),a===null)throw Error(r(387));p=s.pendingProps,w=s.memoizedState,x=w.element,Cb(a,s),Fc(s,p,null,d);var C=s.memoizedState;if(p=C.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){x=Ho(Error(r(423)),s),s=m1(a,s,p,d,x);break e}else if(p!==x){x=Ho(Error(r(424)),s),s=m1(a,s,p,d,x);break e}else for(Cr=Mi(s.stateNode.containerInfo.firstChild),Ar=s,lt=!0,an=null,d=Eb(s,null,p,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if($o(),p===x){s=ei(a,s,d);break e}lr(a,s,p,d)}s=s.child}return s;case 5:return _b(s),a===null&&Hm(s),p=s.type,x=s.pendingProps,w=a!==null?a.memoizedProps:null,C=x.children,Tm(p,x)?C=null:w!==null&&Tm(p,w)&&(s.flags|=32),d1(a,s),lr(a,s,C,d),s.child;case 6:return a===null&&Hm(s),null;case 13:return p1(a,s,d);case 4:return Xm(s,s.stateNode.containerInfo),p=s.pendingProps,a===null?s.child=zo(s,null,p,d):lr(a,s,p,d),s.child;case 11:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),s1(a,s,p,x,d);case 7:return lr(a,s,s.pendingProps,d),s.child;case 8:return lr(a,s,s.pendingProps.children,d),s.child;case 12:return lr(a,s,s.pendingProps.children,d),s.child;case 10:e:{if(p=s.type._context,x=s.pendingProps,w=s.memoizedProps,C=x.value,tt(Lc,p._currentValue),p._currentValue=C,w!==null)if(nn(w.value,C)){if(w.children===x.children&&!pr.current){s=ei(a,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var T=w.dependencies;if(T!==null){C=w.child;for(var R=T.firstContext;R!==null;){if(R.context===p){if(w.tag===1){R=Jn(-1,d&-d),R.tag=2;var Q=w.updateQueue;if(Q!==null){Q=Q.shared;var le=Q.pending;le===null?R.next=R:(R.next=le.next,le.next=R),Q.pending=R}}w.lanes|=d,R=w.alternate,R!==null&&(R.lanes|=d),qm(w.return,d,s),T.lanes|=d;break}R=R.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(r(341));C.lanes|=d,T=C.alternate,T!==null&&(T.lanes|=d),qm(C,d,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}lr(a,s,x.children,d),s=s.child}return s;case 9:return x=s.type,p=s.pendingProps.children,Bo(s,d),x=Br(x),p=p(x),s.flags|=1,lr(a,s,p,d),s.child;case 14:return p=s.type,x=on(p,s.pendingProps),x=on(p.type,x),l1(a,s,p,x,d);case 15:return u1(a,s,s.type,s.pendingProps,d);case 17:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),Qc(a,s),s.tag=1,gr(p)?(a=!0,_c(s)):a=!1,Bo(s,d),e1(s,p,x),cp(s,p,x,d),mp(null,s,p,!0,a,d);case 19:return v1(a,s,d);case 22:return c1(a,s,d)}throw Error(r(156,s.tag))};function B1(a,s){return bx(a,s)}function UM(a,s,d,p){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wr(a,s,d,p){return new UM(a,s,d,p)}function Tp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function HM(a){if(typeof a=="function")return Tp(a)?1:0;if(a!=null){if(a=a.$$typeof,a===U)return 11;if(a===ge)return 14}return 2}function Hi(a,s){var d=a.alternate;return d===null?(d=Wr(a.tag,s,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=s,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,s=a.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function od(a,s,d,p,x,w){var C=2;if(p=a,typeof a=="function")Tp(a)&&(C=1);else if(typeof a=="string")C=5;else e:switch(a){case D:return _a(d.children,x,w,s);case B:C=8,x|=8;break;case F:return a=Wr(12,d,s,x|2),a.elementType=F,a.lanes=w,a;case he:return a=Wr(13,d,s,x),a.elementType=he,a.lanes=w,a;case ue:return a=Wr(19,d,s,x),a.elementType=ue,a.lanes=w,a;case se:return sd(d,x,w,s);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case z:C=10;break e;case Y:C=9;break e;case U:C=11;break e;case ge:C=14;break e;case ie:C=16,p=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return s=Wr(C,d,s,x),s.elementType=a,s.type=p,s.lanes=w,s}function _a(a,s,d,p){return a=Wr(7,a,p,s),a.lanes=d,a}function sd(a,s,d,p){return a=Wr(22,a,p,s),a.elementType=se,a.lanes=d,a.stateNode={isHidden:!1},a}function Dp(a,s,d){return a=Wr(6,a,null,s),a.lanes=d,a}function Rp(a,s,d){return s=Wr(4,a.children!==null?a.children:[],a.key,s),s.lanes=d,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}function WM(a,s,d,p,x){this.tag=s,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=um(0),this.expirationTimes=um(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=um(0),this.identifierPrefix=p,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Lp(a,s,d,p,x,w,C,T,R){return a=new WM(a,s,d,T,R),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Wr(3,null,null,s),a.current=w,w.stateNode=a,w.memoizedState={element:p,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ym(w),a}function KM(a,s,d){var p=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Wp.exports=a3(),Wp.exports}var rw;function o3(){if(rw)return pd;rw=1;var e=fN();return pd.createRoot=e.createRoot,pd.hydrateRoot=e.hydrateRoot,pd}var s3=o3();const l3=cy(s3);var Bu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Va,ea,vs,rN,u3=(rN=class extends Bu{constructor(){super();Re(this,Va);Re(this,ea);Re(this,vs);ye(this,vs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,ea)||this.setEventListener(L(this,vs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ea))==null||t.call(this),ye(this,ea,void 0))}setEventListener(t){var r;ye(this,vs,t),(r=L(this,ea))==null||r.call(this),ye(this,ea,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,Va)!==t&&(ye(this,Va,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,Va)=="boolean"?L(this,Va):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Va=new WeakMap,ea=new WeakMap,vs=new WeakMap,rN),fy=new u3,c3={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ta,uy,nN,d3=(nN=class{constructor(){Re(this,ta,c3);Re(this,uy,!1)}setTimeoutProvider(e){ye(this,ta,e)}setTimeout(e,t){return L(this,ta).setTimeout(e,t)}clearTimeout(e){L(this,ta).clearTimeout(e)}setInterval(e,t){return L(this,ta).setInterval(e,t)}clearInterval(e){L(this,ta).clearInterval(e)}},ta=new WeakMap,uy=new WeakMap,nN),Ba=new d3;function f3(e){setTimeout(e,0)}var h3=typeof window>"u"||"Deno"in globalThis;function kr(){}function m3(e,t){return typeof e=="function"?e(t):e}function Fg(e){return typeof e=="number"&&e>=0&&e!==1/0}function hN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ua(e,t){return typeof e=="function"?e(t):e}function Ir(e,t){return typeof e=="function"?e(t):e}function nw(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:u,stale:c}=e;if(u){if(n){if(t.queryHash!==hy(u,t.options))return!1}else if(!pu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function iw(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(mu(t.options.mutationKey)!==mu(o))return!1}else if(!pu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function hy(e,t){return((t==null?void 0:t.queryKeyHashFn)||mu)(e)}function mu(e){return JSON.stringify(e,(t,r)=>Ug(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function pu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>pu(e[r],t[r])):!1}var p3=Object.prototype.hasOwnProperty;function mN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=aw(e)&&aw(t);if(!n&&!(Ug(e)&&Ug(t)))return t;const o=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),c=u.length,f=n?new Array(c):{};let h=0;for(let m=0;m{Ba.setTimeout(t,e)})}function Hg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?mN(e,t):t}function v3(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function y3(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var my=Symbol();function pN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===my?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gN(e,t){return typeof e=="function"?e(...t):!!e}function x3(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var gu=(()=>{let e=()=>h3;return{isServer(){return e()},setIsServer(t){e=t}}})();function Wg(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var b3=f3;function w3(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=b3;const o=c=>{t?e.push(c):i(()=>{r(c)})},u=()=>{const c=e;e=[],c.length&&i(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||u()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{i=c}}}var Kt=w3(),ys,ra,xs,iN,k3=(iN=class extends Bu{constructor(){super();Re(this,ys,!0);Re(this,ra);Re(this,xs);ye(this,xs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,ra)||this.setEventListener(L(this,xs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ra))==null||t.call(this),ye(this,ra,void 0))}setEventListener(t){var r;ye(this,xs,t),(r=L(this,ra))==null||r.call(this),ye(this,ra,t(this.setOnline.bind(this)))}setOnline(t){L(this,ys)!==t&&(ye(this,ys,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,ys)}},ys=new WeakMap,ra=new WeakMap,xs=new WeakMap,iN),Xd=new k3;function j3(e){return Math.min(1e3*2**e,3e4)}function vN(e){return(e??"online")==="online"?Xd.isOnline():!0}var Kg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function yN(e){let t=!1,r=0,n;const i=Wg(),o=()=>i.status!=="pending",u=k=>{var S;if(!o()){const N=new Kg(k);v(N),(S=e.onCancel)==null||S.call(e,N)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>fy.isFocused()&&(e.networkMode==="always"||Xd.isOnline())&&e.canRun(),m=()=>vN(e.networkMode)&&e.canRun(),g=k=>{o()||(n==null||n(),i.resolve(k))},v=k=>{o()||(n==null||n(),i.reject(k))},b=()=>new Promise(k=>{var S;n=N=>{(o()||h())&&k(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var k;n=void 0,o()||(k=e.onContinue)==null||k.call(e)}),j=()=>{if(o())return;let k;const S=r===0?e.initialPromise:void 0;try{k=S??e.fn()}catch(N){k=Promise.reject(N)}Promise.resolve(k).then(g).catch(N=>{var O;if(o())return;const E=e.retry??(gu.isServer()?0:3),A=e.retryDelay??j3,P=typeof A=="function"?A(r,N):A,_=E===!0||typeof E=="number"&&rh()?void 0:b()).then(()=>{t?v(N):j()})})};return{promise:i,status:()=>i.status,cancel:u,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?j():b().then(j),i)}}var qa,aN,xN=(aN=class{constructor(){Re(this,qa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fg(this.gcTime)&&ye(this,qa,Ba.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(gu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,qa)!==void 0&&(Ba.clearTimeout(L(this,qa)),ye(this,qa,void 0))}},qa=new WeakMap,aN);function S3(e){return{onFetch:(t,r)=>{var m,g,v,b,j;const n=t.options,i=(v=(g=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const h=async()=>{let k=!1;const S=A=>{x3(A,()=>t.signal,()=>k=!0)},N=pN(t.options,t.fetchOptions),E=async(A,P,_)=>{if(k)return Promise.reject(t.signal.reason);if(P==null&&A.pages.length)return Promise.resolve(A);const D=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:P,direction:_?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),B=await N(D),{maxPages:F}=t.options,z=_?y3:v3;return{pages:z(A.pages,B,F),pageParams:z(A.pageParams,P,F)}};if(i&&o.length){const A=i==="backward",P=A?N3:sw,_={pages:o,pageParams:u},O=P(n,_);c=await E(_,O,A)}else{const A=e??o.length;do{const P=f===0?u[0]??n.initialPageParam:sw(n,c);if(f>0&&P==null)break;c=await E(c,P),f++}while(f{var k,S;return(S=(k=t.options).persister)==null?void 0:S.call(k,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function sw(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function N3(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var bs,Qa,ws,Gr,Ya,It,Ru,Xa,Mr,bN,ni,oN,E3=(oN=class extends xN{constructor(t){super();Re(this,Mr);Re(this,bs);Re(this,Qa);Re(this,ws);Re(this,Gr);Re(this,Ya);Re(this,It);Re(this,Ru);Re(this,Xa);ye(this,Xa,!1),ye(this,Ru,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,Ya,t.client),ye(this,Gr,L(this,Ya).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Qa,uw(this.options)),this.state=t.state??L(this,Qa),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,bs)}get promise(){var t;return(t=L(this,It))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,Ru),...t},t!=null&&t._type&&ye(this,bs,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=uw(this.options);r.data!==void 0&&(this.setState(lw(r.data,r.dataUpdatedAt)),ye(this,Qa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Gr).remove(this)}setData(t,r){const n=Hg(this.state.data,t,this.options);return Ue(this,Mr,ni).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Ue(this,Mr,ni).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=L(this,It))==null?void 0:n.promise;return(i=L(this,It))==null||i.cancel(t),r?r.then(kr).catch(kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,Qa)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ir(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===my||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ua(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!hN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,It))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,It))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Gr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(L(this,It)&&(L(this,Xa)||Ue(this,Mr,bN).call(this)?L(this,It).cancel({revert:!0}):L(this,It).cancelRetry()),this.scheduleGc()),L(this,Gr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,Mr,ni).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,g,v,b,j,k,S,N,E,A;if(this.state.fetchStatus!=="idle"&&((h=L(this,It))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,It))return L(this,It).continueRetry(),L(this,It).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(_=>_.options.queryFn);P&&this.setOptions(P.options)}const n=new AbortController,i=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(ye(this,Xa,!0),n.signal)})},o=()=>{const P=pN(this.options,r),O=(()=>{const D={client:L(this,Ya),queryKey:this.queryKey,meta:this.meta};return i(D),D})();return ye(this,Xa,!1),this.options.persister?this.options.persister(P,O,this):P(O)},c=(()=>{const P={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,Ya),state:this.state,fetchFn:o};return i(P),P})(),f=L(this,bs)==="infinite"?S3(this.options.pages):this.options.behavior;f==null||f.onFetch(c,this),ye(this,ws,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&Ue(this,Mr,ni).call(this,{type:"fetch",meta:(g=c.fetchOptions)==null?void 0:g.meta}),ye(this,It,yN({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:P=>{P instanceof Kg&&P.revert&&this.setState({...L(this,ws),fetchStatus:"idle"}),n.abort()},onFail:(P,_)=>{Ue(this,Mr,ni).call(this,{type:"failed",failureCount:P,error:_})},onPause:()=>{Ue(this,Mr,ni).call(this,{type:"pause"})},onContinue:()=>{Ue(this,Mr,ni).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const P=await L(this,It).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(b=(v=L(this,Gr).config).onSuccess)==null||b.call(v,P,this),(k=(j=L(this,Gr).config).onSettled)==null||k.call(j,P,this.state.error,this),P}catch(P){if(P instanceof Kg){if(P.silent)return L(this,It).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw Ue(this,Mr,ni).call(this,{type:"error",error:P}),(N=(S=L(this,Gr).config).onError)==null||N.call(S,P,this),(A=(E=L(this,Gr).config).onSettled)==null||A.call(E,this.state.data,P,this),P}finally{this.scheduleGc()}}},bs=new WeakMap,Qa=new WeakMap,ws=new WeakMap,Gr=new WeakMap,Ya=new WeakMap,It=new WeakMap,Ru=new WeakMap,Xa=new WeakMap,Mr=new WeakSet,bN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ni=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...wN(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...lw(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,ws,t.manual?i:void 0),i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Gr).notify({query:this,type:"updated",action:t})})},oN);function wN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function uw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var wr,We,Lu,cr,Za,ks,ai,na,$u,js,Ss,Ja,eo,ia,Ns,Xe,au,Gg,Vg,qg,Qg,Yg,Xg,Zg,kN,sN,A3=(sN=class extends Bu{constructor(t,r){super();Re(this,Xe);Re(this,wr);Re(this,We);Re(this,Lu);Re(this,cr);Re(this,Za);Re(this,ks);Re(this,ai);Re(this,na);Re(this,$u);Re(this,js);Re(this,Ss);Re(this,Ja);Re(this,eo);Re(this,ia);Re(this,Ns,new Set);this.options=r,ye(this,wr,t),ye(this,na,null),ye(this,ai,Wg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,We).addObserver(this),cw(L(this,We),this.options)?Ue(this,Xe,au).call(this):this.updateResult(),Ue(this,Xe,Qg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jg(L(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jg(L(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,Xe,Yg).call(this),Ue(this,Xe,Xg).call(this),L(this,We).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,We);if(this.options=L(this,wr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ir(this.options.enabled,L(this,We))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,Xe,Zg).call(this),L(this,We).setOptions(this.options),r._defaulted&&!Bg(this.options,r)&&L(this,wr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,We),observer:this});const i=this.hasListeners();i&&dw(L(this,We),n,this.options,r)&&Ue(this,Xe,au).call(this),this.updateResult(),i&&(L(this,We)!==n||Ir(this.options.enabled,L(this,We))!==Ir(r.enabled,L(this,We))||ua(this.options.staleTime,L(this,We))!==ua(r.staleTime,L(this,We)))&&Ue(this,Xe,Gg).call(this);const o=Ue(this,Xe,Vg).call(this);i&&(L(this,We)!==n||Ir(this.options.enabled,L(this,We))!==Ir(r.enabled,L(this,We))||o!==L(this,ia))&&Ue(this,Xe,qg).call(this,o)}getOptimisticResult(t){const r=L(this,wr).getQueryCache().build(L(this,wr),t),n=this.createResult(r,t);return P3(this,n)&&(ye(this,cr,n),ye(this,ks,this.options),ye(this,Za,L(this,We).state)),n}getCurrentResult(){return L(this,cr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,ai).status==="pending"&&L(this,ai).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){L(this,Ns).add(t)}getCurrentQuery(){return L(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,wr).defaultQueryOptions(t),n=L(this,wr).getQueryCache().build(L(this,wr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ue(this,Xe,au).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,cr)))}createResult(t,r){var F;const n=L(this,We),i=this.options,o=L(this,cr),u=L(this,Za),c=L(this,ks),h=t!==n?t.state:L(this,Lu),{state:m}=t;let g={...m},v=!1,b;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&cw(t,r),U=z&&dw(t,n,r,i);(Y||U)&&(g={...g,...wN(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:j,errorUpdatedAt:k,status:S}=g;b=g.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let z;o!=null&&o.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(z=o.data,N=!0):z=typeof r.placeholderData=="function"?r.placeholderData((F=L(this,Ss))==null?void 0:F.state.data,L(this,Ss)):r.placeholderData,z!==void 0&&(S="success",b=Hg(o==null?void 0:o.data,z,r),v=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(u==null?void 0:u.data)&&r.select===L(this,$u))b=L(this,js);else try{ye(this,$u,r.select),b=r.select(b),b=Hg(o==null?void 0:o.data,b,r),ye(this,js,b),ye(this,na,null)}catch(z){ye(this,na,z)}L(this,na)&&(j=L(this,na),b=L(this,js),k=Date.now(),S="error");const E=g.fetchStatus==="fetching",A=S==="pending",P=S==="error",_=A&&E,O=b!==void 0,B={status:S,fetchStatus:g.fetchStatus,isPending:A,isSuccess:S==="success",isError:P,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:g.dataUpdatedAt,error:j,errorUpdatedAt:k,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!A,isLoadingError:P&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:P&&O,isStale:py(t,r),refetch:this.refetch,promise:L(this,ai),isEnabled:Ir(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=B.data!==void 0,Y=B.status==="error"&&!z,U=ge=>{Y?ge.reject(B.error):z&&ge.resolve(B.data)},he=()=>{const ge=ye(this,ai,B.promise=Wg());U(ge)},ue=L(this,ai);switch(ue.status){case"pending":t.queryHash===n.queryHash&&U(ue);break;case"fulfilled":(Y||B.data!==ue.value)&&he();break;case"rejected":(!Y||B.error!==ue.reason)&&he();break}}return B}updateResult(){const t=L(this,cr),r=this.createResult(L(this,We),this.options);if(ye(this,Za,L(this,We).state),ye(this,ks,this.options),L(this,Za).data!==void 0&&ye(this,Ss,L(this,We)),Bg(r,t))return;ye(this,cr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!L(this,Ns).size)return!0;const u=new Set(o??L(this,Ns));return this.options.throwOnError&&u.add("error"),Object.keys(L(this,cr)).some(c=>{const f=c;return L(this,cr)[f]!==t[f]&&u.has(f)})};Ue(this,Xe,kN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,Xe,Qg).call(this)}},wr=new WeakMap,We=new WeakMap,Lu=new WeakMap,cr=new WeakMap,Za=new WeakMap,ks=new WeakMap,ai=new WeakMap,na=new WeakMap,$u=new WeakMap,js=new WeakMap,Ss=new WeakMap,Ja=new WeakMap,eo=new WeakMap,ia=new WeakMap,Ns=new WeakMap,Xe=new WeakSet,au=function(t){Ue(this,Xe,Zg).call(this);let r=L(this,We).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(kr)),r},Gg=function(){Ue(this,Xe,Yg).call(this);const t=ua(this.options.staleTime,L(this,We));if(gu.isServer()||L(this,cr).isStale||!Fg(t))return;const n=hN(L(this,cr).dataUpdatedAt,t)+1;ye(this,Ja,Ba.setTimeout(()=>{L(this,cr).isStale||this.updateResult()},n))},Vg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,We)):this.options.refetchInterval)??!1},qg=function(t){Ue(this,Xe,Xg).call(this),ye(this,ia,t),!(gu.isServer()||Ir(this.options.enabled,L(this,We))===!1||!Fg(L(this,ia))||L(this,ia)===0)&&ye(this,eo,Ba.setInterval(()=>{(this.options.refetchIntervalInBackground||fy.isFocused())&&Ue(this,Xe,au).call(this)},L(this,ia)))},Qg=function(){Ue(this,Xe,Gg).call(this),Ue(this,Xe,qg).call(this,Ue(this,Xe,Vg).call(this))},Yg=function(){L(this,Ja)!==void 0&&(Ba.clearTimeout(L(this,Ja)),ye(this,Ja,void 0))},Xg=function(){L(this,eo)!==void 0&&(Ba.clearInterval(L(this,eo)),ye(this,eo,void 0))},Zg=function(){const t=L(this,wr).getQueryCache().build(L(this,wr),this.options);if(t===L(this,We))return;const r=L(this,We);ye(this,We,t),ye(this,Lu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},kN=function(t){Kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,cr))}),L(this,wr).getQueryCache().notify({query:L(this,We),type:"observerResultsUpdated"})})},sN);function C3(e,t){return Ir(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ir(t.retryOnMount,e)===!1)}function cw(e,t){return C3(e,t)||e.state.data!==void 0&&Jg(e,t,t.refetchOnMount)}function Jg(e,t,r){if(Ir(t.enabled,e)!==!1&&ua(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&py(e,t)}return!1}function dw(e,t,r,n){return(e!==t||Ir(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&py(e,r)}function py(e,t){return Ir(t.enabled,e)!==!1&&e.isStaleByTime(ua(t.staleTime,e))}function P3(e,t){return!Bg(e.getCurrentResult(),t)}var zu,On,rr,to,_n,qi,lN,O3=(lN=class extends xN{constructor(t){super();Re(this,_n);Re(this,zu);Re(this,On);Re(this,rr);Re(this,to);ye(this,zu,t.client),this.mutationId=t.mutationId,ye(this,rr,t.mutationCache),ye(this,On,[]),this.state=t.state||_3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,On).includes(t)||(L(this,On).push(t),this.clearGcTimeout(),L(this,rr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,On,L(this,On).filter(r=>r!==t)),this.scheduleGc(),L(this,rr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,On).length||(this.state.status==="pending"?this.scheduleGc():L(this,rr).remove(this))}continue(){var t;return((t=L(this,to))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,c,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,D;const r=()=>{Ue(this,_n,qi).call(this,{type:"continue"})},n={client:L(this,zu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,to,yN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,F)=>{Ue(this,_n,qi).call(this,{type:"failed",failureCount:B,error:F})},onPause:()=>{Ue(this,_n,qi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,rr).canRun(this)}));const i=this.state.status==="pending",o=!L(this,to).canStart();try{if(i)r();else{Ue(this,_n,qi).call(this,{type:"pending",variables:t,isPaused:o}),L(this,rr).config.onMutate&&await L(this,rr).config.onMutate(t,this,n);const F=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,n));F!==this.state.context&&Ue(this,_n,qi).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const B=await L(this,to).start();return await((h=(f=L(this,rr).config).onSuccess)==null?void 0:h.call(f,B,t,this.state.context,this,n)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,B,t,this.state.context,n)),await((b=(v=L(this,rr).config).onSettled)==null?void 0:b.call(v,B,null,this.state.variables,this.state.context,this,n)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,B,null,t,this.state.context,n)),Ue(this,_n,qi).call(this,{type:"success",data:B}),B}catch(B){try{await((N=(S=L(this,rr).config).onError)==null?void 0:N.call(S,B,t,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((A=(E=this.options).onError)==null?void 0:A.call(E,B,t,this.state.context,n))}catch(F){Promise.reject(F)}try{await((_=(P=L(this,rr).config).onSettled)==null?void 0:_.call(P,void 0,B,this.state.variables,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((D=(O=this.options).onSettled)==null?void 0:D.call(O,void 0,B,t,this.state.context,n))}catch(F){Promise.reject(F)}throw Ue(this,_n,qi).call(this,{type:"error",error:B}),B}finally{L(this,rr).runNext(this)}}},zu=new WeakMap,On=new WeakMap,rr=new WeakMap,to=new WeakMap,_n=new WeakSet,qi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Kt.batch(()=>{L(this,On).forEach(n=>{n.onMutationUpdate(t)}),L(this,rr).notify({mutation:this,type:"updated",action:t})})},lN);function _3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var oi,dn,Fu,uN,M3=(uN=class extends Bu{constructor(t={}){super();Re(this,oi);Re(this,dn);Re(this,Fu);this.config=t,ye(this,oi,new Set),ye(this,dn,new Map),ye(this,Fu,0)}build(t,r,n){const i=new O3({client:t,mutationCache:this,mutationId:++md(this,Fu)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){L(this,oi).add(t);const r=gd(t);if(typeof r=="string"){const n=L(this,dn).get(r);n?n.push(t):L(this,dn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,oi).delete(t)){const r=gd(t);if(typeof r=="string"){const n=L(this,dn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&L(this,dn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=gd(t);if(typeof r=="string"){const n=L(this,dn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=gd(t);if(typeof r=="string"){const i=(n=L(this,dn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kt.batch(()=>{L(this,oi).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,oi).clear(),L(this,dn).clear()})}getAll(){return Array.from(L(this,oi))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>iw(r,n))}findAll(t={}){return this.getAll().filter(r=>iw(t,r))}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(kr))))}},oi=new WeakMap,dn=new WeakMap,Fu=new WeakMap,uN);function gd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Mn,cN,I3=(cN=class extends Bu{constructor(t={}){super();Re(this,Mn);this.config=t,ye(this,Mn,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??hy(i,r);let u=this.get(o);return u||(u=new E3({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(u)),u}add(t){L(this,Mn).has(t.queryHash)||(L(this,Mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,Mn).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,Mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Mn).get(t)}getAll(){return[...L(this,Mn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>nw(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>nw(t,n)):r}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mn=new WeakMap,cN),mt,aa,oa,Es,As,sa,Cs,Ps,dN,T3=(dN=class{constructor(e={}){Re(this,mt);Re(this,aa);Re(this,oa);Re(this,Es);Re(this,As);Re(this,sa);Re(this,Cs);Re(this,Ps);ye(this,mt,e.queryCache||new I3),ye(this,aa,e.mutationCache||new M3),ye(this,oa,e.defaultOptions||{}),ye(this,Es,new Map),ye(this,As,new Map),ye(this,sa,0)}mount(){md(this,sa)._++,L(this,sa)===1&&(ye(this,Cs,fy.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onFocus())})),ye(this,Ps,Xd.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onOnline())})))}unmount(){var e,t;md(this,sa)._--,L(this,sa)===0&&((e=L(this,Cs))==null||e.call(this),ye(this,Cs,void 0),(t=L(this,Ps))==null||t.call(this),ye(this,Ps,void 0))}isFetching(e){return L(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,aa).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,mt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,mt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ua(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,mt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=L(this,mt).get(n.queryHash),o=i==null?void 0:i.state.data,u=m3(t,o);if(u!==void 0)return L(this,mt).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Kt.batch(()=>L(this,mt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,mt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,mt);Kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,mt);return Kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Kt.batch(()=>L(this,mt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(kr).catch(kr)}invalidateQueries(e,t={}){return Kt.batch(()=>(L(this,mt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Kt.batch(()=>L(this,mt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(kr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(kr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,mt).build(this,t);return r.isStaleByTime(ua(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kr).catch(kr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kr).catch(kr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Xd.isOnline()?L(this,aa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,mt)}getMutationCache(){return L(this,aa)}getDefaultOptions(){return L(this,oa)}setDefaultOptions(e){ye(this,oa,e)}setQueryDefaults(e,t){L(this,Es).set(mu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Es).values()],r={};return t.forEach(n=>{pu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,As).set(mu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,As).values()],r={};return t.forEach(n=>{pu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,oa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hy(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===my&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,oa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,mt).clear(),L(this,aa).clear()}},mt=new WeakMap,aa=new WeakMap,oa=new WeakMap,Es=new WeakMap,As=new WeakMap,sa=new WeakMap,Cs=new WeakMap,Ps=new WeakMap,dN),jN=y.createContext(void 0),Kn=e=>{const t=y.useContext(jN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},D3=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(jN.Provider,{value:e,children:t})),SN=y.createContext(!1),R3=()=>y.useContext(SN);SN.Provider;function L3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $3=y.createContext(L3()),z3=()=>y.useContext($3),F3=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?gN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},B3=e=>{y.useEffect(()=>{e.clearReset()},[e])},U3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||gN(r,[e.error,n])),H3=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},W3=(e,t)=>e.isLoading&&e.isFetching&&!t,K3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function G3(e,t,r){var b,j,k,S;const n=R3(),i=z3(),o=Kn(),u=o.defaultQueryOptions(e);(j=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,u);const c=o.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,H3(u),F3(u,i,c),B3(i);const h=!o.getQueryCache().get(u.queryHash),[m]=y.useState(()=>new t(o,u)),g=m.getOptimisticResult(u),v=!n&&f;if(y.useSyncExternalStore(y.useCallback(N=>{const E=v?m.subscribe(Kt.batchCalls(N)):kr;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(u)},[u,m]),K3(u,g))throw fw(u,m,i);if(U3({result:g,errorResetBoundary:i,throwOnError:u.throwOnError,query:c,suspense:u.suspense}))throw g.error;if((S=(k=o.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||S.call(k,u,g),u.experimental_prefetchInRender&&!gu.isServer()&&W3(g,n)){const N=h?fw(u,m,i):c==null?void 0:c.promise;N==null||N.catch(kr).finally(()=>{m.updateResult()})}return u.notifyOnChangeProps?g:m.trackResult(g)}function Rt(e,t){return G3(e,A3)}/** +`+w.stack}return{value:i,source:s,stack:x,digest:null}}function cp(i,s,d){return{value:i,source:null,stack:d??null,digest:s??null}}function dp(i,s){try{console.error(s.value)}catch(d){setTimeout(function(){throw d})}}var w3=typeof WeakMap=="function"?WeakMap:Map;function e1(i,s,d){d=Jn(-1,d),d.tag=3,d.payload={element:null};var p=s.value;return d.callback=function(){ed||(ed=!0,Ep=p),dp(i,s)},d}function t1(i,s,d){d=Jn(-1,d),d.tag=3;var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var x=s.value;d.payload=function(){return p(x)},d.callback=function(){dp(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){dp(i,s),typeof p!="function"&&(zi===null?zi=new Set([this]):zi.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),d}function r1(i,s,d){var p=i.pingCache;if(p===null){p=i.pingCache=new w3;var x=new Set;p.set(s,x)}else x=p.get(s),x===void 0&&(x=new Set,p.set(s,x));x.has(d)||(x.add(d),i=D3.bind(null,i,s,d),s.then(i,i))}function n1(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function i1(i,s,d,p,x){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(s=Jn(-1,1),s.tag=2,Li(d,s,1))),d.lanes|=1),i):(i.flags|=65536,i.lanes=x,i)}var k3=P.ReactCurrentOwner,vr=!1;function lr(i,s,d,p){s.child=i===null?Sb(s,null,d,p):zo(s,i.child,d,p)}function a1(i,s,d,p,x){d=d.render;var w=s.ref;return Bo(s,x),p=rp(i,s,d,p,w,x),d=np(),i!==null&&!vr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~x,ei(i,s,x)):(lt&&d&&zm(s),s.flags|=1,lr(i,s,p,x),s.child)}function o1(i,s,d,p,x){if(i===null){var w=d.type;return typeof w=="function"&&!Ip(w)&&w.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(s.tag=15,s.type=w,s1(i,s,w,p,x)):(i=od(d.type,null,p,s,s.mode,x),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,(i.lanes&x)===0){var C=w.memoizedProps;if(d=d.compare,d=d!==null?d:kl,d(C,p)&&i.ref===s.ref)return ei(i,s,x)}return s.flags|=1,i=Hi(w,p),i.ref=s.ref,i.return=s,s.child=i}function s1(i,s,d,p,x){if(i!==null){var w=i.memoizedProps;if(kl(w,p)&&i.ref===s.ref)if(vr=!1,s.pendingProps=p=w,(i.lanes&x)!==0)(i.flags&131072)!==0&&(vr=!0);else return s.lanes=i.lanes,ei(i,s,x)}return fp(i,s,d,p,x)}function l1(i,s,d){var p=s.pendingProps,x=p.children,w=i!==null?i.memoizedState:null;if(p.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(Ko,Pr),Pr|=d;else{if((d&1073741824)===0)return i=w!==null?w.baseLanes|d:d,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,tt(Ko,Pr),Pr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=w!==null?w.baseLanes:d,tt(Ko,Pr),Pr|=p}else w!==null?(p=w.baseLanes|d,s.memoizedState=null):p=d,tt(Ko,Pr),Pr|=p;return lr(i,s,x,d),s.child}function u1(i,s){var d=s.ref;(i===null&&d!==null||i!==null&&i.ref!==d)&&(s.flags|=512,s.flags|=2097152)}function fp(i,s,d,p,x){var w=gr(d)?wa:Zt.current;return w=Do(s,w),Bo(s,x),d=rp(i,s,d,p,w,x),p=np(),i!==null&&!vr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~x,ei(i,s,x)):(lt&&p&&zm(s),s.flags|=1,lr(i,s,d,x),s.child)}function c1(i,s,d,p,x){if(gr(d)){var w=!0;_c(s)}else w=!1;if(Bo(s,x),s.stateNode===null)Qc(i,s),Zb(s,d,p),up(s,d,p,x),p=!0;else if(i===null){var C=s.stateNode,T=s.memoizedProps;C.props=T;var R=C.context,Q=d.contextType;typeof Q=="object"&&Q!==null?Q=Br(Q):(Q=gr(d)?wa:Zt.current,Q=Do(s,Q));var le=d.getDerivedStateFromProps,ce=typeof le=="function"||typeof C.getSnapshotBeforeUpdate=="function";ce||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(T!==p||R!==Q)&&Jb(s,C,p,Q),Ri=!1;var oe=s.memoizedState;C.state=oe,Fc(s,p,C,x),R=s.memoizedState,T!==p||oe!==R||pr.current||Ri?(typeof le=="function"&&(lp(s,d,le,p),R=s.memoizedState),(T=Ri||Xb(s,d,T,p,oe,R,Q))?(ce||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=R),C.props=p,C.state=R,C.context=Q,p=T):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{C=s.stateNode,Eb(i,s),T=s.memoizedProps,Q=s.type===s.elementType?T:on(s.type,T),C.props=Q,ce=s.pendingProps,oe=C.context,R=d.contextType,typeof R=="object"&&R!==null?R=Br(R):(R=gr(d)?wa:Zt.current,R=Do(s,R));var ve=d.getDerivedStateFromProps;(le=typeof ve=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(T!==ce||oe!==R)&&Jb(s,C,p,R),Ri=!1,oe=s.memoizedState,C.state=oe,Fc(s,p,C,x);var ke=s.memoizedState;T!==ce||oe!==ke||pr.current||Ri?(typeof ve=="function"&&(lp(s,d,ve,p),ke=s.memoizedState),(Q=Ri||Xb(s,d,Q,p,oe,ke,R)||!1)?(le||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(p,ke,R),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(p,ke,R)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||T===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ke),C.props=p,C.state=ke,C.context=R,p=Q):(typeof C.componentDidUpdate!="function"||T===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),p=!1)}return hp(i,s,d,p,w,x)}function hp(i,s,d,p,x,w){u1(i,s);var C=(s.flags&128)!==0;if(!p&&!C)return x&&pb(s,d,!1),ei(i,s,w);p=s.stateNode,k3.current=s;var T=C&&typeof d.getDerivedStateFromError!="function"?null:p.render();return s.flags|=1,i!==null&&C?(s.child=zo(s,i.child,null,w),s.child=zo(s,null,T,w)):lr(i,s,T,w),s.memoizedState=p.state,x&&pb(s,d,!0),s.child}function d1(i){var s=i.stateNode;s.pendingContext?hb(i,s.pendingContext,s.pendingContext!==s.context):s.context&&hb(i,s.context,!1),Ym(i,s.containerInfo)}function f1(i,s,d,p,x){return $o(),Hm(x),s.flags|=256,lr(i,s,d,p),s.child}var mp={dehydrated:null,treeContext:null,retryLane:0};function pp(i){return{baseLanes:i,cachePool:null,transitions:null}}function h1(i,s,d){var p=s.pendingProps,x=dt.current,w=!1,C=(s.flags&128)!==0,T;if((T=C)||(T=i!==null&&i.memoizedState===null?!1:(x&2)!==0),T?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(x|=1),tt(dt,x&1),i===null)return Um(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(C=p.children,i=p.fallback,w?(p=s.mode,w=s.child,C={mode:"hidden",children:C},(p&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=C):w=sd(C,p,0,null),i=_a(i,p,d,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=pp(d),s.memoizedState=mp,i):gp(s,C));if(x=i.memoizedState,x!==null&&(T=x.dehydrated,T!==null))return j3(i,s,C,p,T,x,d);if(w){w=p.fallback,C=s.mode,x=i.child,T=x.sibling;var R={mode:"hidden",children:p.children};return(C&1)===0&&s.child!==x?(p=s.child,p.childLanes=0,p.pendingProps=R,s.deletions=null):(p=Hi(x,R),p.subtreeFlags=x.subtreeFlags&14680064),T!==null?w=Hi(T,w):(w=_a(w,C,d,null),w.flags|=2),w.return=s,p.return=s,p.sibling=w,s.child=p,p=w,w=s.child,C=i.child.memoizedState,C=C===null?pp(d):{baseLanes:C.baseLanes|d,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=i.childLanes&~d,s.memoizedState=mp,p}return w=i.child,i=w.sibling,p=Hi(w,{mode:"visible",children:p.children}),(s.mode&1)===0&&(p.lanes=d),p.return=s,p.sibling=null,i!==null&&(d=s.deletions,d===null?(s.deletions=[i],s.flags|=16):d.push(i)),s.child=p,s.memoizedState=null,p}function gp(i,s){return s=sd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function qc(i,s,d,p){return p!==null&&Hm(p),zo(s,i.child,null,d),i=gp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function j3(i,s,d,p,x,w,C){if(d)return s.flags&256?(s.flags&=-257,p=cp(Error(r(422))),qc(i,s,C,p)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=p.fallback,x=s.mode,p=sd({mode:"visible",children:p.children},x,0,null),w=_a(w,x,C,null),w.flags|=2,p.return=s,w.return=s,p.sibling=w,s.child=p,(s.mode&1)!==0&&zo(s,i.child,null,C),s.child.memoizedState=pp(C),s.memoizedState=mp,w);if((s.mode&1)===0)return qc(i,s,C,null);if(x.data==="$!"){if(p=x.nextSibling&&x.nextSibling.dataset,p)var T=p.dgst;return p=T,w=Error(r(419)),p=cp(w,p,void 0),qc(i,s,C,p)}if(T=(C&i.childLanes)!==0,vr||T){if(p=_t,p!==null){switch(C&-C){case 4:x=2;break;case 16:x=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(p.suspendedLanes|C))!==0?0:x,x!==0&&x!==w.retryLane&&(w.retryLane=x,Zn(i,x),un(p,i,x,-1))}return Mp(),p=cp(Error(r(421))),qc(i,s,C,p)}return x.data==="$?"?(s.flags|=128,s.child=i.child,s=R3.bind(null,i),x._reactRetry=s,null):(i=w.treeContext,Cr=Mi(x.nextSibling),Ar=s,lt=!0,an=null,i!==null&&(zr[Fr++]=Yn,zr[Fr++]=Xn,zr[Fr++]=ka,Yn=i.id,Xn=i.overflow,ka=s),s=gp(s,p.children),s.flags|=4096,s)}function m1(i,s,d){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),Vm(i.return,s,d)}function vp(i,s,d,p,x){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:x}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=p,w.tail=d,w.tailMode=x)}function p1(i,s,d){var p=s.pendingProps,x=p.revealOrder,w=p.tail;if(lr(i,s,p.children,d),p=dt.current,(p&2)!==0)p=p&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&m1(i,d,s);else if(i.tag===19)m1(i,d,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}p&=1}if(tt(dt,p),(s.mode&1)===0)s.memoizedState=null;else switch(x){case"forwards":for(d=s.child,x=null;d!==null;)i=d.alternate,i!==null&&Bc(i)===null&&(x=d),d=d.sibling;d=x,d===null?(x=s.child,s.child=null):(x=d.sibling,d.sibling=null),vp(s,!1,x,d,w);break;case"backwards":for(d=null,x=s.child,s.child=null;x!==null;){if(i=x.alternate,i!==null&&Bc(i)===null){s.child=x;break}i=x.sibling,x.sibling=d,d=x,x=i}vp(s,!0,d,null,w);break;case"together":vp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Qc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ei(i,s,d){if(i!==null&&(s.dependencies=i.dependencies),Aa|=s.lanes,(d&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,d=Hi(i,i.pendingProps),s.child=d,d.return=s;i.sibling!==null;)i=i.sibling,d=d.sibling=Hi(i,i.pendingProps),d.return=s;d.sibling=null}return s.child}function S3(i,s,d){switch(s.tag){case 3:d1(s),$o();break;case 5:Pb(s);break;case 1:gr(s.type)&&_c(s);break;case 4:Ym(s,s.stateNode.containerInfo);break;case 10:var p=s.type._context,x=s.memoizedProps.value;tt(Lc,p._currentValue),p._currentValue=x;break;case 13:if(p=s.memoizedState,p!==null)return p.dehydrated!==null?(tt(dt,dt.current&1),s.flags|=128,null):(d&s.child.childLanes)!==0?h1(i,s,d):(tt(dt,dt.current&1),i=ei(i,s,d),i!==null?i.sibling:null);tt(dt,dt.current&1);break;case 19:if(p=(d&s.childLanes)!==0,(i.flags&128)!==0){if(p)return p1(i,s,d);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),tt(dt,dt.current),p)break;return null;case 22:case 23:return s.lanes=0,l1(i,s,d)}return ei(i,s,d)}var g1,yp,v1,y1;g1=function(i,s){for(var d=s.child;d!==null;){if(d.tag===5||d.tag===6)i.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===s)break;for(;d.sibling===null;){if(d.return===null||d.return===s)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},yp=function(){},v1=function(i,s,d,p){var x=i.memoizedProps;if(x!==p){i=s.stateNode,Na(jn.current);var w=null;switch(d){case"input":x=Be(i,x),p=Be(i,p),w=[];break;case"select":x=J({},x,{value:void 0}),p=J({},p,{value:void 0}),w=[];break;case"textarea":x=G(i,x),p=G(i,p),w=[];break;default:typeof x.onClick!="function"&&typeof p.onClick=="function"&&(i.onclick=Cc)}Zh(d,p);var C;d=null;for(Q in x)if(!p.hasOwnProperty(Q)&&x.hasOwnProperty(Q)&&x[Q]!=null)if(Q==="style"){var T=x[Q];for(C in T)T.hasOwnProperty(C)&&(d||(d={}),d[C]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(a.hasOwnProperty(Q)?w||(w=[]):(w=w||[]).push(Q,null));for(Q in p){var R=p[Q];if(T=x!=null?x[Q]:void 0,p.hasOwnProperty(Q)&&R!==T&&(R!=null||T!=null))if(Q==="style")if(T){for(C in T)!T.hasOwnProperty(C)||R&&R.hasOwnProperty(C)||(d||(d={}),d[C]="");for(C in R)R.hasOwnProperty(C)&&T[C]!==R[C]&&(d||(d={}),d[C]=R[C])}else d||(w||(w=[]),w.push(Q,d)),d=R;else Q==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,T=T?T.__html:void 0,R!=null&&T!==R&&(w=w||[]).push(Q,R)):Q==="children"?typeof R!="string"&&typeof R!="number"||(w=w||[]).push(Q,""+R):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(a.hasOwnProperty(Q)?(R!=null&&Q==="onScroll"&&nt("scroll",i),w||T===R||(w=[])):(w=w||[]).push(Q,R))}d&&(w=w||[]).push("style",d);var Q=w;(s.updateQueue=Q)&&(s.flags|=4)}},y1=function(i,s,d,p){d!==p&&(s.flags|=4)};function Ll(i,s){if(!lt)switch(i.tailMode){case"hidden":s=i.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function er(i){var s=i.alternate!==null&&i.alternate.child===i.child,d=0,p=0;if(s)for(var x=i.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags&14680064,p|=x.flags&14680064,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=p,i.childLanes=d,s}function N3(i,s,d){var p=s.pendingProps;switch(Fm(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(s),null;case 1:return gr(s.type)&&Oc(),er(s),null;case 3:return p=s.stateNode,Uo(),it(pr),it(Zt),Jm(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(i===null||i.child===null)&&(Dc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,an!==null&&(Pp(an),an=null))),yp(i,s),er(s),null;case 5:Xm(s);var x=Na(Ml.current);if(d=s.type,i!==null&&s.stateNode!=null)v1(i,s,d,p,x),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!p){if(s.stateNode===null)throw Error(r(166));return er(s),null}if(i=Na(jn.current),Dc(s)){p=s.stateNode,d=s.type;var w=s.memoizedProps;switch(p[kn]=s,p[Al]=w,i=(s.mode&1)!==0,d){case"dialog":nt("cancel",p),nt("close",p);break;case"iframe":case"object":case"embed":nt("load",p);break;case"video":case"audio":for(x=0;x<\/script>",i=i.removeChild(i.firstChild)):typeof p.is=="string"?i=C.createElement(d,{is:p.is}):(i=C.createElement(d),d==="select"&&(C=i,p.multiple?C.multiple=!0:p.size&&(C.size=p.size))):i=C.createElementNS(i,d),i[kn]=s,i[Al]=p,g1(i,s,!1,!1),s.stateNode=i;e:{switch(C=Jh(d,p),d){case"dialog":nt("cancel",i),nt("close",i),x=p;break;case"iframe":case"object":case"embed":nt("load",i),x=p;break;case"video":case"audio":for(x=0;xGo&&(s.flags|=128,p=!0,Ll(w,!1),s.lanes=4194304)}else{if(!p)if(i=Bc(C),i!==null){if(s.flags|=128,p=!0,d=i.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),Ll(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!lt)return er(s),null}else 2*yt()-w.renderingStartTime>Go&&d!==1073741824&&(s.flags|=128,p=!0,Ll(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(d=w.last,d!==null?d.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=yt(),s.sibling=null,d=dt.current,tt(dt,p?d&1|2:d&1),s):(er(s),null);case 22:case 23:return _p(),p=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==p&&(s.flags|=8192),p&&(s.mode&1)!==0?(Pr&1073741824)!==0&&(er(s),s.subtreeFlags&6&&(s.flags|=8192)):er(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function E3(i,s){switch(Fm(s),s.tag){case 1:return gr(s.type)&&Oc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Uo(),it(pr),it(Zt),Jm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Xm(s),null;case 13:if(it(dt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));$o()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return it(dt),null;case 4:return Uo(),null;case 10:return Gm(s.type._context),null;case 22:case 23:return _p(),null;case 24:return null;default:return null}}var Yc=!1,tr=!1,A3=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Wo(i,s){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(p){ht(i,s,p)}else d.current=null}function xp(i,s,d){try{d()}catch(p){ht(i,s,p)}}var x1=!1;function C3(i,s){if(_m=gc,i=Xx(),jm(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var C=0,T=-1,R=-1,Q=0,le=0,ce=i,oe=null;t:for(;;){for(var ve;ce!==d||x!==0&&ce.nodeType!==3||(T=C+x),ce!==w||p!==0&&ce.nodeType!==3||(R=C+p),ce.nodeType===3&&(C+=ce.nodeValue.length),(ve=ce.firstChild)!==null;)oe=ce,ce=ve;for(;;){if(ce===i)break t;if(oe===d&&++Q===x&&(T=C),oe===w&&++le===p&&(R=C),(ve=ce.nextSibling)!==null)break;ce=oe,oe=ce.parentNode}ce=ve}d=T===-1||R===-1?null:{start:T,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(Mm={focusedElem:i,selectionRange:d},gc=!1,xe=s;xe!==null;)if(s=xe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,xe=i;else for(;xe!==null;){s=xe;try{var ke=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Ne=ke.memoizedProps,xt=ke.memoizedState,W=s.stateNode,$=W.getSnapshotBeforeUpdate(s.elementType===s.type?Ne:on(s.type,Ne),xt);W.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(fe){ht(s,s.return,fe)}if(i=s.sibling,i!==null){i.return=s.return,xe=i;break}xe=s.return}return ke=x1,x1=!1,ke}function $l(i,s,d){var p=s.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&i)===i){var w=x.destroy;x.destroy=void 0,w!==void 0&&xp(s,d,w)}x=x.next}while(x!==p)}}function Xc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&i)===i){var p=d.create;d.destroy=p()}d=d.next}while(d!==s)}}function bp(i){var s=i.ref;if(s!==null){var d=i.stateNode;switch(i.tag){case 5:i=d;break;default:i=d}typeof s=="function"?s(i):s.current=i}}function b1(i){var s=i.alternate;s!==null&&(i.alternate=null,b1(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[kn],delete s[Al],delete s[Rm],delete s[c3],delete s[d3])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function w1(i){return i.tag===5||i.tag===3||i.tag===4}function k1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||w1(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function wp(i,s,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(i,s):d.insertBefore(i,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(i,d)):(s=d,s.appendChild(i)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Cc));else if(p!==4&&(i=i.child,i!==null))for(wp(i,s,d),i=i.sibling;i!==null;)wp(i,s,d),i=i.sibling}function kp(i,s,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?d.insertBefore(i,s):d.appendChild(i);else if(p!==4&&(i=i.child,i!==null))for(kp(i,s,d),i=i.sibling;i!==null;)kp(i,s,d),i=i.sibling}var zt=null,sn=!1;function $i(i,s,d){for(d=d.child;d!==null;)j1(i,s,d),d=d.sibling}function j1(i,s,d){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(cc,d)}catch{}switch(d.tag){case 5:tr||Wo(d,s);case 6:var p=zt,x=sn;zt=null,$i(i,s,d),zt=p,sn=x,zt!==null&&(sn?(i=zt,d=d.stateNode,i.nodeType===8?i.parentNode.removeChild(d):i.removeChild(d)):zt.removeChild(d.stateNode));break;case 18:zt!==null&&(sn?(i=zt,d=d.stateNode,i.nodeType===8?Dm(i.parentNode,d):i.nodeType===1&&Dm(i,d),gl(i)):Dm(zt,d.stateNode));break;case 4:p=zt,x=sn,zt=d.stateNode.containerInfo,sn=!0,$i(i,s,d),zt=p,sn=x;break;case 0:case 11:case 14:case 15:if(!tr&&(p=d.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){x=p=p.next;do{var w=x,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&xp(d,s,C),x=x.next}while(x!==p)}$i(i,s,d);break;case 1:if(!tr&&(Wo(d,s),p=d.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=d.memoizedProps,p.state=d.memoizedState,p.componentWillUnmount()}catch(T){ht(d,s,T)}$i(i,s,d);break;case 21:$i(i,s,d);break;case 22:d.mode&1?(tr=(p=tr)||d.memoizedState!==null,$i(i,s,d),tr=p):$i(i,s,d);break;default:$i(i,s,d)}}function S1(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new A3),s.forEach(function(p){var x=L3.bind(null,i,p);d.has(p)||(d.add(p),p.then(x,x))})}}function ln(i,s){var d=s.deletions;if(d!==null)for(var p=0;px&&(x=C),p&=~w}if(p=x,p=yt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*O3(p/1960))-p,10i?16:i,Fi===null)var p=!1;else{if(i=Fi,Fi=null,rd=0,(Ge&6)!==0)throw Error(r(331));var x=Ge;for(Ge|=4,xe=i.current;xe!==null;){var w=xe,C=w.child;if((xe.flags&16)!==0){var T=w.deletions;if(T!==null){for(var R=0;Ryt()-Np?Pa(i,0):Sp|=d),xr(i,s)}function L1(i,s){s===0&&((i.mode&1)===0?s=1:(s=fc,fc<<=1,(fc&130023424)===0&&(fc=4194304)));var d=ur();i=Zn(i,s),i!==null&&(dl(i,s,d),xr(i,d))}function R3(i){var s=i.memoizedState,d=0;s!==null&&(d=s.retryLane),L1(i,d)}function L3(i,s){var d=0;switch(i.tag){case 13:var p=i.stateNode,x=i.memoizedState;x!==null&&(d=x.retryLane);break;case 19:p=i.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(s),L1(i,d)}var $1;$1=function(i,s,d){if(i!==null)if(i.memoizedProps!==s.pendingProps||pr.current)vr=!0;else{if((i.lanes&d)===0&&(s.flags&128)===0)return vr=!1,S3(i,s,d);vr=(i.flags&131072)!==0}else vr=!1,lt&&(s.flags&1048576)!==0&&vb(s,Tc,s.index);switch(s.lanes=0,s.tag){case 2:var p=s.type;Qc(i,s),i=s.pendingProps;var x=Do(s,Zt.current);Bo(s,d),x=rp(null,s,p,i,x,d);var w=np();return s.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,gr(p)?(w=!0,_c(s)):w=!1,s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,Qm(s),x.updater=Vc,s.stateNode=x,x._reactInternals=s,up(s,p,i,d),s=hp(null,s,p,!0,w,d)):(s.tag=0,lt&&w&&zm(s),lr(null,s,x,d),s=s.child),s;case 16:p=s.elementType;e:{switch(Qc(i,s),i=s.pendingProps,x=p._init,p=x(p._payload),s.type=p,x=s.tag=z3(p),i=on(p,i),x){case 0:s=fp(null,s,p,i,d);break e;case 1:s=c1(null,s,p,i,d);break e;case 11:s=a1(null,s,p,i,d);break e;case 14:s=o1(null,s,p,on(p.type,i),d);break e}throw Error(r(306,p,""))}return s;case 0:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),fp(i,s,p,x,d);case 1:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),c1(i,s,p,x,d);case 3:e:{if(d1(s),i===null)throw Error(r(387));p=s.pendingProps,w=s.memoizedState,x=w.element,Eb(i,s),Fc(s,p,null,d);var C=s.memoizedState;if(p=C.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){x=Ho(Error(r(423)),s),s=f1(i,s,p,d,x);break e}else if(p!==x){x=Ho(Error(r(424)),s),s=f1(i,s,p,d,x);break e}else for(Cr=Mi(s.stateNode.containerInfo.firstChild),Ar=s,lt=!0,an=null,d=Sb(s,null,p,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if($o(),p===x){s=ei(i,s,d);break e}lr(i,s,p,d)}s=s.child}return s;case 5:return Pb(s),i===null&&Um(s),p=s.type,x=s.pendingProps,w=i!==null?i.memoizedProps:null,C=x.children,Im(p,x)?C=null:w!==null&&Im(p,w)&&(s.flags|=32),u1(i,s),lr(i,s,C,d),s.child;case 6:return i===null&&Um(s),null;case 13:return h1(i,s,d);case 4:return Ym(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=zo(s,null,p,d):lr(i,s,p,d),s.child;case 11:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),a1(i,s,p,x,d);case 7:return lr(i,s,s.pendingProps,d),s.child;case 8:return lr(i,s,s.pendingProps.children,d),s.child;case 12:return lr(i,s,s.pendingProps.children,d),s.child;case 10:e:{if(p=s.type._context,x=s.pendingProps,w=s.memoizedProps,C=x.value,tt(Lc,p._currentValue),p._currentValue=C,w!==null)if(nn(w.value,C)){if(w.children===x.children&&!pr.current){s=ei(i,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var T=w.dependencies;if(T!==null){C=w.child;for(var R=T.firstContext;R!==null;){if(R.context===p){if(w.tag===1){R=Jn(-1,d&-d),R.tag=2;var Q=w.updateQueue;if(Q!==null){Q=Q.shared;var le=Q.pending;le===null?R.next=R:(R.next=le.next,le.next=R),Q.pending=R}}w.lanes|=d,R=w.alternate,R!==null&&(R.lanes|=d),Vm(w.return,d,s),T.lanes|=d;break}R=R.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(r(341));C.lanes|=d,T=C.alternate,T!==null&&(T.lanes|=d),Vm(C,d,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}lr(i,s,x.children,d),s=s.child}return s;case 9:return x=s.type,p=s.pendingProps.children,Bo(s,d),x=Br(x),p=p(x),s.flags|=1,lr(i,s,p,d),s.child;case 14:return p=s.type,x=on(p,s.pendingProps),x=on(p.type,x),o1(i,s,p,x,d);case 15:return s1(i,s,s.type,s.pendingProps,d);case 17:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:on(p,x),Qc(i,s),s.tag=1,gr(p)?(i=!0,_c(s)):i=!1,Bo(s,d),Zb(s,p,x),up(s,p,x,d),hp(null,s,p,!0,i,d);case 19:return p1(i,s,d);case 22:return l1(i,s,d)}throw Error(r(156,s.tag))};function z1(i,s){return yx(i,s)}function $3(i,s,d,p){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wr(i,s,d,p){return new $3(i,s,d,p)}function Ip(i){return i=i.prototype,!(!i||!i.isReactComponent)}function z3(i){if(typeof i=="function")return Ip(i)?1:0;if(i!=null){if(i=i.$$typeof,i===U)return 11;if(i===ge)return 14}return 2}function Hi(i,s){var d=i.alternate;return d===null?(d=Wr(i.tag,s,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=s,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&14680064,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,s=i.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d}function od(i,s,d,p,x,w){var C=2;if(p=i,typeof i=="function")Ip(i)&&(C=1);else if(typeof i=="string")C=5;else e:switch(i){case D:return _a(d.children,x,w,s);case B:C=8,x|=8;break;case F:return i=Wr(12,d,s,x|2),i.elementType=F,i.lanes=w,i;case he:return i=Wr(13,d,s,x),i.elementType=he,i.lanes=w,i;case ue:return i=Wr(19,d,s,x),i.elementType=ue,i.lanes=w,i;case se:return sd(d,x,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:C=10;break e;case Y:C=9;break e;case U:C=11;break e;case ge:C=14;break e;case ie:C=16,p=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return s=Wr(C,d,s,x),s.elementType=i,s.type=p,s.lanes=w,s}function _a(i,s,d,p){return i=Wr(7,i,p,s),i.lanes=d,i}function sd(i,s,d,p){return i=Wr(22,i,p,s),i.elementType=se,i.lanes=d,i.stateNode={isHidden:!1},i}function Tp(i,s,d){return i=Wr(6,i,null,s),i.lanes=d,i}function Dp(i,s,d){return s=Wr(4,i.children!==null?i.children:[],i.key,s),s.lanes=d,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function F3(i,s,d,p,x){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=lm(0),this.expirationTimes=lm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lm(0),this.identifierPrefix=p,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Rp(i,s,d,p,x,w,C,T,R){return i=new F3(i,s,d,T,R),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Wr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:p,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qm(w),i}function B3(i,s,d){var p=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Hp.exports=tM(),Hp.exports}var ew;function rM(){if(ew)return pd;ew=1;var e=cN();return pd.createRoot=e.createRoot,pd.hydrateRoot=e.hydrateRoot,pd}var nM=rM();const iM=ly(nM);var Bu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Va,ea,vs,eN,aM=(eN=class extends Bu{constructor(){super();Re(this,Va);Re(this,ea);Re(this,vs);ye(this,vs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,ea)||this.setEventListener(L(this,vs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ea))==null||t.call(this),ye(this,ea,void 0))}setEventListener(t){var r;ye(this,vs,t),(r=L(this,ea))==null||r.call(this),ye(this,ea,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,Va)!==t&&(ye(this,Va,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,Va)=="boolean"?L(this,Va):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Va=new WeakMap,ea=new WeakMap,vs=new WeakMap,eN),cy=new aM,oM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ta,sy,tN,sM=(tN=class{constructor(){Re(this,ta,oM);Re(this,sy,!1)}setTimeoutProvider(e){ye(this,ta,e)}setTimeout(e,t){return L(this,ta).setTimeout(e,t)}clearTimeout(e){L(this,ta).clearTimeout(e)}setInterval(e,t){return L(this,ta).setInterval(e,t)}clearInterval(e){L(this,ta).clearInterval(e)}},ta=new WeakMap,sy=new WeakMap,tN),Ba=new sM;function lM(e){setTimeout(e,0)}var uM=typeof window>"u"||"Deno"in globalThis;function kr(){}function cM(e,t){return typeof e=="function"?e(t):e}function $g(e){return typeof e=="number"&&e>=0&&e!==1/0}function dN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ua(e,t){return typeof e=="function"?e(t):e}function Ir(e,t){return typeof e=="function"?e(t):e}function tw(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:u,stale:c}=e;if(u){if(n){if(t.queryHash!==dy(u,t.options))return!1}else if(!pu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||a&&a!==t.state.fetchStatus||o&&!o(t))}function rw(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(mu(t.options.mutationKey)!==mu(o))return!1}else if(!pu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function dy(e,t){return((t==null?void 0:t.queryKeyHashFn)||mu)(e)}function mu(e){return JSON.stringify(e,(t,r)=>Fg(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function pu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>pu(e[r],t[r])):!1}var dM=Object.prototype.hasOwnProperty;function fN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=nw(e)&&nw(t);if(!n&&!(Fg(e)&&Fg(t)))return t;const o=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),c=u.length,f=n?new Array(c):{};let h=0;for(let m=0;m{Ba.setTimeout(t,e)})}function Bg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?fN(e,t):t}function hM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function mM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var fy=Symbol();function hN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===fy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mN(e,t){return typeof e=="function"?e(...t):!!e}function pM(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var gu=(()=>{let e=()=>uM;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ug(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var gM=lM;function vM(){let e=[],t=0,r=c=>{c()},n=c=>{c()},a=gM;const o=c=>{t?e.push(c):a(()=>{r(c)})},u=()=>{const c=e;e=[],c.length&&a(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||u()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{a=c}}}var Wt=vM(),ys,ra,xs,rN,yM=(rN=class extends Bu{constructor(){super();Re(this,ys,!0);Re(this,ra);Re(this,xs);ye(this,xs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,ra)||this.setEventListener(L(this,xs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ra))==null||t.call(this),ye(this,ra,void 0))}setEventListener(t){var r;ye(this,xs,t),(r=L(this,ra))==null||r.call(this),ye(this,ra,t(this.setOnline.bind(this)))}setOnline(t){L(this,ys)!==t&&(ye(this,ys,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,ys)}},ys=new WeakMap,ra=new WeakMap,xs=new WeakMap,rN),Yd=new yM;function xM(e){return Math.min(1e3*2**e,3e4)}function pN(e){return(e??"online")==="online"?Yd.isOnline():!0}var Hg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function gN(e){let t=!1,r=0,n;const a=Ug(),o=()=>a.status!=="pending",u=k=>{var S;if(!o()){const N=new Hg(k);v(N),(S=e.onCancel)==null||S.call(e,N)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>cy.isFocused()&&(e.networkMode==="always"||Yd.isOnline())&&e.canRun(),m=()=>pN(e.networkMode)&&e.canRun(),g=k=>{o()||(n==null||n(),a.resolve(k))},v=k=>{o()||(n==null||n(),a.reject(k))},b=()=>new Promise(k=>{var S;n=N=>{(o()||h())&&k(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var k;n=void 0,o()||(k=e.onContinue)==null||k.call(e)}),j=()=>{if(o())return;let k;const S=r===0?e.initialPromise:void 0;try{k=S??e.fn()}catch(N){k=Promise.reject(N)}Promise.resolve(k).then(g).catch(N=>{var O;if(o())return;const E=e.retry??(gu.isServer()?0:3),A=e.retryDelay??xM,P=typeof A=="function"?A(r,N):A,_=E===!0||typeof E=="number"&&rh()?void 0:b()).then(()=>{t?v(N):j()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(n==null||n(),a),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?j():b().then(j),a)}}var qa,nN,vN=(nN=class{constructor(){Re(this,qa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$g(this.gcTime)&&ye(this,qa,Ba.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(gu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,qa)!==void 0&&(Ba.clearTimeout(L(this,qa)),ye(this,qa,void 0))}},qa=new WeakMap,nN);function bM(e){return{onFetch:(t,r)=>{var m,g,v,b,j;const n=t.options,a=(v=(g=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const h=async()=>{let k=!1;const S=A=>{pM(A,()=>t.signal,()=>k=!0)},N=hN(t.options,t.fetchOptions),E=async(A,P,_)=>{if(k)return Promise.reject(t.signal.reason);if(P==null&&A.pages.length)return Promise.resolve(A);const D=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:P,direction:_?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),B=await N(D),{maxPages:F}=t.options,z=_?mM:hM;return{pages:z(A.pages,B,F),pageParams:z(A.pageParams,P,F)}};if(a&&o.length){const A=a==="backward",P=A?wM:aw,_={pages:o,pageParams:u},O=P(n,_);c=await E(_,O,A)}else{const A=e??o.length;do{const P=f===0?u[0]??n.initialPageParam:aw(n,c);if(f>0&&P==null)break;c=await E(c,P),f++}while(f{var k,S;return(S=(k=t.options).persister)==null?void 0:S.call(k,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function aw(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function wM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var bs,Qa,ws,Gr,Ya,It,Ru,Xa,Mr,yN,ni,iN,kM=(iN=class extends vN{constructor(t){super();Re(this,Mr);Re(this,bs);Re(this,Qa);Re(this,ws);Re(this,Gr);Re(this,Ya);Re(this,It);Re(this,Ru);Re(this,Xa);ye(this,Xa,!1),ye(this,Ru,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,Ya,t.client),ye(this,Gr,L(this,Ya).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Qa,sw(this.options)),this.state=t.state??L(this,Qa),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,bs)}get promise(){var t;return(t=L(this,It))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,Ru),...t},t!=null&&t._type&&ye(this,bs,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=sw(this.options);r.data!==void 0&&(this.setState(ow(r.data,r.dataUpdatedAt)),ye(this,Qa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Gr).remove(this)}setData(t,r){const n=Bg(this.state.data,t,this.options);return Ue(this,Mr,ni).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Ue(this,Mr,ni).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=L(this,It))==null?void 0:n.promise;return(a=L(this,It))==null||a.cancel(t),r?r.then(kr).catch(kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,Qa)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ir(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ua(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!dN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,It))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,It))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Gr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(L(this,It)&&(L(this,Xa)||Ue(this,Mr,yN).call(this)?L(this,It).cancel({revert:!0}):L(this,It).cancelRetry()),this.scheduleGc()),L(this,Gr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,Mr,ni).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,g,v,b,j,k,S,N,E,A;if(this.state.fetchStatus!=="idle"&&((h=L(this,It))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,It))return L(this,It).continueRetry(),L(this,It).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(_=>_.options.queryFn);P&&this.setOptions(P.options)}const n=new AbortController,a=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(ye(this,Xa,!0),n.signal)})},o=()=>{const P=hN(this.options,r),O=(()=>{const D={client:L(this,Ya),queryKey:this.queryKey,meta:this.meta};return a(D),D})();return ye(this,Xa,!1),this.options.persister?this.options.persister(P,O,this):P(O)},c=(()=>{const P={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,Ya),state:this.state,fetchFn:o};return a(P),P})(),f=L(this,bs)==="infinite"?bM(this.options.pages):this.options.behavior;f==null||f.onFetch(c,this),ye(this,ws,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&Ue(this,Mr,ni).call(this,{type:"fetch",meta:(g=c.fetchOptions)==null?void 0:g.meta}),ye(this,It,gN({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:P=>{P instanceof Hg&&P.revert&&this.setState({...L(this,ws),fetchStatus:"idle"}),n.abort()},onFail:(P,_)=>{Ue(this,Mr,ni).call(this,{type:"failed",failureCount:P,error:_})},onPause:()=>{Ue(this,Mr,ni).call(this,{type:"pause"})},onContinue:()=>{Ue(this,Mr,ni).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const P=await L(this,It).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(b=(v=L(this,Gr).config).onSuccess)==null||b.call(v,P,this),(k=(j=L(this,Gr).config).onSettled)==null||k.call(j,P,this.state.error,this),P}catch(P){if(P instanceof Hg){if(P.silent)return L(this,It).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw Ue(this,Mr,ni).call(this,{type:"error",error:P}),(N=(S=L(this,Gr).config).onError)==null||N.call(S,P,this),(A=(E=L(this,Gr).config).onSettled)==null||A.call(E,this.state.data,P,this),P}finally{this.scheduleGc()}}},bs=new WeakMap,Qa=new WeakMap,ws=new WeakMap,Gr=new WeakMap,Ya=new WeakMap,It=new WeakMap,Ru=new WeakMap,Xa=new WeakMap,Mr=new WeakSet,yN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ni=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...xN(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...ow(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,ws,t.manual?a:void 0),a;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Wt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Gr).notify({query:this,type:"updated",action:t})})},iN);function xN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ow(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function sw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var wr,We,Lu,cr,Za,ks,ai,na,$u,js,Ss,Ja,eo,ia,Ns,Xe,au,Wg,Kg,Gg,Vg,qg,Qg,Yg,bN,aN,jM=(aN=class extends Bu{constructor(t,r){super();Re(this,Xe);Re(this,wr);Re(this,We);Re(this,Lu);Re(this,cr);Re(this,Za);Re(this,ks);Re(this,ai);Re(this,na);Re(this,$u);Re(this,js);Re(this,Ss);Re(this,Ja);Re(this,eo);Re(this,ia);Re(this,Ns,new Set);this.options=r,ye(this,wr,t),ye(this,na,null),ye(this,ai,Ug()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,We).addObserver(this),lw(L(this,We),this.options)?Ue(this,Xe,au).call(this):this.updateResult(),Ue(this,Xe,Vg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xg(L(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xg(L(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,Xe,qg).call(this),Ue(this,Xe,Qg).call(this),L(this,We).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,We);if(this.options=L(this,wr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ir(this.options.enabled,L(this,We))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,Xe,Yg).call(this),L(this,We).setOptions(this.options),r._defaulted&&!zg(this.options,r)&&L(this,wr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,We),observer:this});const a=this.hasListeners();a&&uw(L(this,We),n,this.options,r)&&Ue(this,Xe,au).call(this),this.updateResult(),a&&(L(this,We)!==n||Ir(this.options.enabled,L(this,We))!==Ir(r.enabled,L(this,We))||ua(this.options.staleTime,L(this,We))!==ua(r.staleTime,L(this,We)))&&Ue(this,Xe,Wg).call(this);const o=Ue(this,Xe,Kg).call(this);a&&(L(this,We)!==n||Ir(this.options.enabled,L(this,We))!==Ir(r.enabled,L(this,We))||o!==L(this,ia))&&Ue(this,Xe,Gg).call(this,o)}getOptimisticResult(t){const r=L(this,wr).getQueryCache().build(L(this,wr),t),n=this.createResult(r,t);return NM(this,n)&&(ye(this,cr,n),ye(this,ks,this.options),ye(this,Za,L(this,We).state)),n}getCurrentResult(){return L(this,cr)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,ai).status==="pending"&&L(this,ai).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){L(this,Ns).add(t)}getCurrentQuery(){return L(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,wr).defaultQueryOptions(t),n=L(this,wr).getQueryCache().build(L(this,wr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ue(this,Xe,au).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,cr)))}createResult(t,r){var F;const n=L(this,We),a=this.options,o=L(this,cr),u=L(this,Za),c=L(this,ks),h=t!==n?t.state:L(this,Lu),{state:m}=t;let g={...m},v=!1,b;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&lw(t,r),U=z&&uw(t,n,r,a);(Y||U)&&(g={...g,...xN(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:j,errorUpdatedAt:k,status:S}=g;b=g.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let z;o!=null&&o.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(z=o.data,N=!0):z=typeof r.placeholderData=="function"?r.placeholderData((F=L(this,Ss))==null?void 0:F.state.data,L(this,Ss)):r.placeholderData,z!==void 0&&(S="success",b=Bg(o==null?void 0:o.data,z,r),v=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(u==null?void 0:u.data)&&r.select===L(this,$u))b=L(this,js);else try{ye(this,$u,r.select),b=r.select(b),b=Bg(o==null?void 0:o.data,b,r),ye(this,js,b),ye(this,na,null)}catch(z){ye(this,na,z)}L(this,na)&&(j=L(this,na),b=L(this,js),k=Date.now(),S="error");const E=g.fetchStatus==="fetching",A=S==="pending",P=S==="error",_=A&&E,O=b!==void 0,B={status:S,fetchStatus:g.fetchStatus,isPending:A,isSuccess:S==="success",isError:P,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:g.dataUpdatedAt,error:j,errorUpdatedAt:k,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!A,isLoadingError:P&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:P&&O,isStale:hy(t,r),refetch:this.refetch,promise:L(this,ai),isEnabled:Ir(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=B.data!==void 0,Y=B.status==="error"&&!z,U=ge=>{Y?ge.reject(B.error):z&&ge.resolve(B.data)},he=()=>{const ge=ye(this,ai,B.promise=Ug());U(ge)},ue=L(this,ai);switch(ue.status){case"pending":t.queryHash===n.queryHash&&U(ue);break;case"fulfilled":(Y||B.data!==ue.value)&&he();break;case"rejected":(!Y||B.error!==ue.reason)&&he();break}}return B}updateResult(){const t=L(this,cr),r=this.createResult(L(this,We),this.options);if(ye(this,Za,L(this,We).state),ye(this,ks,this.options),L(this,Za).data!==void 0&&ye(this,Ss,L(this,We)),zg(r,t))return;ye(this,cr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!L(this,Ns).size)return!0;const u=new Set(o??L(this,Ns));return this.options.throwOnError&&u.add("error"),Object.keys(L(this,cr)).some(c=>{const f=c;return L(this,cr)[f]!==t[f]&&u.has(f)})};Ue(this,Xe,bN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,Xe,Vg).call(this)}},wr=new WeakMap,We=new WeakMap,Lu=new WeakMap,cr=new WeakMap,Za=new WeakMap,ks=new WeakMap,ai=new WeakMap,na=new WeakMap,$u=new WeakMap,js=new WeakMap,Ss=new WeakMap,Ja=new WeakMap,eo=new WeakMap,ia=new WeakMap,Ns=new WeakMap,Xe=new WeakSet,au=function(t){Ue(this,Xe,Yg).call(this);let r=L(this,We).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(kr)),r},Wg=function(){Ue(this,Xe,qg).call(this);const t=ua(this.options.staleTime,L(this,We));if(gu.isServer()||L(this,cr).isStale||!$g(t))return;const n=dN(L(this,cr).dataUpdatedAt,t)+1;ye(this,Ja,Ba.setTimeout(()=>{L(this,cr).isStale||this.updateResult()},n))},Kg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,We)):this.options.refetchInterval)??!1},Gg=function(t){Ue(this,Xe,Qg).call(this),ye(this,ia,t),!(gu.isServer()||Ir(this.options.enabled,L(this,We))===!1||!$g(L(this,ia))||L(this,ia)===0)&&ye(this,eo,Ba.setInterval(()=>{(this.options.refetchIntervalInBackground||cy.isFocused())&&Ue(this,Xe,au).call(this)},L(this,ia)))},Vg=function(){Ue(this,Xe,Wg).call(this),Ue(this,Xe,Gg).call(this,Ue(this,Xe,Kg).call(this))},qg=function(){L(this,Ja)!==void 0&&(Ba.clearTimeout(L(this,Ja)),ye(this,Ja,void 0))},Qg=function(){L(this,eo)!==void 0&&(Ba.clearInterval(L(this,eo)),ye(this,eo,void 0))},Yg=function(){const t=L(this,wr).getQueryCache().build(L(this,wr),this.options);if(t===L(this,We))return;const r=L(this,We);ye(this,We,t),ye(this,Lu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},bN=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,cr))}),L(this,wr).getQueryCache().notify({query:L(this,We),type:"observerResultsUpdated"})})},aN);function SM(e,t){return Ir(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ir(t.retryOnMount,e)===!1)}function lw(e,t){return SM(e,t)||e.state.data!==void 0&&Xg(e,t,t.refetchOnMount)}function Xg(e,t,r){if(Ir(t.enabled,e)!==!1&&ua(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&hy(e,t)}return!1}function uw(e,t,r,n){return(e!==t||Ir(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&hy(e,r)}function hy(e,t){return Ir(t.enabled,e)!==!1&&e.isStaleByTime(ua(t.staleTime,e))}function NM(e,t){return!zg(e.getCurrentResult(),t)}var zu,On,rr,to,_n,qi,oN,EM=(oN=class extends vN{constructor(t){super();Re(this,_n);Re(this,zu);Re(this,On);Re(this,rr);Re(this,to);ye(this,zu,t.client),this.mutationId=t.mutationId,ye(this,rr,t.mutationCache),ye(this,On,[]),this.state=t.state||AM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,On).includes(t)||(L(this,On).push(t),this.clearGcTimeout(),L(this,rr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,On,L(this,On).filter(r=>r!==t)),this.scheduleGc(),L(this,rr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,On).length||(this.state.status==="pending"?this.scheduleGc():L(this,rr).remove(this))}continue(){var t;return((t=L(this,to))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,c,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,D;const r=()=>{Ue(this,_n,qi).call(this,{type:"continue"})},n={client:L(this,zu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,to,gN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,F)=>{Ue(this,_n,qi).call(this,{type:"failed",failureCount:B,error:F})},onPause:()=>{Ue(this,_n,qi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,rr).canRun(this)}));const a=this.state.status==="pending",o=!L(this,to).canStart();try{if(a)r();else{Ue(this,_n,qi).call(this,{type:"pending",variables:t,isPaused:o}),L(this,rr).config.onMutate&&await L(this,rr).config.onMutate(t,this,n);const F=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,n));F!==this.state.context&&Ue(this,_n,qi).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const B=await L(this,to).start();return await((h=(f=L(this,rr).config).onSuccess)==null?void 0:h.call(f,B,t,this.state.context,this,n)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,B,t,this.state.context,n)),await((b=(v=L(this,rr).config).onSettled)==null?void 0:b.call(v,B,null,this.state.variables,this.state.context,this,n)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,B,null,t,this.state.context,n)),Ue(this,_n,qi).call(this,{type:"success",data:B}),B}catch(B){try{await((N=(S=L(this,rr).config).onError)==null?void 0:N.call(S,B,t,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((A=(E=this.options).onError)==null?void 0:A.call(E,B,t,this.state.context,n))}catch(F){Promise.reject(F)}try{await((_=(P=L(this,rr).config).onSettled)==null?void 0:_.call(P,void 0,B,this.state.variables,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((D=(O=this.options).onSettled)==null?void 0:D.call(O,void 0,B,t,this.state.context,n))}catch(F){Promise.reject(F)}throw Ue(this,_n,qi).call(this,{type:"error",error:B}),B}finally{L(this,rr).runNext(this)}}},zu=new WeakMap,On=new WeakMap,rr=new WeakMap,to=new WeakMap,_n=new WeakSet,qi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Wt.batch(()=>{L(this,On).forEach(n=>{n.onMutationUpdate(t)}),L(this,rr).notify({mutation:this,type:"updated",action:t})})},oN);function AM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var oi,dn,Fu,sN,CM=(sN=class extends Bu{constructor(t={}){super();Re(this,oi);Re(this,dn);Re(this,Fu);this.config=t,ye(this,oi,new Set),ye(this,dn,new Map),ye(this,Fu,0)}build(t,r,n){const a=new EM({client:t,mutationCache:this,mutationId:++md(this,Fu)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){L(this,oi).add(t);const r=gd(t);if(typeof r=="string"){const n=L(this,dn).get(r);n?n.push(t):L(this,dn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,oi).delete(t)){const r=gd(t);if(typeof r=="string"){const n=L(this,dn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&L(this,dn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=gd(t);if(typeof r=="string"){const n=L(this,dn).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=gd(t);if(typeof r=="string"){const a=(n=L(this,dn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{L(this,oi).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,oi).clear(),L(this,dn).clear()})}getAll(){return Array.from(L(this,oi))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>rw(r,n))}findAll(t={}){return this.getAll().filter(r=>rw(t,r))}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Wt.batch(()=>Promise.all(t.map(r=>r.continue().catch(kr))))}},oi=new WeakMap,dn=new WeakMap,Fu=new WeakMap,sN);function gd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Mn,lN,PM=(lN=class extends Bu{constructor(t={}){super();Re(this,Mn);this.config=t,ye(this,Mn,new Map)}build(t,r,n){const a=r.queryKey,o=r.queryHash??dy(a,r);let u=this.get(o);return u||(u=new kM({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){L(this,Mn).has(t.queryHash)||(L(this,Mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,Mn).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,Mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Mn).get(t)}getAll(){return[...L(this,Mn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>tw(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>tw(t,n)):r}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mn=new WeakMap,lN),mt,aa,oa,Es,As,sa,Cs,Ps,uN,OM=(uN=class{constructor(e={}){Re(this,mt);Re(this,aa);Re(this,oa);Re(this,Es);Re(this,As);Re(this,sa);Re(this,Cs);Re(this,Ps);ye(this,mt,e.queryCache||new PM),ye(this,aa,e.mutationCache||new CM),ye(this,oa,e.defaultOptions||{}),ye(this,Es,new Map),ye(this,As,new Map),ye(this,sa,0)}mount(){md(this,sa)._++,L(this,sa)===1&&(ye(this,Cs,cy.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onFocus())})),ye(this,Ps,Yd.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onOnline())})))}unmount(){var e,t;md(this,sa)._--,L(this,sa)===0&&((e=L(this,Cs))==null||e.call(this),ye(this,Cs,void 0),(t=L(this,Ps))==null||t.call(this),ye(this,Ps,void 0))}isFetching(e){return L(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,aa).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,mt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,mt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ua(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,mt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=L(this,mt).get(n.queryHash),o=a==null?void 0:a.state.data,u=cM(t,o);if(u!==void 0)return L(this,mt).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Wt.batch(()=>L(this,mt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,mt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,mt);Wt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,mt);return Wt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Wt.batch(()=>L(this,mt).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(kr).catch(kr)}invalidateQueries(e,t={}){return Wt.batch(()=>(L(this,mt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Wt.batch(()=>L(this,mt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(kr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(kr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,mt).build(this,t);return r.isStaleByTime(ua(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kr).catch(kr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kr).catch(kr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Yd.isOnline()?L(this,aa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,mt)}getMutationCache(){return L(this,aa)}getDefaultOptions(){return L(this,oa)}setDefaultOptions(e){ye(this,oa,e)}setQueryDefaults(e,t){L(this,Es).set(mu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Es).values()],r={};return t.forEach(n=>{pu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,As).set(mu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,As).values()],r={};return t.forEach(n=>{pu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,oa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=dy(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===fy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,oa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,mt).clear(),L(this,aa).clear()}},mt=new WeakMap,aa=new WeakMap,oa=new WeakMap,Es=new WeakMap,As=new WeakMap,sa=new WeakMap,Cs=new WeakMap,Ps=new WeakMap,uN),wN=y.createContext(void 0),Kn=e=>{const t=y.useContext(wN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_M=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(wN.Provider,{value:e,children:t})),kN=y.createContext(!1),MM=()=>y.useContext(kN);kN.Provider;function IM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var TM=y.createContext(IM()),DM=()=>y.useContext(TM),RM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?mN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},LM=e=>{y.useEffect(()=>{e.clearReset()},[e])},$M=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||mN(r,[e.error,n])),zM=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},FM=(e,t)=>e.isLoading&&e.isFetching&&!t,BM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,cw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function UM(e,t,r){var b,j,k,S;const n=MM(),a=DM(),o=Kn(),u=o.defaultQueryOptions(e);(j=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,u);const c=o.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,zM(u),RM(u,a,c),LM(a);const h=!o.getQueryCache().get(u.queryHash),[m]=y.useState(()=>new t(o,u)),g=m.getOptimisticResult(u),v=!n&&f;if(y.useSyncExternalStore(y.useCallback(N=>{const E=v?m.subscribe(Wt.batchCalls(N)):kr;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(u)},[u,m]),BM(u,g))throw cw(u,m,a);if($M({result:g,errorResetBoundary:a,throwOnError:u.throwOnError,query:c,suspense:u.suspense}))throw g.error;if((S=(k=o.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||S.call(k,u,g),u.experimental_prefetchInRender&&!gu.isServer()&&FM(g,n)){const N=h?cw(u,m,a):c==null?void 0:c.promise;N==null||N.catch(kr).finally(()=>{m.updateResult()})}return u.notifyOnChangeProps?g:m.trackResult(g)}function Vt(e,t){return UM(e,jM)}/** * @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 V3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),NN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** + */const HM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).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 q3={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"};/** + */var WM={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 Q3=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:u,...c},f)=>y.createElement("svg",{ref:f,...q3,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:NN("lucide",i),...c},[...u.map(([h,m])=>y.createElement(h,m)),...Array.isArray(o)?o:[o]]));/** + */const KM=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:u,...c},f)=>y.createElement("svg",{ref:f,...WM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:jN("lucide",a),...c},[...u.map(([h,m])=>y.createElement(h,m)),...Array.isArray(o)?o:[o]]));/** * @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 de=(e,t)=>{const r=y.forwardRef(({className:n,...i},o)=>y.createElement(Q3,{ref:o,iconNode:t,className:NN(`lucide-${V3(e)}`,n),...i}));return r.displayName=`${e}`,r};/** + */const de=(e,t)=>{const r=y.forwardRef(({className:n,...a},o)=>y.createElement(KM,{ref:o,iconNode:t,className:jN(`lucide-${HM(e)}`,n),...a}));return r.displayName=`${e}`,r};/** * @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 Jf=de("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"}]]);/** + */const Zf=de("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 EN=de("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** + */const SN=de("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** * @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 Zd=de("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + */const Xd=de("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 Y3=de("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** + */const GM=de("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** * @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=de("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/** + */const NN=de("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/** * @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 ev=de("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"}]]);/** + */const Zg=de("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 X3=de("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/** + */const VM=de("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -102,22 +102,22 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Z3=de("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + */const qM=de("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** * @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=de("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"}]]);/** + */const Zd=de("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 J3=de("BrainCircuit",[["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:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["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:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/** + */const QM=de("BrainCircuit",[["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:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["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:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/** * @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 e4=de("BrainCog",[["path",{d:"M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",key:"1kgmhc"}],["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"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m15.7 10.4-.9.4",key:"ayzo6p"}],["path",{d:"m9.2 13.2-.9.4",key:"1uzb3g"}],["path",{d:"m13.6 15.7-.4-.9",key:"11ifqf"}],["path",{d:"m10.8 9.2-.4-.9",key:"1pmk2v"}],["path",{d:"m15.7 13.5-.9-.4",key:"7ng02m"}],["path",{d:"m9.2 10.9-.9-.4",key:"1x66zd"}],["path",{d:"m10.5 15.7.4-.9",key:"3js94g"}],["path",{d:"m13.1 9.2.4-.9",key:"18n7mc"}]]);/** + */const YM=de("BrainCog",[["path",{d:"M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",key:"1kgmhc"}],["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"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m15.7 10.4-.9.4",key:"ayzo6p"}],["path",{d:"m9.2 13.2-.9.4",key:"1uzb3g"}],["path",{d:"m13.6 15.7-.4-.9",key:"11ifqf"}],["path",{d:"m10.8 9.2-.4-.9",key:"1pmk2v"}],["path",{d:"m15.7 13.5-.9-.4",key:"7ng02m"}],["path",{d:"m9.2 10.9-.9-.4",key:"1x66zd"}],["path",{d:"m10.5 15.7.4-.9",key:"3js94g"}],["path",{d:"m13.1 9.2.4-.9",key:"18n7mc"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -127,7 +127,7 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const t4=de("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** + */const XM=de("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -137,52 +137,52 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CN=de("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const EN=de("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 r4=de("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const ZM=de("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 eh=de("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const Jf=de("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 PN=de("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + */const AN=de("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 n4=de("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/** + */const JM=de("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/** * @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=de("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const CN=de("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @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 i4=de("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"}]]);/** + */const e4=de("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 a4=de("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** + */const t4=de("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** * @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 _N=de("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + */const PN=de("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 o4=de("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/** + */const r4=de("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -192,22 +192,22 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const s4=de("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"}]]);/** + */const n4=de("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 tv=de("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"}]]);/** + */const Jg=de("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 l4=de("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"}]]);/** + */const i4=de("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 rv=de("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"}]]);/** + */const ev=de("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. @@ -217,7 +217,7 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const u4=de("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** + */const a4=de("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -232,7 +232,7 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hw=de("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"}]]);/** + */const dw=de("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. @@ -242,32 +242,32 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const c4=de("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** + */const o4=de("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @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 d4=de("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** + */const s4=de("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** * @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 f4=de("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"}]]);/** + */const l4=de("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 MN=de("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** + */const u4=de("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** * @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 h4=de("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/** + */const c4=de("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/** * @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 m4=de("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"}]]);/** + */const d4=de("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. @@ -277,122 +277,122 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const p4=de("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/** + */const f4=de("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/** * @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 g4=de("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** + */const h4=de("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** * @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 mw=de("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + */const fw=de("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 v4=de("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"}]]);/** + */const m4=de("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 y4=de("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/** + */const p4=de("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/** * @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 gy=de("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"}]]);/** + */const my=de("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 x4=de("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"}]]);/** + */const g4=de("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 b4=de("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/** + */const v4=de("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/** * @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 w4=de("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** + */const y4=de("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** * @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 k4=de("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** + */const x4=de("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** * @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 th=de("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + */const eh=de("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @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 j4=de("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** + */const b4=de("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** * @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 S4=de("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** + */const w4=de("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** * @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 N4=de("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** + */const k4=de("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** * @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 E4=de("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** + */const j4=de("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** * @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 pw=de("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"}]]);/** + */const hw=de("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 A4=de("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + */const S4=de("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 C4=de("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + */const N4=de("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** * @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 gw=de("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** + */const mw=de("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** * @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 P4=de("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"}]]);/** + */const E4=de("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 ef=de("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"}]]);/** + */const Jd=de("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 tf=de("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + */const ef=de("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 O4=de("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + */const A4=de("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 _4=de("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/** + */const C4=de("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -402,47 +402,47 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const M4=de("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** + */const P4=de("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** * @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 I4=de("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"}]]);/** + */const O4=de("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 vy=de("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const py=de("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 T4=de("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** + */const _4=de("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** * @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 rh=de("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"}]]);/** + */const th=de("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 D4=de("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** + */const M4=de("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** * @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 R4=de("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"}]]);/** + */const I4=de("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 IN=de("ShieldCheck",[["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:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const ON=de("ShieldCheck",[["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:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @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 L4=de("ShieldQuestion",[["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:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const T4=de("ShieldQuestion",[["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:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -452,17 +452,17 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TN=de("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/** + */const _N=de("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/** * @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 $4=de("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** + */const D4=de("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** * @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 z4=de("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/** + */const R4=de("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -472,27 +472,27 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const DN=de("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** + */const MN=de("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** * @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 F4=de("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"}]]);/** + */const L4=de("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 B4=de("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);/** + */const $4=de("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);/** * @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 RN=de("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** + */const IN=de("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 nv=de("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"}]]);/** + */const tv=de("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. @@ -502,7 +502,7 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const U4=de("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"}]]);/** + */const z4=de("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. @@ -517,8 +517,8 @@ Error generating stack: `+w.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ha=de("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"}]]),ou=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:x4},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:Jd},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:vo},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:ef},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:pn},{id:"terminal",label:"Terminal",hint:"Interaktives Hermes-Agent-Terminal",icon:DN},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:i4}];var vw=1,H4=.9,W4=.8,K4=.17,Vp=.1,qp=.999,G4=.9999,V4=.99,q4=/[\\\/_+.#"@\[\(\{&]/,Q4=/[\\\/_+.#"@\[\(\{&]/g,Y4=/[\s-]/,LN=/[\s-]/g;function iv(e,t,r,n,i,o,u){if(o===t.length)return i===e.length?vw:V4;var c=`${i},${o}`;if(u[c]!==void 0)return u[c];for(var f=n.charAt(o),h=r.indexOf(f,i),m=0,g,v,b,j;h>=0;)g=iv(e,t,r,n,h+1,o+1,u),g>m&&(h===i?g*=vw:q4.test(e.charAt(h-1))?(g*=W4,b=e.slice(i,h-1).match(Q4),b&&i>0&&(g*=Math.pow(qp,b.length))):Y4.test(e.charAt(h-1))?(g*=H4,j=e.slice(i,h-1).match(LN),j&&i>0&&(g*=Math.pow(qp,j.length))):(g*=K4,i>0&&(g*=Math.pow(qp,h-i))),e.charAt(h)!==t.charAt(o)&&(g*=G4)),(gg&&(g=v*Vp)),g>m&&(m=g),h=r.indexOf(f,h+1);return u[c]=m,m}function yw(e){return e.toLowerCase().replace(LN," ")}function X4(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,iv(e,t,yw(e),yw(t),0,0,{})}function ca(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function xw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Is(...e){return t=>{let r=!1;const n=e.map(i=>{const o=xw(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i{var N;const{scope:v,children:b,...j}=g,k=((N=v==null?void 0:v[e])==null?void 0:N[f])||c,S=y.useMemo(()=>j,Object.values(j));return l.jsx(k.Provider,{value:S,children:b})};h.displayName=o+"Provider";function m(g,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[f])||c,j=y.useContext(b);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,m]}const i=()=>{const o=r.map(u=>y.createContext(u));return function(c){const f=(c==null?void 0:c[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return i.scopeName=e,[n,J4(i,...t)]}function J4(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const u=n.reduce((c,{useScope:f,scopeName:h})=>{const g=f(o)[`__scope${h}`];return{...c,...g}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var yu=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},eI=Zf[" useId ".trim().toString()]||(()=>{}),tI=0;function di(e){const[t,r]=y.useState(eI());return yu(()=>{r(n=>n??String(tI++))},[e]),t?`radix-${t}`:""}var rI=Zf[" useInsertionEffect ".trim().toString()]||yu;function nI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,u]=iI({defaultProp:t,onChange:r}),c=e!==void 0,f=c?e:i;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const g=m.current;g!==c&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${c?"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.`),m.current=c},[c,n])}const h=y.useCallback(m=>{var g;if(c){const v=aI(m)?m(e):m;v!==e&&((g=u.current)==null||g.call(u,v))}else o(m)},[c,e,o,u]);return[f,h]}function iI({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),i=y.useRef(r),o=y.useRef(t);return rI(()=>{o.current=t},[t]),y.useEffect(()=>{var u;i.current!==r&&((u=o.current)==null||u.call(o,r),i.current=r)},[r,i]),[r,n,o]}function aI(e){return typeof e=="function"}var nh=fN();function $N(e){const t=y.forwardRef((r,n)=>{let{children:i,...o}=r,u=null,c=!1;const f=[];bw(i)&&typeof vd=="function"&&(i=vd(i._payload)),y.Children.forEach(i,v=>{var b;if(cI(v)){c=!0;const j=v;let k="child"in j.props?j.props.child:j.props.children;bw(k)&&typeof vd=="function"&&(k=vd(k._payload)),u=sI(j,k),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(v)}),u?u=y.cloneElement(u,void 0,f):!c&&y.Children.count(i)===1&&y.isValidElement(i)&&(u=i);const h=u?uI(u):void 0,m=yo(n,h);if(!u){if(i||i===0)throw new Error(c?mI(e):hI(e));return i}const g=lI(o,u.props??{});return u.type!==y.Fragment&&(g.ref=n?m:h),y.cloneElement(u,g)});return t.displayName=`${e}.Slot`,t}var oI=Symbol.for("radix.slottable"),sI=(e,t)=>{if("child"in e.props){const r=e.props.child;return y.isValidElement(r)?y.cloneElement(r,void 0,e.props.children(r.props.children)):null}return y.isValidElement(t)?t:null};function lI(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...c)=>{const f=o(...c);return i(...c),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function uI(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function cI(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oI}var dI=Symbol.for("react.lazy");function bw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===dI&&"_payload"in e&&fI(e._payload)}function fI(e){return typeof e=="object"&&e!==null&&"then"in e}var hI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,mI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,vd=Zf[" use ".trim().toString()],pI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qt=pI.reduce((e,t)=>{const r=$N(`Primitive.${t}`),n=y.forwardRef((i,o)=>{const{asChild:u,...c}=i,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(f,{...c,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function gI(e,t){e&&nh.flushSync(()=>e.dispatchEvent(t))}function xu(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function vI(e,t=globalThis==null?void 0:globalThis.document){const r=xu(e);y.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var yI="DismissableLayer",av="dismissableLayer.update",xI="dismissableLayer.pointerDownOutside",bI="dismissableLayer.focusOutside",ww,yy=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),zN=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:c,onDismiss:f,...h}=e,m=y.useContext(yy),[g,v]=y.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=y.useState({}),k=yo(t,F=>v(F)),S=Array.from(m.layers),[N]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(N),A=g?S.indexOf(g):-1,P=m.layersWithOutsidePointerEventsDisabled.size>0,_=A>=E,O=y.useRef(!1),D=SI(F=>{const z=F.target;if(!(z instanceof Node))return;const Y=[...m.branches].some(U=>U.contains(z));!_||Y||(o==null||o(F),c==null||c(F),F.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:m.dismissableSurfaces}),B=NI(F=>{if(n&&O.current)return;const z=F.target;[...m.branches].some(U=>U.contains(z))||(u==null||u(F),c==null||c(F),F.defaultPrevented||f==null||f())},b);return vI(F=>{A===m.layers.size-1&&(i==null||i(F),!F.defaultPrevented&&f&&(F.preventDefault(),f()))},b),y.useEffect(()=>{if(g)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(ww=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),kw(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(g),m.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=ww))}},[g,b,r,m]),y.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),kw())},[g,m]),y.useEffect(()=>{const F=()=>j({});return document.addEventListener(av,F),()=>document.removeEventListener(av,F)},[]),l.jsx(qt.div,{...h,ref:k,style:{pointerEvents:P?_?"auto":"none":void 0,...e.style},onFocusCapture:ca(e.onFocusCapture,B.onFocusCapture),onBlurCapture:ca(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:ca(e.onPointerDownCapture,D.onPointerDownCapture)})});zN.displayName=yI;var wI="DismissableLayerBranch",kI=y.forwardRef((e,t)=>{const r=y.useContext(yy),n=y.useRef(null),i=yo(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),l.jsx(qt.div,{...e,ref:i})});kI.displayName=wI;function jI(){const e=y.useContext(yy),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function SI(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,u=xu(e),c=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),m=y.useRef(()=>{});return y.useEffect(()=>{function g(){f.current=!1,i.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const A=E.target;A instanceof Node&&[...o].some(_=>_.contains(A))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function j(E){f.current&&h.current.set(E.type,!1)}const k=E=>{if(E.target&&!c.current){let A=function(){r.removeEventListener("click",m.current);const _=v();g(),_||FN(xI,u,P,{discrete:!0})};const P={originalEvent:E};f.current=!0,i.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?A():(r.removeEventListener("click",m.current),m.current=A,r.addEventListener("click",m.current,{once:!0}))}else r.removeEventListener("click",m.current),g();c.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of S)r.addEventListener(E,b,!0),r.addEventListener(E,j);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",k),r.removeEventListener("click",m.current);for(const E of S)r.removeEventListener(E,b,!0),r.removeEventListener(E,j)}},[r,u,n,i,o]),{onPointerDownCapture:()=>c.current=!0}}function NI(e,t=globalThis==null?void 0:globalThis.document){const r=xu(e),n=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!n.current&&FN(bI,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function kw(){const e=new CustomEvent(av);document.dispatchEvent(e)}function FN(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?gI(i,o):i.dispatchEvent(o)}var Qp="focusScope.autoFocusOnMount",Yp="focusScope.autoFocusOnUnmount",jw={bubbles:!1,cancelable:!0},EI="FocusScope",BN=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...u}=e,[c,f]=y.useState(null),h=xu(i),m=xu(o),g=y.useRef(null),v=yo(t,k=>f(k)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let k=function(A){if(b.paused||!c)return;const P=A.target;c.contains(P)?g.current=P:Qi(g.current,{select:!0})},S=function(A){if(b.paused||!c)return;const P=A.relatedTarget;P!==null&&(c.contains(P)||Qi(g.current,{select:!0}))},N=function(A){if(document.activeElement===document.body)for(const _ of A)_.removedNodes.length>0&&Qi(c)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const E=new MutationObserver(N);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),E.disconnect()}}},[n,c,b.paused]),y.useEffect(()=>{if(c){Nw.add(b);const k=document.activeElement;if(!c.contains(k)){const N=new CustomEvent(Qp,jw);c.addEventListener(Qp,h),c.dispatchEvent(N),N.defaultPrevented||(AI(MI(UN(c)),{select:!0}),document.activeElement===k&&Qi(c))}return()=>{c.removeEventListener(Qp,h),setTimeout(()=>{const N=new CustomEvent(Yp,jw);c.addEventListener(Yp,m),c.dispatchEvent(N),N.defaultPrevented||Qi(k??document.body,{select:!0}),c.removeEventListener(Yp,m),Nw.remove(b)},0)}}},[c,h,m,b]);const j=y.useCallback(k=>{if(!r&&!n||b.paused)return;const S=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,N=document.activeElement;if(S&&N){const E=k.currentTarget,[A,P]=CI(E);A&&P?!k.shiftKey&&N===P?(k.preventDefault(),r&&Qi(A,{select:!0})):k.shiftKey&&N===A&&(k.preventDefault(),r&&Qi(P,{select:!0})):N===E&&k.preventDefault()}},[r,n,b.paused]);return l.jsx(qt.div,{tabIndex:-1,...u,ref:v,onKeyDown:j})});BN.displayName=EI;function AI(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Qi(n,{select:t}),document.activeElement!==r)return}function CI(e){const t=UN(e),r=Sw(t,e),n=Sw(t.reverse(),e);return[r,n]}function UN(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Sw(e,t){for(const r of e)if(!PI(r,{upTo:t}))return r}function PI(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function OI(e){return e instanceof HTMLInputElement&&"select"in e}function Qi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&OI(e)&&t&&e.select()}}var Nw=_I();function _I(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ew(e,t),e.unshift(t)},remove(t){var r;e=Ew(e,t),(r=e[0])==null||r.resume()}}}function Ew(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function MI(e){return e.filter(t=>t.tagName!=="A")}var II="Portal",HN=y.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[i,o]=y.useState(!1);yu(()=>o(!0),[]);const u=r||i&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?nh.createPortal(l.jsx(qt.div,{...n,ref:t}),u):null});HN.displayName=II;function TI(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var ih=e=>{const{present:t,children:r}=e,n=DI(t),i=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=RI(n.ref,LI(i));return typeof r=="function"||n.isPresent?y.cloneElement(i,{ref:o}):null};ih.displayName="Presence";function DI(e){const[t,r]=y.useState(),n=y.useRef(null),i=y.useRef(e),o=y.useRef("none"),u=e?"mounted":"unmounted",[c,f]=TI(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=yd(n.current);o.current=c==="mounted"?h:"none"},[c]),yu(()=>{const h=n.current,m=i.current;if(m!==e){const v=o.current,b=yd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),yu(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=b=>{const k=yd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(f("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=b=>{b.target===t&&(o.current=yd(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function Aw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function RI(...e){const t=y.useRef(e);return t.current=e,y.useCallback(r=>{const n=t.current;let i=!1;const o=n.map(u=>{const c=Aw(u,r);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let u=0;u{En||(En={start:Cw(),end:Cw()});const{start:e,end:t}=En;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),xd++,()=>{xd===1&&(En==null||En.start.remove(),En==null||En.end.remove(),En=null),xd=Math.max(0,xd-1)}},[])}function Cw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var In=function(){return In=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return tT;var t=rT(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},iT=VN(),fs="data-scroll-locked",aT=function(e,t,r,n){var i=e.left,o=e.top,u=e.right,c=e.gap;return r===void 0&&(r="margin"),` - .`.concat(FI,` { + */const ha=de("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"}]]),ou=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:g4},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:Zd},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:vo},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Jd},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:pn},{id:"terminal",label:"Terminal",hint:"Interaktives Hermes-Agent-Terminal",icon:MN},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:e4}];var pw=1,F4=.9,B4=.8,U4=.17,Gp=.1,Vp=.999,H4=.9999,W4=.99,K4=/[\\\/_+.#"@\[\(\{&]/,G4=/[\\\/_+.#"@\[\(\{&]/g,V4=/[\s-]/,TN=/[\s-]/g;function rv(e,t,r,n,a,o,u){if(o===t.length)return a===e.length?pw:W4;var c=`${a},${o}`;if(u[c]!==void 0)return u[c];for(var f=n.charAt(o),h=r.indexOf(f,a),m=0,g,v,b,j;h>=0;)g=rv(e,t,r,n,h+1,o+1,u),g>m&&(h===a?g*=pw:K4.test(e.charAt(h-1))?(g*=B4,b=e.slice(a,h-1).match(G4),b&&a>0&&(g*=Math.pow(Vp,b.length))):V4.test(e.charAt(h-1))?(g*=F4,j=e.slice(a,h-1).match(TN),j&&a>0&&(g*=Math.pow(Vp,j.length))):(g*=U4,a>0&&(g*=Math.pow(Vp,h-a))),e.charAt(h)!==t.charAt(o)&&(g*=H4)),(gg&&(g=v*Gp)),g>m&&(m=g),h=r.indexOf(f,h+1);return u[c]=m,m}function gw(e){return e.toLowerCase().replace(TN," ")}function q4(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,rv(e,t,gw(e),gw(t),0,0,{})}function ca(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function vw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Is(...e){return t=>{let r=!1;const n=e.map(a=>{const o=vw(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a{var N;const{scope:v,children:b,...j}=g,k=((N=v==null?void 0:v[e])==null?void 0:N[f])||c,S=y.useMemo(()=>j,Object.values(j));return l.jsx(k.Provider,{value:S,children:b})};h.displayName=o+"Provider";function m(g,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[f])||c,j=y.useContext(b);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,m]}const a=()=>{const o=r.map(u=>y.createContext(u));return function(c){const f=(c==null?void 0:c[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return a.scopeName=e,[n,Y4(a,...t)]}function Y4(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const u=n.reduce((c,{useScope:f,scopeName:h})=>{const g=f(o)[`__scope${h}`];return{...c,...g}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var yu=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},X4=Xf[" useId ".trim().toString()]||(()=>{}),Z4=0;function di(e){const[t,r]=y.useState(X4());return yu(()=>{r(n=>n??String(Z4++))},[e]),t?`radix-${t}`:""}var J4=Xf[" useInsertionEffect ".trim().toString()]||yu;function eI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,u]=tI({defaultProp:t,onChange:r}),c=e!==void 0,f=c?e:a;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const g=m.current;g!==c&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${c?"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.`),m.current=c},[c,n])}const h=y.useCallback(m=>{var g;if(c){const v=rI(m)?m(e):m;v!==e&&((g=u.current)==null||g.call(u,v))}else o(m)},[c,e,o,u]);return[f,h]}function tI({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),a=y.useRef(r),o=y.useRef(t);return J4(()=>{o.current=t},[t]),y.useEffect(()=>{var u;a.current!==r&&((u=o.current)==null||u.call(o,r),a.current=r)},[r,a]),[r,n,o]}function rI(e){return typeof e=="function"}var rh=cN();function DN(e){const t=y.forwardRef((r,n)=>{let{children:a,...o}=r,u=null,c=!1;const f=[];yw(a)&&typeof vd=="function"&&(a=vd(a._payload)),y.Children.forEach(a,v=>{var b;if(sI(v)){c=!0;const j=v;let k="child"in j.props?j.props.child:j.props.children;yw(k)&&typeof vd=="function"&&(k=vd(k._payload)),u=iI(j,k),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(v)}),u?u=y.cloneElement(u,void 0,f):!c&&y.Children.count(a)===1&&y.isValidElement(a)&&(u=a);const h=u?oI(u):void 0,m=yo(n,h);if(!u){if(a||a===0)throw new Error(c?dI(e):cI(e));return a}const g=aI(o,u.props??{});return u.type!==y.Fragment&&(g.ref=n?m:h),y.cloneElement(u,g)});return t.displayName=`${e}.Slot`,t}var nI=Symbol.for("radix.slottable"),iI=(e,t)=>{if("child"in e.props){const r=e.props.child;return y.isValidElement(r)?y.cloneElement(r,void 0,e.props.children(r.props.children)):null}return y.isValidElement(t)?t:null};function aI(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function oI(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function sI(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nI}var lI=Symbol.for("react.lazy");function yw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===lI&&"_payload"in e&&uI(e._payload)}function uI(e){return typeof e=="object"&&e!==null&&"then"in e}var cI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,dI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,vd=Xf[" use ".trim().toString()],fI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qt=fI.reduce((e,t)=>{const r=DN(`Primitive.${t}`),n=y.forwardRef((a,o)=>{const{asChild:u,...c}=a,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(f,{...c,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hI(e,t){e&&rh.flushSync(()=>e.dispatchEvent(t))}function xu(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function mI(e,t=globalThis==null?void 0:globalThis.document){const r=xu(e);y.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var pI="DismissableLayer",nv="dismissableLayer.update",gI="dismissableLayer.pointerDownOutside",vI="dismissableLayer.focusOutside",xw,gy=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),RN=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:c,onDismiss:f,...h}=e,m=y.useContext(gy),[g,v]=y.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=y.useState({}),k=yo(t,F=>v(F)),S=Array.from(m.layers),[N]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(N),A=g?S.indexOf(g):-1,P=m.layersWithOutsidePointerEventsDisabled.size>0,_=A>=E,O=y.useRef(!1),D=wI(F=>{const z=F.target;if(!(z instanceof Node))return;const Y=[...m.branches].some(U=>U.contains(z));!_||Y||(o==null||o(F),c==null||c(F),F.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:m.dismissableSurfaces}),B=kI(F=>{if(n&&O.current)return;const z=F.target;[...m.branches].some(U=>U.contains(z))||(u==null||u(F),c==null||c(F),F.defaultPrevented||f==null||f())},b);return mI(F=>{A===m.layers.size-1&&(a==null||a(F),!F.defaultPrevented&&f&&(F.preventDefault(),f()))},b),y.useEffect(()=>{if(g)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(xw=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),bw(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(g),m.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=xw))}},[g,b,r,m]),y.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),bw())},[g,m]),y.useEffect(()=>{const F=()=>j({});return document.addEventListener(nv,F),()=>document.removeEventListener(nv,F)},[]),l.jsx(qt.div,{...h,ref:k,style:{pointerEvents:P?_?"auto":"none":void 0,...e.style},onFocusCapture:ca(e.onFocusCapture,B.onFocusCapture),onBlurCapture:ca(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:ca(e.onPointerDownCapture,D.onPointerDownCapture)})});RN.displayName=pI;var yI="DismissableLayerBranch",xI=y.forwardRef((e,t)=>{const r=y.useContext(gy),n=y.useRef(null),a=yo(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),l.jsx(qt.div,{...e,ref:a})});xI.displayName=yI;function bI(){const e=y.useContext(gy),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function wI(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,u=xu(e),c=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),m=y.useRef(()=>{});return y.useEffect(()=>{function g(){f.current=!1,a.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const A=E.target;A instanceof Node&&[...o].some(_=>_.contains(A))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function j(E){f.current&&h.current.set(E.type,!1)}const k=E=>{if(E.target&&!c.current){let A=function(){r.removeEventListener("click",m.current);const _=v();g(),_||LN(gI,u,P,{discrete:!0})};const P={originalEvent:E};f.current=!0,a.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?A():(r.removeEventListener("click",m.current),m.current=A,r.addEventListener("click",m.current,{once:!0}))}else r.removeEventListener("click",m.current),g();c.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of S)r.addEventListener(E,b,!0),r.addEventListener(E,j);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",k),r.removeEventListener("click",m.current);for(const E of S)r.removeEventListener(E,b,!0),r.removeEventListener(E,j)}},[r,u,n,a,o]),{onPointerDownCapture:()=>c.current=!0}}function kI(e,t=globalThis==null?void 0:globalThis.document){const r=xu(e),n=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!n.current&&LN(vI,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function bw(){const e=new CustomEvent(nv);document.dispatchEvent(e)}function LN(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?hI(a,o):a.dispatchEvent(o)}var qp="focusScope.autoFocusOnMount",Qp="focusScope.autoFocusOnUnmount",ww={bubbles:!1,cancelable:!0},jI="FocusScope",$N=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...u}=e,[c,f]=y.useState(null),h=xu(a),m=xu(o),g=y.useRef(null),v=yo(t,k=>f(k)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let k=function(A){if(b.paused||!c)return;const P=A.target;c.contains(P)?g.current=P:Qi(g.current,{select:!0})},S=function(A){if(b.paused||!c)return;const P=A.relatedTarget;P!==null&&(c.contains(P)||Qi(g.current,{select:!0}))},N=function(A){if(document.activeElement===document.body)for(const _ of A)_.removedNodes.length>0&&Qi(c)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const E=new MutationObserver(N);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),E.disconnect()}}},[n,c,b.paused]),y.useEffect(()=>{if(c){jw.add(b);const k=document.activeElement;if(!c.contains(k)){const N=new CustomEvent(qp,ww);c.addEventListener(qp,h),c.dispatchEvent(N),N.defaultPrevented||(SI(PI(zN(c)),{select:!0}),document.activeElement===k&&Qi(c))}return()=>{c.removeEventListener(qp,h),setTimeout(()=>{const N=new CustomEvent(Qp,ww);c.addEventListener(Qp,m),c.dispatchEvent(N),N.defaultPrevented||Qi(k??document.body,{select:!0}),c.removeEventListener(Qp,m),jw.remove(b)},0)}}},[c,h,m,b]);const j=y.useCallback(k=>{if(!r&&!n||b.paused)return;const S=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,N=document.activeElement;if(S&&N){const E=k.currentTarget,[A,P]=NI(E);A&&P?!k.shiftKey&&N===P?(k.preventDefault(),r&&Qi(A,{select:!0})):k.shiftKey&&N===A&&(k.preventDefault(),r&&Qi(P,{select:!0})):N===E&&k.preventDefault()}},[r,n,b.paused]);return l.jsx(qt.div,{tabIndex:-1,...u,ref:v,onKeyDown:j})});$N.displayName=jI;function SI(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Qi(n,{select:t}),document.activeElement!==r)return}function NI(e){const t=zN(e),r=kw(t,e),n=kw(t.reverse(),e);return[r,n]}function zN(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function kw(e,t){for(const r of e)if(!EI(r,{upTo:t}))return r}function EI(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function AI(e){return e instanceof HTMLInputElement&&"select"in e}function Qi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&AI(e)&&t&&e.select()}}var jw=CI();function CI(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Sw(e,t),e.unshift(t)},remove(t){var r;e=Sw(e,t),(r=e[0])==null||r.resume()}}}function Sw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function PI(e){return e.filter(t=>t.tagName!=="A")}var OI="Portal",FN=y.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[a,o]=y.useState(!1);yu(()=>o(!0),[]);const u=r||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?rh.createPortal(l.jsx(qt.div,{...n,ref:t}),u):null});FN.displayName=OI;function _I(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var nh=e=>{const{present:t,children:r}=e,n=MI(t),a=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=II(n.ref,TI(a));return typeof r=="function"||n.isPresent?y.cloneElement(a,{ref:o}):null};nh.displayName="Presence";function MI(e){const[t,r]=y.useState(),n=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),u=e?"mounted":"unmounted",[c,f]=_I(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=yd(n.current);o.current=c==="mounted"?h:"none"},[c]),yu(()=>{const h=n.current,m=a.current;if(m!==e){const v=o.current,b=yd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),yu(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=b=>{const k=yd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(f("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=b=>{b.target===t&&(o.current=yd(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function Nw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function II(...e){const t=y.useRef(e);return t.current=e,y.useCallback(r=>{const n=t.current;let a=!1;const o=n.map(u=>{const c=Nw(u,r);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let u=0;u{En||(En={start:Ew(),end:Ew()});const{start:e,end:t}=En;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),xd++,()=>{xd===1&&(En==null||En.start.remove(),En==null||En.end.remove(),En=null),xd=Math.max(0,xd-1)}},[])}function Ew(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var In=function(){return In=Object.assign||function(t){for(var r,n=1,a=arguments.length;n"u")return ZI;var t=JI(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},tT=WN(),fs="data-scroll-locked",rT=function(e,t,r,n){var a=e.left,o=e.top,u=e.right,c=e.gap;return r===void 0&&(r="margin"),` + .`.concat(LI,` { overflow: hidden `).concat(n,`; padding-right: `).concat(c,"px ").concat(n,`; } @@ -526,7 +526,7 @@ Error generating stack: `+w.message+` overflow: hidden `).concat(n,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(i,`px; + padding-left: `.concat(a,`px; padding-top: `).concat(o,`px; padding-right: `).concat(u,`px; margin-left:0; @@ -535,29 +535,29 @@ Error generating stack: `+w.message+` `),r==="padding"&&"padding-right: ".concat(c,"px ").concat(n,";")].filter(Boolean).join(""),` } - .`).concat(Ud,` { + .`).concat(Bd,` { right: `).concat(c,"px ").concat(n,`; } - .`).concat(Hd,` { + .`).concat(Ud,` { margin-right: `).concat(c,"px ").concat(n,`; } - .`).concat(Ud," .").concat(Ud,` { + .`).concat(Bd," .").concat(Bd,` { right: 0 `).concat(n,`; } - .`).concat(Hd," .").concat(Hd,` { + .`).concat(Ud," .").concat(Ud,` { margin-right: 0 `).concat(n,`; } body[`).concat(fs,`] { - `).concat(BI,": ").concat(c,`px; + `).concat($I,": ").concat(c,`px; } -`)},Ow=function(){var e=parseInt(document.body.getAttribute(fs)||"0",10);return isFinite(e)?e:0},oT=function(){y.useEffect(function(){return document.body.setAttribute(fs,(Ow()+1).toString()),function(){var e=Ow()-1;e<=0?document.body.removeAttribute(fs):document.body.setAttribute(fs,e.toString())}},[])},sT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;oT();var o=y.useMemo(function(){return nT(i)},[i]);return y.createElement(iT,{styles:aT(o,!t,i,r?"":"!important")})},ov=!1;if(typeof window<"u")try{var bd=Object.defineProperty({},"passive",{get:function(){return ov=!0,!0}});window.addEventListener("test",bd,bd),window.removeEventListener("test",bd,bd)}catch{ov=!1}var Qo=ov?{passive:!1}:!1,lT=function(e){return e.tagName==="TEXTAREA"},qN=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!lT(e)&&r[t]==="visible")},uT=function(e){return qN(e,"overflowY")},cT=function(e){return qN(e,"overflowX")},_w=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=QN(e,n);if(i){var o=YN(e,n),u=o[1],c=o[2];if(u>c)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},dT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},fT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},QN=function(e,t){return e==="v"?uT(t):cT(t)},YN=function(e,t){return e==="v"?dT(t):fT(t)},hT=function(e,t){return e==="h"&&t==="rtl"?-1:1},mT=function(e,t,r,n,i){var o=hT(e,window.getComputedStyle(t).direction),u=o*n,c=r.target,f=t.contains(c),h=!1,m=u>0,g=0,v=0;do{if(!c)break;var b=YN(e,c),j=b[0],k=b[1],S=b[2],N=k-S-o*j;(j||N)&&QN(e,c)&&(g+=N,v+=j);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},wd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mw=function(e){return[e.deltaX,e.deltaY]},Iw=function(e){return e&&"current"in e?e.current:e},pT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gT=function(e){return` +`)},Cw=function(){var e=parseInt(document.body.getAttribute(fs)||"0",10);return isFinite(e)?e:0},nT=function(){y.useEffect(function(){return document.body.setAttribute(fs,(Cw()+1).toString()),function(){var e=Cw()-1;e<=0?document.body.removeAttribute(fs):document.body.setAttribute(fs,e.toString())}},[])},iT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;nT();var o=y.useMemo(function(){return eT(a)},[a]);return y.createElement(tT,{styles:rT(o,!t,a,r?"":"!important")})},iv=!1;if(typeof window<"u")try{var bd=Object.defineProperty({},"passive",{get:function(){return iv=!0,!0}});window.addEventListener("test",bd,bd),window.removeEventListener("test",bd,bd)}catch{iv=!1}var Qo=iv?{passive:!1}:!1,aT=function(e){return e.tagName==="TEXTAREA"},KN=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!aT(e)&&r[t]==="visible")},oT=function(e){return KN(e,"overflowY")},sT=function(e){return KN(e,"overflowX")},Pw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=GN(e,n);if(a){var o=VN(e,n),u=o[1],c=o[2];if(u>c)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},lT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},uT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},GN=function(e,t){return e==="v"?oT(t):sT(t)},VN=function(e,t){return e==="v"?lT(t):uT(t)},cT=function(e,t){return e==="h"&&t==="rtl"?-1:1},dT=function(e,t,r,n,a){var o=cT(e,window.getComputedStyle(t).direction),u=o*n,c=r.target,f=t.contains(c),h=!1,m=u>0,g=0,v=0;do{if(!c)break;var b=VN(e,c),j=b[0],k=b[1],S=b[2],N=k-S-o*j;(j||N)&&GN(e,c)&&(g+=N,v+=j);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},wd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ow=function(e){return[e.deltaX,e.deltaY]},_w=function(e){return e&&"current"in e?e.current:e},fT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hT=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},vT=0,Yo=[];function yT(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),i=y.useState(vT++)[0],o=y.useState(VN)[0],u=y.useRef(e);y.useEffect(function(){u.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=zI([e.lockRef.current],(e.shards||[]).map(Iw),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var N=wd(k),E=r.current,A="deltaX"in k?k.deltaX:E[0]-N[0],P="deltaY"in k?k.deltaY:E[1]-N[1],_,O=k.target,D=Math.abs(A)>Math.abs(P)?"h":"v";if("touches"in k&&D==="h"&&O.type==="range")return!1;var B=window.getSelection(),F=B&&B.anchorNode,z=F?F===O||F.contains(O):!1;if(z)return!1;var Y=_w(D,O);if(!Y)return!0;if(Y?_=D:(_=D==="v"?"h":"v",Y=_w(D,O)),!Y)return!1;if(!n.current&&"changedTouches"in k&&(A||P)&&(n.current=_),!_)return!0;var U=n.current||_;return mT(U,S,k,U==="h"?A:P)},[]),f=y.useCallback(function(k){var S=k;if(!(!Yo.length||Yo[Yo.length-1]!==o)){var N="deltaY"in S?Mw(S):wd(S),E=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&pT(_.delta,N)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var A=(u.current.shards||[]).map(Iw).filter(Boolean).filter(function(_){return _.contains(S.target)}),P=A.length>0?c(S,A[0]):!u.current.noIsolation;P&&S.cancelable&&S.preventDefault()}}},[]),h=y.useCallback(function(k,S,N,E){var A={name:k,delta:S,target:N,should:E,shadowParent:xT(N)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(P){return P!==A})},1)},[]),m=y.useCallback(function(k){r.current=wd(k),n.current=void 0},[]),g=y.useCallback(function(k){h(k.type,Mw(k),k.target,c(k,e.lockRef.current))},[]),v=y.useCallback(function(k){h(k.type,wd(k),k.target,c(k,e.lockRef.current))},[]);y.useEffect(function(){return Yo.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Qo),document.addEventListener("touchmove",f,Qo),document.addEventListener("touchstart",m,Qo),function(){Yo=Yo.filter(function(k){return k!==o}),document.removeEventListener("wheel",f,Qo),document.removeEventListener("touchmove",f,Qo),document.removeEventListener("touchstart",m,Qo)}},[]);var b=e.removeScrollBar,j=e.inert;return y.createElement(y.Fragment,null,j?y.createElement(o,{styles:gT(i)}):null,b?y.createElement(sT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bT=qI(GN,yT);var XN=y.forwardRef(function(e,t){return y.createElement(ah,In({},e,{ref:t,sideCar:bT}))});XN.classNames=ah.classNames;var wT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xo=new WeakMap,kd=new WeakMap,jd={},eg=0,ZN=function(e){return e&&(e.host||ZN(e.parentNode))},kT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ZN(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},jT=function(e,t,r,n){var i=kT(t,Array.isArray(e)?e:[e]);jd[r]||(jd[r]=new WeakMap);var o=jd[r],u=[],c=new Set,f=new Set(i),h=function(g){!g||c.has(g)||(c.add(g),h(g.parentNode))};i.forEach(h);var m=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(v){if(c.has(v))m(v);else try{var b=v.getAttribute(n),j=b!==null&&b!=="false",k=(Xo.get(v)||0)+1,S=(o.get(v)||0)+1;Xo.set(v,k),o.set(v,S),u.push(v),k===1&&j&&kd.set(v,!0),S===1&&v.setAttribute(r,"true"),j||v.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return m(t),c.clear(),eg++,function(){u.forEach(function(g){var v=Xo.get(g)-1,b=o.get(g)-1;Xo.set(g,v),o.set(g,b),v||(kd.has(g)||g.removeAttribute(n),kd.delete(g)),b||g.removeAttribute(r)}),eg--,eg||(Xo=new WeakMap,Xo=new WeakMap,kd=new WeakMap,jd={})}},ST=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=wT(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),jT(n,i,r,"aria-hidden")):function(){return null}},oh="Dialog",[JN]=Z4(oh),[NT,xn]=JN(oh),e5=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:u=!0}=e,c=y.useRef(null),f=y.useRef(null),[h,m]=nI({prop:n,defaultProp:i??!1,onChange:o,caller:oh});return l.jsx(NT,{scope:t,triggerRef:c,contentRef:f,contentId:di(),titleId:di(),descriptionId:di(),open:h,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(g=>!g),[m]),modal:u,children:r})};e5.displayName=oh;var t5="DialogTrigger",ET=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(t5,r),o=yo(t,i.triggerRef);return l.jsx(qt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":by(i.open),...n,ref:o,onClick:ca(e.onClick,i.onOpenToggle)})});ET.displayName=t5;var xy="DialogPortal",[AT,r5]=JN(xy,{forceMount:void 0}),n5=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=xn(xy,t);return l.jsx(AT,{scope:t,forceMount:r,children:y.Children.map(n,u=>l.jsx(ih,{present:r||o.open,children:l.jsx(HN,{asChild:!0,container:i,children:u})}))})};n5.displayName=xy;var rf="DialogOverlay",i5=y.forwardRef((e,t)=>{const r=r5(rf,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=xn(rf,e.__scopeDialog);return o.modal?l.jsx(ih,{present:n||o.open,children:l.jsx(PT,{...i,ref:t})}):null});i5.displayName=rf;var CT=$N("DialogOverlay.RemoveScroll"),PT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(rf,r),o=jI(),u=yo(t,o);return l.jsx(XN,{as:CT,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(qt.div,{"data-state":by(i.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),Ts="DialogContent",a5=y.forwardRef((e,t)=>{const r=r5(Ts,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=xn(Ts,e.__scopeDialog);return l.jsx(ih,{present:n||o.open,children:o.modal?l.jsx(OT,{...i,ref:t}):l.jsx(_T,{...i,ref:t})})});a5.displayName=Ts;var OT=y.forwardRef((e,t)=>{const r=xn(Ts,e.__scopeDialog),n=y.useRef(null),i=yo(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return ST(o)},[]),l.jsx(o5,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:ca(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ca(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0;(u.button===2||c)&&o.preventDefault()}),onFocusOutside:ca(e.onFocusOutside,o=>o.preventDefault())})}),_T=y.forwardRef((e,t)=>{const r=xn(Ts,e.__scopeDialog),n=y.useRef(!1),i=y.useRef(!1);return l.jsx(o5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),o5=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...u}=e,c=xn(Ts,r);return $I(),l.jsx(l.Fragment,{children:l.jsx(BN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:l.jsx(zN,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":by(c.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),s5="DialogTitle",MT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(s5,r);return l.jsx(qt.h2,{id:i.titleId,...n,ref:t})});MT.displayName=s5;var l5="DialogDescription",IT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(l5,r);return l.jsx(qt.p,{id:i.descriptionId,...n,ref:t})});IT.displayName=l5;var u5="DialogClose",TT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=xn(u5,r);return l.jsx(qt.button,{type:"button",...n,ref:t,onClick:ca(e.onClick,()=>i.onOpenChange(!1))})});TT.displayName=u5;function by(e){return e?"open":"closed"}var Wl='[cmdk-group=""]',tg='[cmdk-group-items=""]',DT='[cmdk-group-heading=""]',c5='[cmdk-item=""]',Tw=`${c5}:not([aria-disabled="true"])`,sv="cmdk-item-select",os="data-value",RT=(e,t,r)=>X4(e,t,r),d5=y.createContext(void 0),Hu=()=>y.useContext(d5),f5=y.createContext(void 0),wy=()=>y.useContext(f5),h5=y.createContext(void 0),m5=y.forwardRef((e,t)=>{let r=ss(()=>{var M,H;return{search:"",value:(H=(M=e.value)!=null?M:e.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=ss(()=>new Set),i=ss(()=>new Map),o=ss(()=>new Map),u=ss(()=>new Set),c=p5(e),{label:f,children:h,value:m,onValueChange:g,filter:v,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:S=!0,...N}=e,E=di(),A=di(),P=di(),_=y.useRef(null),O=VT();so(()=>{if(m!==void 0){let M=m.trim();r.current.value=M,D.emit()}},[m]),so(()=>{O(6,he)},[]);let D=y.useMemo(()=>({subscribe:M=>(u.current.add(M),()=>u.current.delete(M)),snapshot:()=>r.current,setState:(M,H,ne)=>{var Z,me,pe,Oe;if(!Object.is(r.current[M],H)){if(r.current[M]=H,M==="search")U(),z(),O(1,Y);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let re=document.getElementById(P);re?re.focus():(Z=document.getElementById(E))==null||Z.focus()}if(O(7,()=>{var re;r.current.selectedItemId=(re=ue())==null?void 0:re.id,D.emit()}),ne||O(5,he),((me=c.current)==null?void 0:me.value)!==void 0){let re=H??"";(Oe=(pe=c.current).onValueChange)==null||Oe.call(pe,re);return}}D.emit()}},emit:()=>{u.current.forEach(M=>M())}}),[]),B=y.useMemo(()=>({value:(M,H,ne)=>{var Z;H!==((Z=o.current.get(M))==null?void 0:Z.value)&&(o.current.set(M,{value:H,keywords:ne}),r.current.filtered.items.set(M,F(H,ne)),O(2,()=>{z(),D.emit()}))},item:(M,H)=>(n.current.add(M),H&&(i.current.has(H)?i.current.get(H).add(M):i.current.set(H,new Set([M]))),O(3,()=>{U(),z(),r.current.value||Y(),D.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let ne=ue();O(4,()=>{U(),(ne==null?void 0:ne.getAttribute("id"))===M&&Y(),D.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>c.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:E,inputId:P,labelId:A,listInnerRef:_}),[]);function F(M,H){var ne,Z;let me=(Z=(ne=c.current)==null?void 0:ne.filter)!=null?Z:RT;return M?me(M,r.current.search,H):0}function z(){if(!r.current.search||c.current.shouldFilter===!1)return;let M=r.current.filtered.items,H=[];r.current.filtered.groups.forEach(Z=>{let me=i.current.get(Z),pe=0;me.forEach(Oe=>{let re=M.get(Oe);pe=Math.max(re,pe)}),H.push([Z,pe])});let ne=_.current;ge().sort((Z,me)=>{var pe,Oe;let re=Z.getAttribute("id"),we=me.getAttribute("id");return((pe=M.get(we))!=null?pe:0)-((Oe=M.get(re))!=null?Oe:0)}).forEach(Z=>{let me=Z.closest(tg);me?me.appendChild(Z.parentElement===me?Z:Z.closest(`${tg} > *`)):ne.appendChild(Z.parentElement===ne?Z:Z.closest(`${tg} > *`))}),H.sort((Z,me)=>me[1]-Z[1]).forEach(Z=>{var me;let pe=(me=_.current)==null?void 0:me.querySelector(`${Wl}[${os}="${encodeURIComponent(Z[0])}"]`);pe==null||pe.parentElement.appendChild(pe)})}function Y(){let M=ge().find(ne=>ne.getAttribute("aria-disabled")!=="true"),H=M==null?void 0:M.getAttribute(os);D.setState("value",H||void 0)}function U(){var M,H,ne,Z;if(!r.current.search||c.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let me=0;for(let pe of n.current){let Oe=(H=(M=o.current.get(pe))==null?void 0:M.value)!=null?H:"",re=(Z=(ne=o.current.get(pe))==null?void 0:ne.keywords)!=null?Z:[],we=F(Oe,re);r.current.filtered.items.set(pe,we),we>0&&me++}for(let[pe,Oe]of i.current)for(let re of Oe)if(r.current.filtered.items.get(re)>0){r.current.filtered.groups.add(pe);break}r.current.filtered.count=me}function he(){var M,H,ne;let Z=ue();Z&&(((M=Z.parentElement)==null?void 0:M.firstChild)===Z&&((ne=(H=Z.closest(Wl))==null?void 0:H.querySelector(DT))==null||ne.scrollIntoView({block:"nearest"})),Z.scrollIntoView({block:"nearest"}))}function ue(){var M;return(M=_.current)==null?void 0:M.querySelector(`${c5}[aria-selected="true"]`)}function ge(){var M;return Array.from(((M=_.current)==null?void 0:M.querySelectorAll(Tw))||[])}function ie(M){let H=ge()[M];H&&D.setState("value",H.getAttribute(os))}function se(M){var H;let ne=ue(),Z=ge(),me=Z.findIndex(Oe=>Oe===ne),pe=Z[me+M];(H=c.current)!=null&&H.loop&&(pe=me+M<0?Z[Z.length-1]:me+M===Z.length?Z[0]:Z[me+M]),pe&&D.setState("value",pe.getAttribute(os))}function X(M){let H=ue(),ne=H==null?void 0:H.closest(Wl),Z;for(;ne&&!Z;)ne=M>0?KT(ne,Wl):GT(ne,Wl),Z=ne==null?void 0:ne.querySelector(Tw);Z?D.setState("value",Z.getAttribute(os)):se(M)}let te=()=>ie(ge().length-1),J=M=>{M.preventDefault(),M.metaKey?te():M.altKey?X(1):se(1)},I=M=>{M.preventDefault(),M.metaKey?ie(0):M.altKey?X(-1):se(-1)};return y.createElement(qt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:M=>{var H;(H=N.onKeyDown)==null||H.call(N,M);let ne=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||ne))switch(M.key){case"n":case"j":{S&&M.ctrlKey&&J(M);break}case"ArrowDown":{J(M);break}case"p":case"k":{S&&M.ctrlKey&&I(M);break}case"ArrowUp":{I(M);break}case"Home":{M.preventDefault(),ie(0);break}case"End":{M.preventDefault(),te();break}case"Enter":{M.preventDefault();let Z=ue();if(Z){let me=new Event(sv);Z.dispatchEvent(me)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:QT},f),sh(e,M=>y.createElement(f5.Provider,{value:D},y.createElement(d5.Provider,{value:B},M))))}),LT=y.forwardRef((e,t)=>{var r,n;let i=di(),o=y.useRef(null),u=y.useContext(h5),c=Hu(),f=p5(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;so(()=>{if(!h)return c.item(i,u==null?void 0:u.id)},[h]);let m=g5(i,o,[e.value,e.children,o],e.keywords),g=wy(),v=ma(O=>O.value&&O.value===m.current),b=ma(O=>h||c.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);y.useEffect(()=>{let O=o.current;if(!(!O||e.disabled))return O.addEventListener(sv,j),()=>O.removeEventListener(sv,j)},[b,e.onSelect,e.disabled]);function j(){var O,D;k(),(D=(O=f.current).onSelect)==null||D.call(O,m.current)}function k(){g.setState("value",m.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:E,forceMount:A,keywords:P,..._}=e;return y.createElement(qt.div,{ref:Is(o,t),..._,id:i,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!v,"data-disabled":!!S,"data-selected":!!v,onPointerMove:S||c.getDisablePointerSelection()?void 0:k,onClick:S?void 0:j},e.children)}),$T=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,u=di(),c=y.useRef(null),f=y.useRef(null),h=di(),m=Hu(),g=ma(b=>i||m.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);so(()=>m.group(u),[]),g5(u,c,[e.value,e.heading,f]);let v=y.useMemo(()=>({id:u,forceMount:i}),[i]);return y.createElement(qt.div,{ref:Is(c,t),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),sh(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},y.createElement(h5.Provider,{value:v},b))))}),zT=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=y.useRef(null),o=ma(u=>!u.search);return!r&&!o?null:y.createElement(qt.div,{ref:Is(i,t),...n,"cmdk-separator":"",role:"separator"})}),FT=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,o=wy(),u=ma(h=>h.search),c=ma(h=>h.selectedItemId),f=Hu();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(qt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":c,id:f.inputId,type:"text",value:i?e.value:u,onChange:h=>{i||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),BT=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=y.useRef(null),u=y.useRef(null),c=ma(h=>h.selectedItemId),f=Hu();return y.useEffect(()=>{if(u.current&&o.current){let h=u.current,m=o.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),y.createElement(qt.div,{ref:Is(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":n,id:f.listId},sh(e,h=>y.createElement("div",{ref:Is(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),UT=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:u,...c}=e;return y.createElement(e5,{open:r,onOpenChange:n},y.createElement(n5,{container:u},y.createElement(i5,{"cmdk-overlay":"",className:i}),y.createElement(a5,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(m5,{ref:t,...c}))))}),HT=y.forwardRef((e,t)=>ma(r=>r.filtered.count===0)?y.createElement(qt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),WT=y.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return y.createElement(qt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},sh(e,u=>y.createElement("div",{"aria-hidden":!0},u)))}),Zo=Object.assign(m5,{List:BT,Item:LT,Input:FT,Group:$T,Separator:zT,Dialog:UT,Empty:HT,Loading:WT});function KT(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function GT(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function p5(e){let t=y.useRef(e);return so(()=>{t.current=e}),t}var so=typeof window>"u"?y.useEffect:y.useLayoutEffect;function ss(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ma(e){let t=wy(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function g5(e,t,r,n=[]){let i=y.useRef(),o=Hu();return so(()=>{var u;let c=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():i.current}})(),f=n.map(h=>h.trim());o.value(e,c,f),(u=t.current)==null||u.setAttribute(os,c),i.current=c}),i}var VT=()=>{let[e,t]=y.useState(),r=ss(()=>new Map);return so(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function qT(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function sh({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(qT(t),{ref:t.ref},r(t.props.children)):r(t)}var QT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function YT({onNavigate:e}){const[t,r]=y.useState(!1);return y.useEffect(()=>{const n=i=>{(i.metaKey||i.ctrlKey)&&i.key.toLowerCase()==="k"&&(i.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),l.jsx(Zo.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh] overscroll-contain",onClick:()=>r(!1),children:l.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[l.jsx(Zo.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"}),l.jsxs(Zo.List,{className:"max-h-80 overflow-y-auto p-2",children:[l.jsx(Zo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),l.jsx(Zo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:ou.map(n=>l.jsxs(Zo.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!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:[l.jsx(n.icon,{className:"h-4 w-4 text-primary"}),l.jsx("span",{children:n.label}),l.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const v5="mc_expert_mode",lv="mc-expert-mode-change",XT=()=>{try{return localStorage.getItem(v5)==="true"}catch{return!1}};function ZT(e){return window.addEventListener(lv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(lv,e),window.removeEventListener("storage",e)}}function Dw(e){localStorage.setItem(v5,String(e)),window.dispatchEvent(new Event(lv))}function y5(){return y.useSyncExternalStore(ZT,XT,()=>!1)}function x5(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=tD(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const c=u.split(ky);return c[0]===""&&c.length!==1&&c.shift(),b5(c,t)||eD(u)},getConflictingClassGroupIds:(u,c)=>{const f=r[u]||[];return c&&n[u]?[...f,...n[u]]:f}}},b5=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?b5(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(ky);return(u=t.validators.find(({validator:c})=>c(o)))==null?void 0:u.classGroupId},Rw=/^\[(.+)\]$/,eD=e=>{if(Rw.test(e)){const t=Rw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},tD=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return nD(Object.entries(e.classGroups),r).forEach(([o,u])=>{uv(u,n,o,t)}),n},uv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Lw(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(rD(i)){uv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,u])=>{uv(u,Lw(t,o),r,n)})})},Lw=(e,t)=>{let r=e;return t.split(ky).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},rD=e=>e.isThemeGetter,nD=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([u,c])=>[t+u,c])):o);return[r,i]}):e,iD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,u)=>{r.set(o,u),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let u=r.get(o);if(u!==void 0)return u;if((u=n.get(o))!==void 0)return i(o,u),u},set(o,u){r.has(o)?r.set(o,u):i(o,u)}}},w5="!",aD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,u=c=>{const f=[];let h=0,m=0,g;for(let S=0;Sm?g-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}};return r?c=>r({className:c,parseClassName:u}):u},oD=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},sD=e=>({cache:iD(e.cacheSize),parseClassName:aD(e),...JT(e)}),lD=/\s+/,uD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],u=e.trim().split(lD);let c="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:m,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let j=!!b,k=n(j?v.substring(0,b):v);if(!k){if(!j){c=h+(c.length>0?" "+c:c);continue}if(k=n(v),!k){c=h+(c.length>0?" "+c:c);continue}j=!1}const S=oD(m).join(":"),N=g?S+w5:S,E=N+k;if(o.includes(E))continue;o.push(E);const A=i(k,j);for(let P=0;P0?" "+c:c)}return c};function cD(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;ng(m),e());return r=sD(h),n=r.cache.get,i=r.cache.set,o=c,c(f)}function c(f){const h=n(f);if(h)return h;const m=uD(f,r);return i(f,m),m}return function(){return o(cD.apply(null,arguments))}}const at=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},j5=/^\[(?:([a-z-]+):)?(.+)\]$/i,fD=/^\d+\/\d+$/,hD=new Set(["px","full","screen"]),mD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pD=/\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$/,gD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ri=e=>hs(e)||hD.has(e)||fD.test(e),Ki=e=>Gs(e,"length",ED),hs=e=>!!e&&!Number.isNaN(Number(e)),rg=e=>Gs(e,"number",hs),Kl=e=>!!e&&Number.isInteger(Number(e)),xD=e=>e.endsWith("%")&&hs(e.slice(0,-1)),$e=e=>j5.test(e),Gi=e=>mD.test(e),bD=new Set(["length","size","percentage"]),wD=e=>Gs(e,bD,S5),kD=e=>Gs(e,"position",S5),jD=new Set(["image","url"]),SD=e=>Gs(e,jD,CD),ND=e=>Gs(e,"",AD),Gl=()=>!0,Gs=(e,t,r)=>{const n=j5.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},ED=e=>pD.test(e)&&!gD.test(e),S5=()=>!1,AD=e=>vD.test(e),CD=e=>yD.test(e),PD=()=>{const e=at("colors"),t=at("spacing"),r=at("blur"),n=at("brightness"),i=at("borderColor"),o=at("borderRadius"),u=at("borderSpacing"),c=at("borderWidth"),f=at("contrast"),h=at("grayscale"),m=at("hueRotate"),g=at("invert"),v=at("gap"),b=at("gradientColorStops"),j=at("gradientColorStopPositions"),k=at("inset"),S=at("margin"),N=at("opacity"),E=at("padding"),A=at("saturate"),P=at("scale"),_=at("sepia"),O=at("skew"),D=at("space"),B=at("translate"),F=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",$e,t],U=()=>[$e,t],he=()=>["",ri,Ki],ue=()=>["auto",hs,$e],ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",$e],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[hs,$e];return{cacheSize:500,separator:":",theme:{colors:[Gl],spacing:[ri,Ki],blur:["none","",Gi,$e],brightness:I(),borderColor:[e],borderRadius:["none","","full",Gi,$e],borderSpacing:U(),borderWidth:he(),contrast:I(),grayscale:te(),hueRotate:I(),invert:te(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[xD,Ki],inset:Y(),margin:Y(),opacity:I(),padding:U(),saturate:I(),scale:I(),sepia:te(),skew:I(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Gi]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"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:[...ge(),$e]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kl,$e]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",Kl,$e]}],"grid-cols":[{"grid-cols":[Gl]}],"col-start-end":[{col:["auto",{span:["full",Kl,$e]},$e]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[Gl]}],"row-start-end":[{row:["auto",{span:[Kl,$e]},$e]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Gi]},Gi]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gi,Ki]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rg]}],"font-family":[{font:[Gl]}],"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",$e]}],"line-clamp":[{"line-clamp":["none",hs,rg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ri,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ri,Ki]}],"underline-offset":[{"underline-offset":["auto",ri,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],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",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ge(),kD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},SD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:ie()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[ri,$e]}],"outline-w":[{outline:[ri,Ki]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ri,Ki]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gi,ND]}],"shadow-color":[{shadow:[Gl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Gi,$e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[g]}],saturate:[{saturate:[A]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Kl,$e]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],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",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ri,Ki,rg]}],stroke:[{stroke:[e,"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"]}}},OD=dD(PD);function ee(...e){return OD(rt(e))}function Ds(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function N5(){const e=y5();return l.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[l.jsxs("button",{onClick:()=>Dw(!1),"aria-pressed":!e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[l.jsx(us,{className:"h-3.5 w-3.5"})," Einfach"]}),l.jsxs("button",{onClick:()=>Dw(!0),"aria-pressed":e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.jsx($4,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function je(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),i=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let m=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,m=!0),i&&!("hf_token"in h)&&(h.hf_token=i,m=!0),m&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),i&&(h.hf_token=i),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const c=await fetch(e,{...t,headers:r,body:o});if(!c.ok)throw new Error(`${c.status} ${c.statusText}`);return c.json()}const E5=(e,t,r=!1,n=!0)=>je("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),_D=e=>je("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)}),Ge={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],voiceMetrics:["voice-metrics"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"]},MD=(e=!0)=>Rt({queryKey:Ge.memoryGraph,queryFn:()=>je("/api/memory/graph"),enabled:e}),jy=()=>Rt({queryKey:Ge.health,queryFn:()=>je("/api/health"),refetchInterval:1e4}),xo=(e=5e3)=>Rt({queryKey:Ge.systemStatus,queryFn:()=>je("/api/system/status"),refetchInterval:e}),A5=(e=3e3)=>Rt({queryKey:Ge.services,queryFn:()=>je("/api/system/services"),refetchInterval:e}),yi=(e=4e3)=>Rt({queryKey:Ge.models,queryFn:()=>je("/api/models"),refetchInterval:e}),C5=(e=8e3)=>Rt({queryKey:Ge.groups,queryFn:()=>je("/api/groups"),refetchInterval:e}),ID=(e=5e3)=>Rt({queryKey:Ge.voiceMetrics,queryFn:()=>je("/api/voice/metrics"),refetchInterval:e}),TD=()=>Rt({queryKey:Ge.routingPolicy,queryFn:()=>je("/api/routing/policy")}),DD=(e=2e3)=>Rt({queryKey:Ge.jobs,queryFn:()=>je("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),Sy=(e=3e3)=>Rt({queryKey:Ge.tokenStats,queryFn:()=>je("/api/system/token-stats"),refetchInterval:e}),Ny=(e=5e3)=>Rt({queryKey:Ge.agentStatus,queryFn:()=>je("/api/agent/status"),refetchInterval:e}),P5=(e=6e4)=>Rt({queryKey:Ge.hermesBrain,queryFn:()=>je("/api/agent/brain"),refetchInterval:e}),lh=e=>Rt({queryKey:Ge.updates,queryFn:()=>je("/api/maintenance/updates"),refetchInterval:e}),RD=()=>Rt({queryKey:Ge.discover,queryFn:()=>je("/api/discover")}),LD=e=>Rt({queryKey:Ge.drafts(e),queryFn:()=>je(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),$D=e=>Rt({queryKey:Ge.connect(e),queryFn:()=>je(e?`/api/connect?${e}`:"/api/connect")}),zD=()=>Rt({queryKey:Ge.connectHealth,queryFn:()=>je("/api/connect/health"),refetchInterval:15e3}),cv=e=>Rt({queryKey:Ge.memory(e==null?void 0:e.q,e==null?void 0:e.category),queryFn:()=>{const t=new URLSearchParams;return e!=null&&e.q&&t.set("q",e.q),e!=null&&e.category&&t.set("category",e.category),je(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});let dv=[],fv=[];const hv=new Set,O5=()=>hv.forEach(e=>e());function _5(e){return hv.add(e),()=>{hv.delete(e)}}function FD(e){dv=[...dv,e].slice(-40),O5()}function BD(e){fv=[...fv,e].slice(-40),O5()}const UD=()=>y.useSyncExternalStore(_5,()=>dv),HD=()=>y.useSyncExternalStore(_5,()=>fv);function WD(){const{data:e,dataUpdatedAt:t}=xo(3e3),{data:r,dataUpdatedAt:n}=Sy(3e3),i=y.useRef(null);y.useEffect(()=>{var o,u,c,f;e&&FD({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((u=e.ram)==null?void 0:u.percent)??0,gpu:((c=e.gpu)==null?void 0:c.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),y.useEffect(()=>{if(!r)return;const o=Date.now(),u=r.prompt_tokens,c=r.completion_tokens;if(i.current){const f=Math.max((o-i.current.t)/1e3,.001);BD({t:o,prompt:Math.max(0,(u-i.current.p)/f),completion:Math.max(0,(c-i.current.c)/f)})}i.current={p:u,c,t:o}},[n])}function KD(){const{data:e,error:t}=xo(3e3),r=UD();return{sys:e,hist:r,error:t}}function Yi(e){return(e/1024**3).toFixed(1)}function mv(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function _r(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function GD(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function $w(e){return e?`${Math.round(e/1024)}k`:"—"}var VD=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Ey(e){if(typeof e!="string")return!1;var t=VD;return t.includes(e)}var qD=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],QD=new Set(qD);function M5(e){return typeof e!="string"?!1:QD.has(e)}function I5(e){return typeof e=="string"&&e.startsWith("data-")}function vn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(M5(r)||I5(r))&&(t[r]=e[r]);return t}function uh(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return vn(t)}return typeof e=="object"&&!Array.isArray(e)?vn(e):null}function Yr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(M5(r)||I5(r)||Ey(r))&&(t[r]=e[r]);return t}function YD(e){return e==null?null:y.isValidElement(e)?Yr(e.props):typeof e=="object"&&!Array.isArray(e)?Yr(e):null}var XD=["children","width","height","viewBox","className","style","title","desc"];function pv(){return pv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,i=e.height,o=e.viewBox,u=e.className,c=e.style,f=e.title,h=e.desc,m=ZD(e,XD),g=o||{width:n,height:i,x:0,y:0},v=rt("recharts-surface",u);return y.createElement("svg",pv({},Yr(m),{className:v,width:n,height:i,style:c,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),y.createElement("title",null,f),y.createElement("desc",null,h),r)}),eR=["children","className"];function gv(){return gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,i=tR(e,eR),o=rt("recharts-layer",n);return y.createElement("g",gv({className:o},Yr(i),{ref:t}),r)}),nR=y.createContext(null);function pt(e){return function(){return e}}const vv=Math.PI,yv=2*vv,$a=1e-6,iR=yv-$a;function D5(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return D5;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i$a)if(!(Math.abs(g*f-h*m)>$a)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,j=i-c,k=f*f+h*h,S=b*b+j*j,N=Math.sqrt(k),E=Math.sqrt(v),A=o*Math.tan((vv-Math.acos((k+v-S)/(2*N*E)))/2),P=A/E,_=A/N;Math.abs(P-1)>$a&&this._append`L${t+P*m},${r+P*g}`,this._append`A${o},${o},0,0,${+(g*b>m*j)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,i,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(i),f=n*Math.sin(i),h=t+c,m=r+f,g=1^u,v=u?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>$a||Math.abs(this._y1-m)>$a)&&this._append`L${h},${m}`,n&&(v<0&&(v=v%yv+yv),v>iR?this._append`A${n},${n},0,1,${g},${t-c},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=m}`:v>$a&&this._append`A${n},${n},0,${+(v>=vv)},${g},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function R5(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new oR(t)}function Ay(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function L5(e){this._context=e}L5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ch(e){return new L5(e)}function $5(e){return e[0]}function z5(e){return e[1]}function F5(e,t){var r=pt(!0),n=null,i=ch,o=null,u=R5(c);e=typeof e=="function"?e:e===void 0?$5:pt(e),t=typeof t=="function"?t:t===void 0?z5:pt(t);function c(f){var h,m=(f=Ay(f)).length,g,v=!1,b;for(n==null&&(o=i(b=u())),h=0;h<=m;++h)!(h=b;--j)c.point(A[j],P[j]);c.lineEnd(),c.areaEnd()}N&&(A[v]=+e(S,v,g),P[v]=+t(S,v,g),c.point(n?+n(S,v,g):A[v],r?+r(S,v,g):P[v]))}if(E)return c=null,E+""||null}function m(){return F5().defined(i).curve(u).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:pt(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:pt(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:pt(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:pt(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:pt(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:pt(+g),h):r},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(r)},h.lineX1=function(){return m().x(n).y(t)},h.defined=function(g){return arguments.length?(i=typeof g=="function"?g:pt(!!g),h):i},h.curve=function(g){return arguments.length?(u=g,o!=null&&(c=u(o)),h):u},h.context=function(g){return arguments.length?(g==null?o=c=null:c=u(o=g),h):o},h}class B5{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function sR(e){return new B5(e,!0)}function lR(e){return new B5(e,!1)}function nf(){}function af(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function U5(e){this._context=e}U5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:af(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:af(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uR(e){return new U5(e)}function H5(e){this._context=e}H5.prototype={areaStart:nf,areaEnd:nf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:af(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cR(e){return new H5(e)}function W5(e){this._context=e}W5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:af(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dR(e){return new W5(e)}function K5(e){this._context=e}K5.prototype={areaStart:nf,areaEnd:nf,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function fR(e){return new K5(e)}function zw(e){return e<0?-1:1}function Fw(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),u=(r-e._y1)/(i||n<0&&-0),c=(o*i+u*n)/(n+i);return(zw(o)+zw(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(c))||0}function Bw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ng(e,t,r){var n=e._x0,i=e._y0,o=e._x1,u=e._y1,c=(o-n)/3;e._context.bezierCurveTo(n+c,i+c*t,o-c,u-c*r,o,u)}function of(e){this._context=e}of.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ng(this,this._t0,Bw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ng(this,Bw(this,r=Fw(this,e,t)),r);break;default:ng(this,this._t0,r=Fw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function G5(e){this._context=new V5(e)}(G5.prototype=Object.create(of.prototype)).point=function(e,t){of.prototype.point.call(this,t,e)};function V5(e){this._context=e}V5.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function hR(e){return new of(e)}function mR(e){return new G5(e)}function q5(e){this._context=e}q5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Uw(e),i=Uw(t),o=0,u=1;u=0;--t)i[t]=(u[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function gR(e){return new dh(e,.5)}function vR(e){return new dh(e,0)}function yR(e){return new dh(e,1)}function lo(e,t){if((u=e.length)>1)for(var r=1,n,i,o=e[t[0]],u,c=o.length;r=0;)r[t]=t;return r}function xR(e,t){return e[t]}function bR(e){const t=[];return t.key=e,t}function wR(){var e=pt([]),t=xv,r=lo,n=xR;function i(o){var u=Array.from(e.apply(this,arguments),bR),c,f=u.length,h=-1,m;for(const g of o)for(c=0,++h;c0){for(var r,n,i=0,o=e[0].length,u;i0){for(var r=0,n=e[t[0]],i,o=n.length;r0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,u;n1&&arguments[1]!==void 0?arguments[1]:ER,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Ht(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var c=r[u-1];return typeof c=="string"?i+c+o:c!==void 0?i+la(c)+o:i+o},"")}var Vr=e=>e===0?0:e>0?1:-1,Fn=e=>typeof e=="number"&&e!=+e,uo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ee=e=>(typeof e=="number"||e instanceof Number)&&!Fn(e),Bn=e=>Ee(e)||typeof e=="string",AR=0,bu=e=>{var t=++AR;return"".concat(e||"").concat(t)},pa=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ee(t)&&typeof t!="string")return n;var o;if(uo(t)){if(r==null)return n;var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return Fn(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},X5=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):bo(n,t))===r)}var Vt=e=>e===null||typeof e>"u",Oy=e=>Vt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function jr(e){return e!=null}function Vs(){}var J5=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,_y=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(y.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Ey(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},CR=(e,t,r)=>n=>(e(t,r,n),null),PR=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];Ey(i)&&typeof o=="function"&&(n||(n={}),n[i]=CR(o,t,r))}),n};function Hw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function OR(e){for(var t=1;t(u[c]===void 0&&n[c]!==void 0&&(u[c]=n[c]),u),r);return o}function TR(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function My(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zR="[object RegExp]",tE="[object String]",rE="[object Number]",nE="[object Boolean]",iE="[object Arguments]",FR="[object Symbol]",BR="[object Date]",UR="[object Map]",HR="[object Set]",WR="[object Array]",KR="[object ArrayBuffer]",GR="[object Object]",VR="[object DataView]",qR="[object Uint8Array]",QR="[object Uint8ClampedArray]",YR="[object Uint16Array]",XR="[object Uint32Array]",ZR="[object Int8Array]",JR="[object Int16Array]",eL="[object Int32Array]",tL="[object Float32Array]",rL="[object Float64Array]",Ww=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function nL(e){return typeof Ww.Buffer<"u"&&Ww.Buffer.isBuffer(e)}function iL(e,t){return Ua(e,void 0,e,new Map,t)}function Ua(e,t,r,n=new Map,i=void 0){const o=i==null?void 0:i(e,t,r,n);if(o!==void 0)return o;if(wv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const u=new Array(e.length);n.set(e,u);for(let c=0;c{}):kv(e,t,function n(i,o,u,c,f,h){const m=r(i,o,u,c,f,h);return m!==void 0?!!m:kv(i,o,n,h,!1)},new Map,!0)}function kv(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return sL(e,t,r,n);case"function":return Object.keys(t).length>0?kv(e,{...t},r,n,i):Wd(e,t);default:return aE(e)&&i?typeof t=="string"?t==="":!0:Wd(e,t)}}function sL(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return sE(e,t,r,n);if(t instanceof Map)return lL(e,t,r,n);if(t instanceof Set)return uL(e,t,r,n);const i=Object.keys(t);if(e==null||wv(e))return i.length===0;if(i.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o{})}function cL(e){return e=oL(e),t=>lE(t,e)}function dL(e,t){return iL(e,(r,n,i,o)=>{if(typeof e=="object"){if(My(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return o.set(e,u),cn(u,e,i,o),u}switch(Object.prototype.toString.call(e)){case rE:case tE:case nE:{const u=new e.constructor(e==null?void 0:e.valueOf());return cn(u,e),u}case iE:{const u={};return cn(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function fL(e){return dL(e)}const hL=/^(?:0|[1-9]\d*)$/;function uE(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function cE(e){return e!=null&&typeof e!="function"&&yL(e.length)}function xL(e){return typeof e=="object"&&e!==null}function bL(e){return xL(e)&&cE(e)}function Kw(e,t=eE){return bL(e)?TR(Array.from(e),DR(vL(t),1)):[]}function wL(e,t,r){return t===!0?Kw(e,r):typeof t=="function"?Kw(e,t):e}var ig={exports:{}},ag={},og={exports:{}},sg={};/** +`)},mT=0,Yo=[];function pT(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),a=y.useState(mT++)[0],o=y.useState(WN)[0],u=y.useRef(e);y.useEffect(function(){u.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=RI([e.lockRef.current],(e.shards||[]).map(_w),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var N=wd(k),E=r.current,A="deltaX"in k?k.deltaX:E[0]-N[0],P="deltaY"in k?k.deltaY:E[1]-N[1],_,O=k.target,D=Math.abs(A)>Math.abs(P)?"h":"v";if("touches"in k&&D==="h"&&O.type==="range")return!1;var B=window.getSelection(),F=B&&B.anchorNode,z=F?F===O||F.contains(O):!1;if(z)return!1;var Y=Pw(D,O);if(!Y)return!0;if(Y?_=D:(_=D==="v"?"h":"v",Y=Pw(D,O)),!Y)return!1;if(!n.current&&"changedTouches"in k&&(A||P)&&(n.current=_),!_)return!0;var U=n.current||_;return dT(U,S,k,U==="h"?A:P)},[]),f=y.useCallback(function(k){var S=k;if(!(!Yo.length||Yo[Yo.length-1]!==o)){var N="deltaY"in S?Ow(S):wd(S),E=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&fT(_.delta,N)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var A=(u.current.shards||[]).map(_w).filter(Boolean).filter(function(_){return _.contains(S.target)}),P=A.length>0?c(S,A[0]):!u.current.noIsolation;P&&S.cancelable&&S.preventDefault()}}},[]),h=y.useCallback(function(k,S,N,E){var A={name:k,delta:S,target:N,should:E,shadowParent:gT(N)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(P){return P!==A})},1)},[]),m=y.useCallback(function(k){r.current=wd(k),n.current=void 0},[]),g=y.useCallback(function(k){h(k.type,Ow(k),k.target,c(k,e.lockRef.current))},[]),v=y.useCallback(function(k){h(k.type,wd(k),k.target,c(k,e.lockRef.current))},[]);y.useEffect(function(){return Yo.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Qo),document.addEventListener("touchmove",f,Qo),document.addEventListener("touchstart",m,Qo),function(){Yo=Yo.filter(function(k){return k!==o}),document.removeEventListener("wheel",f,Qo),document.removeEventListener("touchmove",f,Qo),document.removeEventListener("touchstart",m,Qo)}},[]);var b=e.removeScrollBar,j=e.inert;return y.createElement(y.Fragment,null,j?y.createElement(o,{styles:hT(a)}):null,b?y.createElement(iT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const vT=KI(HN,pT);var qN=y.forwardRef(function(e,t){return y.createElement(ih,In({},e,{ref:t,sideCar:vT}))});qN.classNames=ih.classNames;var yT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xo=new WeakMap,kd=new WeakMap,jd={},Jp=0,QN=function(e){return e&&(e.host||QN(e.parentNode))},xT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=QN(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},bT=function(e,t,r,n){var a=xT(t,Array.isArray(e)?e:[e]);jd[r]||(jd[r]=new WeakMap);var o=jd[r],u=[],c=new Set,f=new Set(a),h=function(g){!g||c.has(g)||(c.add(g),h(g.parentNode))};a.forEach(h);var m=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(v){if(c.has(v))m(v);else try{var b=v.getAttribute(n),j=b!==null&&b!=="false",k=(Xo.get(v)||0)+1,S=(o.get(v)||0)+1;Xo.set(v,k),o.set(v,S),u.push(v),k===1&&j&&kd.set(v,!0),S===1&&v.setAttribute(r,"true"),j||v.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return m(t),c.clear(),Jp++,function(){u.forEach(function(g){var v=Xo.get(g)-1,b=o.get(g)-1;Xo.set(g,v),o.set(g,b),v||(kd.has(g)||g.removeAttribute(n),kd.delete(g)),b||g.removeAttribute(r)}),Jp--,Jp||(Xo=new WeakMap,Xo=new WeakMap,kd=new WeakMap,jd={})}},wT=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=yT(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),bT(n,a,r,"aria-hidden")):function(){return null}},ah="Dialog",[YN]=Q4(ah),[kT,xn]=YN(ah),XN=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:u=!0}=e,c=y.useRef(null),f=y.useRef(null),[h,m]=eI({prop:n,defaultProp:a??!1,onChange:o,caller:ah});return l.jsx(kT,{scope:t,triggerRef:c,contentRef:f,contentId:di(),titleId:di(),descriptionId:di(),open:h,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(g=>!g),[m]),modal:u,children:r})};XN.displayName=ah;var ZN="DialogTrigger",jT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(ZN,r),o=yo(t,a.triggerRef);return l.jsx(qt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":yy(a.open),...n,ref:o,onClick:ca(e.onClick,a.onOpenToggle)})});jT.displayName=ZN;var vy="DialogPortal",[ST,JN]=YN(vy,{forceMount:void 0}),eE=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=xn(vy,t);return l.jsx(ST,{scope:t,forceMount:r,children:y.Children.map(n,u=>l.jsx(nh,{present:r||o.open,children:l.jsx(FN,{asChild:!0,container:a,children:u})}))})};eE.displayName=vy;var tf="DialogOverlay",tE=y.forwardRef((e,t)=>{const r=JN(tf,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=xn(tf,e.__scopeDialog);return o.modal?l.jsx(nh,{present:n||o.open,children:l.jsx(ET,{...a,ref:t})}):null});tE.displayName=tf;var NT=DN("DialogOverlay.RemoveScroll"),ET=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(tf,r),o=bI(),u=yo(t,o);return l.jsx(qN,{as:NT,allowPinchZoom:!0,shards:[a.contentRef],children:l.jsx(qt.div,{"data-state":yy(a.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),Ts="DialogContent",rE=y.forwardRef((e,t)=>{const r=JN(Ts,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=xn(Ts,e.__scopeDialog);return l.jsx(nh,{present:n||o.open,children:o.modal?l.jsx(AT,{...a,ref:t}):l.jsx(CT,{...a,ref:t})})});rE.displayName=Ts;var AT=y.forwardRef((e,t)=>{const r=xn(Ts,e.__scopeDialog),n=y.useRef(null),a=yo(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return wT(o)},[]),l.jsx(nE,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:ca(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ca(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0;(u.button===2||c)&&o.preventDefault()}),onFocusOutside:ca(e.onFocusOutside,o=>o.preventDefault())})}),CT=y.forwardRef((e,t)=>{const r=xn(Ts,e.__scopeDialog),n=y.useRef(!1),a=y.useRef(!1);return l.jsx(nE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),nE=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...u}=e,c=xn(Ts,r);return DI(),l.jsx(l.Fragment,{children:l.jsx($N,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:l.jsx(RN,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":yy(c.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),iE="DialogTitle",PT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(iE,r);return l.jsx(qt.h2,{id:a.titleId,...n,ref:t})});PT.displayName=iE;var aE="DialogDescription",OT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(aE,r);return l.jsx(qt.p,{id:a.descriptionId,...n,ref:t})});OT.displayName=aE;var oE="DialogClose",_T=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(oE,r);return l.jsx(qt.button,{type:"button",...n,ref:t,onClick:ca(e.onClick,()=>a.onOpenChange(!1))})});_T.displayName=oE;function yy(e){return e?"open":"closed"}var Wl='[cmdk-group=""]',eg='[cmdk-group-items=""]',MT='[cmdk-group-heading=""]',sE='[cmdk-item=""]',Mw=`${sE}:not([aria-disabled="true"])`,av="cmdk-item-select",os="data-value",IT=(e,t,r)=>q4(e,t,r),lE=y.createContext(void 0),Hu=()=>y.useContext(lE),uE=y.createContext(void 0),xy=()=>y.useContext(uE),cE=y.createContext(void 0),dE=y.forwardRef((e,t)=>{let r=ss(()=>{var M,H;return{search:"",value:(H=(M=e.value)!=null?M:e.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=ss(()=>new Set),a=ss(()=>new Map),o=ss(()=>new Map),u=ss(()=>new Set),c=fE(e),{label:f,children:h,value:m,onValueChange:g,filter:v,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:S=!0,...N}=e,E=di(),A=di(),P=di(),_=y.useRef(null),O=WT();so(()=>{if(m!==void 0){let M=m.trim();r.current.value=M,D.emit()}},[m]),so(()=>{O(6,he)},[]);let D=y.useMemo(()=>({subscribe:M=>(u.current.add(M),()=>u.current.delete(M)),snapshot:()=>r.current,setState:(M,H,ne)=>{var Z,me,pe,Oe;if(!Object.is(r.current[M],H)){if(r.current[M]=H,M==="search")U(),z(),O(1,Y);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let re=document.getElementById(P);re?re.focus():(Z=document.getElementById(E))==null||Z.focus()}if(O(7,()=>{var re;r.current.selectedItemId=(re=ue())==null?void 0:re.id,D.emit()}),ne||O(5,he),((me=c.current)==null?void 0:me.value)!==void 0){let re=H??"";(Oe=(pe=c.current).onValueChange)==null||Oe.call(pe,re);return}}D.emit()}},emit:()=>{u.current.forEach(M=>M())}}),[]),B=y.useMemo(()=>({value:(M,H,ne)=>{var Z;H!==((Z=o.current.get(M))==null?void 0:Z.value)&&(o.current.set(M,{value:H,keywords:ne}),r.current.filtered.items.set(M,F(H,ne)),O(2,()=>{z(),D.emit()}))},item:(M,H)=>(n.current.add(M),H&&(a.current.has(H)?a.current.get(H).add(M):a.current.set(H,new Set([M]))),O(3,()=>{U(),z(),r.current.value||Y(),D.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let ne=ue();O(4,()=>{U(),(ne==null?void 0:ne.getAttribute("id"))===M&&Y(),D.emit()})}),group:M=>(a.current.has(M)||a.current.set(M,new Set),()=>{o.current.delete(M),a.current.delete(M)}),filter:()=>c.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:E,inputId:P,labelId:A,listInnerRef:_}),[]);function F(M,H){var ne,Z;let me=(Z=(ne=c.current)==null?void 0:ne.filter)!=null?Z:IT;return M?me(M,r.current.search,H):0}function z(){if(!r.current.search||c.current.shouldFilter===!1)return;let M=r.current.filtered.items,H=[];r.current.filtered.groups.forEach(Z=>{let me=a.current.get(Z),pe=0;me.forEach(Oe=>{let re=M.get(Oe);pe=Math.max(re,pe)}),H.push([Z,pe])});let ne=_.current;ge().sort((Z,me)=>{var pe,Oe;let re=Z.getAttribute("id"),we=me.getAttribute("id");return((pe=M.get(we))!=null?pe:0)-((Oe=M.get(re))!=null?Oe:0)}).forEach(Z=>{let me=Z.closest(eg);me?me.appendChild(Z.parentElement===me?Z:Z.closest(`${eg} > *`)):ne.appendChild(Z.parentElement===ne?Z:Z.closest(`${eg} > *`))}),H.sort((Z,me)=>me[1]-Z[1]).forEach(Z=>{var me;let pe=(me=_.current)==null?void 0:me.querySelector(`${Wl}[${os}="${encodeURIComponent(Z[0])}"]`);pe==null||pe.parentElement.appendChild(pe)})}function Y(){let M=ge().find(ne=>ne.getAttribute("aria-disabled")!=="true"),H=M==null?void 0:M.getAttribute(os);D.setState("value",H||void 0)}function U(){var M,H,ne,Z;if(!r.current.search||c.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let me=0;for(let pe of n.current){let Oe=(H=(M=o.current.get(pe))==null?void 0:M.value)!=null?H:"",re=(Z=(ne=o.current.get(pe))==null?void 0:ne.keywords)!=null?Z:[],we=F(Oe,re);r.current.filtered.items.set(pe,we),we>0&&me++}for(let[pe,Oe]of a.current)for(let re of Oe)if(r.current.filtered.items.get(re)>0){r.current.filtered.groups.add(pe);break}r.current.filtered.count=me}function he(){var M,H,ne;let Z=ue();Z&&(((M=Z.parentElement)==null?void 0:M.firstChild)===Z&&((ne=(H=Z.closest(Wl))==null?void 0:H.querySelector(MT))==null||ne.scrollIntoView({block:"nearest"})),Z.scrollIntoView({block:"nearest"}))}function ue(){var M;return(M=_.current)==null?void 0:M.querySelector(`${sE}[aria-selected="true"]`)}function ge(){var M;return Array.from(((M=_.current)==null?void 0:M.querySelectorAll(Mw))||[])}function ie(M){let H=ge()[M];H&&D.setState("value",H.getAttribute(os))}function se(M){var H;let ne=ue(),Z=ge(),me=Z.findIndex(Oe=>Oe===ne),pe=Z[me+M];(H=c.current)!=null&&H.loop&&(pe=me+M<0?Z[Z.length-1]:me+M===Z.length?Z[0]:Z[me+M]),pe&&D.setState("value",pe.getAttribute(os))}function X(M){let H=ue(),ne=H==null?void 0:H.closest(Wl),Z;for(;ne&&!Z;)ne=M>0?UT(ne,Wl):HT(ne,Wl),Z=ne==null?void 0:ne.querySelector(Mw);Z?D.setState("value",Z.getAttribute(os)):se(M)}let te=()=>ie(ge().length-1),J=M=>{M.preventDefault(),M.metaKey?te():M.altKey?X(1):se(1)},I=M=>{M.preventDefault(),M.metaKey?ie(0):M.altKey?X(-1):se(-1)};return y.createElement(qt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:M=>{var H;(H=N.onKeyDown)==null||H.call(N,M);let ne=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||ne))switch(M.key){case"n":case"j":{S&&M.ctrlKey&&J(M);break}case"ArrowDown":{J(M);break}case"p":case"k":{S&&M.ctrlKey&&I(M);break}case"ArrowUp":{I(M);break}case"Home":{M.preventDefault(),ie(0);break}case"End":{M.preventDefault(),te();break}case"Enter":{M.preventDefault();let Z=ue();if(Z){let me=new Event(av);Z.dispatchEvent(me)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:GT},f),oh(e,M=>y.createElement(uE.Provider,{value:D},y.createElement(lE.Provider,{value:B},M))))}),TT=y.forwardRef((e,t)=>{var r,n;let a=di(),o=y.useRef(null),u=y.useContext(cE),c=Hu(),f=fE(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;so(()=>{if(!h)return c.item(a,u==null?void 0:u.id)},[h]);let m=hE(a,o,[e.value,e.children,o],e.keywords),g=xy(),v=ma(O=>O.value&&O.value===m.current),b=ma(O=>h||c.filter()===!1?!0:O.search?O.filtered.items.get(a)>0:!0);y.useEffect(()=>{let O=o.current;if(!(!O||e.disabled))return O.addEventListener(av,j),()=>O.removeEventListener(av,j)},[b,e.onSelect,e.disabled]);function j(){var O,D;k(),(D=(O=f.current).onSelect)==null||D.call(O,m.current)}function k(){g.setState("value",m.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:E,forceMount:A,keywords:P,..._}=e;return y.createElement(qt.div,{ref:Is(o,t),..._,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!v,"data-disabled":!!S,"data-selected":!!v,onPointerMove:S||c.getDisablePointerSelection()?void 0:k,onClick:S?void 0:j},e.children)}),DT=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,u=di(),c=y.useRef(null),f=y.useRef(null),h=di(),m=Hu(),g=ma(b=>a||m.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);so(()=>m.group(u),[]),hE(u,c,[e.value,e.heading,f]);let v=y.useMemo(()=>({id:u,forceMount:a}),[a]);return y.createElement(qt.div,{ref:Is(c,t),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),oh(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},y.createElement(cE.Provider,{value:v},b))))}),RT=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=y.useRef(null),o=ma(u=>!u.search);return!r&&!o?null:y.createElement(qt.div,{ref:Is(a,t),...n,"cmdk-separator":"",role:"separator"})}),LT=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=xy(),u=ma(h=>h.search),c=ma(h=>h.selectedItemId),f=Hu();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(qt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":c,id:f.inputId,type:"text",value:a?e.value:u,onChange:h=>{a||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),$T=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=y.useRef(null),u=y.useRef(null),c=ma(h=>h.selectedItemId),f=Hu();return y.useEffect(()=>{if(u.current&&o.current){let h=u.current,m=o.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),y.createElement(qt.div,{ref:Is(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":n,id:f.listId},oh(e,h=>y.createElement("div",{ref:Is(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),zT=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:u,...c}=e;return y.createElement(XN,{open:r,onOpenChange:n},y.createElement(eE,{container:u},y.createElement(tE,{"cmdk-overlay":"",className:a}),y.createElement(rE,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(dE,{ref:t,...c}))))}),FT=y.forwardRef((e,t)=>ma(r=>r.filtered.count===0)?y.createElement(qt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),BT=y.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return y.createElement(qt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},oh(e,u=>y.createElement("div",{"aria-hidden":!0},u)))}),Zo=Object.assign(dE,{List:$T,Item:TT,Input:LT,Group:DT,Separator:RT,Dialog:zT,Empty:FT,Loading:BT});function UT(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function HT(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function fE(e){let t=y.useRef(e);return so(()=>{t.current=e}),t}var so=typeof window>"u"?y.useEffect:y.useLayoutEffect;function ss(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ma(e){let t=xy(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function hE(e,t,r,n=[]){let a=y.useRef(),o=Hu();return so(()=>{var u;let c=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():a.current}})(),f=n.map(h=>h.trim());o.value(e,c,f),(u=t.current)==null||u.setAttribute(os,c),a.current=c}),a}var WT=()=>{let[e,t]=y.useState(),r=ss(()=>new Map);return so(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function KT(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function oh({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(KT(t),{ref:t.ref},r(t.props.children)):r(t)}var GT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function VT({onNavigate:e}){const[t,r]=y.useState(!1);return y.useEffect(()=>{const n=a=>{(a.metaKey||a.ctrlKey)&&a.key.toLowerCase()==="k"&&(a.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),l.jsx(Zo.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh] overscroll-contain",onClick:()=>r(!1),children:l.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[l.jsx(Zo.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"}),l.jsxs(Zo.List,{className:"max-h-80 overflow-y-auto p-2",children:[l.jsx(Zo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),l.jsx(Zo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:ou.map(n=>l.jsxs(Zo.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!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:[l.jsx(n.icon,{className:"h-4 w-4 text-primary"}),l.jsx("span",{children:n.label}),l.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const mE="mc_expert_mode",ov="mc-expert-mode-change",qT=()=>{try{return localStorage.getItem(mE)==="true"}catch{return!1}};function QT(e){return window.addEventListener(ov,e),window.addEventListener("storage",e),()=>{window.removeEventListener(ov,e),window.removeEventListener("storage",e)}}function Iw(e){localStorage.setItem(mE,String(e)),window.dispatchEvent(new Event(ov))}function pE(){return y.useSyncExternalStore(QT,qT,()=>!1)}function gE(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{const t=ZT(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const c=u.split(by);return c[0]===""&&c.length!==1&&c.shift(),vE(c,t)||XT(u)},getConflictingClassGroupIds:(u,c)=>{const f=r[u]||[];return c&&n[u]?[...f,...n[u]]:f}}},vE=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?vE(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(by);return(u=t.validators.find(({validator:c})=>c(o)))==null?void 0:u.classGroupId},Tw=/^\[(.+)\]$/,XT=e=>{if(Tw.test(e)){const t=Tw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ZT=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return eD(Object.entries(e.classGroups),r).forEach(([o,u])=>{sv(u,n,o,t)}),n},sv=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:Dw(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(JT(a)){sv(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,u])=>{sv(u,Dw(t,o),r,n)})})},Dw=(e,t)=>{let r=e;return t.split(by).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},JT=e=>e.isThemeGetter,eD=(e,t)=>t?e.map(([r,n])=>{const a=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([u,c])=>[t+u,c])):o);return[r,a]}):e,tD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(o,u)=>{r.set(o,u),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let u=r.get(o);if(u!==void 0)return u;if((u=n.get(o))!==void 0)return a(o,u),u},set(o,u){r.has(o)?r.set(o,u):a(o,u)}}},yE="!",rD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,u=c=>{const f=[];let h=0,m=0,g;for(let S=0;Sm?g-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}};return r?c=>r({className:c,parseClassName:u}):u},nD=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},iD=e=>({cache:tD(e.cacheSize),parseClassName:rD(e),...YT(e)}),aD=/\s+/,oD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],u=e.trim().split(aD);let c="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:m,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let j=!!b,k=n(j?v.substring(0,b):v);if(!k){if(!j){c=h+(c.length>0?" "+c:c);continue}if(k=n(v),!k){c=h+(c.length>0?" "+c:c);continue}j=!1}const S=nD(m).join(":"),N=g?S+yE:S,E=N+k;if(o.includes(E))continue;o.push(E);const A=a(k,j);for(let P=0;P0?" "+c:c)}return c};function sD(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;ng(m),e());return r=iD(h),n=r.cache.get,a=r.cache.set,o=c,c(f)}function c(f){const h=n(f);if(h)return h;const m=oD(f,r);return a(f,m),m}return function(){return o(sD.apply(null,arguments))}}const at=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},bE=/^\[(?:([a-z-]+):)?(.+)\]$/i,uD=/^\d+\/\d+$/,cD=new Set(["px","full","screen"]),dD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fD=/\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$/,hD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ri=e=>hs(e)||cD.has(e)||uD.test(e),Ki=e=>Gs(e,"length",jD),hs=e=>!!e&&!Number.isNaN(Number(e)),tg=e=>Gs(e,"number",hs),Kl=e=>!!e&&Number.isInteger(Number(e)),gD=e=>e.endsWith("%")&&hs(e.slice(0,-1)),$e=e=>bE.test(e),Gi=e=>dD.test(e),vD=new Set(["length","size","percentage"]),yD=e=>Gs(e,vD,wE),xD=e=>Gs(e,"position",wE),bD=new Set(["image","url"]),wD=e=>Gs(e,bD,ND),kD=e=>Gs(e,"",SD),Gl=()=>!0,Gs=(e,t,r)=>{const n=bE.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},jD=e=>fD.test(e)&&!hD.test(e),wE=()=>!1,SD=e=>mD.test(e),ND=e=>pD.test(e),ED=()=>{const e=at("colors"),t=at("spacing"),r=at("blur"),n=at("brightness"),a=at("borderColor"),o=at("borderRadius"),u=at("borderSpacing"),c=at("borderWidth"),f=at("contrast"),h=at("grayscale"),m=at("hueRotate"),g=at("invert"),v=at("gap"),b=at("gradientColorStops"),j=at("gradientColorStopPositions"),k=at("inset"),S=at("margin"),N=at("opacity"),E=at("padding"),A=at("saturate"),P=at("scale"),_=at("sepia"),O=at("skew"),D=at("space"),B=at("translate"),F=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",$e,t],U=()=>[$e,t],he=()=>["",ri,Ki],ue=()=>["auto",hs,$e],ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",$e],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[hs,$e];return{cacheSize:500,separator:":",theme:{colors:[Gl],spacing:[ri,Ki],blur:["none","",Gi,$e],brightness:I(),borderColor:[e],borderRadius:["none","","full",Gi,$e],borderSpacing:U(),borderWidth:he(),contrast:I(),grayscale:te(),hueRotate:I(),invert:te(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[gD,Ki],inset:Y(),margin:Y(),opacity:I(),padding:U(),saturate:I(),scale:I(),sepia:te(),skew:I(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Gi]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"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:[...ge(),$e]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kl,$e]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",Kl,$e]}],"grid-cols":[{"grid-cols":[Gl]}],"col-start-end":[{col:["auto",{span:["full",Kl,$e]},$e]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[Gl]}],"row-start-end":[{row:["auto",{span:[Kl,$e]},$e]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Gi]},Gi]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gi,Ki]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tg]}],"font-family":[{font:[Gl]}],"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",$e]}],"line-clamp":[{"line-clamp":["none",hs,tg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ri,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ri,Ki]}],"underline-offset":[{"underline-offset":["auto",ri,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],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",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ge(),xD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:ie()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[ri,$e]}],"outline-w":[{outline:[ri,Ki]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ri,Ki]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gi,kD]}],"shadow-color":[{shadow:[Gl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Gi,$e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[g]}],saturate:[{saturate:[A]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Kl,$e]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],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",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ri,Ki,tg]}],stroke:[{stroke:[e,"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"]}}},AD=lD(ED);function ee(...e){return AD(rt(e))}function Ds(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function kE(){const e=pE();return l.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[l.jsxs("button",{onClick:()=>Iw(!1),"aria-pressed":!e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[l.jsx(us,{className:"h-3.5 w-3.5"})," Einfach"]}),l.jsxs("button",{onClick:()=>Iw(!0),"aria-pressed":e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.jsx(D4,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function je(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),a=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let m=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,m=!0),a&&!("hf_token"in h)&&(h.hf_token=a,m=!0),m&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),a&&(h.hf_token=a),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const c=await fetch(e,{...t,headers:r,body:o});if(!c.ok)throw new Error(`${c.status} ${c.statusText}`);return c.json()}const jE=(e,t,r=!1,n=!0)=>je("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),CD=e=>je("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)}),Ve={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"]},PD=(e=!0)=>Vt({queryKey:Ve.memoryGraph,queryFn:()=>je("/api/memory/graph"),enabled:e}),wy=()=>Vt({queryKey:Ve.health,queryFn:()=>je("/api/health"),refetchInterval:1e4}),xo=(e=5e3)=>Vt({queryKey:Ve.systemStatus,queryFn:()=>je("/api/system/status"),refetchInterval:e}),SE=(e=3e3)=>Vt({queryKey:Ve.services,queryFn:()=>je("/api/system/services"),refetchInterval:e}),yi=(e=4e3)=>Vt({queryKey:Ve.models,queryFn:()=>je("/api/models"),refetchInterval:e}),NE=(e=8e3)=>Vt({queryKey:Ve.groups,queryFn:()=>je("/api/groups"),refetchInterval:e}),OD=()=>Vt({queryKey:Ve.routingPolicy,queryFn:()=>je("/api/routing/policy")}),_D=(e=2e3)=>Vt({queryKey:Ve.jobs,queryFn:()=>je("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),ky=(e=3e3)=>Vt({queryKey:Ve.tokenStats,queryFn:()=>je("/api/system/token-stats"),refetchInterval:e}),jy=(e=5e3)=>Vt({queryKey:Ve.agentStatus,queryFn:()=>je("/api/agent/status"),refetchInterval:e}),EE=(e=6e4)=>Vt({queryKey:Ve.hermesBrain,queryFn:()=>je("/api/agent/brain"),refetchInterval:e}),sh=e=>Vt({queryKey:Ve.updates,queryFn:()=>je("/api/maintenance/updates"),refetchInterval:e}),MD=()=>Vt({queryKey:Ve.discover,queryFn:()=>je("/api/discover")}),ID=e=>Vt({queryKey:Ve.drafts(e),queryFn:()=>je(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),TD=e=>Vt({queryKey:Ve.connect(e),queryFn:()=>je(e?`/api/connect?${e}`:"/api/connect")}),DD=()=>Vt({queryKey:Ve.connectHealth,queryFn:()=>je("/api/connect/health"),refetchInterval:15e3}),lv=e=>Vt({queryKey:Ve.memory(e==null?void 0:e.q,e==null?void 0:e.category),queryFn:()=>{const t=new URLSearchParams;return e!=null&&e.q&&t.set("q",e.q),e!=null&&e.category&&t.set("category",e.category),je(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});let uv=[],cv=[];const dv=new Set,AE=()=>dv.forEach(e=>e());function CE(e){return dv.add(e),()=>{dv.delete(e)}}function RD(e){uv=[...uv,e].slice(-40),AE()}function LD(e){cv=[...cv,e].slice(-40),AE()}const $D=()=>y.useSyncExternalStore(CE,()=>uv),zD=()=>y.useSyncExternalStore(CE,()=>cv);function FD(){const{data:e,dataUpdatedAt:t}=xo(3e3),{data:r,dataUpdatedAt:n}=ky(3e3),a=y.useRef(null);y.useEffect(()=>{var o,u,c,f;e&&RD({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((u=e.ram)==null?void 0:u.percent)??0,gpu:((c=e.gpu)==null?void 0:c.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),y.useEffect(()=>{if(!r)return;const o=Date.now(),u=r.prompt_tokens,c=r.completion_tokens;if(a.current){const f=Math.max((o-a.current.t)/1e3,.001);LD({t:o,prompt:Math.max(0,(u-a.current.p)/f),completion:Math.max(0,(c-a.current.c)/f)})}a.current={p:u,c,t:o}},[n])}function BD(){const{data:e,error:t}=xo(3e3),r=$D();return{sys:e,hist:r,error:t}}function Yi(e){return(e/1024**3).toFixed(1)}function fv(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function _r(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function UD(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function Rw(e){return e?`${Math.round(e/1024)}k`:"—"}var HD=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Sy(e){if(typeof e!="string")return!1;var t=HD;return t.includes(e)}var WD=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],KD=new Set(WD);function PE(e){return typeof e!="string"?!1:KD.has(e)}function OE(e){return typeof e=="string"&&e.startsWith("data-")}function vn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(PE(r)||OE(r))&&(t[r]=e[r]);return t}function lh(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return vn(t)}return typeof e=="object"&&!Array.isArray(e)?vn(e):null}function Yr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(PE(r)||OE(r)||Sy(r))&&(t[r]=e[r]);return t}function GD(e){return e==null?null:y.isValidElement(e)?Yr(e.props):typeof e=="object"&&!Array.isArray(e)?Yr(e):null}var VD=["children","width","height","viewBox","className","style","title","desc"];function hv(){return hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,a=e.height,o=e.viewBox,u=e.className,c=e.style,f=e.title,h=e.desc,m=qD(e,VD),g=o||{width:n,height:a,x:0,y:0},v=rt("recharts-surface",u);return y.createElement("svg",hv({},Yr(m),{className:v,width:n,height:a,style:c,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),y.createElement("title",null,f),y.createElement("desc",null,h),r)}),YD=["children","className"];function mv(){return mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,a=XD(e,YD),o=rt("recharts-layer",n);return y.createElement("g",mv({className:o},Yr(a),{ref:t}),r)}),JD=y.createContext(null);function pt(e){return function(){return e}}const pv=Math.PI,gv=2*pv,$a=1e-6,eR=gv-$a;function ME(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ME;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;a$a)if(!(Math.abs(g*f-h*m)>$a)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,j=a-c,k=f*f+h*h,S=b*b+j*j,N=Math.sqrt(k),E=Math.sqrt(v),A=o*Math.tan((pv-Math.acos((k+v-S)/(2*N*E)))/2),P=A/E,_=A/N;Math.abs(P-1)>$a&&this._append`L${t+P*m},${r+P*g}`,this._append`A${o},${o},0,0,${+(g*b>m*j)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,a,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(a),f=n*Math.sin(a),h=t+c,m=r+f,g=1^u,v=u?a-o:o-a;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>$a||Math.abs(this._y1-m)>$a)&&this._append`L${h},${m}`,n&&(v<0&&(v=v%gv+gv),v>eR?this._append`A${n},${n},0,1,${g},${t-c},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=m}`:v>$a&&this._append`A${n},${n},0,${+(v>=pv)},${g},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function IE(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new rR(t)}function Ny(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function TE(e){this._context=e}TE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function uh(e){return new TE(e)}function DE(e){return e[0]}function RE(e){return e[1]}function LE(e,t){var r=pt(!0),n=null,a=uh,o=null,u=IE(c);e=typeof e=="function"?e:e===void 0?DE:pt(e),t=typeof t=="function"?t:t===void 0?RE:pt(t);function c(f){var h,m=(f=Ny(f)).length,g,v=!1,b;for(n==null&&(o=a(b=u())),h=0;h<=m;++h)!(h=b;--j)c.point(A[j],P[j]);c.lineEnd(),c.areaEnd()}N&&(A[v]=+e(S,v,g),P[v]=+t(S,v,g),c.point(n?+n(S,v,g):A[v],r?+r(S,v,g):P[v]))}if(E)return c=null,E+""||null}function m(){return LE().defined(a).curve(u).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:pt(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:pt(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:pt(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:pt(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:pt(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:pt(+g),h):r},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(r)},h.lineX1=function(){return m().x(n).y(t)},h.defined=function(g){return arguments.length?(a=typeof g=="function"?g:pt(!!g),h):a},h.curve=function(g){return arguments.length?(u=g,o!=null&&(c=u(o)),h):u},h.context=function(g){return arguments.length?(g==null?o=c=null:c=u(o=g),h):o},h}class $E{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function nR(e){return new $E(e,!0)}function iR(e){return new $E(e,!1)}function rf(){}function nf(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function zE(e){this._context=e}zE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:nf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:nf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aR(e){return new zE(e)}function FE(e){this._context=e}FE.prototype={areaStart:rf,areaEnd:rf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:nf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oR(e){return new FE(e)}function BE(e){this._context=e}BE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:nf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sR(e){return new BE(e)}function UE(e){this._context=e}UE.prototype={areaStart:rf,areaEnd:rf,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function lR(e){return new UE(e)}function Lw(e){return e<0?-1:1}function $w(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),u=(r-e._y1)/(a||n<0&&-0),c=(o*a+u*n)/(n+a);return(Lw(o)+Lw(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(c))||0}function zw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function rg(e,t,r){var n=e._x0,a=e._y0,o=e._x1,u=e._y1,c=(o-n)/3;e._context.bezierCurveTo(n+c,a+c*t,o-c,u-c*r,o,u)}function af(e){this._context=e}af.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:rg(this,this._t0,zw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,rg(this,zw(this,r=$w(this,e,t)),r);break;default:rg(this,this._t0,r=$w(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function HE(e){this._context=new WE(e)}(HE.prototype=Object.create(af.prototype)).point=function(e,t){af.prototype.point.call(this,t,e)};function WE(e){this._context=e}WE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function uR(e){return new af(e)}function cR(e){return new HE(e)}function KE(e){this._context=e}KE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Fw(e),a=Fw(t),o=0,u=1;u=0;--t)a[t]=(u[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function fR(e){return new ch(e,.5)}function hR(e){return new ch(e,0)}function mR(e){return new ch(e,1)}function lo(e,t){if((u=e.length)>1)for(var r=1,n,a,o=e[t[0]],u,c=o.length;r=0;)r[t]=t;return r}function pR(e,t){return e[t]}function gR(e){const t=[];return t.key=e,t}function vR(){var e=pt([]),t=vv,r=lo,n=pR;function a(o){var u=Array.from(e.apply(this,arguments),gR),c,f=u.length,h=-1,m;for(const g of o)for(c=0,++h;c0){for(var r,n,a=0,o=e[0].length,u;a0){for(var r=0,n=e[t[0]],a,o=n.length;r0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,u;n1&&arguments[1]!==void 0?arguments[1]:kR,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Ut(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var c=r[u-1];return typeof c=="string"?a+c+o:c!==void 0?a+la(c)+o:a+o},"")}var Vr=e=>e===0?0:e>0?1:-1,Fn=e=>typeof e=="number"&&e!=+e,uo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ee=e=>(typeof e=="number"||e instanceof Number)&&!Fn(e),Bn=e=>Ee(e)||typeof e=="string",jR=0,bu=e=>{var t=++jR;return"".concat(e||"").concat(t)},pa=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ee(t)&&typeof t!="string")return n;var o;if(uo(t)){if(r==null)return n;var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return Fn(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},qE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):bo(n,t))===r)}var Gt=e=>e===null||typeof e>"u",Cy=e=>Gt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function jr(e){return e!=null}function Vs(){}var YE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Py=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(y.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{Sy(a)&&typeof r[a]=="function"&&(n[a]=(o=>r[a](r,o)))}),n},SR=(e,t,r)=>n=>(e(t,r,n),null),NR=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var o=e[a];Sy(a)&&typeof o=="function"&&(n||(n={}),n[a]=SR(o,t,r))}),n};function Bw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ER(e){for(var t=1;t(u[c]===void 0&&n[c]!==void 0&&(u[c]=n[c]),u),r);return o}function OR(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function Oy(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const DR="[object RegExp]",ZE="[object String]",JE="[object Number]",e5="[object Boolean]",t5="[object Arguments]",RR="[object Symbol]",LR="[object Date]",$R="[object Map]",zR="[object Set]",FR="[object Array]",BR="[object ArrayBuffer]",UR="[object Object]",HR="[object DataView]",WR="[object Uint8Array]",KR="[object Uint8ClampedArray]",GR="[object Uint16Array]",VR="[object Uint32Array]",qR="[object Int8Array]",QR="[object Int16Array]",YR="[object Int32Array]",XR="[object Float32Array]",ZR="[object Float64Array]",Uw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function JR(e){return typeof Uw.Buffer<"u"&&Uw.Buffer.isBuffer(e)}function eL(e,t){return Ua(e,void 0,e,new Map,t)}function Ua(e,t,r,n=new Map,a=void 0){const o=a==null?void 0:a(e,t,r,n);if(o!==void 0)return o;if(xv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const u=new Array(e.length);n.set(e,u);for(let c=0;c{}):bv(e,t,function n(a,o,u,c,f,h){const m=r(a,o,u,c,f,h);return m!==void 0?!!m:bv(a,o,n,h,!1)},new Map,!0)}function bv(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return nL(e,t,r,n);case"function":return Object.keys(t).length>0?bv(e,{...t},r,n,a):Hd(e,t);default:return r5(e)&&a?typeof t=="string"?t==="":!0:Hd(e,t)}}function nL(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return i5(e,t,r,n);if(t instanceof Map)return iL(e,t,r,n);if(t instanceof Set)return aL(e,t,r,n);const a=Object.keys(t);if(e==null||xv(e))return a.length===0;if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o{})}function oL(e){return e=rL(e),t=>a5(t,e)}function sL(e,t){return eL(e,(r,n,a,o)=>{if(typeof e=="object"){if(Oy(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return o.set(e,u),cn(u,e,a,o),u}switch(Object.prototype.toString.call(e)){case JE:case ZE:case e5:{const u=new e.constructor(e==null?void 0:e.valueOf());return cn(u,e),u}case t5:{const u={};return cn(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function lL(e){return sL(e)}const uL=/^(?:0|[1-9]\d*)$/;function o5(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function s5(e){return e!=null&&typeof e!="function"&&mL(e.length)}function pL(e){return typeof e=="object"&&e!==null}function gL(e){return pL(e)&&s5(e)}function Hw(e,t=XE){return gL(e)?OR(Array.from(e),_R(hL(t),1)):[]}function vL(e,t,r){return t===!0?Hw(e,r):typeof t=="function"?Hw(e,t):e}var ng={exports:{}},ig={},ag={exports:{}},og={};/** * @license React * use-sync-external-store-shim.production.js * @@ -565,7 +565,7 @@ Error generating stack: `+w.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gw;function kL(){if(Gw)return sg;Gw=1;var e=Ws();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function c(g,v){var b=v(),j=n({inst:{value:b,getSnapshot:v}}),k=j[0].inst,S=j[1];return o(function(){k.value=b,k.getSnapshot=v,f(k)&&S({inst:k})},[g,b,v]),i(function(){return f(k)&&S({inst:k}),g(function(){f(k)&&S({inst:k})})},[g]),u(b),b}function f(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!r(g,b)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return sg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,sg}var Vw;function jL(){return Vw||(Vw=1,og.exports=kL()),og.exports}/** + */var Ww;function yL(){if(Ww)return og;Ww=1;var e=Ws();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function c(g,v){var b=v(),j=n({inst:{value:b,getSnapshot:v}}),k=j[0].inst,S=j[1];return o(function(){k.value=b,k.getSnapshot=v,f(k)&&S({inst:k})},[g,b,v]),a(function(){return f(k)&&S({inst:k}),g(function(){f(k)&&S({inst:k})})},[g]),u(b),b}function f(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!r(g,b)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return og.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,og}var Kw;function xL(){return Kw||(Kw=1,ag.exports=yL()),ag.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -573,12 +573,12 @@ Error generating stack: `+w.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var qw;function SL(){if(qw)return ag;qw=1;var e=Ws(),t=jL();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,c=e.useMemo,f=e.useDebugValue;return ag.useSyncExternalStoreWithSelector=function(h,m,g,v,b){var j=o(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=c(function(){function N(O){if(!E){if(E=!0,A=O,O=v(O),b!==void 0&&k.hasValue){var D=k.value;if(b(D,O))return P=D}return P=O}if(D=P,n(A,O))return D;var B=v(O);return b!==void 0&&b(D,B)?(A=O,D):(A=O,P=B)}var E=!1,A,P,_=g===void 0?null:g;return[function(){return N(m())},_===null?void 0:function(){return N(_())}]},[m,g,v,b]);var S=i(h,j[0],j[1]);return u(function(){k.hasValue=!0,k.value=S},[S]),f(S),S},ag}var Qw;function NL(){return Qw||(Qw=1,ig.exports=SL()),ig.exports}var EL=NL(),Iy=y.createContext(null),AL=e=>e,jt=()=>{var e=y.useContext(Iy);return e?e.store.dispatch:AL},Kd=()=>{},CL=()=>Kd,PL=(e,t)=>e===t;function Me(e){var t=y.useContext(Iy),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Kd,[t,e]);return EL.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:CL,t?t.store.getState:Kd,t?t.store.getState:Kd,r,PL)}function OL(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _L(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Yw=e=>Array.isArray(e)?e:[e];function ML(e){const t=Array.isArray(e[0])?e[0]:e;return _L(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function IL(e,t){const r=[],{length:n}=e;for(let i=0;itypeof WeakRef>"u"?TL:WeakRef,dE=DL(),RL=0,Xw=1;function Nd(){return{s:RL,v:void 0,o:null,p:null}}function LL(e){return e instanceof dE?e.deref():e}function fE(e,t={}){let r=Nd();const{resultEqualityCheck:n}=t;let i,o=0;function u(){let c=r;const{length:f}=arguments;for(let g=0,v=f;g{r=Nd(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function $L(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,u=0,c,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),OL(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...f},{memoize:g,memoizeOptions:v=[],argsMemoize:b=fE,argsMemoizeOptions:j=[]}=m,k=Yw(v),S=Yw(j),N=ML(i),E=g(function(){return o++,h.apply(null,arguments)},...k),A=b(function(){u++;const _=IL(N,arguments);return c=E.apply(null,_),c},...S);return Object.assign(A,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var q=$L(fE);function zL(e,t=1){const r=[],n=Math.floor(t),i=(o,u)=>{for(let c=0;c{if(e!==t){const n=Zw(e),i=Zw(t);if(n===i&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function hE(e){return typeof e=="symbol"||e instanceof Symbol}const BL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,UL=/^\w*$/;function HL(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||hE(e)?!0:typeof e=="string"&&(UL.test(e)||!BL.test(e))||t!=null}function WL(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(c=>String(c));const i=(c,f)=>{let h=c;for(let m=0;mf==null||c==null?f:typeof c=="object"&&"key"in c?Object.hasOwn(f,c.key)?f[c.key]:i(f,c.path):typeof c=="function"?c(f):Array.isArray(c)?i(f,c):typeof f=="object"?f[c]:f,u=t.map(c=>(Array.isArray(c)&&c.length===1&&(c=c[0]),c==null||typeof c=="function"||Array.isArray(c)||HL(c)?c:{key:c,path:Py(c)}));return e.map(c=>({original:c,criteria:u.map(f=>o(f,c))})).slice().sort((c,f)=>{for(let h=0;hc.original)}function fh(e,...t){const r=t.length;return r>1&&jv(e,t[0],t[1])?t=[]:r>2&&jv(t[0],t[1],t[2])&&(t=[t[0]]),WL(e,zL(t),["asc"])}var mE=e=>e.legend.settings,KL=e=>e.legend.size,GL=e=>e.legend.payload;q([GL,mE],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?fh(n,r):n});function VL(e,t){return XL(e)||YL(e,t)||QL(e,t)||qL()}function qL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QL(e,t){if(e){if(typeof e=="string")return Jw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jw(e,t):void 0}}function Jw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rEd||Math.abs(e.left-t.left)>Ed||Math.abs(e.top-t.top)>Ed||Math.abs(e.width-t.width)>Ed}function tk(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function ZL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=VL(t,2),n=r[0],i=r[1],o=y.useRef(null),u=y.useRef(n);u.current=n;var c=y.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=tk(f);if(ek(h,u.current)&&i(h),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var g=tk(f);ek(g,u.current)&&i(g)});m.observe(f),o.current=m}}},[...e]);return y.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,c]}function Ut(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var JL=typeof Symbol=="function"&&Symbol.observable||"@@observable",rk=JL,lg=()=>Math.random().toString(36).substring(7).split("").join("."),e$={INIT:`@@redux/INIT${lg()}`,REPLACE:`@@redux/REPLACE${lg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lg()}`},sf=e$;function Ty(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function pE(e,t,r){if(typeof e!="function")throw new Error(Ut(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ut(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ut(1));return r(pE)(e,t)}let n=e,i=t,o=new Map,u=o,c=0,f=!1;function h(){u===o&&(u=new Map,o.forEach((S,N)=>{u.set(N,S)}))}function m(){if(f)throw new Error(Ut(3));return i}function g(S){if(typeof S!="function")throw new Error(Ut(4));if(f)throw new Error(Ut(5));let N=!0;h();const E=c++;return u.set(E,S),function(){if(N){if(f)throw new Error(Ut(6));N=!1,h(),u.delete(E),o=null}}}function v(S){if(!Ty(S))throw new Error(Ut(7));if(typeof S.type>"u")throw new Error(Ut(8));if(typeof S.type!="string")throw new Error(Ut(17));if(f)throw new Error(Ut(9));try{f=!0,i=n(i,S)}finally{f=!1}return(o=u).forEach(E=>{E()}),S}function b(S){if(typeof S!="function")throw new Error(Ut(10));n=S,v({type:sf.REPLACE})}function j(){const S=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Ut(11));function E(){const P=N;P.next&&P.next(m())}return E(),{unsubscribe:S(E)}},[rk](){return this}}}return v({type:sf.INIT}),{dispatch:v,subscribe:g,getState:m,replaceReducer:b,[rk]:j}}function t$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:sf.INIT})>"u")throw new Error(Ut(12));if(typeof r(void 0,{type:sf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ut(13))})}function gE(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw c&&c.type,new Error(Ut(14));h[g]=j,f=f||j!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function lf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function r$(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(Ut(15))};const u={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},c=e.map(f=>f(u));return o=lf(...c)(i.dispatch),{...i,dispatch:o}}}function vE(e){return Ty(e)&&"type"in e&&typeof e.type=="string"}var yE=Symbol.for("immer-nothing"),nk=Symbol.for("immer-draftable"),hr=Symbol.for("immer-state");function fn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Dr=Object,Rs=Dr.getPrototypeOf,uf="constructor",hh="prototype",Sv="configurable",cf="enumerable",Gd="writable",wu="value",mi=e=>!!e&&!!e[hr];function yn(e){var t;return e?xE(e)||ph(e)||!!e[nk]||!!((t=e[uf])!=null&&t[nk])||gh(e)||vh(e):!1}var n$=Dr[hh][uf].toString(),ik=new WeakMap;function xE(e){if(!e||!Dy(e))return!1;const t=Rs(e);if(t===null||t===Dr[hh])return!0;const r=Dr.hasOwnProperty.call(t,uf)&&t[uf];if(r===Object)return!0;if(!ls(r))return!1;let n=ik.get(r);return n===void 0&&(n=Function.toString.call(r),ik.set(r,n)),n===n$}function mh(e,t,r=!0){Wu(e)===0?(r?Reflect.ownKeys(e):Dr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Wu(e){const t=e[hr];return t?t.type_:ph(e)?1:gh(e)?2:vh(e)?3:0}var ak=(e,t,r=Wu(e))=>r===2?e.has(t):Dr[hh].hasOwnProperty.call(e,t),Nv=(e,t,r=Wu(e))=>r===2?e.get(t):e[t],df=(e,t,r,n=Wu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function i$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var ph=Array.isArray,gh=e=>e instanceof Map,vh=e=>e instanceof Set,Dy=e=>typeof e=="object",ls=e=>typeof e=="function",ug=e=>typeof e=="boolean";function a$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ii=e=>e.copy_||e.base_,Ry=e=>e.modified_?e.copy_:e.base_;function Ev(e,t){if(gh(e))return new Map(e);if(vh(e))return new Set(e);if(ph(e))return Array[hh].slice.call(e);const r=xE(e);if(t===!0||t==="class_only"&&!r){const n=Dr.getOwnPropertyDescriptors(e);delete n[hr];let i=Reflect.ownKeys(n);for(let o=0;o1&&Dr.defineProperties(e,{set:Ad,add:Ad,clear:Ad,delete:Ad}),Dr.freeze(e),t&&mh(e,(r,n)=>{Ly(n,!0)},!1)),e}function o$(){fn(2)}var Ad={[wu]:o$};function yh(e){return e===null||!Dy(e)?!0:Dr.isFrozen(e)}var ff="MapSet",Av="Patches",ok="ArrayMethods",bE={};function co(e){const t=bE[e];return t||fn(0,e),t}var sk=e=>!!bE[e],ku,wE=()=>ku,s$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:sk(ff)?co(ff):void 0,arrayMethodsPlugin_:sk(ok)?co(ok):void 0});function lk(e,t){t&&(e.patchPlugin_=co(Av),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Cv(e){Pv(e),e.drafts_.forEach(l$),e.drafts_=null}function Pv(e){e===ku&&(ku=e.parent_)}var uk=e=>ku=s$(ku,e);function l$(e){const t=e[hr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ck(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[hr].modified_&&(Cv(t),fn(4)),yn(e)&&(e=dk(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[hr].base_,e,t)}else e=dk(t,r);return u$(t,e,!0),Cv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==yE?e:void 0}function dk(e,t){if(yh(t))return t;const r=t[hr];if(!r)return hf(t,e.handledSet_,e);if(!xh(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);SE(r,e)}return r.copy_}function u$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ly(t,r)}function kE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var xh=(e,t)=>e.scope_===t,c$=[];function jE(e,t,r,n){const i=ii(e),o=e.type_;if(n!==void 0&&Nv(i,n,o)===t){df(i,n,r,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;mh(i,(f,h)=>{if(mi(h)){const m=c.get(h)||[];m.push(f),c.set(h,m)}})}const u=e.draftLocations_.get(t)??c$;for(const c of u)df(i,c,r,o)}function d$(e,t,r){e.callbacks_.push(function(i){var c;const o=t;if(!o||!xh(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const u=Ry(o);jE(e,o.draft_??o,u,r),SE(o,i)})}function SE(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}kE(e)}}function f$(e,t,r){const{scope_:n}=e;if(mi(r)){const i=r[hr];xh(i,n)&&i.callbacks_.push(function(){Vd(e);const u=Ry(i);jE(e,r,u,t)})}else yn(r)&&e.callbacks_.push(function(){const o=ii(e);e.type_===3?o.has(r)&&hf(r,n.handledSet_,n):Nv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&hf(Nv(e.copy_,t,e.type_),n.handledSet_,n)})}function hf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||mi(e)||t.has(e)||!yn(e)||yh(e)||(t.add(e),mh(e,(n,i)=>{if(mi(i)){const o=i[hr];if(xh(o,r)){const u=Ry(o);df(e,n,u,e.type_),kE(o)}}else yn(i)&&hf(i,t,r)})),e}function h$(e,t){const r=ph(e),n={type_:r?1:0,scope_:t?t.scope_:wE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,o=mf;r&&(i=[n],o=ju);const{revoke:u,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=u,[c,n]}var mf={get(e,t){if(t===hr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=ii(e);if(!ak(i,t,e.type_))return m$(e,i,t);const o=i[t];if(e.finalized_||!yn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&a$(t))return o;if(o===cg(e.base_,t)){Vd(e);const u=e.type_===1?+t:t,c=_v(e.scope_,o,e,u);return e.copy_[u]=c}return o},has(e,t){return t in ii(e)},ownKeys(e){return Reflect.ownKeys(ii(e))},set(e,t,r){const n=NE(ii(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=cg(ii(e),t),o=i==null?void 0:i[hr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(i$(r,i)&&(r!==void 0||ak(e.base_,t,e.type_)))return!0;Vd(e),Ov(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),f$(e,t,r)),!0},deleteProperty(e,t){return Vd(e),cg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ov(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ii(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Gd]:!0,[Sv]:e.type_!==1||t!=="length",[cf]:n[cf],[wu]:r[t]}},defineProperty(){fn(11)},getPrototypeOf(e){return Rs(e.base_)},setPrototypeOf(){fn(12)}},ju={};for(let e in mf){let t=mf[e];ju[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}ju.deleteProperty=function(e,t){return ju.set.call(this,e,t,void 0)};ju.set=function(e,t,r){return mf.set.call(this,e[0],t,r,e[0])};function cg(e,t){const r=e[hr];return(r?ii(r):e)[t]}function m$(e,t,r){var i;const n=NE(t,r);return n?wu in n?n[wu]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function NE(e,t){if(!(t in e))return;let r=Rs(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Rs(r)}}function Ov(e){e.modified_||(e.modified_=!0,e.parent_&&Ov(e.parent_))}function Vd(e){e.copy_||(e.assigned_=new Map,e.copy_=Ev(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var p$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(ls(r)&&!ls(n)){const u=n;n=r;const c=this;return function(h=u,...m){return c.produce(h,g=>n.call(this,g,...m))}}ls(n)||fn(6),i!==void 0&&!ls(i)&&fn(7);let o;if(yn(r)){const u=uk(this),c=_v(u,r,void 0);let f=!0;try{o=n(c),f=!1}finally{f?Cv(u):Pv(u)}return lk(u,i),ck(o,u)}else if(!r||!Dy(r)){if(o=n(r),o===void 0&&(o=r),o===yE&&(o=void 0),this.autoFreeze_&&Ly(o,!0),i){const u=[],c=[];co(Av).generateReplacementPatches_(r,o,{patches_:u,inversePatches_:c}),i(u,c)}return o}else fn(1,r)},this.produceWithPatches=(r,n)=>{if(ls(r))return(c,...f)=>this.produceWithPatches(c,h=>r(h,...f));let i,o;return[this.produce(r,n,(c,f)=>{i=c,o=f}),i,o]},ug(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),ug(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),ug(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){yn(t)||fn(8),mi(t)&&(t=qr(t));const r=uk(this),n=_v(r,t,void 0);return n[hr].isManual_=!0,Pv(r),n}finishDraft(t,r){const n=t&&t[hr];(!n||!n.isManual_)&&fn(9);const{scope_:i}=n;return lk(i,r),ck(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const i=co(Av).applyPatches_;return mi(t)?i(t,r):this.produce(t,o=>i(o,r))}};function _v(e,t,r,n){const[i,o]=gh(t)?co(ff).proxyMap_(t,r):vh(t)?co(ff).proxySet_(t,r):h$(t,r);return((r==null?void 0:r.scope_)??wE()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?d$(r,o,n):o.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function qr(e){return mi(e)||fn(10,e),EE(e)}function EE(e){if(!yn(e)||yh(e))return e;const t=e[hr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ev(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ev(e,!0);return mh(r,(i,o)=>{df(r,i,EE(o))},n),t&&(t.finalized_=!1),r}var g$=new p$,AE=g$.produce;function CE(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var v$=CE(),y$=CE,x$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?lf:lf.apply(null,arguments)};function Lr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Rr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>vE(n)&&n.type===e,r}var PE=class su extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,su.prototype)}static get[Symbol.species](){return su}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new su(...t[0].concat(this)):new su(...t.concat(this))}};function fk(e){return yn(e)?AE(e,()=>{}):e}function Cd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function b$(e){return typeof e=="boolean"}var w$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let u=new PE;return r&&(b$(r)?u.push(v$):u.push(y$(r.extraArgument))),u},OE="RTK_autoBatch",ot=()=>e=>({payload:e,meta:{[OE]:!0}}),hk=e=>t=>{setTimeout(t,e)},k$=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(u),r())},o=e(i),u=setTimeout(i,t)},_E=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,u=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?k$(window.requestAnimationFrame,100):hk(10):e.type==="callback"?e.queueNotification:hk(e.timeout),h=()=>{u=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){const g=()=>i&&m(),v=n.subscribe(g);return c.add(m),()=>{v(),c.delete(m)}},dispatch(m){var g;try{return i=!((g=m==null?void 0:m.meta)!=null&&g[OE]),o=!i,o&&(u||(u=!0,f(h))),n.dispatch(m)}finally{i=!0}}})},j$=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new PE(e);return n&&i.push(_E(typeof n=="object"?n:void 0)),i};function S$(e){const t=w$(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Ty(r))c=gE(r);else throw new Error(Rr(1));let f;typeof n=="function"?f=n(t):f=t();let h=lf;i&&(h=x$({trace:!1,...typeof i=="object"&&i}));const m=r$(...f),g=j$(m);let v=typeof u=="function"?u(g):g();const b=h(...v);return pE(c,o,b)}function ME(e){const t={},r=[];let n;const i={addCase(o,u){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Rr(28));if(c in t)throw new Error(Rr(29));return t[c]=u,i},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&r.push({matcher:o.settled,reducer:u.settled}),i},addMatcher(o,u){return r.push({matcher:o,reducer:u}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function N$(e){return typeof e=="function"}function E$(e,t){let[r,n,i]=ME(t),o;if(N$(e))o=()=>fk(e());else{const c=fk(e);o=()=>c}function u(c=o(),f){let h=[r[f.type],...n.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,g)=>{if(g)if(mi(m)){const b=g(m,f);return b===void 0?m:b}else{if(yn(m))return AE(m,v=>g(v,f));{const v=g(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return m},c)}return u.getInitialState=o,u}var A$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",C$=(e=21)=>{let t="",r=e;for(;r--;)t+=A$[Math.random()*64|0];return t},P$=Symbol.for("rtk-slice-createasyncthunk");function O$(e,t){return`${e}/${t}`}function _$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[P$];return function(i){const{name:o,reducerPath:u=o}=i;if(!o)throw new Error(Rr(11));const c=(typeof i.reducers=="function"?i.reducers(I$()):i.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(P,_){const O=typeof P=="string"?P:P.type;if(!O)throw new Error(Rr(12));if(O in h.sliceCaseReducersByType)throw new Error(Rr(13));return h.sliceCaseReducersByType[O]=_,m},addMatcher(P,_){return h.sliceMatchers.push({matcher:P,reducer:_}),m},exposeAction(P,_){return h.actionCreators[P]=_,m},exposeCaseReducer(P,_){return h.sliceCaseReducersByName[P]=_,m}};f.forEach(P=>{const _=c[P],O={reducerName:P,type:O$(o,P),createNotation:typeof i.reducers=="function"};D$(_)?L$(O,_,m,t):T$(O,_,m)});function g(){const[P={},_=[],O=void 0]=typeof i.extraReducers=="function"?ME(i.extraReducers):[i.extraReducers],D={...P,...h.sliceCaseReducersByType};return E$(i.initialState,B=>{for(let F in D)B.addCase(F,D[F]);for(let F of h.sliceMatchers)B.addMatcher(F.matcher,F.reducer);for(let F of _)B.addMatcher(F.matcher,F.reducer);O&&B.addDefaultCase(O)})}const v=P=>P,b=new Map,j=new WeakMap;let k;function S(P,_){return k||(k=g()),k(P,_)}function N(){return k||(k=g()),k.getInitialState()}function E(P,_=!1){function O(B){let F=B[P];return typeof F>"u"&&_&&(F=Cd(j,O,N)),F}function D(B=v){const F=Cd(b,_,()=>new WeakMap);return Cd(F,B,()=>{const z={};for(const[Y,U]of Object.entries(i.selectors??{}))z[Y]=M$(U,B,()=>Cd(j,B,N),_);return z})}return{reducerPath:P,getSelectors:D,get selectors(){return D(O)},selectSlice:O}}const A={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(u),injectInto(P,{reducerPath:_,...O}={}){const D=_??u;return P.inject({reducerPath:D,reducer:S},O),{...A,...E(D,!0)}}};return A}}function M$(e,t,r,n){function i(o,...u){let c=t(o);return typeof c>"u"&&n&&(c=r()),e(c,...u)}return i.unwrapped=e,i}var sr=_$();function I$(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function T$({type:e,reducerName:t,createNotation:r},n,i){let o,u;if("reducer"in n){if(r&&!R$(n))throw new Error(Rr(17));o=n.reducer,u=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?Lr(e,u):Lr(e))}function D$(e){return e._reducerDefinitionType==="asyncThunk"}function R$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function L$({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Rr(18));const{payloadCreator:o,fulfilled:u,pending:c,rejected:f,settled:h,options:m}=r,g=i(e,o,m);n.exposeAction(t,g),u&&n.addCase(g.fulfilled,u),c&&n.addCase(g.pending,c),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Pd,pending:c||Pd,rejected:f||Pd,settled:h||Pd})}function Pd(){}var $$="task",IE="listener",TE="completed",$y="cancelled",z$=`task-${$y}`,F$=`task-${TE}`,Mv=`${IE}-${$y}`,B$=`${IE}-${TE}`,bh=class{constructor(e){qo(this,"code");qo(this,"name","TaskAbortError");qo(this,"message");this.code=e,this.message=`${$$} ${$y} (reason: ${e})`}},zy=(e,t)=>{if(typeof e!="function")throw new TypeError(Rr(32))},pf=()=>{},DE=(e,t=pf)=>(e.catch(t),e),RE=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),no=e=>{if(e.aborted)throw new bh(e.reason)};function LE(e,t){let r=pf;return new Promise((n,i)=>{const o=()=>i(new bh(e.reason));if(e.aborted){o();return}r=RE(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=pf})}var U$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof bh?"cancelled":"rejected",error:r}}finally{t==null||t()}},gf=e=>t=>DE(LE(e,t).then(r=>(no(e),r))),$E=e=>{const t=gf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ms}=Object,mk={},wh="listenerMiddleware",H$=(e,t)=>{const r=n=>RE(e,()=>n.abort(e.reason));return(n,i)=>{zy(n);const o=new AbortController;r(o);const u=U$(async()=>{no(e),no(o.signal);const c=await n({pause:gf(o.signal),delay:$E(o.signal),signal:o.signal});return no(o.signal),c},()=>o.abort(F$));return i!=null&&i.autoJoin&&t.push(u.catch(pf)),{result:gf(e)(u),cancel(){o.abort(z$)}}}},W$=(e,t)=>{const r=async(n,i)=>{no(t);let o=()=>{};const c=[new Promise((f,h)=>{let m=e({predicate:n,effect:(g,v)=>{v.unsubscribe(),f([g,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await LE(t,Promise.race(c));return no(t),f}finally{o()}};return((n,i)=>DE(r(n,i)))},zE=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=Lr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Rr(21));return zy(o),{predicate:i,type:t,effect:o}},FE=ms(e=>{const{type:t,predicate:r,effect:n}=zE(e);return{id:C$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Rr(22))}}},{withTypes:()=>FE}),pk=(e,t)=>{const{type:r,effect:n,predicate:i}=zE(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},Iv=e=>{e.pending.forEach(t=>{t.abort(Mv)})},K$=(e,t)=>()=>{for(const r of t.keys())Iv(r);e.clear()},gk=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},BE=ms(Lr(`${wh}/add`),{withTypes:()=>BE}),G$=Lr(`${wh}/removeAll`),UE=ms(Lr(`${wh}/remove`),{withTypes:()=>UE}),V$=(...e)=>{console.error(`${wh}/error`,...e)},Ku=(e={})=>{const t=new Map,r=new Map,n=b=>{const j=r.get(b)??0;r.set(b,j+1)},i=b=>{const j=r.get(b)??1;j===1?r.delete(b):r.set(b,j-1)},{extra:o,onError:u=V$}=e;zy(u);const c=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),j=>{b.unsubscribe(),j!=null&&j.cancelActive&&Iv(b)}),f=(b=>{const j=pk(t,b)??FE(b);return c(j)});ms(f,{withTypes:()=>f});const h=b=>{const j=pk(t,b);return j&&(j.unsubscribe(),b.cancelActive&&Iv(j)),!!j};ms(h,{withTypes:()=>h});const m=async(b,j,k,S)=>{const N=new AbortController,E=W$(f,N.signal),A=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(j,ms({},k,{getOriginalState:S,condition:(P,_)=>E(P,_).then(Boolean),take:E,delay:$E(N.signal),pause:gf(N.signal),extra:o,signal:N.signal,fork:H$(N.signal,A),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((P,_,O)=>{P!==N&&(P.abort(Mv),O.delete(P))})},cancel:()=>{N.abort(Mv),b.pending.delete(N)},throwIfCancelled:()=>{no(N.signal)}})))}catch(P){P instanceof bh||gk(u,P,{raisedBy:"effect"})}finally{await Promise.all(A),N.abort(B$),i(b),b.pending.delete(N)}},g=K$(t,r);return{middleware:b=>j=>k=>{if(!vE(k))return j(k);if(BE.match(k))return f(k.payload);if(G$.match(k)){g();return}if(UE.match(k))return h(k.payload);let S=b.getState();const N=()=>{if(S===mk)throw new Error(Rr(23));return S};let E;try{if(E=j(k),t.size>0){const A=b.getState(),P=Array.from(t.values());for(const _ of P){let O=!1;try{O=_.predicate(k,A,S)}catch(D){O=!1,gk(u,D,{raisedBy:"predicate"})}O&&m(_,k,b,N)}}}finally{S=mk}return E},startListening:f,stopListening:h,clearListeners:g}};function Rr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var q$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},HE=sr({name:"chartLayout",initialState:q$,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),kh=HE.actions,Q$=kh.setMargin,Y$=kh.setLayout,X$=kh.setChartSize,Z$=kh.setScale,J$=HE.reducer;function WE(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function He(e){return Number.isFinite(e)}function Un(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cs(e){for(var t=1;t{if(t&&r){var n=r.width,i=r.height,o=t.align,u=t.verticalAlign,c=t.layout;if((c==="vertical"||c==="horizontal"&&u==="middle")&&o!=="center"&&Ee(e[o]))return cs(cs({},e),{},{[o]:e[o]+(n||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&u!=="middle"&&Ee(e[u]))return cs(cs({},e),{},{[u]:e[u]+(i||0)})}return e},Gn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",KE=(e,t,r,n)=>{if(n)return e.map(c=>c.coordinate);var i,o,u=e.map(c=>(c.coordinate===t&&(i=!0),c.coordinate===r&&(o=!0),c.coordinate));return i||u.push(t),o||u.push(r),u},GE=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,o=e.range,u=e.scale,c=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,m=e.tickCount,g=e.ticks,v=e.niceTicks,b=e.axisType;if(!u)return null;var j=c==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,k=i==="category"&&u.bandwidth?u.bandwidth()/j:0;if(k=b==="angleAxis"&&o&&o.length>=2?Vr(o[0]-o[1])*2*k:k,g||v){var S=(g||v||[]).map((N,E)=>{var A=n?n.indexOf(N):N,P=u.map(A);return He(P)?{coordinate:P+k,value:N,offset:k,index:E}:null}).filter(jr);return S}return f&&h?h.map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(jr):u.ticks&&m!=null?u.ticks(m).map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(jr):u.domain().map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:n?n[N]:N,index:E,offset:k}:null}).filter(jr)},iz=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(h[0]=o,o+=v,h[1]=o):(h[0]=u,u+=v,h[1]=u)}}}},az=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},oz={sign:iz,expand:kR,none:lo,silhouette:jR,wiggle:SR,positive:az},sz=(e,t,r)=>{var n,i=(n=oz[r])!==null&&n!==void 0?n:lo,o=wR().keys(t).value((c,f)=>Number(Dt(c,f,0))).order(xv).offset(i),u=o(e);return u.forEach((c,f)=>{c.forEach((h,m)=>{var g=Dt(e[m],t[f],0);Array.isArray(g)&&g.length===2&&Ee(g[0])&&Ee(g[1])&&(h[0]=g[0],h[1]=g[1])})}),u};function lz(e){return e==null?void 0:String(e)}function yk(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Vt(i[t.dataKey])){var c=Z5(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Dt(i,Vt(u)?t.dataKey:u),h=t.scale.map(f);return Ee(h)?h:null}var uz=e=>{var t=e.flat(2).filter(Ee);return[Math.min(...t),Math.max(...t)]},cz=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],dz=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return cz(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var u=o.stackedData,c=u.reduce((f,h)=>{var m=WE(h,t,r),g=uz(m);return!He(g[0])||!He(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},xk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,vf=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=fh(t,m=>m.coordinate),o=1/0,u=1,c=i.length;u{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},hz=(e,t)=>t==="centric"?e.angle:e.radius,xi=e=>e.layout.width,bi=e=>e.layout.height,mz=e=>e.layout.scale,qE=e=>e.layout.margin,jh=q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Sh=q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),pz="data-recharts-item-index",gz="data-recharts-item-id",Gu=60;function kk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Od(e){for(var t=1;te.brush.height;function wz(e){var t=Sh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Gu;return r+i}return r},0)}function kz(e){var t=Sh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Gu;return r+i}return r},0)}function jz(e){var t=jh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Sz(e){var t=jh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Qt=q([xi,bi,qE,bz,wz,kz,jz,Sz,mE,KL],(e,t,r,n,i,o,u,c,f,h)=>{var m={left:(r.left||0)+i,right:(r.right||0)+o},g={top:(r.top||0)+u,bottom:(r.bottom||0)+c},v=Od(Od({},g),m),b=v.bottom;v.bottom+=n,v=nz(v,f,h);var j=e-v.left-v.right,k=t-v.top-v.bottom;return Od(Od({brushBottom:b},v),{},{width:Math.max(j,0),height:Math.max(k,0)})}),Nz=q(Qt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),QE=q(xi,bi,(e,t)=>({x:0,y:0,width:e,height:t})),Ez=y.createContext(null),Nr=()=>y.useContext(Ez)!=null,Nh=e=>e.brush,Eh=q([Nh,Qt,qE],(e,t,r)=>({height:e.height,x:Ee(e.x)?e.x:t.left,y:Ee(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ee(e.width)?e.width:t.width}));function Az(e,t,{signal:r,edges:n}={}){let i,o=null;const u=n!=null&&n.includes("leading"),c=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(i,o),i=void 0,o=null)},h=()=>{c&&f(),b()};let m=null;const g=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,h()},t)},v=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{v(),i=void 0,o=null},j=()=>{f()},k=function(...S){if(r!=null&&r.aborted)return;i=this,o=S;const N=m==null;g(),u&&N&&f()};return k.schedule=g,k.cancel=b,k.flush=j,r==null||r.addEventListener("abort",b,{once:!0}),k}function Cz(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:o}=r,u=Array(2);n&&(u[0]="leading"),i&&(u[1]="trailing");let c,f=null;const h=Az(function(...v){c=e.apply(this,v),f=null},t,{edges:u}),m=function(...v){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(c=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),c):(h.apply(this,v),c)},g=()=>(h.flush(),c);return m.cancel=h.cancel,m.flush=g,m}function Pz(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return Cz(e,t,{leading:n,maxWait:t,trailing:i})}var yf=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oi[u++]))}},Tn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},YE=(e,t,r)=>{var n=r.width,i=n===void 0?Tn.width:n,o=r.height,u=o===void 0?Tn.height:o,c=r.aspect,f=r.maxHeight,h=uo(i)?e:Number(i),m=uo(u)?t:Number(u);return c&&c>0&&(h?m=h/c:m&&(h=m*c),f&&m!=null&&m>f&&(m=f)),{calculatedWidth:h,calculatedHeight:m}},Oz={width:0,height:0,overflow:"visible"},_z={width:0,overflowX:"visible"},Mz={height:0,overflowY:"visible"},Iz={},Tz=e=>{var t=e.width,r=e.height,n=uo(t),i=uo(r);return n&&i?Oz:n?_z:i?Mz:Iz};function Dz(e){var t=e.width,r=e.height,n=e.aspect,i=t,o=r;return i===void 0&&o===void 0?(i=Tn.width,o=Tn.height):i===void 0?i=n&&n>0?void 0:Tn.width:o===void 0&&(o=n&&n>0?void 0:Tn.height),{width:i,height:o}}var Rz=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function xf(){return xf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return Vz(i)?y.createElement(XE.Provider,{value:i},t):null}var Fy=()=>y.useContext(XE),qz=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?Tn.initialDimension:n,o=e.width,u=e.height,c=e.minWidth,f=c===void 0?Tn.minWidth:c,h=e.minHeight,m=e.maxHeight,g=e.children,v=e.debounce,b=v===void 0?Tn.debounce:v,j=e.id,k=e.className,S=e.onResize,N=e.style,E=N===void 0?{}:N,A=Kz(e,Rz),P=y.useRef(null),_=y.useRef();_.current=S,y.useImperativeHandle(t,()=>P.current);var O=y.useState({containerWidth:i.width,containerHeight:i.height}),D=Fz(O,2),B=D[0],F=D[1],z=y.useCallback((ie,se)=>{F(X=>{var te=Math.round(ie),J=Math.round(se);return X.containerWidth===te&&X.containerHeight===J?X:{containerWidth:te,containerHeight:J}})},[]);y.useEffect(()=>{if(P.current==null||typeof ResizeObserver>"u")return Vs;var ie=I=>{var M,H=I[0];if(H!=null){var ne=H.contentRect,Z=ne.width,me=ne.height;z(Z,me),(M=_.current)===null||M===void 0||M.call(_,Z,me)}};b>0&&(ie=Pz(ie,b,{trailing:!0,leading:!1}));var se=new ResizeObserver(ie),X=P.current.getBoundingClientRect(),te=X.width,J=X.height;return z(te,J),se.observe(P.current),()=>{se.disconnect()}},[z,b]);var Y=B.containerWidth,U=B.containerHeight;yf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var he=YE(Y,U,{width:o,height:u,aspect:r,maxHeight:m}),ue=he.calculatedWidth,ge=he.calculatedHeight;return yf(Y<0||U<0||ue!=null&&ue>0||ge!=null&&ge>0,`The width(%s) and height(%s) of chart should be greater than 0, + */var Gw;function bL(){if(Gw)return ig;Gw=1;var e=Ws(),t=xL();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,c=e.useMemo,f=e.useDebugValue;return ig.useSyncExternalStoreWithSelector=function(h,m,g,v,b){var j=o(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=c(function(){function N(O){if(!E){if(E=!0,A=O,O=v(O),b!==void 0&&k.hasValue){var D=k.value;if(b(D,O))return P=D}return P=O}if(D=P,n(A,O))return D;var B=v(O);return b!==void 0&&b(D,B)?(A=O,D):(A=O,P=B)}var E=!1,A,P,_=g===void 0?null:g;return[function(){return N(m())},_===null?void 0:function(){return N(_())}]},[m,g,v,b]);var S=a(h,j[0],j[1]);return u(function(){k.hasValue=!0,k.value=S},[S]),f(S),S},ig}var Vw;function wL(){return Vw||(Vw=1,ng.exports=bL()),ng.exports}var kL=wL(),_y=y.createContext(null),jL=e=>e,jt=()=>{var e=y.useContext(_y);return e?e.store.dispatch:jL},Wd=()=>{},SL=()=>Wd,NL=(e,t)=>e===t;function Me(e){var t=y.useContext(_y),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Wd,[t,e]);return kL.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:SL,t?t.store.getState:Wd,t?t.store.getState:Wd,r,NL)}function EL(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function AL(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var qw=e=>Array.isArray(e)?e:[e];function CL(e){const t=Array.isArray(e[0])?e[0]:e;return AL(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function PL(e,t){const r=[],{length:n}=e;for(let a=0;atypeof WeakRef>"u"?OL:WeakRef,l5=_L(),ML=0,Qw=1;function Nd(){return{s:ML,v:void 0,o:null,p:null}}function IL(e){return e instanceof l5?e.deref():e}function u5(e,t={}){let r=Nd();const{resultEqualityCheck:n}=t;let a,o=0;function u(){let c=r;const{length:f}=arguments;for(let g=0,v=f;g{r=Nd(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function TL(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,u=0,c,f={},h=a.pop();typeof h=="object"&&(f=h,h=a.pop()),EL(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...f},{memoize:g,memoizeOptions:v=[],argsMemoize:b=u5,argsMemoizeOptions:j=[]}=m,k=qw(v),S=qw(j),N=CL(a),E=g(function(){return o++,h.apply(null,arguments)},...k),A=b(function(){u++;const _=PL(N,arguments);return c=E.apply(null,_),c},...S);return Object.assign(A,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var q=TL(u5);function DL(e,t=1){const r=[],n=Math.floor(t),a=(o,u)=>{for(let c=0;c{if(e!==t){const n=Yw(e),a=Yw(t);if(n===a&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0};function c5(e){return typeof e=="symbol"||e instanceof Symbol}const LL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$L=/^\w*$/;function zL(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||c5(e)?!0:typeof e=="string"&&($L.test(e)||!LL.test(e))||t!=null}function FL(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(c=>String(c));const a=(c,f)=>{let h=c;for(let m=0;mf==null||c==null?f:typeof c=="object"&&"key"in c?Object.hasOwn(f,c.key)?f[c.key]:a(f,c.path):typeof c=="function"?c(f):Array.isArray(c)?a(f,c):typeof f=="object"?f[c]:f,u=t.map(c=>(Array.isArray(c)&&c.length===1&&(c=c[0]),c==null||typeof c=="function"||Array.isArray(c)||zL(c)?c:{key:c,path:Ay(c)}));return e.map(c=>({original:c,criteria:u.map(f=>o(f,c))})).slice().sort((c,f)=>{for(let h=0;hc.original)}function dh(e,...t){const r=t.length;return r>1&&wv(e,t[0],t[1])?t=[]:r>2&&wv(t[0],t[1],t[2])&&(t=[t[0]]),FL(e,DL(t),["asc"])}var d5=e=>e.legend.settings,BL=e=>e.legend.size,UL=e=>e.legend.payload;q([UL,d5],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?dh(n,r):n});function HL(e,t){return VL(e)||GL(e,t)||KL(e,t)||WL()}function WL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KL(e,t){if(e){if(typeof e=="string")return Xw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xw(e,t):void 0}}function Xw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rEd||Math.abs(e.left-t.left)>Ed||Math.abs(e.top-t.top)>Ed||Math.abs(e.width-t.width)>Ed}function Jw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function qL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=HL(t,2),n=r[0],a=r[1],o=y.useRef(null),u=y.useRef(n);u.current=n;var c=y.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Jw(f);if(Zw(h,u.current)&&a(h),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var g=Jw(f);Zw(g,u.current)&&a(g)});m.observe(f),o.current=m}}},[...e]);return y.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,c]}function Bt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var QL=typeof Symbol=="function"&&Symbol.observable||"@@observable",ek=QL,sg=()=>Math.random().toString(36).substring(7).split("").join("."),YL={INIT:`@@redux/INIT${sg()}`,REPLACE:`@@redux/REPLACE${sg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${sg()}`},of=YL;function My(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function f5(e,t,r){if(typeof e!="function")throw new Error(Bt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Bt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Bt(1));return r(f5)(e,t)}let n=e,a=t,o=new Map,u=o,c=0,f=!1;function h(){u===o&&(u=new Map,o.forEach((S,N)=>{u.set(N,S)}))}function m(){if(f)throw new Error(Bt(3));return a}function g(S){if(typeof S!="function")throw new Error(Bt(4));if(f)throw new Error(Bt(5));let N=!0;h();const E=c++;return u.set(E,S),function(){if(N){if(f)throw new Error(Bt(6));N=!1,h(),u.delete(E),o=null}}}function v(S){if(!My(S))throw new Error(Bt(7));if(typeof S.type>"u")throw new Error(Bt(8));if(typeof S.type!="string")throw new Error(Bt(17));if(f)throw new Error(Bt(9));try{f=!0,a=n(a,S)}finally{f=!1}return(o=u).forEach(E=>{E()}),S}function b(S){if(typeof S!="function")throw new Error(Bt(10));n=S,v({type:of.REPLACE})}function j(){const S=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Bt(11));function E(){const P=N;P.next&&P.next(m())}return E(),{unsubscribe:S(E)}},[ek](){return this}}}return v({type:of.INIT}),{dispatch:v,subscribe:g,getState:m,replaceReducer:b,[ek]:j}}function XL(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:of.INIT})>"u")throw new Error(Bt(12));if(typeof r(void 0,{type:of.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Bt(13))})}function h5(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw c&&c.type,new Error(Bt(14));h[g]=j,f=f||j!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function sf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function ZL(...e){return t=>(r,n)=>{const a=t(r,n);let o=()=>{throw new Error(Bt(15))};const u={getState:a.getState,dispatch:(f,...h)=>o(f,...h)},c=e.map(f=>f(u));return o=sf(...c)(a.dispatch),{...a,dispatch:o}}}function m5(e){return My(e)&&"type"in e&&typeof e.type=="string"}var p5=Symbol.for("immer-nothing"),tk=Symbol.for("immer-draftable"),hr=Symbol.for("immer-state");function fn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Dr=Object,Rs=Dr.getPrototypeOf,lf="constructor",fh="prototype",kv="configurable",uf="enumerable",Kd="writable",wu="value",mi=e=>!!e&&!!e[hr];function yn(e){var t;return e?g5(e)||mh(e)||!!e[tk]||!!((t=e[lf])!=null&&t[tk])||ph(e)||gh(e):!1}var JL=Dr[fh][lf].toString(),rk=new WeakMap;function g5(e){if(!e||!Iy(e))return!1;const t=Rs(e);if(t===null||t===Dr[fh])return!0;const r=Dr.hasOwnProperty.call(t,lf)&&t[lf];if(r===Object)return!0;if(!ls(r))return!1;let n=rk.get(r);return n===void 0&&(n=Function.toString.call(r),rk.set(r,n)),n===JL}function hh(e,t,r=!0){Wu(e)===0?(r?Reflect.ownKeys(e):Dr.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Wu(e){const t=e[hr];return t?t.type_:mh(e)?1:ph(e)?2:gh(e)?3:0}var nk=(e,t,r=Wu(e))=>r===2?e.has(t):Dr[fh].hasOwnProperty.call(e,t),jv=(e,t,r=Wu(e))=>r===2?e.get(t):e[t],cf=(e,t,r,n=Wu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function e$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var mh=Array.isArray,ph=e=>e instanceof Map,gh=e=>e instanceof Set,Iy=e=>typeof e=="object",ls=e=>typeof e=="function",lg=e=>typeof e=="boolean";function t$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ii=e=>e.copy_||e.base_,Ty=e=>e.modified_?e.copy_:e.base_;function Sv(e,t){if(ph(e))return new Map(e);if(gh(e))return new Set(e);if(mh(e))return Array[fh].slice.call(e);const r=g5(e);if(t===!0||t==="class_only"&&!r){const n=Dr.getOwnPropertyDescriptors(e);delete n[hr];let a=Reflect.ownKeys(n);for(let o=0;o1&&Dr.defineProperties(e,{set:Ad,add:Ad,clear:Ad,delete:Ad}),Dr.freeze(e),t&&hh(e,(r,n)=>{Dy(n,!0)},!1)),e}function r$(){fn(2)}var Ad={[wu]:r$};function vh(e){return e===null||!Iy(e)?!0:Dr.isFrozen(e)}var df="MapSet",Nv="Patches",ik="ArrayMethods",v5={};function co(e){const t=v5[e];return t||fn(0,e),t}var ak=e=>!!v5[e],ku,y5=()=>ku,n$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ak(df)?co(df):void 0,arrayMethodsPlugin_:ak(ik)?co(ik):void 0});function ok(e,t){t&&(e.patchPlugin_=co(Nv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ev(e){Av(e),e.drafts_.forEach(i$),e.drafts_=null}function Av(e){e===ku&&(ku=e.parent_)}var sk=e=>ku=n$(ku,e);function i$(e){const t=e[hr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[hr].modified_&&(Ev(t),fn(4)),yn(e)&&(e=uk(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[hr].base_,e,t)}else e=uk(t,r);return a$(t,e,!0),Ev(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==p5?e:void 0}function uk(e,t){if(vh(t))return t;const r=t[hr];if(!r)return ff(t,e.handledSet_,e);if(!yh(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);w5(r,e)}return r.copy_}function a$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dy(t,r)}function x5(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var yh=(e,t)=>e.scope_===t,o$=[];function b5(e,t,r,n){const a=ii(e),o=e.type_;if(n!==void 0&&jv(a,n,o)===t){cf(a,n,r,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;hh(a,(f,h)=>{if(mi(h)){const m=c.get(h)||[];m.push(f),c.set(h,m)}})}const u=e.draftLocations_.get(t)??o$;for(const c of u)cf(a,c,r,o)}function s$(e,t,r){e.callbacks_.push(function(a){var c;const o=t;if(!o||!yh(o,a))return;(c=a.mapSetPlugin_)==null||c.fixSetContents(o);const u=Ty(o);b5(e,o.draft_??o,u,r),w5(o,a)})}function w5(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}x5(e)}}function l$(e,t,r){const{scope_:n}=e;if(mi(r)){const a=r[hr];yh(a,n)&&a.callbacks_.push(function(){Gd(e);const u=Ty(a);b5(e,r,u,t)})}else yn(r)&&e.callbacks_.push(function(){const o=ii(e);e.type_===3?o.has(r)&&ff(r,n.handledSet_,n):jv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ff(jv(e.copy_,t,e.type_),n.handledSet_,n)})}function ff(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||mi(e)||t.has(e)||!yn(e)||vh(e)||(t.add(e),hh(e,(n,a)=>{if(mi(a)){const o=a[hr];if(yh(o,r)){const u=Ty(o);cf(e,n,u,e.type_),x5(o)}}else yn(a)&&ff(a,t,r)})),e}function u$(e,t){const r=mh(e),n={type_:r?1:0,scope_:t?t.scope_:y5(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,o=hf;r&&(a=[n],o=ju);const{revoke:u,proxy:c}=Proxy.revocable(a,o);return n.draft_=c,n.revoke_=u,[c,n]}var hf={get(e,t){if(t===hr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=ii(e);if(!nk(a,t,e.type_))return c$(e,a,t);const o=a[t];if(e.finalized_||!yn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&t$(t))return o;if(o===ug(e.base_,t)){Gd(e);const u=e.type_===1?+t:t,c=Pv(e.scope_,o,e,u);return e.copy_[u]=c}return o},has(e,t){return t in ii(e)},ownKeys(e){return Reflect.ownKeys(ii(e))},set(e,t,r){const n=k5(ii(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=ug(ii(e),t),o=a==null?void 0:a[hr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(e$(r,a)&&(r!==void 0||nk(e.base_,t,e.type_)))return!0;Gd(e),Cv(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),l$(e,t,r)),!0},deleteProperty(e,t){return Gd(e),ug(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Cv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ii(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Kd]:!0,[kv]:e.type_!==1||t!=="length",[uf]:n[uf],[wu]:r[t]}},defineProperty(){fn(11)},getPrototypeOf(e){return Rs(e.base_)},setPrototypeOf(){fn(12)}},ju={};for(let e in hf){let t=hf[e];ju[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}ju.deleteProperty=function(e,t){return ju.set.call(this,e,t,void 0)};ju.set=function(e,t,r){return hf.set.call(this,e[0],t,r,e[0])};function ug(e,t){const r=e[hr];return(r?ii(r):e)[t]}function c$(e,t,r){var a;const n=k5(t,r);return n?wu in n?n[wu]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function k5(e,t){if(!(t in e))return;let r=Rs(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Rs(r)}}function Cv(e){e.modified_||(e.modified_=!0,e.parent_&&Cv(e.parent_))}function Gd(e){e.copy_||(e.assigned_=new Map,e.copy_=Sv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var d$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(ls(r)&&!ls(n)){const u=n;n=r;const c=this;return function(h=u,...m){return c.produce(h,g=>n.call(this,g,...m))}}ls(n)||fn(6),a!==void 0&&!ls(a)&&fn(7);let o;if(yn(r)){const u=sk(this),c=Pv(u,r,void 0);let f=!0;try{o=n(c),f=!1}finally{f?Ev(u):Av(u)}return ok(u,a),lk(o,u)}else if(!r||!Iy(r)){if(o=n(r),o===void 0&&(o=r),o===p5&&(o=void 0),this.autoFreeze_&&Dy(o,!0),a){const u=[],c=[];co(Nv).generateReplacementPatches_(r,o,{patches_:u,inversePatches_:c}),a(u,c)}return o}else fn(1,r)},this.produceWithPatches=(r,n)=>{if(ls(r))return(c,...f)=>this.produceWithPatches(c,h=>r(h,...f));let a,o;return[this.produce(r,n,(c,f)=>{a=c,o=f}),a,o]},lg(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),lg(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),lg(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){yn(t)||fn(8),mi(t)&&(t=qr(t));const r=sk(this),n=Pv(r,t,void 0);return n[hr].isManual_=!0,Av(r),n}finishDraft(t,r){const n=t&&t[hr];(!n||!n.isManual_)&&fn(9);const{scope_:a}=n;return ok(a,r),lk(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const a=co(Nv).applyPatches_;return mi(t)?a(t,r):this.produce(t,o=>a(o,r))}};function Pv(e,t,r,n){const[a,o]=ph(t)?co(df).proxyMap_(t,r):gh(t)?co(df).proxySet_(t,r):u$(t,r);return((r==null?void 0:r.scope_)??y5()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?s$(r,o,n):o.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),a}function qr(e){return mi(e)||fn(10,e),j5(e)}function j5(e){if(!yn(e)||vh(e))return e;const t=e[hr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Sv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Sv(e,!0);return hh(r,(a,o)=>{cf(r,a,j5(o))},n),t&&(t.finalized_=!1),r}var f$=new d$,S5=f$.produce;function N5(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var h$=N5(),m$=N5,p$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?sf:sf.apply(null,arguments)};function Lr(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(Rr(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>m5(n)&&n.type===e,r}var E5=class su extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,su.prototype)}static get[Symbol.species](){return su}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new su(...t[0].concat(this)):new su(...t.concat(this))}};function ck(e){return yn(e)?S5(e,()=>{}):e}function Cd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function g$(e){return typeof e=="boolean"}var v$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let u=new E5;return r&&(g$(r)?u.push(h$):u.push(m$(r.extraArgument))),u},A5="RTK_autoBatch",ot=()=>e=>({payload:e,meta:{[A5]:!0}}),dk=e=>t=>{setTimeout(t,e)},y$=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(u),r())},o=e(a),u=setTimeout(a,t)},C5=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,u=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?y$(window.requestAnimationFrame,100):dk(10):e.type==="callback"?e.queueNotification:dk(e.timeout),h=()=>{u=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){const g=()=>a&&m(),v=n.subscribe(g);return c.add(m),()=>{v(),c.delete(m)}},dispatch(m){var g;try{return a=!((g=m==null?void 0:m.meta)!=null&&g[A5]),o=!a,o&&(u||(u=!0,f(h))),n.dispatch(m)}finally{a=!0}}})},x$=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new E5(e);return n&&a.push(C5(typeof n=="object"?n:void 0)),a};function b$(e){const t=v$(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(My(r))c=h5(r);else throw new Error(Rr(1));let f;typeof n=="function"?f=n(t):f=t();let h=sf;a&&(h=p$({trace:!1,...typeof a=="object"&&a}));const m=ZL(...f),g=x$(m);let v=typeof u=="function"?u(g):g();const b=h(...v);return f5(c,o,b)}function P5(e){const t={},r=[];let n;const a={addCase(o,u){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Rr(28));if(c in t)throw new Error(Rr(29));return t[c]=u,a},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&r.push({matcher:o.settled,reducer:u.settled}),a},addMatcher(o,u){return r.push({matcher:o,reducer:u}),a},addDefaultCase(o){return n=o,a}};return e(a),[t,r,n]}function w$(e){return typeof e=="function"}function k$(e,t){let[r,n,a]=P5(t),o;if(w$(e))o=()=>ck(e());else{const c=ck(e);o=()=>c}function u(c=o(),f){let h=[r[f.type],...n.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[a]),h.reduce((m,g)=>{if(g)if(mi(m)){const b=g(m,f);return b===void 0?m:b}else{if(yn(m))return S5(m,v=>g(v,f));{const v=g(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return m},c)}return u.getInitialState=o,u}var j$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",S$=(e=21)=>{let t="",r=e;for(;r--;)t+=j$[Math.random()*64|0];return t},N$=Symbol.for("rtk-slice-createasyncthunk");function E$(e,t){return`${e}/${t}`}function A$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[N$];return function(a){const{name:o,reducerPath:u=o}=a;if(!o)throw new Error(Rr(11));const c=(typeof a.reducers=="function"?a.reducers(P$()):a.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(P,_){const O=typeof P=="string"?P:P.type;if(!O)throw new Error(Rr(12));if(O in h.sliceCaseReducersByType)throw new Error(Rr(13));return h.sliceCaseReducersByType[O]=_,m},addMatcher(P,_){return h.sliceMatchers.push({matcher:P,reducer:_}),m},exposeAction(P,_){return h.actionCreators[P]=_,m},exposeCaseReducer(P,_){return h.sliceCaseReducersByName[P]=_,m}};f.forEach(P=>{const _=c[P],O={reducerName:P,type:E$(o,P),createNotation:typeof a.reducers=="function"};_$(_)?I$(O,_,m,t):O$(O,_,m)});function g(){const[P={},_=[],O=void 0]=typeof a.extraReducers=="function"?P5(a.extraReducers):[a.extraReducers],D={...P,...h.sliceCaseReducersByType};return k$(a.initialState,B=>{for(let F in D)B.addCase(F,D[F]);for(let F of h.sliceMatchers)B.addMatcher(F.matcher,F.reducer);for(let F of _)B.addMatcher(F.matcher,F.reducer);O&&B.addDefaultCase(O)})}const v=P=>P,b=new Map,j=new WeakMap;let k;function S(P,_){return k||(k=g()),k(P,_)}function N(){return k||(k=g()),k.getInitialState()}function E(P,_=!1){function O(B){let F=B[P];return typeof F>"u"&&_&&(F=Cd(j,O,N)),F}function D(B=v){const F=Cd(b,_,()=>new WeakMap);return Cd(F,B,()=>{const z={};for(const[Y,U]of Object.entries(a.selectors??{}))z[Y]=C$(U,B,()=>Cd(j,B,N),_);return z})}return{reducerPath:P,getSelectors:D,get selectors(){return D(O)},selectSlice:O}}const A={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(u),injectInto(P,{reducerPath:_,...O}={}){const D=_??u;return P.inject({reducerPath:D,reducer:S},O),{...A,...E(D,!0)}}};return A}}function C$(e,t,r,n){function a(o,...u){let c=t(o);return typeof c>"u"&&n&&(c=r()),e(c,...u)}return a.unwrapped=e,a}var sr=A$();function P$(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function O$({type:e,reducerName:t,createNotation:r},n,a){let o,u;if("reducer"in n){if(r&&!M$(n))throw new Error(Rr(17));o=n.reducer,u=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?Lr(e,u):Lr(e))}function _$(e){return e._reducerDefinitionType==="asyncThunk"}function M$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function I$({type:e,reducerName:t},r,n,a){if(!a)throw new Error(Rr(18));const{payloadCreator:o,fulfilled:u,pending:c,rejected:f,settled:h,options:m}=r,g=a(e,o,m);n.exposeAction(t,g),u&&n.addCase(g.fulfilled,u),c&&n.addCase(g.pending,c),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Pd,pending:c||Pd,rejected:f||Pd,settled:h||Pd})}function Pd(){}var T$="task",O5="listener",_5="completed",Ry="cancelled",D$=`task-${Ry}`,R$=`task-${_5}`,Ov=`${O5}-${Ry}`,L$=`${O5}-${_5}`,xh=class{constructor(e){qo(this,"code");qo(this,"name","TaskAbortError");qo(this,"message");this.code=e,this.message=`${T$} ${Ry} (reason: ${e})`}},Ly=(e,t)=>{if(typeof e!="function")throw new TypeError(Rr(32))},mf=()=>{},M5=(e,t=mf)=>(e.catch(t),e),I5=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),no=e=>{if(e.aborted)throw new xh(e.reason)};function T5(e,t){let r=mf;return new Promise((n,a)=>{const o=()=>a(new xh(e.reason));if(e.aborted){o();return}r=I5(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=mf})}var $$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof xh?"cancelled":"rejected",error:r}}finally{t==null||t()}},pf=e=>t=>M5(T5(e,t).then(r=>(no(e),r))),D5=e=>{const t=pf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ms}=Object,fk={},bh="listenerMiddleware",z$=(e,t)=>{const r=n=>I5(e,()=>n.abort(e.reason));return(n,a)=>{Ly(n);const o=new AbortController;r(o);const u=$$(async()=>{no(e),no(o.signal);const c=await n({pause:pf(o.signal),delay:D5(o.signal),signal:o.signal});return no(o.signal),c},()=>o.abort(R$));return a!=null&&a.autoJoin&&t.push(u.catch(mf)),{result:pf(e)(u),cancel(){o.abort(D$)}}}},F$=(e,t)=>{const r=async(n,a)=>{no(t);let o=()=>{};const c=[new Promise((f,h)=>{let m=e({predicate:n,effect:(g,v)=>{v.unsubscribe(),f([g,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];a!=null&&c.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await T5(t,Promise.race(c));return no(t),f}finally{o()}};return((n,a)=>M5(r(n,a)))},R5=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=Lr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(Rr(21));return Ly(o),{predicate:a,type:t,effect:o}},L5=ms(e=>{const{type:t,predicate:r,effect:n}=R5(e);return{id:S$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Rr(22))}}},{withTypes:()=>L5}),hk=(e,t)=>{const{type:r,effect:n,predicate:a}=R5(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},_v=e=>{e.pending.forEach(t=>{t.abort(Ov)})},B$=(e,t)=>()=>{for(const r of t.keys())_v(r);e.clear()},mk=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},$5=ms(Lr(`${bh}/add`),{withTypes:()=>$5}),U$=Lr(`${bh}/removeAll`),z5=ms(Lr(`${bh}/remove`),{withTypes:()=>z5}),H$=(...e)=>{console.error(`${bh}/error`,...e)},Ku=(e={})=>{const t=new Map,r=new Map,n=b=>{const j=r.get(b)??0;r.set(b,j+1)},a=b=>{const j=r.get(b)??1;j===1?r.delete(b):r.set(b,j-1)},{extra:o,onError:u=H$}=e;Ly(u);const c=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),j=>{b.unsubscribe(),j!=null&&j.cancelActive&&_v(b)}),f=(b=>{const j=hk(t,b)??L5(b);return c(j)});ms(f,{withTypes:()=>f});const h=b=>{const j=hk(t,b);return j&&(j.unsubscribe(),b.cancelActive&&_v(j)),!!j};ms(h,{withTypes:()=>h});const m=async(b,j,k,S)=>{const N=new AbortController,E=F$(f,N.signal),A=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(j,ms({},k,{getOriginalState:S,condition:(P,_)=>E(P,_).then(Boolean),take:E,delay:D5(N.signal),pause:pf(N.signal),extra:o,signal:N.signal,fork:z$(N.signal,A),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((P,_,O)=>{P!==N&&(P.abort(Ov),O.delete(P))})},cancel:()=>{N.abort(Ov),b.pending.delete(N)},throwIfCancelled:()=>{no(N.signal)}})))}catch(P){P instanceof xh||mk(u,P,{raisedBy:"effect"})}finally{await Promise.all(A),N.abort(L$),a(b),b.pending.delete(N)}},g=B$(t,r);return{middleware:b=>j=>k=>{if(!m5(k))return j(k);if($5.match(k))return f(k.payload);if(U$.match(k)){g();return}if(z5.match(k))return h(k.payload);let S=b.getState();const N=()=>{if(S===fk)throw new Error(Rr(23));return S};let E;try{if(E=j(k),t.size>0){const A=b.getState(),P=Array.from(t.values());for(const _ of P){let O=!1;try{O=_.predicate(k,A,S)}catch(D){O=!1,mk(u,D,{raisedBy:"predicate"})}O&&m(_,k,b,N)}}}finally{S=fk}return E},startListening:f,stopListening:h,clearListeners:g}};function Rr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var W$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},F5=sr({name:"chartLayout",initialState:W$,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),wh=F5.actions,K$=wh.setMargin,G$=wh.setLayout,V$=wh.setChartSize,q$=wh.setScale,Q$=F5.reducer;function B5(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function He(e){return Number.isFinite(e)}function Un(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function pk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cs(e){for(var t=1;t{if(t&&r){var n=r.width,a=r.height,o=t.align,u=t.verticalAlign,c=t.layout;if((c==="vertical"||c==="horizontal"&&u==="middle")&&o!=="center"&&Ee(e[o]))return cs(cs({},e),{},{[o]:e[o]+(n||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&u!=="middle"&&Ee(e[u]))return cs(cs({},e),{},{[u]:e[u]+(a||0)})}return e},Gn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",U5=(e,t,r,n)=>{if(n)return e.map(c=>c.coordinate);var a,o,u=e.map(c=>(c.coordinate===t&&(a=!0),c.coordinate===r&&(o=!0),c.coordinate));return a||u.push(t),o||u.push(r),u},H5=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,o=e.range,u=e.scale,c=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,m=e.tickCount,g=e.ticks,v=e.niceTicks,b=e.axisType;if(!u)return null;var j=c==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,k=a==="category"&&u.bandwidth?u.bandwidth()/j:0;if(k=b==="angleAxis"&&o&&o.length>=2?Vr(o[0]-o[1])*2*k:k,g||v){var S=(g||v||[]).map((N,E)=>{var A=n?n.indexOf(N):N,P=u.map(A);return He(P)?{coordinate:P+k,value:N,offset:k,index:E}:null}).filter(jr);return S}return f&&h?h.map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(jr):u.ticks&&m!=null?u.ticks(m).map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(jr):u.domain().map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:n?n[N]:N,index:E,offset:k}:null}).filter(jr)},ez=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(h[0]=o,o+=v,h[1]=o):(h[0]=u,u+=v,h[1]=u)}}}},tz=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},rz={sign:ez,expand:yR,none:lo,silhouette:xR,wiggle:bR,positive:tz},nz=(e,t,r)=>{var n,a=(n=rz[r])!==null&&n!==void 0?n:lo,o=vR().keys(t).value((c,f)=>Number(Dt(c,f,0))).order(vv).offset(a),u=o(e);return u.forEach((c,f)=>{c.forEach((h,m)=>{var g=Dt(e[m],t[f],0);Array.isArray(g)&&g.length===2&&Ee(g[0])&&Ee(g[1])&&(h[0]=g[0],h[1]=g[1])})}),u};function iz(e){return e==null?void 0:String(e)}function gk(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Gt(a[t.dataKey])){var c=QE(r,"value",a[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Dt(a,Gt(u)?t.dataKey:u),h=t.scale.map(f);return Ee(h)?h:null}var az=e=>{var t=e.flat(2).filter(Ee);return[Math.min(...t),Math.max(...t)]},oz=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],sz=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return oz(Object.keys(e).reduce((n,a)=>{var o=e[a];if(!o)return n;var u=o.stackedData,c=u.reduce((f,h)=>{var m=B5(h,t,r),g=az(m);return!He(g[0])||!He(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},vk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,gf=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=dh(t,m=>m.coordinate),o=1/0,u=1,c=a.length;u{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},uz=(e,t)=>t==="centric"?e.angle:e.radius,xi=e=>e.layout.width,bi=e=>e.layout.height,cz=e=>e.layout.scale,K5=e=>e.layout.margin,kh=q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),jh=q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),dz="data-recharts-item-index",fz="data-recharts-item-id",Gu=60;function bk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Od(e){for(var t=1;te.brush.height;function vz(e){var t=jh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Gu;return r+a}return r},0)}function yz(e){var t=jh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Gu;return r+a}return r},0)}function xz(e){var t=kh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function bz(e){var t=kh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Qt=q([xi,bi,K5,gz,vz,yz,xz,bz,d5,BL],(e,t,r,n,a,o,u,c,f,h)=>{var m={left:(r.left||0)+a,right:(r.right||0)+o},g={top:(r.top||0)+u,bottom:(r.bottom||0)+c},v=Od(Od({},g),m),b=v.bottom;v.bottom+=n,v=J$(v,f,h);var j=e-v.left-v.right,k=t-v.top-v.bottom;return Od(Od({brushBottom:b},v),{},{width:Math.max(j,0),height:Math.max(k,0)})}),wz=q(Qt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),G5=q(xi,bi,(e,t)=>({x:0,y:0,width:e,height:t})),kz=y.createContext(null),Nr=()=>y.useContext(kz)!=null,Sh=e=>e.brush,Nh=q([Sh,Qt,K5],(e,t,r)=>({height:e.height,x:Ee(e.x)?e.x:t.left,y:Ee(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ee(e.width)?e.width:t.width}));function jz(e,t,{signal:r,edges:n}={}){let a,o=null;const u=n!=null&&n.includes("leading"),c=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},h=()=>{c&&f(),b()};let m=null;const g=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,h()},t)},v=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{v(),a=void 0,o=null},j=()=>{f()},k=function(...S){if(r!=null&&r.aborted)return;a=this,o=S;const N=m==null;g(),u&&N&&f()};return k.schedule=g,k.cancel=b,k.flush=j,r==null||r.addEventListener("abort",b,{once:!0}),k}function Sz(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:a=!0,maxWait:o}=r,u=Array(2);n&&(u[0]="leading"),a&&(u[1]="trailing");let c,f=null;const h=jz(function(...v){c=e.apply(this,v),f=null},t,{edges:u}),m=function(...v){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(c=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),c):(h.apply(this,v),c)},g=()=>(h.flush(),c);return m.cancel=h.cancel,m.flush=g,m}function Nz(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return Sz(e,t,{leading:n,maxWait:t,trailing:a})}var vf=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;oa[u++]))}},Tn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},V5=(e,t,r)=>{var n=r.width,a=n===void 0?Tn.width:n,o=r.height,u=o===void 0?Tn.height:o,c=r.aspect,f=r.maxHeight,h=uo(a)?e:Number(a),m=uo(u)?t:Number(u);return c&&c>0&&(h?m=h/c:m&&(h=m*c),f&&m!=null&&m>f&&(m=f)),{calculatedWidth:h,calculatedHeight:m}},Ez={width:0,height:0,overflow:"visible"},Az={width:0,overflowX:"visible"},Cz={height:0,overflowY:"visible"},Pz={},Oz=e=>{var t=e.width,r=e.height,n=uo(t),a=uo(r);return n&&a?Ez:n?Az:a?Cz:Pz};function _z(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=Tn.width,o=Tn.height):a===void 0?a=n&&n>0?void 0:Tn.width:o===void 0&&(o=n&&n>0?void 0:Tn.height),{width:a,height:o}}var Mz=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function yf(){return yf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return Hz(a)?y.createElement(q5.Provider,{value:a},t):null}var $y=()=>y.useContext(q5),Wz=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?Tn.initialDimension:n,o=e.width,u=e.height,c=e.minWidth,f=c===void 0?Tn.minWidth:c,h=e.minHeight,m=e.maxHeight,g=e.children,v=e.debounce,b=v===void 0?Tn.debounce:v,j=e.id,k=e.className,S=e.onResize,N=e.style,E=N===void 0?{}:N,A=Bz(e,Mz),P=y.useRef(null),_=y.useRef();_.current=S,y.useImperativeHandle(t,()=>P.current);var O=y.useState({containerWidth:a.width,containerHeight:a.height}),D=Rz(O,2),B=D[0],F=D[1],z=y.useCallback((ie,se)=>{F(X=>{var te=Math.round(ie),J=Math.round(se);return X.containerWidth===te&&X.containerHeight===J?X:{containerWidth:te,containerHeight:J}})},[]);y.useEffect(()=>{if(P.current==null||typeof ResizeObserver>"u")return Vs;var ie=I=>{var M,H=I[0];if(H!=null){var ne=H.contentRect,Z=ne.width,me=ne.height;z(Z,me),(M=_.current)===null||M===void 0||M.call(_,Z,me)}};b>0&&(ie=Nz(ie,b,{trailing:!0,leading:!1}));var se=new ResizeObserver(ie),X=P.current.getBoundingClientRect(),te=X.width,J=X.height;return z(te,J),se.observe(P.current),()=>{se.disconnect()}},[z,b]);var Y=B.containerWidth,U=B.containerHeight;vf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var he=V5(Y,U,{width:o,height:u,aspect:r,maxHeight:m}),ue=he.calculatedWidth,ge=he.calculatedHeight;return vf(Y<0||U<0||ue!=null&&ue>0||ge!=null&&ge>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,ue,ge,o,u,f,h,r),y.createElement("div",xf({id:j?"".concat(j):void 0,className:rt("recharts-responsive-container",k),style:Sk(Sk({},E),{},{width:o,height:u,minWidth:f,minHeight:h,maxHeight:m}),ref:P},A),y.createElement("div",{style:Tz({width:o,height:u})},y.createElement(ZE,{width:ue,height:ge},g)))}),Qz=y.forwardRef((e,t)=>{var r=Fy();if(Un(r.width)&&Un(r.height))return e.children;var n=Dz({width:e.width,height:e.height,aspect:e.aspect}),i=n.width,o=n.height,u=YE(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),c=u.calculatedWidth,f=u.calculatedHeight;return Ee(c)&&Ee(f)?y.createElement(ZE,{width:c,height:f},e.children):y.createElement(qz,xf({},e,{width:i,height:o,ref:t}))});function By(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Ah=()=>{var e,t=Nr(),r=Me(Nz),n=Me(Eh),i=(e=Me(Nh))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},Yz={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},JE=()=>{var e;return(e=Me(Qt))!==null&&e!==void 0?e:Yz},eA=()=>Me(xi),tA=()=>Me(bi),ct=e=>e.layout.layoutType,qs=()=>Me(ct),Uy=()=>{var e=qs();if(e==="horizontal"||e==="vertical")return e},rA=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Xz=()=>{var e=qs();return e!==void 0},Vu=e=>{var t=jt(),r=Nr(),n=e.width,i=e.height,o=Fy(),u=n,c=i;return o&&(u=o.width>0?o.width:n,c=o.height>0?o.height:i),y.useEffect(()=>{!r&&Un(u)&&Un(c)&&t(X$({width:u,height:c}))},[t,r,u,c]),null},nA=Symbol.for("immer-nothing"),Ek=Symbol.for("immer-draftable"),$r=Symbol.for("immer-state");function hn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Su=Object.getPrototypeOf;function Ls(e){return!!e&&!!e[$r]}function fo(e){var t;return e?iA(e)||Array.isArray(e)||!!e[Ek]||!!((t=e.constructor)!=null&&t[Ek])||qu(e)||Ph(e):!1}var Zz=Object.prototype.constructor.toString(),Ak=new WeakMap;function iA(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=Ak.get(r);return n===void 0&&(n=Function.toString.call(r),Ak.set(r,n)),n===Zz}function bf(e,t,r=!0){Ch(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Ch(e){const t=e[$r];return t?t.type_:Array.isArray(e)?1:qu(e)?2:Ph(e)?3:0}function Tv(e,t){return Ch(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function aA(e,t,r){const n=Ch(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Jz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qu(e){return e instanceof Map}function Ph(e){return e instanceof Set}function za(e){return e.copy_||e.base_}function Dv(e,t){if(qu(e))return new Map(e);if(Ph(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=iA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[$r];let i=Reflect.ownKeys(n);for(let o=0;o1&&Object.defineProperties(e,{set:_d,add:_d,clear:_d,delete:_d}),Object.freeze(e),t&&Object.values(e).forEach(r=>Hy(r,!0))),e}function e6(){hn(2)}var _d={value:e6};function Oh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var t6={};function ho(e){const t=t6[e];return t||hn(0,e),t}var Nu;function oA(){return Nu}function r6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ck(e,t){t&&(ho("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Rv(e){Lv(e),e.drafts_.forEach(n6),e.drafts_=null}function Lv(e){e===Nu&&(Nu=e.parent_)}function Pk(e){return Nu=r6(Nu,e)}function n6(e){const t=e[$r];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ok(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[$r].modified_&&(Rv(t),hn(4)),fo(e)&&(e=wf(t,e),t.parent_||kf(t,e)),t.patches_&&ho("Patches").generateReplacementPatches_(r[$r].base_,e,t.patches_,t.inversePatches_)):e=wf(t,r,[]),Rv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nA?e:void 0}function wf(e,t,r){if(Oh(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[$r];if(!i)return bf(t,(o,u)=>_k(e,i,t,o,u,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return kf(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let u=o,c=!1;i.type_===3&&(u=new Set(o),o.clear(),c=!0),bf(u,(f,h)=>_k(e,i,o,f,h,r,c),n),kf(e,o,!1),r&&e.patches_&&ho("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function _k(e,t,r,n,i,o,u){if(i==null||typeof i!="object"&&!u)return;const c=Oh(i);if(!(c&&!u)){if(Ls(i)){const f=o&&t&&t.type_!==3&&!Tv(t.assigned_,n)?o.concat(n):void 0,h=wf(e,i,f);if(aA(r,n,h),Ls(h))e.canAutoFreeze_=!1;else return}else u&&r.add(i);if(fo(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;wf(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(qu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&kf(e,i)}}}function kf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hy(t,r)}function i6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:oA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=Wy;r&&(i=[n],o=Eu);const{revoke:u,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=u,c}var Wy={get(e,t){if(t===$r)return e;const r=za(e);if(!Tv(r,t))return a6(e,r,t);const n=r[t];return e.finalized_||!fo(n)?n:n===dg(e.base_,t)?(fg(e),e.copy_[t]=zv(n,e)):n},has(e,t){return t in za(e)},ownKeys(e){return Reflect.ownKeys(za(e))},set(e,t,r){const n=sA(za(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=dg(za(e),t),o=i==null?void 0:i[$r];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Jz(r,i)&&(r!==void 0||Tv(e.base_,t)))return!0;fg(e),$v(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return dg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fg(e),$v(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=za(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){hn(11)},getPrototypeOf(e){return Su(e.base_)},setPrototypeOf(){hn(12)}},Eu={};bf(Wy,(e,t)=>{Eu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Eu.deleteProperty=function(e,t){return Eu.set.call(this,e,t,void 0)};Eu.set=function(e,t,r){return Wy.set.call(this,e[0],t,r,e[0])};function dg(e,t){const r=e[$r];return(r?za(r):e)[t]}function a6(e,t,r){var i;const n=sA(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function sA(e,t){if(!(t in e))return;let r=Su(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Su(r)}}function $v(e){e.modified_||(e.modified_=!0,e.parent_&&$v(e.parent_))}function fg(e){e.copy_||(e.copy_=Dv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var o6=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const u=this;return function(f=o,...h){return u.produce(f,m=>r.call(this,m,...h))}}typeof r!="function"&&hn(6),n!==void 0&&typeof n!="function"&&hn(7);let i;if(fo(t)){const o=Pk(this),u=zv(t,void 0);let c=!0;try{i=r(u),c=!1}finally{c?Rv(o):Lv(o)}return Ck(o,n),Ok(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===nA&&(i=void 0),this.autoFreeze_&&Hy(i,!0),n){const o=[],u=[];ho("Patches").generateReplacementPatches_(t,i,o,u),n(o,u)}return i}else hn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,f=>t(f,...c));let n,i;return[this.produce(t,r,(u,c)=>{n=u,i=c}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){fo(e)||hn(8),Ls(e)&&(e=s6(e));const t=Pk(this),r=zv(e,void 0);return r[$r].isManual_=!0,Lv(t),r}finishDraft(e,t){const r=e&&e[$r];(!r||!r.isManual_)&&hn(9);const{scope_:n}=r;return Ck(n,t),Ok(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=ho("Patches").applyPatches_;return Ls(e)?n(e,t):this.produce(e,i=>n(i,t))}};function zv(e,t){const r=qu(e)?ho("MapSet").proxyMap_(e,t):Ph(e)?ho("MapSet").proxySet_(e,t):i6(e,t);return(t?t.scope_:oA()).drafts_.push(r),r}function s6(e){return Ls(e)||hn(10,e),lA(e)}function lA(e){if(!fo(e)||Oh(e))return e;const t=e[$r];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Dv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Dv(e,!0);return bf(r,(i,o)=>{aA(r,i,lA(o))},n),t&&(t.finalized_=!1),r}var l6=new o6;l6.produce;var u6={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},uA=sr({name:"legend",initialState:u6,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:ot()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=qr(e).payload.indexOf(n);o>-1&&(e.payload[o]=i)},prepare:ot()},removeLegendPayload:{reducer(e,t){var r=qr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ot()}}}),Qu=uA.actions;Qu.setLegendSize;Qu.setLegendSettings;var c6=Qu.addLegendPayload,d6=Qu.replaceLegendPayload,f6=Qu.removeLegendPayload,h6=uA.reducer,hg={exports:{}},mg={};/** + height and width.`,ue,ge,o,u,f,h,r),y.createElement("div",yf({id:j?"".concat(j):void 0,className:rt("recharts-responsive-container",k),style:kk(kk({},E),{},{width:o,height:u,minWidth:f,minHeight:h,maxHeight:m}),ref:P},A),y.createElement("div",{style:Oz({width:o,height:u})},y.createElement(Q5,{width:ue,height:ge},g)))}),Kz=y.forwardRef((e,t)=>{var r=$y();if(Un(r.width)&&Un(r.height))return e.children;var n=_z({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,o=n.height,u=V5(void 0,void 0,{width:a,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),c=u.calculatedWidth,f=u.calculatedHeight;return Ee(c)&&Ee(f)?y.createElement(Q5,{width:c,height:f},e.children):y.createElement(Wz,yf({},e,{width:a,height:o,ref:t}))});function zy(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Eh=()=>{var e,t=Nr(),r=Me(wz),n=Me(Nh),a=(e=Me(Sh))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},Gz={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Y5=()=>{var e;return(e=Me(Qt))!==null&&e!==void 0?e:Gz},X5=()=>Me(xi),Z5=()=>Me(bi),ct=e=>e.layout.layoutType,qs=()=>Me(ct),Fy=()=>{var e=qs();if(e==="horizontal"||e==="vertical")return e},J5=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Vz=()=>{var e=qs();return e!==void 0},Vu=e=>{var t=jt(),r=Nr(),n=e.width,a=e.height,o=$y(),u=n,c=a;return o&&(u=o.width>0?o.width:n,c=o.height>0?o.height:a),y.useEffect(()=>{!r&&Un(u)&&Un(c)&&t(V$({width:u,height:c}))},[t,r,u,c]),null},eA=Symbol.for("immer-nothing"),Sk=Symbol.for("immer-draftable"),$r=Symbol.for("immer-state");function hn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Su=Object.getPrototypeOf;function Ls(e){return!!e&&!!e[$r]}function fo(e){var t;return e?tA(e)||Array.isArray(e)||!!e[Sk]||!!((t=e.constructor)!=null&&t[Sk])||qu(e)||Ch(e):!1}var qz=Object.prototype.constructor.toString(),Nk=new WeakMap;function tA(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=Nk.get(r);return n===void 0&&(n=Function.toString.call(r),Nk.set(r,n)),n===qz}function xf(e,t,r=!0){Ah(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Ah(e){const t=e[$r];return t?t.type_:Array.isArray(e)?1:qu(e)?2:Ch(e)?3:0}function Mv(e,t){return Ah(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rA(e,t,r){const n=Ah(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Qz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qu(e){return e instanceof Map}function Ch(e){return e instanceof Set}function za(e){return e.copy_||e.base_}function Iv(e,t){if(qu(e))return new Map(e);if(Ch(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=tA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[$r];let a=Reflect.ownKeys(n);for(let o=0;o1&&Object.defineProperties(e,{set:_d,add:_d,clear:_d,delete:_d}),Object.freeze(e),t&&Object.values(e).forEach(r=>By(r,!0))),e}function Yz(){hn(2)}var _d={value:Yz};function Ph(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Xz={};function ho(e){const t=Xz[e];return t||hn(0,e),t}var Nu;function nA(){return Nu}function Zz(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ek(e,t){t&&(ho("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tv(e){Dv(e),e.drafts_.forEach(Jz),e.drafts_=null}function Dv(e){e===Nu&&(Nu=e.parent_)}function Ak(e){return Nu=Zz(Nu,e)}function Jz(e){const t=e[$r];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ck(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[$r].modified_&&(Tv(t),hn(4)),fo(e)&&(e=bf(t,e),t.parent_||wf(t,e)),t.patches_&&ho("Patches").generateReplacementPatches_(r[$r].base_,e,t.patches_,t.inversePatches_)):e=bf(t,r,[]),Tv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==eA?e:void 0}function bf(e,t,r){if(Ph(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[$r];if(!a)return xf(t,(o,u)=>Pk(e,a,t,o,u,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return wf(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let u=o,c=!1;a.type_===3&&(u=new Set(o),o.clear(),c=!0),xf(u,(f,h)=>Pk(e,a,o,f,h,r,c),n),wf(e,o,!1),r&&e.patches_&&ho("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function Pk(e,t,r,n,a,o,u){if(a==null||typeof a!="object"&&!u)return;const c=Ph(a);if(!(c&&!u)){if(Ls(a)){const f=o&&t&&t.type_!==3&&!Mv(t.assigned_,n)?o.concat(n):void 0,h=bf(e,a,f);if(rA(r,n,h),Ls(h))e.canAutoFreeze_=!1;else return}else u&&r.add(a);if(fo(a)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&c)return;bf(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(qu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&wf(e,a)}}}function wf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&By(t,r)}function e6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:nA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=Uy;r&&(a=[n],o=Eu);const{revoke:u,proxy:c}=Proxy.revocable(a,o);return n.draft_=c,n.revoke_=u,c}var Uy={get(e,t){if(t===$r)return e;const r=za(e);if(!Mv(r,t))return t6(e,r,t);const n=r[t];return e.finalized_||!fo(n)?n:n===cg(e.base_,t)?(dg(e),e.copy_[t]=Lv(n,e)):n},has(e,t){return t in za(e)},ownKeys(e){return Reflect.ownKeys(za(e))},set(e,t,r){const n=iA(za(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=cg(za(e),t),o=a==null?void 0:a[$r];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Qz(r,a)&&(r!==void 0||Mv(e.base_,t)))return!0;dg(e),Rv(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return cg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,dg(e),Rv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=za(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){hn(11)},getPrototypeOf(e){return Su(e.base_)},setPrototypeOf(){hn(12)}},Eu={};xf(Uy,(e,t)=>{Eu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Eu.deleteProperty=function(e,t){return Eu.set.call(this,e,t,void 0)};Eu.set=function(e,t,r){return Uy.set.call(this,e[0],t,r,e[0])};function cg(e,t){const r=e[$r];return(r?za(r):e)[t]}function t6(e,t,r){var a;const n=iA(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function iA(e,t){if(!(t in e))return;let r=Su(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Su(r)}}function Rv(e){e.modified_||(e.modified_=!0,e.parent_&&Rv(e.parent_))}function dg(e){e.copy_||(e.copy_=Iv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var r6=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const u=this;return function(f=o,...h){return u.produce(f,m=>r.call(this,m,...h))}}typeof r!="function"&&hn(6),n!==void 0&&typeof n!="function"&&hn(7);let a;if(fo(t)){const o=Ak(this),u=Lv(t,void 0);let c=!0;try{a=r(u),c=!1}finally{c?Tv(o):Dv(o)}return Ek(o,n),Ck(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===eA&&(a=void 0),this.autoFreeze_&&By(a,!0),n){const o=[],u=[];ho("Patches").generateReplacementPatches_(t,a,o,u),n(o,u)}return a}else hn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,f=>t(f,...c));let n,a;return[this.produce(t,r,(u,c)=>{n=u,a=c}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){fo(e)||hn(8),Ls(e)&&(e=n6(e));const t=Ak(this),r=Lv(e,void 0);return r[$r].isManual_=!0,Dv(t),r}finishDraft(e,t){const r=e&&e[$r];(!r||!r.isManual_)&&hn(9);const{scope_:n}=r;return Ek(n,t),Ck(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=ho("Patches").applyPatches_;return Ls(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Lv(e,t){const r=qu(e)?ho("MapSet").proxyMap_(e,t):Ch(e)?ho("MapSet").proxySet_(e,t):e6(e,t);return(t?t.scope_:nA()).drafts_.push(r),r}function n6(e){return Ls(e)||hn(10,e),aA(e)}function aA(e){if(!fo(e)||Ph(e))return e;const t=e[$r];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Iv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Iv(e,!0);return xf(r,(a,o)=>{rA(r,a,aA(o))},n),t&&(t.finalized_=!1),r}var i6=new r6;i6.produce;var a6={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},oA=sr({name:"legend",initialState:a6,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:ot()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=qr(e).payload.indexOf(n);o>-1&&(e.payload[o]=a)},prepare:ot()},removeLegendPayload:{reducer(e,t){var r=qr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ot()}}}),Qu=oA.actions;Qu.setLegendSize;Qu.setLegendSettings;var o6=Qu.addLegendPayload,s6=Qu.replaceLegendPayload,l6=Qu.removeLegendPayload,u6=oA.reducer,fg={exports:{}},hg={};/** * @license React * use-sync-external-store-with-selector.production.js * @@ -586,56 +586,56 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Mk;function m6(){if(Mk)return mg;Mk=1;var e=Ws();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,u=e.useMemo,c=e.useDebugValue;return mg.useSyncExternalStoreWithSelector=function(f,h,m,g,v){var b=i(null);if(b.current===null){var j={hasValue:!1,value:null};b.current=j}else j=b.current;b=u(function(){function S(_){if(!N){if(N=!0,E=_,_=g(_),v!==void 0&&j.hasValue){var O=j.value;if(v(O,_))return A=O}return A=_}if(O=A,r(E,_))return O;var D=g(_);return v!==void 0&&v(O,D)?(E=_,O):(E=_,A=D)}var N=!1,E,A,P=m===void 0?null:m;return[function(){return S(h())},P===null?void 0:function(){return S(P())}]},[h,m,g,v]);var k=n(f,b[0],b[1]);return o(function(){j.hasValue=!0,j.value=k},[k]),c(k),k},mg}var Ik;function p6(){return Ik||(Ik=1,hg.exports=m6()),hg.exports}p6();function g6(e){e()}function v6(){let e=null,t=null;return{clear(){e=null,t=null},notify(){g6(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var Tk={notify(){},get:()=>[]};function y6(e,t){let r,n=Tk,i=0,o=!1;function u(k){m();const S=n.subscribe(k);let N=!1;return()=>{N||(N=!0,S(),g())}}function c(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return o}function m(){i++,r||(r=e.subscribe(f),n=v6())}function g(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=Tk)}function v(){o||(o=!0,m())}function b(){o&&(o=!1,g())}const j={addNestedSub:u,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return j}var x6=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b6=x6(),w6=()=>typeof navigator<"u"&&navigator.product==="ReactNative",k6=w6(),j6=()=>b6||k6?y.useLayoutEffect:y.useEffect,S6=j6();function Dk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function N6(e,t){if(Dk(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i{const f=y6(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),u=y.useMemo(()=>i.getState(),[i]);S6(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const c=r||A6;return y.createElement(c.Provider,{value:o},t)}var P6=C6,O6=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function _6(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function _h(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(O6.has(n)){if(e[n]==null&&t[n]==null)continue;if(!N6(e[n],t[n]))return!1}else if(!_6(e[n],t[n]))return!1;return!0}function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?Jo.separator:t,n=e.contentStyle,i=e.itemStyle,o=e.labelStyle,u=o===void 0?Jo.labelStyle:o,c=e.payload,f=e.formatter,h=e.itemSorter,m=e.wrapperClassName,g=e.labelClassName,v=e.label,b=e.labelFormatter,j=e.accessibilityLayer,k=j===void 0?Jo.accessibilityLayer:j,S=()=>{if(c&&c.length){var B={padding:0,margin:0},F=B6(c,h),z=F.map((Y,U)=>{if(!Y||Y.type==="none")return null;var he=Y.formatter||f||F6,ue=Y.value,ge=Y.name,ie=ue,se=ge;if(he){var X=he(ue,ge,Y,U,c);if(Array.isArray(X)){var te=D6(X,2);ie=te[0],se=te[1]}else if(X!=null)ie=X;else return null}var J=Vl(Vl({},Jo.itemStyle),{},{color:Y.color||Jo.itemStyle.color},i);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:J},Bn(se)?y.createElement("span",{className:"recharts-tooltip-item-name"},se):null,Bn(se)?y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,y.createElement("span",{className:"recharts-tooltip-item-value"},ie),y.createElement("span",{className:"recharts-tooltip-item-unit"},Y.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:B},z)}return null},N=Vl(Vl({},Jo.contentStyle),n),E=Vl({margin:0},u),A=!Vt(v),P=A?v:"",_=rt("recharts-default-tooltip",m),O=rt("recharts-tooltip-label",g);A&&b&&c!==void 0&&c!==null&&(P=b(v,c));var D=k?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",Fv({className:_,style:N},D),y.createElement("p",{className:O,style:E},y.isValidElement(P)?P:"".concat(P)),S())},ql="recharts-tooltip-wrapper",H6={visibility:"hidden"};function W6(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return rt(ql,{["".concat(ql,"-right")]:Ee(r)&&t&&Ee(t.x)&&r>=t.x,["".concat(ql,"-left")]:Ee(r)&&t&&Ee(t.x)&&r=t.y,["".concat(ql,"-top")]:Ee(n)&&t&&Ee(t.y)&&n0?i:0),g=r[n]+i;if(t[n])return u[n]?m:g;var v=f[n];if(v==null)return 0;if(u[n]){var b=m,j=v;return bS?Math.max(m,v):Math.max(g,v)}function K6(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function G6(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,i=e.offsetLeft,o=e.position,u=e.reverseDirection,c=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,m,g,v;return c.height>0&&c.width>0&&r?(g=$k({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:u,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),v=$k({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:u,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),m=K6({translateX:g,translateY:v,useTranslate3d:f})):m=H6,{cssProperties:m,cssClasses:W6({translateX:g,translateY:v,coordinate:r})}}var V6=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Yu={isSsr:V6()};function q6(e,t){return Z6(e)||X6(e,t)||Y6(e,t)||Q6()}function Q6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y6(e,t){if(e){if(typeof e=="string")return zk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zk(e,t):void 0}}function zk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rYu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=q6(e,2),r=t[0],n=t[1];return y.useEffect(()=>{if(window.matchMedia){var i=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(i.matches)};return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}}},[]),r}function Fk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=r8(f,2),m=h[0],g=h[1];y.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var A,P,_,O;g({dismissed:!0,dismissedAtCoordinate:{x:(A=(P=e.coordinate)===null||P===void 0?void 0:P.x)!==null&&A!==void 0?A:0,y:(_=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==m.dismissedAtCoordinate.y)&&g(es(es({},m),{},{dismissed:!1}));var v=G6({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),b=v.cssClasses,j=v.cssProperties,k=e.hasPortalFromProps?{}:es(es({transition:s8({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},j),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=es(es({},k),{},{visibility:!m.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return y.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var u8=y.memo(l8),dA=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Bv(){return Bv=Object.assign?Object.assign.bind():function(e){for(var t=1;tHe(e.x)&&He(e.y),Kk=e=>e.base!=null&&jf(e.base)&&jf(e),Ql=e=>e.x,Yl=e=>e.y,h8=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Oy(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Wk["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Wk[r]||ch},Gk={connectNulls:!1,type:"linear"},m8=e=>{var t=e.type,r=t===void 0?Gk.type:t,n=e.points,i=n===void 0?[]:n,o=e.baseLine,u=e.layout,c=e.connectNulls,f=c===void 0?Gk.connectNulls:c,h=h8(r,u),m=f?i.filter(jf):i;if(Array.isArray(o)){var g,v=i.map((N,E)=>Hk(Hk({},N),{},{base:o[E]}));u==="vertical"?g=Sd().y(Yl).x1(Ql).x0(N=>N.base.x):g=Sd().x(Ql).y1(Yl).y0(N=>N.base.y);var b=g.defined(Kk).curve(h),j=f?v.filter(Kk):v;return b(j)}var k;u==="vertical"&&Ee(o)?k=Sd().y(Yl).x1(Ql).x0(o):Ee(o)?k=Sd().x(Ql).y1(Yl).y0(o):k=F5().x(Ql).y(Yl);var S=k.defined(jf).curve(h);return S(m)},qd=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,o=qs();if((!r||!r.length)&&!n)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=r&&r.length?m8(u):n;return y.createElement("path",Bv({},vn(e),_y(e),{className:rt("recharts-curve",t),d:c===null?void 0:c,ref:i}))},p8=["x","y","top","left","width","height","className"];function Uv(){return Uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),j8=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,i=n===void 0?0:n,o=e.top,u=o===void 0?0:o,c=e.left,f=c===void 0?0:c,h=e.width,m=h===void 0?0:h,g=e.height,v=g===void 0?0:g,b=e.className,j=b8(e,p8),k=g8({x:r,y:i,top:u,left:f,width:m,height:v},j);return!Ee(r)||!Ee(i)||!Ee(m)||!Ee(v)||!Ee(u)||!Ee(f)?null:y.createElement("path",Uv({},Yr(k),{className:rt("recharts-cross",b),d:k8(r,i,m,v,u,f)}))};function S8(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Sf=1e-4,fA=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],hA=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),qk=(e,t)=>r=>{var n=fA(e,t);return hA(n,r)},N8=(e,t)=>r=>{var n=fA(e,t),i=[...n.map((o,u)=>o*u).slice(1),0];return hA(i,r)},E8=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},A8=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var i=qk(e,r),o=qk(t,n),u=N8(e,r),c=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,g=m,v=0;v<8;++v){var b=i(g)-m,j=u(g);if(Math.abs(b-m)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,u=t.dt,c=u===void 0?16.67:u,f=1,h=[0],m=0,g=0,v=1e4,b=0;b{var E,A,P;if(N<=0)return 0;if(N>=1)return f;var _=N*S,O=Math.floor(_),D=_-O;return((E=h[O])!==null&&E!==void 0?E:0)+(((A=h[O+1])!==null&&A!==void 0?A:0)-((P=h[O])!==null&&P!==void 0?P:0))*D}},O8=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Qk(e);case"spring":return P8();default:if(e.split("(")[0]==="cubic-bezier")return Qk(e)}return typeof e=="function"?e:null},_8=(e,t,r)=>{var n,i=o=>{var u=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(i,u);return}n=e.setTimeout(i,u)};return n=e.setTimeout(i,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},mA=y.createContext(_8);mA.Provider;function M8(e){var t=y.useContext(mA);return y.useMemo(()=>e??t,[e,t])}function I8(e,t,r){return(t=T8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T8(e){var t=D8(e,"string");return typeof t=="symbol"?t:t+""}function D8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yk="init",Xk="pending",Zk="active",R8="completed";function vg(e){return Math.max(0,e)}class L8{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;I8(this,"state",Yk),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=vg(t.animationDuration),this.animationBegin=vg(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(r=t.onAnimationStart)===null||r===void 0||r.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===Yk)return this.state=Xk,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Xk){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Zk,this.animationStartedTime=t,this.nextAnimationUpdate(0)):vg(this.animationBegin-r)}if(this.getState()===Zk){if(this.animationStartedTime==null)throw new Error;var n=t-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=R8}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class $8 extends L8{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(li(this.getFrom(),this.getTo(),this.getProgress()))}}class z8{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=u=>{u-n>=r?t(u):i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function F8(e,t){return W8(e)||H8(e,t)||U8(e,t)||B8()}function B8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U8(e,t){if(e){if(typeof e=="string")return Jk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jk(e,t):void 0}}function Jk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},ej=0,yg=1;function pA(e){var t=Jr(e,K8),r=t.animationId,n=t.isActive,i=t.canBegin,o=t.duration,u=t.easing,c=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,m=t.children,g=cA(),v=n==="auto"?!Yu.isSsr&&!g:n,b=M8(t.animationController),j=y.useState(v?ej:yg),k=F8(j,2),S=k[0],N=k[1];return y.useEffect(()=>{v||N(yg)},[v]),y.useEffect(()=>{var E=O8(u);if(!v||!i||E==null)return Vs;var A=new z8,P=new $8({animationId:r,easing:E,animationDuration:o,animationBegin:c,onAnimationStart:h,onAnimationEnd:f,from:ej,to:yg});return b(A,P,N)},[b,r,v,i,o,u,c,h,f]),m(Number(S))}function gA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(bu(t)),n=y.useRef(e);return n.current!==e&&(r.current=bu(t),n.current=e),r.current}var G8=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),V8=(e,t,r)=>e.map(n=>"".concat(G8(n)," ").concat(t,"ms ").concat(r)).join(","),q8=["radius"],Q8=["radius"],tj,rj,nj,ij,aj,oj,sj,lj,uj,cj;function dj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fj(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=la(r),u=la(n),c=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,h=o>=0?1:-1,m=u>=0&&o>=0||u<0&&o<0?1:0,g;if(c>0&&Array.isArray(i)){for(var v=[0,0,0,0],b=0,j=4;bc?c:S}g=Ht(tj||(tj=An(["M",",",""])),e,t+f*v[0]),v[0]>0&&(g+=Ht(rj||(rj=An(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),g+=Ht(nj||(nj=An(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(g+=Ht(ij||(ij=An(["A ",",",",0,0,",`, - `,",",""])),v[1],v[1],m,e+r,t+f*v[1])),g+=Ht(aj||(aj=An(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(g+=Ht(oj||(oj=An(["A ",",",",0,0,",`, - `,",",""])),v[2],v[2],m,e+r-h*v[2],t+n)),g+=Ht(sj||(sj=An(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(g+=Ht(lj||(lj=An(["A ",",",",0,0,",`, - `,",",""])),v[3],v[3],m,e,t+n-f*v[3])),g+="Z"}else if(c>0&&i===+i&&i>0){var N=Math.min(c,i);g=Ht(uj||(uj=An(["M ",",",` + */var Ok;function c6(){if(Ok)return hg;Ok=1;var e=Ws();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,a=e.useRef,o=e.useEffect,u=e.useMemo,c=e.useDebugValue;return hg.useSyncExternalStoreWithSelector=function(f,h,m,g,v){var b=a(null);if(b.current===null){var j={hasValue:!1,value:null};b.current=j}else j=b.current;b=u(function(){function S(_){if(!N){if(N=!0,E=_,_=g(_),v!==void 0&&j.hasValue){var O=j.value;if(v(O,_))return A=O}return A=_}if(O=A,r(E,_))return O;var D=g(_);return v!==void 0&&v(O,D)?(E=_,O):(E=_,A=D)}var N=!1,E,A,P=m===void 0?null:m;return[function(){return S(h())},P===null?void 0:function(){return S(P())}]},[h,m,g,v]);var k=n(f,b[0],b[1]);return o(function(){j.hasValue=!0,j.value=k},[k]),c(k),k},hg}var _k;function d6(){return _k||(_k=1,fg.exports=c6()),fg.exports}d6();function f6(e){e()}function h6(){let e=null,t=null;return{clear(){e=null,t=null},notify(){f6(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var Mk={notify(){},get:()=>[]};function m6(e,t){let r,n=Mk,a=0,o=!1;function u(k){m();const S=n.subscribe(k);let N=!1;return()=>{N||(N=!0,S(),g())}}function c(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return o}function m(){a++,r||(r=e.subscribe(f),n=h6())}function g(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=Mk)}function v(){o||(o=!0,m())}function b(){o&&(o=!1,g())}const j={addNestedSub:u,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return j}var p6=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g6=p6(),v6=()=>typeof navigator<"u"&&navigator.product==="ReactNative",y6=v6(),x6=()=>g6||y6?y.useLayoutEffect:y.useEffect,b6=x6();function Ik(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function w6(e,t){if(Ik(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a{const f=m6(a);return{store:a,subscription:f,getServerState:n?()=>n:void 0}},[a,n]),u=y.useMemo(()=>a.getState(),[a]);b6(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const c=r||j6;return y.createElement(c.Provider,{value:o},t)}var N6=S6,E6=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function A6(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Oh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(E6.has(n)){if(e[n]==null&&t[n]==null)continue;if(!w6(e[n],t[n]))return!1}else if(!A6(e[n],t[n]))return!1;return!0}function $v(){return $v=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?Jo.separator:t,n=e.contentStyle,a=e.itemStyle,o=e.labelStyle,u=o===void 0?Jo.labelStyle:o,c=e.payload,f=e.formatter,h=e.itemSorter,m=e.wrapperClassName,g=e.labelClassName,v=e.label,b=e.labelFormatter,j=e.accessibilityLayer,k=j===void 0?Jo.accessibilityLayer:j,S=()=>{if(c&&c.length){var B={padding:0,margin:0},F=L6(c,h),z=F.map((Y,U)=>{if(!Y||Y.type==="none")return null;var he=Y.formatter||f||R6,ue=Y.value,ge=Y.name,ie=ue,se=ge;if(he){var X=he(ue,ge,Y,U,c);if(Array.isArray(X)){var te=_6(X,2);ie=te[0],se=te[1]}else if(X!=null)ie=X;else return null}var J=Vl(Vl({},Jo.itemStyle),{},{color:Y.color||Jo.itemStyle.color},a);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:J},Bn(se)?y.createElement("span",{className:"recharts-tooltip-item-name"},se):null,Bn(se)?y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,y.createElement("span",{className:"recharts-tooltip-item-value"},ie),y.createElement("span",{className:"recharts-tooltip-item-unit"},Y.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:B},z)}return null},N=Vl(Vl({},Jo.contentStyle),n),E=Vl({margin:0},u),A=!Gt(v),P=A?v:"",_=rt("recharts-default-tooltip",m),O=rt("recharts-tooltip-label",g);A&&b&&c!==void 0&&c!==null&&(P=b(v,c));var D=k?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",$v({className:_,style:N},D),y.createElement("p",{className:O,style:E},y.isValidElement(P)?P:"".concat(P)),S())},ql="recharts-tooltip-wrapper",z6={visibility:"hidden"};function F6(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return rt(ql,{["".concat(ql,"-right")]:Ee(r)&&t&&Ee(t.x)&&r>=t.x,["".concat(ql,"-left")]:Ee(r)&&t&&Ee(t.x)&&r=t.y,["".concat(ql,"-top")]:Ee(n)&&t&&Ee(t.y)&&n0?a:0),g=r[n]+a;if(t[n])return u[n]?m:g;var v=f[n];if(v==null)return 0;if(u[n]){var b=m,j=v;return bS?Math.max(m,v):Math.max(g,v)}function B6(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function U6(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,o=e.position,u=e.reverseDirection,c=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,m,g,v;return c.height>0&&c.width>0&&r?(g=Rk({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:o,reverseDirection:u,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),v=Rk({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:u,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),m=B6({translateX:g,translateY:v,useTranslate3d:f})):m=z6,{cssProperties:m,cssClasses:F6({translateX:g,translateY:v,coordinate:r})}}var H6=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Yu={isSsr:H6()};function W6(e,t){return q6(e)||V6(e,t)||G6(e,t)||K6()}function K6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G6(e,t){if(e){if(typeof e=="string")return Lk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lk(e,t):void 0}}function Lk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rYu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=W6(e,2),r=t[0],n=t[1];return y.useEffect(()=>{if(window.matchMedia){var a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(a.matches)};return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}},[]),r}function $k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=Z6(f,2),m=h[0],g=h[1];y.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var A,P,_,O;g({dismissed:!0,dismissedAtCoordinate:{x:(A=(P=e.coordinate)===null||P===void 0?void 0:P.x)!==null&&A!==void 0?A:0,y:(_=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==m.dismissedAtCoordinate.y)&&g(es(es({},m),{},{dismissed:!1}));var v=U6({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),b=v.cssClasses,j=v.cssProperties,k=e.hasPortalFromProps?{}:es(es({transition:n8({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},j),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=es(es({},k),{},{visibility:!m.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return y.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var a8=y.memo(i8),lA=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;tHe(e.x)&&He(e.y),Hk=e=>e.base!=null&&kf(e.base)&&kf(e),Ql=e=>e.x,Yl=e=>e.y,u8=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Cy(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Uk["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Uk[r]||uh},Wk={connectNulls:!1,type:"linear"},c8=e=>{var t=e.type,r=t===void 0?Wk.type:t,n=e.points,a=n===void 0?[]:n,o=e.baseLine,u=e.layout,c=e.connectNulls,f=c===void 0?Wk.connectNulls:c,h=u8(r,u),m=f?a.filter(kf):a;if(Array.isArray(o)){var g,v=a.map((N,E)=>Bk(Bk({},N),{},{base:o[E]}));u==="vertical"?g=Sd().y(Yl).x1(Ql).x0(N=>N.base.x):g=Sd().x(Ql).y1(Yl).y0(N=>N.base.y);var b=g.defined(Hk).curve(h),j=f?v.filter(Hk):v;return b(j)}var k;u==="vertical"&&Ee(o)?k=Sd().y(Yl).x1(Ql).x0(o):Ee(o)?k=Sd().x(Ql).y1(Yl).y0(o):k=LE().x(Ql).y(Yl);var S=k.defined(kf).curve(h);return S(m)},Vd=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,o=qs();if((!r||!r.length)&&!n)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=r&&r.length?c8(u):n;return y.createElement("path",zv({},vn(e),Py(e),{className:rt("recharts-curve",t),d:c===null?void 0:c,ref:a}))},d8=["x","y","top","left","width","height","className"];function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),x8=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,a=n===void 0?0:n,o=e.top,u=o===void 0?0:o,c=e.left,f=c===void 0?0:c,h=e.width,m=h===void 0?0:h,g=e.height,v=g===void 0?0:g,b=e.className,j=g8(e,d8),k=f8({x:r,y:a,top:u,left:f,width:m,height:v},j);return!Ee(r)||!Ee(a)||!Ee(m)||!Ee(v)||!Ee(u)||!Ee(f)?null:y.createElement("path",Fv({},Yr(k),{className:rt("recharts-cross",b),d:y8(r,a,m,v,u,f)}))};function b8(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var jf=1e-4,uA=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],cA=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Gk=(e,t)=>r=>{var n=uA(e,t);return cA(n,r)},w8=(e,t)=>r=>{var n=uA(e,t),a=[...n.map((o,u)=>o*u).slice(1),0];return cA(a,r)},k8=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var a=n.map(o=>parseFloat(o));return[a[0],a[1],a[2],a[3]]},j8=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var a=Gk(e,r),o=Gk(t,n),u=w8(e,r),c=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,g=m,v=0;v<8;++v){var b=a(g)-m,j=u(g);if(Math.abs(b-m)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,o=a===void 0?8:a,u=t.dt,c=u===void 0?16.67:u,f=1,h=[0],m=0,g=0,v=1e4,b=0;b{var E,A,P;if(N<=0)return 0;if(N>=1)return f;var _=N*S,O=Math.floor(_),D=_-O;return((E=h[O])!==null&&E!==void 0?E:0)+(((A=h[O+1])!==null&&A!==void 0?A:0)-((P=h[O])!==null&&P!==void 0?P:0))*D}},E8=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Vk(e);case"spring":return N8();default:if(e.split("(")[0]==="cubic-bezier")return Vk(e)}return typeof e=="function"?e:null},A8=(e,t,r)=>{var n,a=o=>{var u=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(a,u);return}n=e.setTimeout(a,u)};return n=e.setTimeout(a,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},dA=y.createContext(A8);dA.Provider;function C8(e){var t=y.useContext(dA);return y.useMemo(()=>e??t,[e,t])}function P8(e,t,r){return(t=O8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O8(e){var t=_8(e,"string");return typeof t=="symbol"?t:t+""}function _8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qk="init",Qk="pending",Yk="active",M8="completed";function gg(e){return Math.max(0,e)}class I8{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;P8(this,"state",qk),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=gg(t.animationDuration),this.animationBegin=gg(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(r=t.onAnimationStart)===null||r===void 0||r.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===qk)return this.state=Qk,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Qk){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Yk,this.animationStartedTime=t,this.nextAnimationUpdate(0)):gg(this.animationBegin-r)}if(this.getState()===Yk){if(this.animationStartedTime==null)throw new Error;var n=t-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=M8}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class T8 extends I8{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(li(this.getFrom(),this.getTo(),this.getProgress()))}}class D8{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,o=u=>{u-n>=r?t(u):a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!=null&&cancelAnimationFrame(a)}}}function R8(e,t){return F8(e)||z8(e,t)||$8(e,t)||L8()}function L8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $8(e,t){if(e){if(typeof e=="string")return Xk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xk(e,t):void 0}}function Xk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},Zk=0,vg=1;function fA(e){var t=Jr(e,B8),r=t.animationId,n=t.isActive,a=t.canBegin,o=t.duration,u=t.easing,c=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,m=t.children,g=sA(),v=n==="auto"?!Yu.isSsr&&!g:n,b=C8(t.animationController),j=y.useState(v?Zk:vg),k=R8(j,2),S=k[0],N=k[1];return y.useEffect(()=>{v||N(vg)},[v]),y.useEffect(()=>{var E=E8(u);if(!v||!a||E==null)return Vs;var A=new D8,P=new T8({animationId:r,easing:E,animationDuration:o,animationBegin:c,onAnimationStart:h,onAnimationEnd:f,from:Zk,to:vg});return b(A,P,N)},[b,r,v,a,o,u,c,h,f]),m(Number(S))}function hA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(bu(t)),n=y.useRef(e);return n.current!==e&&(r.current=bu(t),n.current=e),r.current}var U8=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),H8=(e,t,r)=>e.map(n=>"".concat(U8(n)," ").concat(t,"ms ").concat(r)).join(","),W8=["radius"],K8=["radius"],Jk,ej,tj,rj,nj,ij,aj,oj,sj,lj;function uj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cj(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=la(r),u=la(n),c=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,h=o>=0?1:-1,m=u>=0&&o>=0||u<0&&o<0?1:0,g;if(c>0&&Array.isArray(a)){for(var v=[0,0,0,0],b=0,j=4;bc?c:S}g=Ut(Jk||(Jk=An(["M",",",""])),e,t+f*v[0]),v[0]>0&&(g+=Ut(ej||(ej=An(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),g+=Ut(tj||(tj=An(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(g+=Ut(rj||(rj=An(["A ",",",",0,0,",`, + `,",",""])),v[1],v[1],m,e+r,t+f*v[1])),g+=Ut(nj||(nj=An(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(g+=Ut(ij||(ij=An(["A ",",",",0,0,",`, + `,",",""])),v[2],v[2],m,e+r-h*v[2],t+n)),g+=Ut(aj||(aj=An(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(g+=Ut(oj||(oj=An(["A ",",",",0,0,",`, + `,",",""])),v[3],v[3],m,e,t+n-f*v[3])),g+="Z"}else if(c>0&&a===+a&&a>0){var N=Math.min(c,a);g=Ut(sj||(sj=An(["M ",",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` - A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,m,e+h*N,t,e+r-h*N,t,N,N,m,e+r,t+f*N,e+r,t+n-f*N,N,N,m,e+r-h*N,t+n,e+h*N,t+n,N,N,m,e,t+n-f*N)}else g=Ht(cj||(cj=An(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},gj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},aF=e=>{var t=Jr(e,gj),r=y.useRef(null),n=y.useState(-1),i=eF(n,2),o=i[0],u=i[1];y.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var X=r.current.getTotalLength();X&&u(X)}catch{}},[]);var c=t.x,f=t.y,h=t.width,m=t.height,g=t.radius,v=t.className,b=t.animationEasing,j=t.animationDuration,k=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,E=y.useRef(h),A=y.useRef(m),P=y.useRef(c),_=y.useRef(f),O=y.useMemo(()=>({x:c,y:f,width:h,height:m,radius:g}),[c,f,h,m,g]),D=gA(O,"rectangle-");if(c!==+c||f!==+f||h!==+h||m!==+m||h===0||m===0)return null;var B=rt("recharts-rectangle",v);if(!N){var F=Yr(t);F.radius;var z=hj(F,q8);return y.createElement("path",Nf({},z,{x:la(c),y:la(f),width:la(h),height:la(m),radius:typeof g=="number"?g:void 0,className:B,d:pj(c,f,h,m,g)}))}var Y=E.current,U=A.current,he=P.current,ue=_.current,ge="0px ".concat(o===-1?1:o,"px"),ie="".concat(o,"px ").concat(o,"px"),se=V8(["strokeDasharray"],j,typeof b=="string"?b:gj.animationEasing);return y.createElement(pA,{animationId:D,key:D,canBegin:o>0,duration:j,easing:b,isActive:N,begin:k},X=>{var te=li(Y,h,X),J=li(U,m,X),I=li(he,c,X),M=li(ue,f,X);r.current&&(E.current=te,A.current=J,P.current=I,_.current=M);var H;S?X>0?H={transition:se,strokeDasharray:ie}:H={strokeDasharray:ge}:H={strokeDasharray:ie};var ne=Yr(t);ne.radius;var Z=hj(ne,Q8);return y.createElement("path",Nf({},Z,{radius:typeof g=="number"?g:void 0,className:B,d:pj(I,M,te,J,g),ref:r,style:fj(fj({},H),t.style)}))})};function vj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yj(e){for(var t=1;te*180/Math.PI,Gt=(e,t,r,n)=>({x:e+Math.cos(-Ef*n)*r,y:t+Math.sin(-Ef*n)*r}),cF=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},dF=(e,t)=>{var r=e.x,n=e.y,i=t.x,o=t.y;return Math.sqrt((r-i)**2+(n-o)**2)},fF=(e,t)=>{var r=e.x,n=e.y,i=t.cx,o=t.cy,u=dF({x:r,y:n},{x:i,y:o});if(u<=0)return{radius:u,angle:0};var c=(r-i)/u,f=Math.acos(c);return n>o&&(f=2*Math.PI-f),{radius:u,angle:uF(f),angleInRadian:f}},hF=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-o*360,endAngle:r-o*360}},mF=(e,t)=>{var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(i,o);return e+u*360},pF=(e,t)=>{var r=e.relativeX,n=e.relativeY,i=fF({x:r,y:n},t),o=i.radius,u=i.angle,c=t.innerRadius,f=t.outerRadius;if(of||o===0)return null;var h=hF(t),m=h.startAngle,g=h.endAngle,v=u,b;if(m<=g){for(;v>g;)v-=360;for(;v=m&&v<=g}else{for(;v>m;)v-=360;for(;v=g&&v<=m}return b?yj(yj({},t),{},{radius:o,angle:mF(v,t)}):null};function vA(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle,u=Gt(t,r,n,i),c=Gt(t,r,n,o);return{points:[u,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var xj,bj,wj,kj,jj,Sj,Nj;function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Vr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Md=e=>{var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,u=e.isExternal,c=e.cornerRadius,f=e.cornerIsExternal,h=c*(u?1:-1)+n,m=Math.asin(c/h)/Ef,g=f?i:i+o*m,v=Gt(t,r,h,g),b=Gt(t,r,n,g),j=f?i-o*m:i,k=Gt(t,r,h*Math.cos(m*Ef),j);return{center:v,circleTangency:b,lineTangency:k,theta:m}},yA=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,u=e.endAngle,c=gF(o,u),f=o+c,h=Gt(t,r,i,o),m=Gt(t,r,i,f),g=Ht(xj||(xj=Ha(["M ",",",` + A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,m,e+h*N,t,e+r-h*N,t,N,N,m,e+r,t+f*N,e+r,t+n-f*N,N,N,m,e+r-h*N,t+n,e+h*N,t+n,N,N,m,e,t+n-f*N)}else g=Ut(lj||(lj=An(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},mj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tF=e=>{var t=Jr(e,mj),r=y.useRef(null),n=y.useState(-1),a=Y8(n,2),o=a[0],u=a[1];y.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var X=r.current.getTotalLength();X&&u(X)}catch{}},[]);var c=t.x,f=t.y,h=t.width,m=t.height,g=t.radius,v=t.className,b=t.animationEasing,j=t.animationDuration,k=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,E=y.useRef(h),A=y.useRef(m),P=y.useRef(c),_=y.useRef(f),O=y.useMemo(()=>({x:c,y:f,width:h,height:m,radius:g}),[c,f,h,m,g]),D=hA(O,"rectangle-");if(c!==+c||f!==+f||h!==+h||m!==+m||h===0||m===0)return null;var B=rt("recharts-rectangle",v);if(!N){var F=Yr(t);F.radius;var z=dj(F,W8);return y.createElement("path",Sf({},z,{x:la(c),y:la(f),width:la(h),height:la(m),radius:typeof g=="number"?g:void 0,className:B,d:hj(c,f,h,m,g)}))}var Y=E.current,U=A.current,he=P.current,ue=_.current,ge="0px ".concat(o===-1?1:o,"px"),ie="".concat(o,"px ").concat(o,"px"),se=H8(["strokeDasharray"],j,typeof b=="string"?b:mj.animationEasing);return y.createElement(fA,{animationId:D,key:D,canBegin:o>0,duration:j,easing:b,isActive:N,begin:k},X=>{var te=li(Y,h,X),J=li(U,m,X),I=li(he,c,X),M=li(ue,f,X);r.current&&(E.current=te,A.current=J,P.current=I,_.current=M);var H;S?X>0?H={transition:se,strokeDasharray:ie}:H={strokeDasharray:ge}:H={strokeDasharray:ie};var ne=Yr(t);ne.radius;var Z=dj(ne,K8);return y.createElement("path",Sf({},Z,{radius:typeof g=="number"?g:void 0,className:B,d:hj(I,M,te,J,g),ref:r,style:cj(cj({},H),t.style)}))})};function pj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gj(e){for(var t=1;te*180/Math.PI,Kt=(e,t,r,n)=>({x:e+Math.cos(-Nf*n)*r,y:t+Math.sin(-Nf*n)*r}),oF=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},sF=(e,t)=>{var r=e.x,n=e.y,a=t.x,o=t.y;return Math.sqrt((r-a)**2+(n-o)**2)},lF=(e,t)=>{var r=e.x,n=e.y,a=t.cx,o=t.cy,u=sF({x:r,y:n},{x:a,y:o});if(u<=0)return{radius:u,angle:0};var c=(r-a)/u,f=Math.acos(c);return n>o&&(f=2*Math.PI-f),{radius:u,angle:aF(f),angleInRadian:f}},uF=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),a=Math.floor(r/360),o=Math.min(n,a);return{startAngle:t-o*360,endAngle:r-o*360}},cF=(e,t)=>{var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(a,o);return e+u*360},dF=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=lF({x:r,y:n},t),o=a.radius,u=a.angle,c=t.innerRadius,f=t.outerRadius;if(of||o===0)return null;var h=uF(t),m=h.startAngle,g=h.endAngle,v=u,b;if(m<=g){for(;v>g;)v-=360;for(;v=m&&v<=g}else{for(;v>m;)v-=360;for(;v=g&&v<=m}return b?gj(gj({},t),{},{radius:o,angle:cF(v,t)}):null};function mA(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,u=Kt(t,r,n,a),c=Kt(t,r,n,o);return{points:[u,c],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}var vj,yj,xj,bj,wj,kj,jj;function Bv(){return Bv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Vr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Md=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,o=e.sign,u=e.isExternal,c=e.cornerRadius,f=e.cornerIsExternal,h=c*(u?1:-1)+n,m=Math.asin(c/h)/Nf,g=f?a:a+o*m,v=Kt(t,r,h,g),b=Kt(t,r,n,g),j=f?a-o*m:a,k=Kt(t,r,h*Math.cos(m*Nf),j);return{center:v,circleTangency:b,lineTangency:k,theta:m}},pA=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.startAngle,u=e.endAngle,c=fF(o,u),f=o+c,h=Kt(t,r,a,o),m=Kt(t,r,a,f),g=Ut(vj||(vj=Ha(["M ",",",` A `,",",`,0, `,",",`, `,",",` - `])),h.x,h.y,i,i,+(Math.abs(c)>180),+(o>f),m.x,m.y);if(n>0){var v=Gt(t,r,n,o),b=Gt(t,r,n,f);g+=Ht(bj||(bj=Ha(["L ",",",` + `])),h.x,h.y,a,a,+(Math.abs(c)>180),+(o>f),m.x,m.y);if(n>0){var v=Kt(t,r,n,o),b=Kt(t,r,n,f);g+=Ut(yj||(yj=Ha(["L ",",",` A `,",",`,0, `,",",`, - `,","," Z"])),b.x,b.y,n,n,+(Math.abs(c)>180),+(o<=f),v.x,v.y)}else g+=Ht(wj||(wj=Ha(["L ",","," Z"])),t,r);return g},vF=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,u=e.forceCornerRadius,c=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,m=Vr(h-f),g=Md({cx:t,cy:r,radius:i,angle:f,sign:m,cornerRadius:o,cornerIsExternal:c}),v=g.circleTangency,b=g.lineTangency,j=g.theta,k=Md({cx:t,cy:r,radius:i,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:c}),S=k.circleTangency,N=k.lineTangency,E=k.theta,A=c?Math.abs(f-h):Math.abs(f-h)-j-E;if(A<0)return u?Ht(kj||(kj=Ha(["M ",",",` + `,","," Z"])),b.x,b.y,n,n,+(Math.abs(c)>180),+(o<=f),v.x,v.y)}else g+=Ut(xj||(xj=Ha(["L ",","," Z"])),t,r);return g},hF=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,u=e.forceCornerRadius,c=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,m=Vr(h-f),g=Md({cx:t,cy:r,radius:a,angle:f,sign:m,cornerRadius:o,cornerIsExternal:c}),v=g.circleTangency,b=g.lineTangency,j=g.theta,k=Md({cx:t,cy:r,radius:a,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:c}),S=k.circleTangency,N=k.lineTangency,E=k.theta,A=c?Math.abs(f-h):Math.abs(f-h)-j-E;if(A<0)return u?Ut(bj||(bj=Ha(["M ",",",` a`,",",",0,0,1,",`,0 a`,",",",0,0,1,",`,0 - `])),b.x,b.y,o,o,o*2,o,o,-o*2):yA({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var P=Ht(jj||(jj=Ha(["M ",",",` + `])),b.x,b.y,o,o,o*2,o,o,-o*2):pA({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:f,endAngle:h});var P=Ut(wj||(wj=Ha(["M ",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",",` - `])),b.x,b.y,o,o,+(m<0),v.x,v.y,i,i,+(A>180),+(m<0),S.x,S.y,o,o,+(m<0),N.x,N.y);if(n>0){var _=Md({cx:t,cy:r,radius:n,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=_.circleTangency,D=_.lineTangency,B=_.theta,F=Md({cx:t,cy:r,radius:n,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),z=F.circleTangency,Y=F.lineTangency,U=F.theta,he=c?Math.abs(f-h):Math.abs(f-h)-B-U;if(he<0&&o===0)return"".concat(P,"L").concat(t,",").concat(r,"Z");P+=Ht(Sj||(Sj=Ha(["L",",",` + `])),b.x,b.y,o,o,+(m<0),v.x,v.y,a,a,+(A>180),+(m<0),S.x,S.y,o,o,+(m<0),N.x,N.y);if(n>0){var _=Md({cx:t,cy:r,radius:n,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=_.circleTangency,D=_.lineTangency,B=_.theta,F=Md({cx:t,cy:r,radius:n,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),z=F.circleTangency,Y=F.lineTangency,U=F.theta,he=c?Math.abs(f-h):Math.abs(f-h)-B-U;if(he<0&&o===0)return"".concat(P,"L").concat(t,",").concat(r,"Z");P+=Ut(kj||(kj=Ha(["L",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` - A`,",",",0,0,",",",",","Z"])),Y.x,Y.y,o,o,+(m<0),z.x,z.y,n,n,+(he>180),+(m>0),O.x,O.y,o,o,+(m<0),D.x,D.y)}else P+=Ht(Nj||(Nj=Ha(["L",",","Z"])),t,r);return P},yF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xF=e=>{var t=Jr(e,yF),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,g=t.className;if(o0&&Math.abs(h-m)<360?k=vF({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(j,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:m}):k=yA({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m}),y.createElement("path",Hv({},Yr(t),{className:v,d:k}))};function bF(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(J5(t)){if(e==="centric"){var n=t.cx,i=t.cy,o=t.innerRadius,u=t.outerRadius,c=t.angle,f=Gt(n,i,o,c),h=Gt(n,i,u,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return vA(t)}}function wF(e){return hE(e)?NaN:Number(e)}function xg(e){return e?(e=wF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function xA(e,t,r){r&&typeof r!="number"&&jv(e,t,r)&&(t=r=void 0),e=xg(e),t===void 0?(t=e,e=0):t=xg(t),r=r===void 0?ee.chartData,Ky=q([bn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Mh=(e,t,r,n)=>n?Ky(e):bn(e),kF=(e,t,r)=>r?Ky(e):bn(e),jF=q([Mh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});q([Ky],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var SF=q([bn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Gy(e,t){return CF(e)||AF(e,t)||EF(e,t)||NF()}function NF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EF(e,t){if(e){if(typeof e=="string")return Ej(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ej(e,t):void 0}}function Ej(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*st;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(e){return fi(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return Je(fi(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return kt(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Tr))throw Error(Zr+"NaN");if(r.s<1)throw Error(Zr+(r.s?"NaN":"-Infinity"));return r.eq(Tr)?new n(0):(ut=!1,t=fi(Au(r,o),Au(e,o),o),ut=!0,Je(t,i))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?SA(t,e):kA(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Zr+"NaN");return r.s?(ut=!1,t=fi(r,e,0,1).times(e),ut=!0,r.minus(t)):Je(new n(r),i)};be.naturalExponential=be.exp=function(){return jA(this)};be.naturalLogarithm=be.ln=function(){return Au(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?kA(t,e):SA(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(io+e);if(t=kt(i)+1,n=i.d.length-1,r=n*st+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,i,o,u,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(Zr+"NaN")}for(e=kt(c),ut=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=Dn(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ys((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=u=r+3;;)if(o=n,n=o.plus(fi(c,o,u+2)).times(.5),Dn(o.d).slice(0,u)===(t=Dn(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),i==u&&t=="4999"){if(Je(o,r+1,0),o.times(o).eq(c)){n=o;break}}else if(t!="9999")break;u+=4}return ut=!0,Je(n,r)};be.times=be.mul=function(e){var t,r,n,i,o,u,c,f,h,m=this,g=m.constructor,v=m.d,b=(e=new g(e)).d;if(!m.s||!e.s)return new g(0);for(e.s*=m.s,r=m.e+e.e,f=v.length,h=b.length,f=0;){for(t=0,i=f+n;i>n;)c=o[i]+b[n]*v[i-n-1]+t,o[i--]=c%Tt|0,t=c/Tt|0;o[i]=(o[i]+t)%Tt|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ut?Je(e,g.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Hn(e,0,Qs),t===void 0?t=n.rounding:Hn(t,0,8),Je(r,e+kt(r)+1,t))};be.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=mo(n,!0):(Hn(e,0,Qs),t===void 0?t=i.rounding:Hn(t,0,8),n=Je(new i(n),e+1,t),r=mo(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?mo(i):(Hn(e,0,Qs),t===void 0?t=o.rounding:Hn(t,0,8),n=Je(new o(i),e+kt(i)+1,t),r=mo(n.abs(),!1,e+kt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return Je(new t(e),kt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,i,o,u,c=this,f=c.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(Tr);if(c=new f(c),!c.s){if(e.s<1)throw Error(Zr+"Infinity");return c}if(c.eq(Tr))return c;if(n=f.precision,e.eq(Tr))return Je(c,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=c.s,u){if((r=m<0?-m:m)<=wA){for(i=new f(Tr),t=Math.ceil(n/st+4),ut=!1;r%2&&(i=i.times(c),Pj(i.d,t)),r=Ys(r/2),r!==0;)c=c.times(c),Pj(c.d,t);return ut=!0,e.s<0?new f(Tr).div(i):Je(i,n)}}else if(o<0)throw Error(Zr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,ut=!1,i=e.times(Au(c,n+h)),ut=!0,i=jA(i),i.s=o,i};be.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=kt(i),n=mo(i,r<=o.toExpNeg||r>=o.toExpPos)):(Hn(e,1,Qs),t===void 0?t=o.rounding:Hn(t,0,8),i=Je(new o(i),e,t),r=kt(i),n=mo(i,e<=r||r<=o.toExpNeg,e)),n};be.toSignificantDigits=be.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Hn(e,1,Qs),t===void 0?t=n.rounding:Hn(t,0,8)),Je(new n(r),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=kt(e),r=e.constructor;return mo(e,t<=r.toExpNeg||t>=r.toExpPos)};function kA(e,t){var r,n,i,o,u,c,f,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),ut?Je(t,g):t;if(f=e.d,h=t.d,u=e.e,i=t.e,f=f.slice(),o=u-i,o){for(o<0?(n=f,o=-o,c=h.length):(n=h,i=u,c=f.length),u=Math.ceil(g/st),c=u>c?u+1:c+1,o>c&&(o=c,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(c=f.length,o=h.length,c-o<0&&(o=c,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Tt|0,f[o]%=Tt;for(r&&(f.unshift(r),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,ut?Je(t,g):t}function Hn(e,t,r){if(e!==~~e||er)throw Error(io+e)}function Dn(e){var t,r,n,i=e.length-1,o="",u=e[0];if(i>0){for(o+=u,t=1;tu?1:-1;else for(c=f=0;ci[c]?1:-1;break}return f}function r(n,i,o){for(var u=0;o--;)n[o]-=u,u=n[o]1;)n.shift()}return function(n,i,o,u){var c,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,D,B,F=n.constructor,z=n.s==i.s?1:-1,Y=n.d,U=i.d;if(!n.s)return new F(n);if(!i.s)throw Error(Zr+"Division by zero");for(f=n.e-i.e,D=U.length,_=Y.length,b=new F(z),j=b.d=[],h=0;U[h]==(Y[h]||0);)++h;if(U[h]>(Y[h]||0)&&--f,o==null?E=o=F.precision:u?E=o+(kt(n)-kt(i))+1:E=o,E<0)return new F(0);if(E=E/st+2|0,h=0,D==1)for(m=0,U=U[0],E++;(h<_||m)&&E--;h++)A=m*Tt+(Y[h]||0),j[h]=A/U|0,m=A%U|0;else{for(m=Tt/(U[0]+1)|0,m>1&&(U=e(U,m),Y=e(Y,m),D=U.length,_=Y.length),P=D,k=Y.slice(0,D),S=k.length;S=Tt/2&&++O;do m=0,c=t(U,k,D,S),c<0?(N=k[0],D!=S&&(N=N*Tt+(k[1]||0)),m=N/O|0,m>1?(m>=Tt&&(m=Tt-1),g=e(U,m),v=g.length,S=k.length,c=t(g,k,v,S),c==1&&(m--,r(g,D16)throw Error(Vy+kt(e));if(!e.s)return new m(Tr);for(ut=!1,c=g,u=new m(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(Fa(2,h))/Math.LN10*2+5|0,c+=n,r=i=o=new m(Tr),m.precision=c;;){if(i=Je(i.times(e),c),r=r.times(++f),u=o.plus(fi(i,r,c)),Dn(u.d).slice(0,c)===Dn(o.d).slice(0,c)){for(;h--;)o=Je(o.times(o),c);return m.precision=g,t==null?(ut=!0,Je(o,g)):o}o=u}}function kt(e){for(var t=e.e*st,r=e.d[0];r>=10;r/=10)t++;return t}function bg(e,t,r){if(t>e.LN10.sd())throw ut=!0,r&&(e.precision=r),Error(Zr+"LN10 precision limit exceeded");return Je(new e(e.LN10),t)}function Xi(e){for(var t="";e--;)t+="0";return t}function Au(e,t){var r,n,i,o,u,c,f,h,m,g=1,v=10,b=e,j=b.d,k=b.constructor,S=k.precision;if(b.s<1)throw Error(Zr+(b.s?"NaN":"-Infinity"));if(b.eq(Tr))return new k(0);if(t==null?(ut=!1,h=S):h=t,b.eq(10))return t==null&&(ut=!0),bg(k,h);if(h+=v,k.precision=h,r=Dn(j),n=r.charAt(0),o=kt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Dn(b.d),n=r.charAt(0),g++;o=kt(b),n>1?(b=new k("0."+r),o++):b=new k(n+"."+r.slice(1))}else return f=bg(k,h+2,S).times(o+""),b=Au(new k(n+"."+r.slice(1)),h-v).plus(f),k.precision=S,t==null?(ut=!0,Je(b,S)):b;for(c=u=b=fi(b.minus(Tr),b.plus(Tr),h),m=Je(b.times(b),h),i=3;;){if(u=Je(u.times(m),h),f=c.plus(fi(u,new k(i),h)),Dn(f.d).slice(0,h)===Dn(c.d).slice(0,h))return c=c.times(2),o!==0&&(c=c.plus(bg(k,h+2,S).times(o+""))),c=fi(c,new k(g),h),k.precision=S,t==null?(ut=!0,Je(c,S)):c;c=f,i+=2}}function Cj(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ys(r/st),e.d=[],n=(r+1)%st,r<0&&(n+=st),nAf||e.e<-Af))throw Error(Vy+r)}else e.s=0,e.e=0,e.d=[0];return e}function Je(e,t,r){var n,i,o,u,c,f,h,m,g=e.d;for(u=1,o=g[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=st,i=t,h=g[m=0];else{if(m=Math.ceil((n+1)/st),o=g.length,m>=o)return e;for(h=o=g[m],u=1;o>=10;o/=10)u++;n%=st,i=n-st+u}if(r!==void 0&&(o=Fa(10,u-i-1),c=h/o%10|0,f=t<0||g[m+1]!==void 0||h%o,f=r<4?(c||f)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||f||r==6&&(n>0?i>0?h/Fa(10,u-i):0:g[m-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=kt(e),g.length=1,t=t-o-1,g[0]=Fa(10,(st-t%st)%st),e.e=Ys(-t/st)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=m,o=1,m--):(g.length=m+1,o=Fa(10,st-n),g[m]=i>0?(h/Fa(10,u-i)%Fa(10,i)|0)*o:0),f)for(;;)if(m==0){(g[0]+=o)==Tt&&(g[0]=1,++e.e);break}else{if(g[m]+=o,g[m]!=Tt)break;g[m--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(ut&&(e.e>Af||e.e<-Af))throw Error(Vy+kt(e));return e}function SA(e,t){var r,n,i,o,u,c,f,h,m,g,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ut?Je(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(m=u<0,m?(r=f,u=-u,c=g.length):(r=g,n=h,c=f.length),i=Math.max(Math.ceil(b/st),c)+2,u>i&&(u=i,r.length=1),r.reverse(),i=u;i--;)r.push(0);r.reverse()}else{for(i=f.length,c=g.length,m=i0;--i)f[c++]=0;for(i=g.length;i>u;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Xi(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Xi(-i-1)+o,r&&(n=r-u)>0&&(o+=Xi(n))):i>=u?(o+=Xi(i+1-u),r&&(n=r-i-1)>0&&(o=o+"."+Xi(n))):((n=i+1)0&&(i+1===u&&(o+="."),o+=Xi(n))),e.s<0?"-"+o:o}function Pj(e,t){if(e.length>t)return e.length=t,!0}function NA(e){var t,r,n;function i(o){var u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,o instanceof i){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(io+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return Cj(u,o.toString())}else if(typeof o!="string")throw Error(io+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,_F.test(o))Cj(u,o);else throw Error(io+o)}if(i.prototype=be,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=NA,i.config=i.set=MF,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(io+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(io+r+": "+n);return this}var qy=NA(OF);Tr=new qy(1);const Ke=qy;function EA(e){var t;return e===0?t=1:t=Math.floor(new Ke(e).abs().log(10).toNumber())+1,t}function AA(e,t,r){for(var n=new Ke(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}function Cu(e,t){return RF(e)||DF(e,t)||TF(e,t)||IF()}function IF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TF(e,t){if(e){if(typeof e=="string")return Oj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Oj(e,t):void 0}}function Oj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=Cu(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]},Qy=(e,t,r)=>{if(e.lte(0))return new Ke(0);var n=EA(e.toNumber()),i=new Ke(10).pow(n),o=e.div(i),u=n!==1?.05:.1,c=new Ke(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=c.mul(i);return t?new Ke(f.toNumber()):new Ke(Math.ceil(f.toNumber()))},PA=(e,t,r)=>{var n;if(e.lte(0))return new Ke(0);var i=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new Ke(o).abs().log(10).toNumber()),c=new Ke(10).pow(u),f=e.div(c).toNumber(),h=i.findIndex(b=>b>=f-1e-10);if(h===-1&&(c=c.mul(10),h=0),h+=r,h>=i.length){var m=Math.floor(h/i.length);h%=i.length,c=c.mul(new Ke(10).pow(m))}var g=(n=i[h])!==null&&n!==void 0?n:1,v=new Ke(g).mul(c);return t?v:new Ke(Math.ceil(v.toNumber()))},LF=(e,t,r)=>{var n=new Ke(1),i=new Ke(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Ke(10).pow(EA(e)-1),i=new Ke(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Ke(Math.floor(e)))}else e===0?i=new Ke(Math.floor((t-1)/2)):r||(i=new Ke(Math.floor(e)));for(var u=Math.floor((t-1)/2),c=[],f=0;f4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Qy;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ke(0),tickMin:new Ke(0),tickMax:new Ke(0)};var c=u(new Ke(r).sub(t).div(n-1),i,o),f;t<=0&&r>=0?f=new Ke(0):(f=new Ke(t).add(r).div(2),f=f.sub(new Ke(f).mod(c)));var h=Math.ceil(f.sub(t).div(c).toNumber()),m=Math.ceil(new Ke(r).sub(f).div(c).toNumber()),g=h+m+1;return g>n?OA(t,r,n,i,o+1,u):(g0?m+(n-g):m,h=r>0?h:h+(n-g)),{step:c,tickMin:f.sub(new Ke(h).mul(c)),tickMax:f.add(new Ke(m).mul(c))})},_j=function(t){var r=Cu(t,2),n=r[0],i=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=CA([n,i]),m=Cu(h,2),g=m[0],v=m[1];if(g===-1/0||v===1/0){var b=v===1/0?[g,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>i?b.reverse():b}if(g===v)return LF(g,o,u);var j=c==="snap125"?PA:Qy,k=OA(g,v,f,u,0,j),S=k.step,N=k.tickMin,E=k.tickMax,A=AA(N,E.add(new Ke(.1).mul(S)),S);return n>i?A.reverse():A},Mj=function(t,r){var n=Cu(t,2),i=n[0],o=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=CA([i,o]),h=Cu(f,2),m=h[0],g=h[1];if(m===-1/0||g===1/0)return[i,o];if(m===g)return[m];var v=c==="snap125"?PA:Qy,b=Math.max(r,2),j=v(new Ke(g).sub(m).div(b-1),u,0),k=[...AA(new Ke(m),new Ke(g),j),g];return u===!1&&(k=k.map(S=>Math.round(S))),i>o?k.reverse():k},$F=e=>e.rootProps.barCategoryGap,Ih=e=>e.rootProps.stackOffset,_A=e=>e.rootProps.reverseStackOrder,Yy=e=>e.options.chartName,Xy=e=>e.rootProps.syncId,MA=e=>e.rootProps.syncMethod,Zy=e=>e.options.eventEmitter,zF=e=>e.rootProps.baseValue,dr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ma={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Cn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Th=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Dh(e,t,r){if(r!=="auto")return r;if(e!=null)return Gn(e,t)?"category":"number"}function Ij(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cf(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},Jy=q([HF,rA],(e,t)=>{var r;if(e!=null)return e;var n=(r=Dh(t,"angleAxis",Tj.type))!==null&&r!==void 0?r:"category";return Cf(Cf({},Tj),{},{type:n})}),WF=(e,t)=>e.polarAxis.radiusAxis[t],e0=q([WF,rA],(e,t)=>{var r;if(e!=null)return e;var n=(r=Dh(t,"radiusAxis",Dj.type))!==null&&r!==void 0?r:"category";return Cf(Cf({},Dj),{},{type:n})}),Rh=e=>e.polarOptions,t0=q([xi,bi,Qt],cF),IA=q([Rh,t0],(e,t)=>{if(e!=null)return pa(e.innerRadius,t,0)}),TA=q([Rh,t0],(e,t)=>{if(e!=null)return pa(e.outerRadius,t,t*.8)}),KF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},DA=q([Rh],KF);q([Jy,DA],Th);var RA=q([t0,IA,TA],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});q([e0,RA],Th);var LA=q([ct,Rh,IA,TA,xi,bi],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,c=t.cy,f=t.startAngle,h=t.endAngle;return{cx:pa(u,i,i/2),cy:pa(c,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Lt=(e,t)=>t,Lh=(e,t,r)=>r;function r0(e){return e==null?void 0:e.id}function $A(e,t,r){var n=t.chartData,i=n===void 0?[]:n,o=r.allowDuplicatedCategory,u=r.dataKey,c=new Map;return e.forEach(f=>{var h,m=(h=f.data)!==null&&h!==void 0?h:i;if(!(m==null||m.length===0)){var g=r0(f);m.forEach((v,b)=>{var j=u==null||o?b:String(Dt(v,u,null)),k=Dt(v,f.dataKey,0),S;c.has(j)?S=c.get(j):S={},Object.assign(S,{[g]:k}),c.set(j,S)})}}),Array.from(c.values())}function n0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var $h=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function zh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function GF(e,t){if(e.length===t.length){for(var r=0;r{var t=ct(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Xs=e=>e.tooltip.settings.axisId;function i0(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var u=i[0],c=i[1];return u<=c?o>=u&&o<=c:o>=c&&o<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var c=e(o);if(c!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var VF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Rn(t)){for(var r,n,i=0;in)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function da(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function qF(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function a0(e){let t,r,n;e.length!==2?(t=da,r=(c,f)=>da(e(c),f),n=(c,f)=>e(c)-f):(t=e===da||e===qF?e:QF,r=e,n=e);function i(c,f,h=0,m=c.length){if(h>>1;r(c[g],f)<0?h=g+1:m=g}while(h>>1;r(c[g],f)<=0?h=g+1:m=g}while(hh&&n(c[g-1],f)>-n(c[g],f)?g-1:g}return{left:i,center:u,right:o}}function QF(){return 0}function zA(e){return e===null?NaN:+e}function*YF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const XF=a0(da),Xu=XF.right;a0(zA).center;class Rj extends Map{constructor(t,r=e9){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Lj(this,t))}has(t){return super.has(Lj(this,t))}set(t,r){return super.set(ZF(this,t),r)}delete(t){return super.delete(JF(this,t))}}function Lj({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function ZF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function JF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function e9(e){return e!==null&&typeof e=="object"?e.valueOf():e}function t9(e=da){if(e===da)return FA;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function FA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const r9=Math.sqrt(50),n9=Math.sqrt(10),i9=Math.sqrt(2);function Pf(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),u=o>=r9?10:o>=n9?5:o>=i9?2:1;let c,f,h;return i<0?(h=Math.pow(10,-i)/u,c=Math.round(e*h),f=Math.round(t*h),c/ht&&--f,h=-h):(h=Math.pow(10,i)*u,c=Math.round(e/h),f=Math.round(t/h),c*ht&&--f),f0))return[];if(e===t)return[e];const n=t=i))return[];const c=o-i+1,f=new Array(c);if(n)if(u<0)for(let h=0;h=n)&&(r=n);return r}function zj(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function BA(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?FA:t9(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,m=Math.log(f),g=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*g*(f-g)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*g/f+v)),j=Math.min(n,Math.floor(t+(f-h)*g/f+v));BA(e,t,b,j,i)}const o=e[t];let u=r,c=n;for(Xl(e,r,t),i(e[n],o)>0&&Xl(e,r,n);u0;)--c}i(e[r],o)===0?Xl(e,r,c):(++c,Xl(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function Xl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function a9(e,t,r){if(e=Float64Array.from(YF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return zj(e);if(t>=1)return $j(e);var n,i=(n-1)*t,o=Math.floor(i),u=$j(BA(e,o).subarray(0,o+1)),c=zj(e.subarray(o+1));return u+(c-u)*(i-o)}}function o9(e,t,r=zA){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),u=+r(e[o],o,e),c=+r(e[o+1],o+1,e);return u+(c-u)*(i-o)}}function s9(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Id(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Id(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=c9.exec(e))?new Sr(t[1],t[2],t[3],1):(t=d9.exec(e))?new Sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=f9.exec(e))?Id(t[1],t[2],t[3],t[4]):(t=h9.exec(e))?Id(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=m9.exec(e))?Gj(t[1],t[2]/100,t[3]/100,1):(t=p9.exec(e))?Gj(t[1],t[2]/100,t[3]/100,t[4]):Fj.hasOwnProperty(e)?Hj(Fj[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function Hj(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function Id(e,t,r,n){return n<=0&&(e=t=r=NaN),new Sr(e,t,r,n)}function y9(e){return e instanceof Zu||(e=_u(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function qv(e,t,r,n){return arguments.length===1?y9(e):new Sr(e,t,r,n??1)}function Sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}l0(Sr,qv,HA(Zu,{brighter(e){return e=e==null?Of:Math.pow(Of,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pu:Math.pow(Pu,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(ao(this.r),ao(this.g),ao(this.b),_f(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Wj,formatHex:Wj,formatHex8:x9,formatRgb:Kj,toString:Kj}));function Wj(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}`}function x9(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}${Wa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kj(){const e=_f(this.opacity);return`${e===1?"rgb(":"rgba("}${ao(this.r)}, ${ao(this.g)}, ${ao(this.b)}${e===1?")":`, ${e})`}`}function _f(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ao(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wa(e){return e=ao(e),(e<16?"0":"")+e.toString(16)}function Gj(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new mn(e,t,r,n)}function WA(e){if(e instanceof mn)return new mn(e.h,e.s,e.l,e.opacity);if(e instanceof Zu||(e=_u(e)),!e)return new mn;if(e instanceof mn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,c=o-i,f=(o+i)/2;return c?(t===o?u=(r-n)/c+(r0&&f<1?0:u,new mn(u,c,f,e.opacity)}function b9(e,t,r,n){return arguments.length===1?WA(e):new mn(e,t,r,n??1)}function mn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}l0(mn,b9,HA(Zu,{brighter(e){return e=e==null?Of:Math.pow(Of,e),new mn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pu:Math.pow(Pu,e),new mn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Sr(wg(e>=240?e-240:e+120,i,n),wg(e,i,n),wg(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new mn(Vj(this.h),Td(this.s),Td(this.l),_f(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=_f(this.opacity);return`${e===1?"hsl(":"hsla("}${Vj(this.h)}, ${Td(this.s)*100}%, ${Td(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Vj(e){return e=(e||0)%360,e<0?e+360:e}function Td(e){return Math.max(0,Math.min(1,e||0))}function wg(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const u0=e=>()=>e;function w9(e,t){return function(r){return e+r*t}}function k9(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function j9(e){return(e=+e)==1?KA:function(t,r){return r-t?k9(t,r,e):u0(isNaN(t)?r:t)}}function KA(e,t){var r=t-e;return r?w9(e,r):u0(isNaN(e)?t:e)}const qj=(function e(t){var r=j9(t);function n(i,o){var u=r((i=qv(i)).r,(o=qv(o)).r),c=r(i.g,o.g),f=r(i.b,o.b),h=KA(i.opacity,o.opacity);return function(m){return i.r=u(m),i.g=c(m),i.b=f(m),i.opacity=h(m),i+""}}return n.gamma=e,n})(1);function S9(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;ir&&(o=t.slice(r,o),c[u]?c[u]+=o:c[++u]=o),(n=n[0])===(i=i[0])?c[u]?c[u]+=i:c[++u]=i:(c[++u]=null,f.push({i:u,x:Mf(n,i)})),r=kg.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function D9(e,t,r){var n=e[0],i=e[1],o=t[0],u=t[1];return i2?R9:D9,f=h=null,g}function g(v){return v==null||isNaN(v=+v)?o:(f||(f=c(e.map(n),t,r)))(n(u(v)))}return g.invert=function(v){return u(i((h||(h=c(t,e.map(n),Mf)))(v)))},g.domain=function(v){return arguments.length?(e=Array.from(v,If),m()):e.slice()},g.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},g.rangeRound=function(v){return t=Array.from(v),r=c0,m()},g.clamp=function(v){return arguments.length?(u=v?!0:fr,m()):u!==fr},g.interpolate=function(v){return arguments.length?(r=v,m()):r},g.unknown=function(v){return arguments.length?(o=v,g):o},function(v,b){return n=v,i=b,m()}}function d0(){return Fh()(fr,fr)}function L9(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Tf(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $s(e){return e=Tf(Math.abs(e)),e?e[1]:NaN}function $9(e,t){return function(r,n){for(var i=r.length,o=[],u=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>n&&(c=Math.max(1,n-f)),o.push(r.substring(i-=c,i+c)),!((f+=c+1)>n));)c=e[u=(u+1)%e.length];return o.reverse().join(t)}}function z9(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var F9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mu(e){if(!(t=F9.exec(e)))throw new Error("invalid format: "+e);var t;return new f0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Mu.prototype=f0.prototype;function f0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}f0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function B9(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Df;function U9(e,t){var r=Tf(e,t);if(!r)return Df=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Df=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Tf(e,Math.max(0,t+o-1))[0]}function Yj(e,t){var r=Tf(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const Xj={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:L9,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Yj(e*100,t),r:Yj,s:U9,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Zj(e){return e}var Jj=Array.prototype.map,eS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function H9(e){var t=e.grouping===void 0||e.thousands===void 0?Zj:$9(Jj.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Zj:z9(Jj.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,v){g=Mu(g);var b=g.fill,j=g.align,k=g.sign,S=g.symbol,N=g.zero,E=g.width,A=g.comma,P=g.precision,_=g.trim,O=g.type;O==="n"?(A=!0,O="g"):Xj[O]||(P===void 0&&(P=12),_=!0,O="g"),(N||b==="0"&&j==="=")&&(N=!0,b="0",j="=");var D=(v&&v.prefix!==void 0?v.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),B=(S==="$"?n:/[%p]/.test(O)?u:"")+(v&&v.suffix!==void 0?v.suffix:""),F=Xj[O],z=/[defgprs%]/.test(O);P=P===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function Y(U){var he=D,ue=B,ge,ie,se;if(O==="c")ue=F(U)+ue,U="";else{U=+U;var X=U<0||1/U<0;if(U=isNaN(U)?f:F(Math.abs(U),P),_&&(U=B9(U)),X&&+U==0&&k!=="+"&&(X=!1),he=(X?k==="("?k:c:k==="-"||k==="("?"":k)+he,ue=(O==="s"&&!isNaN(U)&&Df!==void 0?eS[8+Df/3]:"")+ue+(X&&k==="("?")":""),z){for(ge=-1,ie=U.length;++gese||se>57){ue=(se===46?i+U.slice(ge+1):U.slice(ge))+ue,U=U.slice(0,ge);break}}}A&&!N&&(U=t(U,1/0));var te=he.length+U.length+ue.length,J=te>1)+he+U+ue+J.slice(te);break;default:U=J+he+U+ue;break}return o(U)}return Y.toString=function(){return g+""},Y}function m(g,v){var b=Math.max(-8,Math.min(8,Math.floor($s(v)/3)))*3,j=Math.pow(10,-b),k=h((g=Mu(g),g.type="f",g),{suffix:eS[8+b/3]});return function(S){return k(j*S)}}return{format:h,formatPrefix:m}}var Dd,h0,GA;W9({thousands:",",grouping:[3],currency:["$",""]});function W9(e){return Dd=H9(e),h0=Dd.format,GA=Dd.formatPrefix,Dd}function K9(e){return Math.max(0,-$s(Math.abs(e)))}function G9(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($s(t)/3)))*3-$s(Math.abs(e)))}function V9(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$s(t)-$s(e))+1}function VA(e,t,r,n){var i=Gv(e,t,r),o;switch(n=Mu(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=G9(i,u))&&(n.precision=o),GA(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=V9(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=K9(i))&&(n.precision=o-(n.type==="%")*2);break}}return h0(n)}function ga(e){var t=e.domain;return e.ticks=function(r){var n=t();return Wv(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return VA(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,u=n[i],c=n[o],f,h,m=10;for(c0;){if(h=Kv(u,c,r),h===f)return n[i]=u,n[o]=c,t(n);if(h>0)u=Math.floor(u/h)*h,c=Math.ceil(c/h)*h;else if(h<0)u=Math.ceil(u*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function qA(){var e=d0();return e.copy=function(){return Ju(e,qA())},en.apply(e,arguments),ga(e)}function QA(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,If),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return QA(e).unknown(t)},e=arguments.length?Array.from(e,If):[0,1],ga(r)}function YA(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],u;return oMath.pow(e,t)}function Z9(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function nS(e){return(t,r)=>-e(-t,r)}function m0(e){const t=e(tS,rS),r=t.domain;let n=10,i,o;function u(){return i=Z9(n),o=X9(n),r()[0]<0?(i=nS(i),o=nS(o),e(q9,Q9)):e(tS,rS),t}return t.base=function(c){return arguments.length?(n=+c,u()):n},t.domain=function(c){return arguments.length?(r(c),u()):r()},t.ticks=c=>{const f=r();let h=f[0],m=f[f.length-1];const g=m0){for(;v<=b;++v)for(j=1;jm)break;N.push(k)}}else for(;v<=b;++v)for(j=n-1;j>=1;--j)if(k=v>0?j/o(-v):j*o(v),!(km)break;N.push(k)}N.length*2{if(c==null&&(c=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Mu(f)).precision==null&&(f.trim=!0),f=h0(f)),c===1/0)return f;const h=Math.max(1,n*c/t.ticks().length);return m=>{let g=m/o(Math.round(i(m)));return g*nr(YA(r(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function XA(){const e=m0(Fh()).domain([1,10]);return e.copy=()=>Ju(e,XA()).base(e.base()),en.apply(e,arguments),e}function iS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function aS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function p0(e){var t=1,r=e(iS(t),aS(t));return r.constant=function(n){return arguments.length?e(iS(t=+n),aS(t)):t},ga(r)}function ZA(){var e=p0(Fh());return e.copy=function(){return Ju(e,ZA()).constant(e.constant())},en.apply(e,arguments)}function oS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function J9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function e7(e){return e<0?-e*e:e*e}function g0(e){var t=e(fr,fr),r=1;function n(){return r===1?e(fr,fr):r===.5?e(J9,e7):e(oS(r),oS(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ga(t)}function v0(){var e=g0(Fh());return e.copy=function(){return Ju(e,v0()).exponent(e.exponent())},en.apply(e,arguments),e}function t7(){return v0.apply(null,arguments).exponent(.5)}function sS(e){return Math.sign(e)*e*e}function r7(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function JA(){var e=d0(),t=[0,1],r=!1,n;function i(o){var u=r7(e(o));return isNaN(u)?n:r?Math.round(u):u}return i.invert=function(o){return e.invert(sS(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,If)).map(sS)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return JA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},en.apply(i,arguments),ga(i)}function eC(){var e=[],t=[],r=[],n;function i(){var u=0,c=Math.max(1,t.length);for(r=new Array(c-1);++u0?r[c-1]:e[0],c=r?[n[r-1],t]:[n[h-1],n[h]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return tC().domain([e,t]).range(i).unknown(o)},en.apply(ga(u),arguments)}function rC(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[Xu(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return rC().domain(e).range(t).unknown(r)},en.apply(i,arguments)}const jg=new Date,Sg=new Date;function Ct(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const u=i(o),c=i.ceil(o);return o-u(t(o=new Date(+o),u==null?1:Math.floor(u)),o),i.range=(o,u,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o0))return f;let h;do f.push(h=new Date(+o)),t(o,c),e(o);while(hCt(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,c)=>{if(u>=u)if(c<0)for(;++c<=0;)for(;t(u,-1),!o(u););else for(;--c>=0;)for(;t(u,1),!o(u););}),r&&(i.count=(o,u)=>(jg.setTime(+o),Sg.setTime(+u),e(jg),e(Sg),Math.floor(r(jg,Sg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?u=>n(u)%o===0:u=>i.count(0,u)%o===0):i)),i}const Rf=Ct(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Rf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ct(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Rf);Rf.range;const ui=1e3,Qr=ui*60,ci=Qr*60,pi=ci*24,y0=pi*7,lS=pi*30,Ng=pi*365,Ka=Ct(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ui)},(e,t)=>(t-e)/ui,e=>e.getUTCSeconds());Ka.range;const x0=Ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui)},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getMinutes());x0.range;const b0=Ct(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getUTCMinutes());b0.range;const w0=Ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui-e.getMinutes()*Qr)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getHours());w0.range;const k0=Ct(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getUTCHours());k0.range;const ec=Ct(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qr)/pi,e=>e.getDate()-1);ec.range;const Bh=Ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/pi,e=>e.getUTCDate()-1);Bh.range;const nC=Ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/pi,e=>Math.floor(e/pi));nC.range;function wo(e){return Ct(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Qr)/y0)}const Uh=wo(0),Lf=wo(1),n7=wo(2),i7=wo(3),zs=wo(4),a7=wo(5),o7=wo(6);Uh.range;Lf.range;n7.range;i7.range;zs.range;a7.range;o7.range;function ko(e){return Ct(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/y0)}const Hh=ko(0),$f=ko(1),s7=ko(2),l7=ko(3),Fs=ko(4),u7=ko(5),c7=ko(6);Hh.range;$f.range;s7.range;l7.range;Fs.range;u7.range;c7.range;const j0=Ct(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());j0.range;const S0=Ct(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());S0.range;const gi=Ct(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());gi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ct(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});gi.range;const vi=Ct(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());vi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ct(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});vi.range;function iC(e,t,r,n,i,o){const u=[[Ka,1,ui],[Ka,5,5*ui],[Ka,15,15*ui],[Ka,30,30*ui],[o,1,Qr],[o,5,5*Qr],[o,15,15*Qr],[o,30,30*Qr],[i,1,ci],[i,3,3*ci],[i,6,6*ci],[i,12,12*ci],[n,1,pi],[n,2,2*pi],[r,1,y0],[t,1,lS],[t,3,3*lS],[e,1,Ng]];function c(h,m,g){const v=mS).right(u,v);if(b===u.length)return e.every(Gv(h/Ng,m/Ng,g));if(b===0)return Rf.every(Math.max(Gv(h,m,g),1));const[j,k]=u[v/u[b-1][2]53)return null;"w"in ae||(ae.w=1),"Z"in ae?(Be=Ag(Zl(ae.y,0,1)),Pe=Be.getUTCDay(),Be=Pe>4||Pe===0?$f.ceil(Be):$f(Be),Be=Bh.offset(Be,(ae.V-1)*7),ae.y=Be.getUTCFullYear(),ae.m=Be.getUTCMonth(),ae.d=Be.getUTCDate()+(ae.w+6)%7):(Be=Eg(Zl(ae.y,0,1)),Pe=Be.getDay(),Be=Pe>4||Pe===0?Lf.ceil(Be):Lf(Be),Be=ec.offset(Be,(ae.V-1)*7),ae.y=Be.getFullYear(),ae.m=Be.getMonth(),ae.d=Be.getDate()+(ae.w+6)%7)}else("W"in ae||"U"in ae)&&("w"in ae||(ae.w="u"in ae?ae.u%7:"W"in ae?1:0),Pe="Z"in ae?Ag(Zl(ae.y,0,1)).getUTCDay():Eg(Zl(ae.y,0,1)).getDay(),ae.m=0,ae.d="W"in ae?(ae.w+6)%7+ae.W*7-(Pe+5)%7:ae.w+ae.U*7-(Pe+6)%7);return"Z"in ae?(ae.H+=ae.Z/100|0,ae.M+=ae.Z%100,Ag(ae)):Eg(ae)}}function B(re,we,_e,ae){for(var et=0,Be=we.length,Pe=_e.length,vt,Yt;et=Pe)return-1;if(vt=we.charCodeAt(et++),vt===37){if(vt=we.charAt(et++),Yt=_[vt in uS?we.charAt(et++):vt],!Yt||(ae=Yt(re,_e,ae))<0)return-1}else if(vt!=_e.charCodeAt(ae++))return-1}return ae}function F(re,we,_e){var ae=h.exec(we.slice(_e));return ae?(re.p=m.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function z(re,we,_e){var ae=b.exec(we.slice(_e));return ae?(re.w=j.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function Y(re,we,_e){var ae=g.exec(we.slice(_e));return ae?(re.w=v.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function U(re,we,_e){var ae=N.exec(we.slice(_e));return ae?(re.m=E.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function he(re,we,_e){var ae=k.exec(we.slice(_e));return ae?(re.m=S.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function ue(re,we,_e){return B(re,t,we,_e)}function ge(re,we,_e){return B(re,r,we,_e)}function ie(re,we,_e){return B(re,n,we,_e)}function se(re){return u[re.getDay()]}function X(re){return o[re.getDay()]}function te(re){return f[re.getMonth()]}function J(re){return c[re.getMonth()]}function I(re){return i[+(re.getHours()>=12)]}function M(re){return 1+~~(re.getMonth()/3)}function H(re){return u[re.getUTCDay()]}function ne(re){return o[re.getUTCDay()]}function Z(re){return f[re.getUTCMonth()]}function me(re){return c[re.getUTCMonth()]}function pe(re){return i[+(re.getUTCHours()>=12)]}function Oe(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var we=O(re+="",A);return we.toString=function(){return re},we},parse:function(re){var we=D(re+="",!1);return we.toString=function(){return re},we},utcFormat:function(re){var we=O(re+="",P);return we.toString=function(){return re},we},utcParse:function(re){var we=D(re+="",!0);return we.toString=function(){return re},we}}}var uS={"-":"",_:" ",0:"0"},zt=/^\s*\d+/,g7=/^%/,v7=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function x7(e,t,r){var n=zt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function b7(e,t,r){var n=zt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function w7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function k7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function j7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function cS(e,t,r){var n=zt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function dS(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function S7(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function N7(e,t,r){var n=zt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function E7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function fS(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function A7(e,t,r){var n=zt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function hS(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function C7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function P7(e,t,r){var n=zt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function O7(e,t,r){var n=zt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function _7(e,t,r){var n=zt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function M7(e,t,r){var n=g7.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function I7(e,t,r){var n=zt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function T7(e,t,r){var n=zt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function mS(e,t){return Ye(e.getDate(),t,2)}function D7(e,t){return Ye(e.getHours(),t,2)}function R7(e,t){return Ye(e.getHours()%12||12,t,2)}function L7(e,t){return Ye(1+ec.count(gi(e),e),t,3)}function aC(e,t){return Ye(e.getMilliseconds(),t,3)}function $7(e,t){return aC(e,t)+"000"}function z7(e,t){return Ye(e.getMonth()+1,t,2)}function F7(e,t){return Ye(e.getMinutes(),t,2)}function B7(e,t){return Ye(e.getSeconds(),t,2)}function U7(e){var t=e.getDay();return t===0?7:t}function H7(e,t){return Ye(Uh.count(gi(e)-1,e),t,2)}function oC(e){var t=e.getDay();return t>=4||t===0?zs(e):zs.ceil(e)}function W7(e,t){return e=oC(e),Ye(zs.count(gi(e),e)+(gi(e).getDay()===4),t,2)}function K7(e){return e.getDay()}function G7(e,t){return Ye(Lf.count(gi(e)-1,e),t,2)}function V7(e,t){return Ye(e.getFullYear()%100,t,2)}function q7(e,t){return e=oC(e),Ye(e.getFullYear()%100,t,2)}function Q7(e,t){return Ye(e.getFullYear()%1e4,t,4)}function Y7(e,t){var r=e.getDay();return e=r>=4||r===0?zs(e):zs.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function X7(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function pS(e,t){return Ye(e.getUTCDate(),t,2)}function Z7(e,t){return Ye(e.getUTCHours(),t,2)}function J7(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function eB(e,t){return Ye(1+Bh.count(vi(e),e),t,3)}function sC(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function tB(e,t){return sC(e,t)+"000"}function rB(e,t){return Ye(e.getUTCMonth()+1,t,2)}function nB(e,t){return Ye(e.getUTCMinutes(),t,2)}function iB(e,t){return Ye(e.getUTCSeconds(),t,2)}function aB(e){var t=e.getUTCDay();return t===0?7:t}function oB(e,t){return Ye(Hh.count(vi(e)-1,e),t,2)}function lC(e){var t=e.getUTCDay();return t>=4||t===0?Fs(e):Fs.ceil(e)}function sB(e,t){return e=lC(e),Ye(Fs.count(vi(e),e)+(vi(e).getUTCDay()===4),t,2)}function lB(e){return e.getUTCDay()}function uB(e,t){return Ye($f.count(vi(e)-1,e),t,2)}function cB(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function dB(e,t){return e=lC(e),Ye(e.getUTCFullYear()%100,t,2)}function fB(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function hB(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Fs(e):Fs.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function mB(){return"+0000"}function gS(){return"%"}function vS(e){return+e}function yS(e){return Math.floor(+e/1e3)}var ts,uC,cC;pB({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function pB(e){return ts=p7(e),uC=ts.format,ts.parse,cC=ts.utcFormat,ts.utcParse,ts}function gB(e){return new Date(e)}function vB(e){return e instanceof Date?+e:+new Date(+e)}function N0(e,t,r,n,i,o,u,c,f,h){var m=d0(),g=m.invert,v=m.domain,b=h(".%L"),j=h(":%S"),k=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),E=h("%b %d"),A=h("%B"),P=h("%Y");function _(O){return(f(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>a9(e,o/n))},r.copy=function(){return mC(t).domain(e)},wi.apply(r,arguments)}function Kh(){var e=0,t=.5,r=1,n=1,i,o,u,c,f,h=fr,m,g=!1,v;function b(k){return isNaN(k=+k)?v:(k=.5+((k=+m(k))-o)*(n*k{if(e!=null){var n=e.scale,i=e.type;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return SB(n)?n:"point"}};function NB(e,t){for(var r=0,n=e.length,i=e[0]t)?r=o+1:n=o}return r}function bC(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var u,c,f=NB(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(u=n[f-1])!==null&&u!==void 0?u:0,m=(c=n[f])!==null&&c!==void 0?c:0;return Math.abs(o-h)<=Math.abs(o-m)?r[f-1]:r[f]}}}function EB(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):bC(e,void 0)}function bS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],ki=(e,t)=>{var r=kC(e,t);return r??Et},At={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Xv,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Gu},jC=(e,t)=>e.cartesianAxis.yAxis[t],ji=(e,t)=>{var r=jC(e,t);return r??At},TB={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},P0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??TB},mr=(e,t,r)=>{switch(t){case"xAxis":return ki(e,r);case"yAxis":return ji(e,r);case"zAxis":return P0(e,r);case"angleAxis":return Jy(e,r);case"radiusAxis":return e0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},DB=(e,t,r)=>{switch(t){case"xAxis":return ki(e,r);case"yAxis":return ji(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},tc=(e,t,r)=>{switch(t){case"xAxis":return ki(e,r);case"yAxis":return ji(e,r);case"angleAxis":return Jy(e,r);case"radiusAxis":return e0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},SC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function NC(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var EC=e=>e.graphicalItems.cartesianItems,RB=q([Lt,Lh],NC),AC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Js=q([EC,mr,RB],AC,{memoizeOptions:{resultEqualityCheck:zh}}),CC=q([Js],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(n0)),PC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),LB=q([Js],PC),OC=e=>e.map(t=>t.data).filter(Boolean).flat(1),$B=q([Js],e=>e.some(t=>!t.data)),_C=q([Js],OC,{memoizeOptions:{resultEqualityCheck:zh}}),MC=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,i=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(i,o+1)},O0=q([_C,Mh],MC),zB=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Dt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Dt(i,n)}))):e.map(n=>({value:n})),IC=(e,t,r,n,i,o)=>{var u=n.chartData,c=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,m=zB(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var g=c.slice(f,h+1),v=g.map(b=>({value:Dt(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...m]}return m},rc=q([O0,mr,Js,Mh,$B,_C],IC);function gs(e){if(Bn(e)||e instanceof Date){var t=Number(e);if(He(t))return t}}function kS(e){if(Array.isArray(e)){var t=[gs(e[0]),gs(e[1])];return Rn(t)?t:void 0}var r=gs(e);if(r!=null)return[r,r]}function Wn(e){return e.map(gs).filter(jr)}function FB(e,t){var r=gs(e),n=gs(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var BB=q([rc],e=>e==null?void 0:e.map(t=>t.value).sort(FB));function TC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function UB(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Fn(t))n=t;else if(Array.isArray(t)){var i=Wn(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:Wn(r.flatMap(o=>{var u=Dt(e,o.dataKey),c,f;if(Array.isArray(u)){var h=wC(u,2);c=h[0],f=h[1]}else c=f=u;if(!(!He(c)||!He(f)))return[n-c,n+f]}))}var Pt=e=>{var t=$t(e),r=Xs(e);return tc(e,t,r)},Bs=q([Pt],e=>e==null?void 0:e.dataKey),HB=q([CC,Mh,Pt],$A),DC=(e,t,r,n)=>{var i={},o=t.reduce((u,c)=>{if(c.stackId==null)return u;var f=u[c.stackId];return f==null&&(f=[]),f.push(c),u[c.stackId]=f,u},i);return Object.fromEntries(Object.entries(o).map(u=>{var c=wC(u,2),f=c[0],h=c[1],m=n?[...h].reverse():h,g=m.map(r0);return[f,{stackedData:sz(e,g,r),graphicalItems:m}]}))},RC=q([HB,CC,Ih,_A],DC),LC=(e,t,r,n)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return dz(e,i,o)},WB=q([mr],e=>e.allowDataOverflow),_0=e=>{var t;if(e==null||!("domain"in e))return Xv;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Wn(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Xv},$C=q([mr],_0),zC=q([$C,WB],bA),KB=q([RC,bn,Lt,zC],LC,{memoizeOptions:{resultEqualityCheck:$h}}),M0=e=>e.errorBars,GB=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>TC(r,n)),Ff=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],c,f;if(n.length>0&&n.forEach(h=>{var m,g=h.data!=null?[...h.data]:u,v=(m=i[h.id])===null||m===void 0?void 0:m.filter(b=>TC(o,b));g.forEach(b=>{var j,k=Dt(b,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),S=UB(b,k,v);if(S.length>=2){var N=Math.min(...S),E=Math.max(...S);(c==null||Nf)&&(f=E)}var A=kS(k);A!=null&&(c=c==null?A[0]:Math.min(c,A[0]),f=f==null?A[1]:Math.max(f,A[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var m=kS(Dt(h,r.dataKey));m!=null&&(c=c==null?m[0]:Math.min(c,m[0]),f=f==null?m[1]:Math.max(f,m[1]))}),He(c)&&He(f))return[c,f]},VB=q([O0,mr,LB,M0,Lt,jF],FC,{memoizeOptions:{resultEqualityCheck:$h}});function qB(e){var t=e.value;if(Bn(t)||t instanceof Date)return t}var QB=(e,t,r)=>{var n=e.map(qB).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&X5(n))?xA(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},BC=e=>e.referenceElements.dots,el=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),YB=q([BC,Lt,Lh],el),UC=e=>e.referenceElements.areas,XB=q([UC,Lt,Lh],el),HC=e=>e.referenceElements.lines,ZB=q([HC,Lt,Lh],el),WC=(e,t)=>{if(e!=null){var r=Wn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},JB=q(YB,Lt,WC),KC=(e,t)=>{if(e!=null){var r=Wn(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},eU=q([XB,Lt],KC);function tU(e){var t;if(e.x!=null)return Wn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Wn(r)}function rU(e){var t;if(e.y!=null)return Wn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Wn(r)}var GC=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?tU(n):rU(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},nU=q([ZB,Lt],GC),iU=q(JB,nU,eU,(e,t,r)=>Ff(e,r,t)),VC=(e,t,r,n,i,o,u,c)=>{if(r!=null)return r;var f=u==="vertical"&&c==="xAxis"||u==="horizontal"&&c==="yAxis",h=f?Ff(n,o,i):Ff(o,i);return PF(t,h,e.allowDataOverflow)},aU=q([mr,$C,zC,KB,VB,iU,ct,Lt],VC,{memoizeOptions:{resultEqualityCheck:$h}}),oU=[0,1],qC=(e,t,r,n,i,o,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var c=e.dataKey,f=e.type,h=Gn(t,o);if(h&&c==null){var m;return xA(0,(m=r==null?void 0:r.length)!==null&&m!==void 0?m:0)}return f==="category"?QB(n,e,h):i==="expand"&&!h?oU:u}},I0=q([mr,ct,O0,rc,Ih,Lt,aU],qC),tl=q([mr,SC,Yy],xC),QC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var i=_0(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Rn(e)){if(o)return _j(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return Mj(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Rn(e))return _j(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Rn(e))return Mj(e,t.tickCount,t.allowDecimals,"adaptive")}}},T0=q([I0,tc,tl],QC),YC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Rn(t)&&Array.isArray(r)&&r.length>0){var i,o,u=t[0],c=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,c),Math.max(f,h)]}return t},sU=q([mr,I0,T0,Lt],YC),lU=q(rc,mr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Wn(e.map(g=>g.value))).sort((g,v)=>g-v),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var u=o-i;if(u===0)return 1/0;for(var c=0;ci,(e,t,r,n,i)=>{if(!He(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var u=pa(r,e*o),c=e*o/2;return c-u-(c-u)/o*u}return 0}),uU=(e,t,r)=>{var n=ki(e,t);return n==null||typeof n.padding!="string"?0:XC(e,"xAxis",t,r,n.padding)},cU=(e,t,r)=>{var n=ji(e,t);return n==null||typeof n.padding!="string"?0:XC(e,"yAxis",t,r,n.padding)},dU=q(ki,uU,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var i=e.padding;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),fU=q(ji,cU,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var i=e.padding;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),ZC=q([Qt,dU,Eh,Nh,(e,t,r)=>r],(e,t,r,n,i)=>{var o=n.padding;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),JC=q([Qt,ct,fU,Eh,Nh,(e,t,r)=>r],(e,t,r,n,i,o)=>{var u=i.padding;return o?[n.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),nc=(e,t,r,n)=>{var i;switch(t){case"xAxis":return ZC(e,r,n);case"yAxis":return JC(e,r,n);case"zAxis":return(i=P0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return DA(e);case"radiusAxis":return RA(e,r);default:return}},eP=q([mr,nc],Th),hU=q([tl,sU],VF),D0=q([mr,tl,hU,eP],C0),tP=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var i=r.type,o=r.scale,u=Gn(e,n);if(u&&(i==="number"||o!=="auto"))return t.map(c=>c.value)}},R0=q([ct,rc,tc,Lt],tP),Gh=q([D0],i0);q([D0],EB);q([D0,BB],bC);q([Js,M0,Lt],GB);function rP(e,t){return e.idt.id?1:0}var Vh=(e,t)=>t,qh=(e,t,r)=>r,mU=q(jh,Vh,qh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(rP)),pU=q(Sh,Vh,qh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(rP)),nP=(e,t)=>({width:e.width,height:t.height}),gU=(e,t)=>{var r=typeof t.width=="number"?t.width:Gu;return{width:r,height:e.height}},vU=q(Qt,ki,nP),yU=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},xU=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},bU=q(bi,Qt,mU,Vh,qh,(e,t,r,n,i)=>{var o={},u;return r.forEach(c=>{var f=nP(t,c);u==null&&(u=yU(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[c.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),o}),wU=q(xi,Qt,pU,Vh,qh,(e,t,r,n,i)=>{var o={},u;return r.forEach(c=>{var f=gU(t,c);u==null&&(u=xU(t,n,e));var h=n==="left"&&!i||n==="right"&&i;o[c.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),o}),kU=(e,t)=>{var r=ki(e,t);if(r!=null)return bU(e,r.orientation,r.mirror)},jU=q([Qt,ki,kU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),SU=(e,t)=>{var r=ji(e,t);if(r!=null)return wU(e,r.orientation,r.mirror)},NU=q([Qt,ji,SU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),EU=q(Qt,ji,(e,t)=>{var r=typeof t.width=="number"?t.width:Gu;return{width:r,height:e.height}}),iP=(e,t,r,n)=>{if(r!=null){var i=r.allowDuplicatedCategory,o=r.type,u=r.dataKey,c=Gn(e,n),f=t.map(m=>m.value),h=f.filter(m=>m!=null);if(u&&c&&o==="category"&&i&&X5(h))return f}},L0=q([ct,rc,mr,Lt],iP),jS=q([ct,DB,tl,Gh,L0,R0,nc,T0,Lt],(e,t,r,n,i,o,u,c,f)=>{if(t!=null){var h=Gn(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:i,isCategorical:h,niceTicks:c,range:u,realScaleType:r,scale:n}}}),AU=(e,t,r,n,i,o,u,c,f)=>{if(!(t==null||n==null)){var h=Gn(e,f),m=t.type,g=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=m==="category"&&n.bandwidth?n.bandwidth()/b:0;j=f==="angleAxis"&&o!=null&&o.length>=2?Vr(o[0]-o[1])*2*j:j;var k=g||i;return k?k.map((S,N)=>{var E=u?u.indexOf(S):S,A=n.map(E);return He(A)?{index:N,coordinate:A+j,value:S,offset:j}:null}).filter(jr):h&&c?c.map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(jr):n.ticks?n.ticks(v).map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(jr):n.domain().map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:u?u[S]:S,index:N,offset:j}:null}).filter(jr)}},aP=q([ct,tc,tl,Gh,T0,nc,L0,R0,Lt],AU),CU=(e,t,r,n,i,o,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=Gn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?Vr(n[0]-n[1])*2*h:h,c&&o?o.map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(jr):r.ticks?r.ticks(f).map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(jr):r.domain().map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:i?i[m]:m,index:g,offset:h}:null}).filter(jr)}},oP=q([ct,tc,Gh,nc,L0,R0,Lt],CU),sP=q(mr,Gh,(e,t)=>{if(!(e==null||t==null))return zf(zf({},e),{},{scale:t})}),PU=q([mr,tl,I0,eP],C0),OU=q([PU],i0);q((e,t,r)=>P0(e,r),OU,(e,t)=>{if(!(e==null||t==null))return zf(zf({},e),{},{scale:t})});var _U=q([ct,jh,Sh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),MU=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};q([MU],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);ue.options.defaultTooltipEventType,uP=e=>e.options.validateTooltipEventTypes;function cP(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function ic(e,t){var r=lP(e),n=uP(e);return cP(t,r,n)}function IU(e){return Me(t=>ic(t,e))}var dP=(e,t)=>{var r,n=Number(t);if(!(Fn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},TU=e=>e.tooltip.settings,Ji={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},DU={itemInteraction:{click:Ji,hover:Ji},axisInteraction:{click:Ji,hover:Ji},keyboardInteraction:Ji,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},fP=sr({name:"tooltip",initialState:DU,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ot()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=qr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:ot()},removeTooltipEntrySettings:{reducer(e,t){var r=qr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ot()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),tn=fP.actions,RU=tn.addTooltipEntrySettings,LU=tn.replaceTooltipEntrySettings,$U=tn.removeTooltipEntrySettings,zU=tn.setTooltipSettingsState,FU=tn.setActiveMouseOverItemIndex;tn.mouseLeaveItem;var hP=tn.mouseLeaveChart;tn.setActiveClickItemIndex;var mP=tn.setMouseOverAxisIndex,BU=tn.setMouseClickAxisIndex,lu=tn.setSyncInteraction,Bf=tn.setKeyboardInteraction,UU=fP.reducer;function SS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rd(e){for(var t=1;t{if(t==null)return Ji;var i=GU(e,t,r);if(i==null)return Ji;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(VU(i)){if(o)return Rd(Rd({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Rd(Rd({},Ji),{},{coordinate:i.coordinate})};function qU(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function QU(e,t){var r=qU(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),u=Math.max(n,i);return r>=o&&r<=u}function YU(e,t,r){if(r==null||t==null)return!0;var n=Dt(e,t);return n==null||!Rn(r)?!0:QU(n,r)}var du=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!He(o))return i;var u=0,c=1/0;t.length>0&&(c=t.length-1);var f=Math.max(u,Math.min(o,c)),h=t[f];return h==null||YU(h,r,n)?String(f):null},gP=(e,t,r,n,i,o,u)=>{if(o!=null){var c=u[0],f=c==null?void 0:c.getPosition(o);if(f!=null)return f;var h=i==null?void 0:i[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},vP=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var c;return((c=u.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},yP=e=>e.options.tooltipPayloadSearcher,rl=e=>e.tooltip;function NS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ES(e){for(var t=1;te(t)}function AS(e){if(typeof e=="string")return e}function nH(e){if(!(e==null||typeof e!="object")){var t="name"in e?eH(e.name):void 0,r="unit"in e?tH(e.unit):void 0,n="dataKey"in e?rH(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?AS(e.color):void 0,u="fill"in e?AS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:u}}}function iH(e,t){return e??t}var xP=(e,t,r,n,i,o,u)=>{if(!(t==null||o==null)){var c=r.chartData,f=r.computedData,h=r.dataStartIndex,m=r.dataEndIndex,g=[];return e.reduce((v,b)=>{var j,k=b.dataDefinedOnItem,S=b.settings,N=iH(k,c),E=Array.isArray(N)?WE(N,h,m):N,A=(j=S==null?void 0:S.dataKey)!==null&&j!==void 0?j:n,P=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&u==="axis"?_=Z5(E,n,i):_=o(E,t,f,P),Array.isArray(_))_.forEach(D=>{var B,F,z=nH(D),Y=z==null?void 0:z.name,U=z==null?void 0:z.dataKey,he=z==null?void 0:z.payload,ue=ES(ES({},S),{},{name:Y,unit:z==null?void 0:z.unit,color:(B=z==null?void 0:z.color)!==null&&B!==void 0?B:S==null?void 0:S.color,fill:(F=z==null?void 0:z.fill)!==null&&F!==void 0?F:S==null?void 0:S.fill});v.push(wk({tooltipEntrySettings:ue,dataKey:U,payload:he,value:Dt(he,U),name:Y==null?void 0:String(Y)}))});else{var O;v.push(wk({tooltipEntrySettings:S,dataKey:A,payload:_,value:Dt(_,A),name:(O=Dt(_,P))!==null&&O!==void 0?O:S==null?void 0:S.name}))}return v},g)}},$0=q([Pt,SC,Yy],xC),aH=q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),oH=q([$t,Xs],NC),jo=q([aH,Pt,oH],AC,{memoizeOptions:{resultEqualityCheck:zh}}),sH=q([jo],e=>e.filter(n0)),bP=q([jo],OC,{memoizeOptions:{resultEqualityCheck:zh}}),lH=q([jo],e=>e.some(t=>!t.data)),po=q([bP,bn],MC),uH=q([sH,bn,Pt],$A),z0=q([po,Pt,jo,bn,lH,bP],IC),wP=q([Pt],_0),cH=q([Pt],e=>e.allowDataOverflow),kP=q([wP,cH],bA),dH=q([jo],e=>e.filter(n0)),fH=q([uH,dH,Ih,_A],DC),hH=q([fH,bn,$t,kP],LC),mH=q([jo],PC),pH=q([po,Pt,mH,M0,$t,SF],FC,{memoizeOptions:{resultEqualityCheck:$h}}),gH=q([BC,$t,Xs],el),vH=q([gH,$t],WC),yH=q([UC,$t,Xs],el),xH=q([yH,$t],KC),bH=q([HC,$t,Xs],el),wH=q([bH,$t],GC),kH=q([vH,wH,xH],Ff),jH=q([Pt,wP,kP,hH,pH,kH,ct,$t],VC),Us=q([Pt,ct,po,z0,Ih,$t,jH],qC),SH=q([Us,Pt,$0],QC),NH=q([Pt,Us,SH,$t],YC),jP=e=>{var t=$t(e),r=Xs(e),n=!1;return nc(e,t,r,n)},SP=q([Pt,jP],Th),EH=q([Pt,$0,NH,SP],C0),NP=q([EH],i0),AH=q([ct,z0,Pt,$t],iP),CH=q([ct,z0,Pt,$t],tP),PH=(e,t,r,n,i,o,u,c)=>{if(t){var f=t.type,h=Gn(e,c);if(n){var m=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/m:0;return g=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Vr(i[0]-i[1])*2*g:g,h&&u?u.map((v,b)=>{var j=n.map(v);return He(j)?{coordinate:j+g,value:v,index:b,offset:g}:null}).filter(jr):n.domain().map((v,b)=>{var j=n.map(v);return He(j)?{coordinate:j+g,value:o?o[v]:v,index:b,offset:g}:null}).filter(jr)}}},Si=q([ct,Pt,$0,NP,jP,AH,CH,$t],PH),F0=q([lP,uP,TU],(e,t,r)=>cP(r.shared,e,t)),EP=e=>e.tooltip.settings.trigger,B0=e=>e.tooltip.settings.defaultIndex,ac=q([rl,F0,EP,B0],pP),Iu=q([ac,po,Bs,Us],du),AP=q([Si,Iu],dP),OH=q([ac],e=>{if(e)return e.dataKey}),_H=q([ac],e=>{if(e)return e.graphicalItemId}),CP=q([rl,F0,EP,B0],vP),MH=q([xi,bi,ct,Qt,Si,B0,CP],gP),IH=q([ac,MH],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),TH=q([ac],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),DH=q([CP,Iu,bn,Bs,AP,yP,F0],xP),RH=q([DH],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function CS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function PS(e){for(var t=1;tMe(Pt),BH=()=>{var e=FH(),t=Me(Si),r=Me(NP);return vf(!e||!r?void 0:PS(PS({},e),{},{scale:r}),t)};function OS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rs(e){for(var t=1;t{var i=t.find(o=>o&&o.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},GH=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="centric"){var o=i.coordinate,u=n.radius;return rs(rs(rs({},n),Gt(n.cx,n.cy,u,o)),{},{angle:o,radius:u})}var c=i.coordinate,f=n.angle;return rs(rs(rs({},n),Gt(n.cx,n.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function VH(e,t){var r=e.relativeX,n=e.relativeY;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var PP=(e,t,r,n,i)=>{var o,u=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c0?(f=r[c-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,j=(m=r[c])===null||m===void 0?void 0:m.coordinate,k=c>=u-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(v=r[c+1])===null||v===void 0?void 0:v.coordinate,S=void 0;if(!(b==null||j==null||k==null))if(Vr(j-b)!==Vr(k-j)){var N=[];if(Vr(k-j)===Vr(i[1]-i[0])){S=k;var E=j+i[1]-i[0];N[0]=Math.min(E,(E+b)/2),N[1]=Math.max(E,(E+b)/2)}else{S=b;var A=k+i[1]-i[0];N[0]=Math.min(j,(A+j)/2),N[1]=Math.max(j,(A+j)/2)}var P=[Math.min(j,(S+j)/2),Math.max(j,(S+j)/2)];if(e>P[0]&&e<=P[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[c])===null||_===void 0?void 0:_.index}}else{var O=Math.min(b,k),D=Math.max(b,k);if(e>(O+j)/2&&e<=(D+j)/2){var B;return(B=r[c])===null||B===void 0?void 0:B.index}}}else if(t)for(var F=0;F(z.coordinate+U.coordinate)/2||F>0&&F(z.coordinate+U.coordinate)/2&&e<=(z.coordinate+Y.coordinate)/2)return z.index}}return-1},OP=()=>Me(Yy),U0=(e,t)=>t,_P=(e,t,r)=>r,H0=(e,t,r,n)=>n,qH=q(Si,e=>fh(e,t=>t.coordinate)),W0=q([rl,U0,_P,H0],pP),K0=q([W0,po,Bs,Us],du),QH=(e,t,r)=>{if(t!=null){var n=rl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},MP=q([rl,U0,_P,H0],vP),Uf=q([xi,bi,ct,Qt,Si,H0,MP],gP),YH=q([W0,Uf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),IP=q([Si,K0],dP),XH=q([MP,K0,bn,Bs,IP,yP,U0],xP),ZH=q([W0,K0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),JH=(e,t,r,n,i,o,u)=>{if(!(!e||!r||!n||!i)&&VH(e,u)){var c=fz(e,t),f=PP(c,o,i,r,n),h=KH(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},eW=(e,t,r,n,i,o,u)=>{if(!(!e||!n||!i||!o||!r)){var c=pF(e,r);if(c){var f=hz(c,t),h=PP(f,u,o,n,i),m=GH(t,o,h,c);return{activeIndex:String(h),activeCoordinate:m}}}},tW=(e,t,r,n,i,o,u,c)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?JH(e,t,n,i,o,u,c):eW(e,t,r,n,i,o,u)},rW=q(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),nW=q(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(dr)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:GF}});function _S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function MS(e){for(var t=1;tMS(MS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),sW)},uW=new Set(Object.values(dr));function cW(e){return uW.has(e)}var TP=sr({name:"zIndex",initialState:lW,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:ot()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!cW(r)&&delete e.zIndexMap[r])},prepare:ot()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,i=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=i:e.zIndexMap[n].element=i:e.zIndexMap[n]={consumers:0,element:o?void 0:i,panoramaElement:o?i:void 0}},prepare:ot()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:ot()}}}),Qh=TP.actions,dW=Qh.registerZIndexPortal,Cg=Qh.unregisterZIndexPortal,fW=Qh.registerZIndexPortalElement,hW=Qh.unregisterZIndexPortalElement,mW=TP.reducer;function Ni(e){var t=e.zIndex,r=e.children,n=Xz(),i=n&&t!==void 0&&t!==0,o=Nr(),u=y.useRef(void 0),c=y.useRef(new Set),f=jt(),h=Me(g=>rW(g,t,o));if(y.useLayoutEffect(()=>{if(!i){var g=c.current;g.forEach(b=>{f(Cg({zIndex:b}))}),g.clear(),u.current=void 0;return}if(c.current.has(t)||(f(dW({zIndex:t})),c.current.add(t)),h){u.current=h;var v=c.current;v.forEach(b=>{b!==t&&(f(Cg({zIndex:b})),v.delete(b))})}},[f,t,i,h]),y.useLayoutEffect(()=>{var g=c.current;return()=>{g.forEach(v=>{f(Cg({zIndex:v}))}),g.clear()}},[f]),!i)return r;var m=h??u.current;return m?nh.createPortal(r,m):null}function Zv(){return Zv=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.useContext(DP),Pg={exports:{}},TS;function kW(){return TS||(TS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,g,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,g||f,v),j=r?r+h:h;return f._events[j]?f._events[j].fn?f._events[j]=[f._events[j],b]:f._events[j].push(b):(f._events[j]=b,f._eventsCount++),f}function u(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],m,g;if(this._eventsCount===0)return h;for(g in m=this._events)t.call(m,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},c.prototype.listeners=function(h){var m=r?r+h:h,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var v=0,b=g.length,j=new Array(b);v{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Fn(r))return e[r]}},EW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},RP=sr({name:"options",initialState:EW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),AW=RP.reducer,CW=RP.actions.createEventEmitter;function PW(e){return e.tooltip.syncInteraction}var OW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},LP=sr({name:"chartData",initialState:OW,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,i=r.endIndex;n!=null&&(e.dataStartIndex=n),i!=null&&(e.dataEndIndex=i)}}}),G0=LP.actions,RS=G0.setChartData,_W=G0.setDataStartEndIndexes;G0.setComputedData;var MW=LP.reducer,IW=["x","y"];function LS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ns(e){for(var t=1;tf.rootProps.className);y.useEffect(()=>{if(e==null)return Vs;var f=(h,m,g)=>{if(t!==g&&e===h){if(m.payload.active===!1){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(u&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,j=b.x,k=b.y,S=LW(b,IW),N=m.payload.sourceViewBox,E=N.x,A=N.y,P=N.width,_=N.height,O=ns(ns({},S),{},{x:u.x+(P?(j-E)/P:0)*u.width,y:u.y+(_?(k-A)/_:0)*u.height});r(ns(ns({},m),{},{payload:ns(ns({},m.payload),{},{coordinate:O})}))}else r(m);return}if(i!=null){var D;if(typeof n=="function"){var B={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},F=n(i,B);D=i[F]}else n==="value"&&(D=i.find(se=>String(se.value)===m.payload.label));var z=m.payload.coordinate;if(z==null||u==null){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(D==null){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var Y=z.x,U=z.y,he=Math.min(Y,u.x+u.width),ue=Math.min(U,u.y+u.height),ge={x:o==="horizontal"?D.coordinate:he,y:o==="horizontal"?ue:D.coordinate},ie=lu({active:m.payload.active,coordinate:ge,dataKey:m.payload.dataKey,index:String(D.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});r(ie)}}};return Tu.on(Jv,f),()=>{Tu.off(Jv,f)}},[c,r,t,e,n,i,o,u])}function FW(){var e=Me(Xy),t=Me(Zy),r=jt();y.useEffect(()=>{if(e==null)return Vs;var n=(i,o,u)=>{t!==u&&e===i&&r(_W(o))};return Tu.on(DS,n),()=>{Tu.off(DS,n)}},[r,t,e])}function BW(){var e=jt();y.useEffect(()=>{e(CW())},[e]),zW(),FW()}function UW(e,t,r,n,i,o){var u=Me(j=>QH(j,e,t)),c=Me(_H),f=Me(Zy),h=Me(Xy),m=Me(MA),g=Me(PW),v=(g==null?void 0:g.sourceViewBox)!=null,b=Ah();y.useEffect(()=>{if(!v&&h!=null&&f!=null){var j=lu({active:o,coordinate:r,dataKey:u,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:c});Tu.emit(Jv,h,j,f)}},[v,r,u,c,i,n,f,h,m,o,b])}function $S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zS(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{D(zU({shared:E,trigger:A,axisId:O,active:i,defaultIndex:B}))},[D,E,A,O,i,B]);var F=Ah(),z=dA(),Y=IU(E),U=(t=Me(_e=>ZH(_e,Y,A,B)))!==null&&t!==void 0?t:{},he=U.activeIndex,ue=U.isActive,ge=Me(_e=>XH(_e,Y,A,B)),ie=Me(_e=>IP(_e,Y,A,B)),se=Me(_e=>YH(_e,Y,A,B)),X=ge,te=wW(),J=(r=i??ue)!==null&&r!==void 0?r:!1,I=ZL([X,J]),M=GW(I,2),H=M[0],ne=M[1],Z=Y==="axis"?ie:void 0;UW(Y,A,se,Z,he,J);var me=_??te;if(me==null||F==null||Y==null)return null;var pe=X??BS;J||(pe=BS),h&&pe.length&&(pe=wL(pe.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),v,XW));var Oe=pe.length>0,re=zS(zS({},n),{},{payload:pe,label:Z,active:J,activeIndex:he,coordinate:se,accessibilityLayer:z}),we=y.createElement(u8,{allowEscapeViewBox:o,animationDuration:u,animationEasing:c,isAnimationActive:m,active:J,coordinate:se,hasPayload:Oe,offset:g,position:b,reverseDirection:j,useTranslate3d:k,viewBox:F,wrapperStyle:S,lastBoundingBox:H,innerRef:ne,hasPortalFromProps:!!_},ZW(f,re));return y.createElement(y.Fragment,null,nh.createPortal(we,me),J&&y.createElement(bW,{cursor:N,tooltipEventType:Y,coordinate:se,payload:pe,index:he}))}function tK(e,t,r){return(t=rK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rK(e){var t=nK(e,"string");return typeof t=="symbol"?t:t+""}function nK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class iK{constructor(t){tK(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function US(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function aK(e){for(var t=1;t{try{var r=document.getElementById(WS);r||(r=document.createElement("span"),r.setAttribute("id",WS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,cK,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},fu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Yu.isSsr)return{width:0,height:0};if(!$P.enableCache)return KS(t,r);var n=dK(t,r),i=HS.get(n);if(i)return i;var o=KS(t,r);return HS.set(n,o),o},zP;function Hf(e,t){return pK(e)||mK(e,t)||hK(e,t)||fK()}function fK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hK(e,t){if(e){if(typeof e=="string")return GS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GS(e,t):void 0}}function GS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var i=[];Vt(t)||(r?i=t.toString().split(""):i=t.toString().split(BP));var o=i.map(c=>({word:c,width:fu(c,n).width})),u=r?0:fu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function HP(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function DK(e){return Vt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var WP=(e,t,r,n)=>e.reduce((i,o)=>{var u=o.word,c=o.width,f=i[i.length-1];if(f&&c!=null&&(t==null||n||f.width+c+re.reduce((t,r)=>t.width>r.width?t:r),RK="…",JS=(e,t,r,n,i,o,u,c)=>{var f=e.slice(0,t),h=UP({breakAll:r,style:n,children:f+RK});if(!h)return[!1,[]];var m=WP(h.wordsWithComputedWidth,o,u,c),g=m.length>i||KP(m).width>Number(o);return[g,m]},LK=(e,t,r,n,i)=>{var o=e.maxLines,u=e.children,c=e.style,f=e.breakAll,h=Ee(o),m=String(u),g=WP(t,n,r,i);if(!h||i)return g;var v=g.length>o||KP(g).width>Number(n);if(!v)return g;for(var b=0,j=m.length-1,k=0,S;b<=j&&k<=m.length-1;){var N=Math.floor((b+j)/2),E=N-1,A=JS(m,E,f,c,o,n,r,i),P=XS(A,2),_=P[0],O=P[1],D=JS(m,N,f,c,o,n,r,i),B=XS(D,1),F=B[0];if(!_&&!F&&(b=N+1),_&&F&&(j=N-1),!_&&F){S=O;break}k++}return S||g},e2=e=>{var t=Vt(e)?[]:e.toString().split(BP);return[{words:t,width:void 0}]},$K=e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,u=e.maxLines;if((t||r)&&!Yu.isSsr){var c,f,h=UP({breakAll:o,children:n,style:i});if(h){var m=h.wordsWithComputedWidth,g=h.spaceWidth;c=m,f=g}else return e2(n);return LK({breakAll:o,children:n,maxLines:u,style:i},c,f,t,!!r)}return e2(n)},GP="#808080",zK={angle:0,breakAll:!1,capHeight:"0.71em",fill:GP,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},V0=y.forwardRef((e,t)=>{var r=Jr(e,zK),n=r.x,i=r.y,o=r.lineHeight,u=r.capHeight,c=r.fill,f=r.scaleToFit,h=r.textAnchor,m=r.verticalAnchor,g=YS(r,CK),v=y.useMemo(()=>$K({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:f,style:g.style,width:g.width}),[g.breakAll,g.children,g.maxLines,f,g.style,g.width]),b=g.dx,j=g.dy,k=g.angle,S=g.className,N=g.breakAll,E=YS(g,PK);if(!Bn(n)||!Bn(i)||v.length===0)return null;var A=Number(n)+(Ee(b)?b:0),P=Number(i)+(Ee(j)?j:0);if(!He(A)||!He(P))return null;var _;switch(m){case"start":_=Og("calc(".concat(u,")"));break;case"middle":_=Og("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:_=Og("calc(".concat(v.length-1," * -").concat(o,")"));break}var O=[],D=v[0];if(f&&D!=null){var B=D.width,F=g.width;O.push("scale(".concat(Ee(F)&&Ee(B)?F/B:1,")"))}return k&&O.push("rotate(".concat(k,", ").concat(A,", ").concat(P,")")),O.length&&(E.transform=O.join(" ")),y.createElement("text",ey({},Yr(E),{ref:t,x:A,y:P,className:rt("recharts-text",S),textAnchor:h,fill:c.includes("url")?GP:c}),v.map((z,Y)=>{var U=z.words.join(N?"":" ");return y.createElement("tspan",{x:A,dy:Y===0?_:o,key:"".concat(U,"-").concat(Y)},U)}))});V0.displayName="Text";function t2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,o=e.parentViewBox,u=By(t),c=u.x,f=u.y,h=u.height,m=u.upperWidth,g=u.lowerWidth,v=c,b=c+(m-g)/2,j=(v+b)/2,k=(m+g)/2,S=v+m/2,N=h>=0?1:-1,E=N*i,A=N>0?"end":"start",P=N>0?"start":"end",_=m>=0?1:-1,O=_*i,D=_>0?"end":"start",B=_>0?"start":"end",F=o;if(r==="top"){var z={x:v+m/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:A};return F&&(z.height=Math.max(f-F.y,0),z.width=m),z}if(r==="bottom"){var Y={x:b+g/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:P};return F&&(Y.height=Math.max(F.y+F.height-(f+h),0),Y.width=g),Y}if(r==="left"){var U={x:j-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"};return F&&(U.width=Math.max(U.x-F.x,0),U.height=h),U}if(r==="right"){var he={x:j+k+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"};return F&&(he.width=Math.max(F.x+F.width-he.x,0),he.height=h),he}var ue=F?{width:k,height:h}:{};return r==="insideLeft"?Pn({x:j+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"},ue):r==="insideRight"?Pn({x:j+k-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"},ue):r==="insideTop"?Pn({x:v+m/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:P},ue):r==="insideBottom"?Pn({x:b+g/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:A},ue):r==="insideTopLeft"?Pn({x:v+O,y:f+E,horizontalAnchor:B,verticalAnchor:P},ue):r==="insideTopRight"?Pn({x:v+m-O,y:f+E,horizontalAnchor:D,verticalAnchor:P},ue):r==="insideBottomLeft"?Pn({x:b+O,y:f+h-E,horizontalAnchor:B,verticalAnchor:A},ue):r==="insideBottomRight"?Pn({x:b+g-O,y:f+h-E,horizontalAnchor:D,verticalAnchor:A},ue):r&&typeof r=="object"&&(Ee(r.x)||uo(r.x))&&(Ee(r.y)||uo(r.y))?Pn({x:c+pa(r.x,k),y:f+pa(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},ue):Pn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},ue)},WK=["labelRef"],KK=["content"];function r2(e,t){if(e==null)return{};var r,n,i=GK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,i=e.lowerWidth,o=e.width,u=e.height,c=e.children,f=y.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:u}),[t,r,n,i,o,u]);return y.createElement(VP.Provider,{value:f},c)},qP=()=>{var e=y.useContext(VP),t=Ah();return e||(t?By(t):void 0)},XK=y.createContext(null),ZK=()=>{var e=y.useContext(XK),t=Me(LA);return e||t},JK=e=>{var t=e.value,r=e.formatter,n=Vt(e.children)?t:e.children;return typeof r=="function"?r(n):n},q0=e=>e!=null&&typeof e=="function",eG=(e,t)=>{var r=Vr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},tG=(e,t,r,n,i)=>{var o=e.offset,u=e.className,c=i.cx,f=i.cy,h=i.innerRadius,m=i.outerRadius,g=i.startAngle,v=i.endAngle,b=i.clockWise,j=(h+m)/2,k=eG(g,v),S=k>=0?1:-1,N,E;switch(t){case"insideStart":N=g+S*o,E=b;break;case"insideEnd":N=v-S*o,E=!b;break;case"end":N=v+S*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=k<=0?E:!E;var A=Gt(c,f,j,N),P=Gt(c,f,j,N+(E?1:-1)*359),_="M".concat(A.x,",").concat(A.y,` + A`,",",",0,0,",",",",","Z"])),Y.x,Y.y,o,o,+(m<0),z.x,z.y,n,n,+(he>180),+(m>0),O.x,O.y,o,o,+(m<0),D.x,D.y)}else P+=Ut(jj||(jj=Ha(["L",",","Z"])),t,r);return P},mF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},pF=e=>{var t=Jr(e,mF),r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,g=t.className;if(o0&&Math.abs(h-m)<360?k=hF({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(j,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:m}):k=pA({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:h,endAngle:m}),y.createElement("path",Bv({},Yr(t),{className:v,d:k}))};function gF(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(YE(t)){if(e==="centric"){var n=t.cx,a=t.cy,o=t.innerRadius,u=t.outerRadius,c=t.angle,f=Kt(n,a,o,c),h=Kt(n,a,u,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return mA(t)}}function vF(e){return c5(e)?NaN:Number(e)}function yg(e){return e?(e=vF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function gA(e,t,r){r&&typeof r!="number"&&wv(e,t,r)&&(t=r=void 0),e=yg(e),t===void 0?(t=e,e=0):t=yg(t),r=r===void 0?ee.chartData,Hy=q([bn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),_h=(e,t,r,n)=>n?Hy(e):bn(e),yF=(e,t,r)=>r?Hy(e):bn(e),xF=q([_h],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});q([Hy],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var bF=q([bn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Wy(e,t){return SF(e)||jF(e,t)||kF(e,t)||wF()}function wF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kF(e,t){if(e){if(typeof e=="string")return Sj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sj(e,t):void 0}}function Sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.e^o.s<0?1:-1;for(n=o.d.length,a=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===a?0:n>a^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*st;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(e){return fi(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return Je(fi(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return kt(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,r=this,n=r.constructor,a=n.precision,o=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Tr))throw Error(Zr+"NaN");if(r.s<1)throw Error(Zr+(r.s?"NaN":"-Infinity"));return r.eq(Tr)?new n(0):(ut=!1,t=fi(Au(r,o),Au(e,o),o),ut=!0,Je(t,a))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?wA(t,e):xA(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Zr+"NaN");return r.s?(ut=!1,t=fi(r,e,0,1).times(e),ut=!0,r.minus(t)):Je(new n(r),a)};be.naturalExponential=be.exp=function(){return bA(this)};be.naturalLogarithm=be.ln=function(){return Au(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?xA(t,e):wA(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(io+e);if(t=kt(a)+1,n=a.d.length-1,r=n*st+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,a,o,u,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(Zr+"NaN")}for(e=kt(c),ut=!1,a=Math.sqrt(+c),a==0||a==1/0?(t=Dn(c.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Ys((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(a.toString()),r=f.precision,a=u=r+3;;)if(o=n,n=o.plus(fi(c,o,u+2)).times(.5),Dn(o.d).slice(0,u)===(t=Dn(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),a==u&&t=="4999"){if(Je(o,r+1,0),o.times(o).eq(c)){n=o;break}}else if(t!="9999")break;u+=4}return ut=!0,Je(n,r)};be.times=be.mul=function(e){var t,r,n,a,o,u,c,f,h,m=this,g=m.constructor,v=m.d,b=(e=new g(e)).d;if(!m.s||!e.s)return new g(0);for(e.s*=m.s,r=m.e+e.e,f=v.length,h=b.length,f=0;){for(t=0,a=f+n;a>n;)c=o[a]+b[n]*v[a-n-1]+t,o[a--]=c%Tt|0,t=c/Tt|0;o[a]=(o[a]+t)%Tt|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ut?Je(e,g.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Hn(e,0,Qs),t===void 0?t=n.rounding:Hn(t,0,8),Je(r,e+kt(r)+1,t))};be.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=mo(n,!0):(Hn(e,0,Qs),t===void 0?t=a.rounding:Hn(t,0,8),n=Je(new a(n),e+1,t),r=mo(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?mo(a):(Hn(e,0,Qs),t===void 0?t=o.rounding:Hn(t,0,8),n=Je(new o(a),e+kt(a)+1,t),r=mo(n.abs(),!1,e+kt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return Je(new t(e),kt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,a,o,u,c=this,f=c.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(Tr);if(c=new f(c),!c.s){if(e.s<1)throw Error(Zr+"Infinity");return c}if(c.eq(Tr))return c;if(n=f.precision,e.eq(Tr))return Je(c,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=c.s,u){if((r=m<0?-m:m)<=yA){for(a=new f(Tr),t=Math.ceil(n/st+4),ut=!1;r%2&&(a=a.times(c),Aj(a.d,t)),r=Ys(r/2),r!==0;)c=c.times(c),Aj(c.d,t);return ut=!0,e.s<0?new f(Tr).div(a):Je(a,n)}}else if(o<0)throw Error(Zr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,ut=!1,a=e.times(Au(c,n+h)),ut=!0,a=bA(a),a.s=o,a};be.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=kt(a),n=mo(a,r<=o.toExpNeg||r>=o.toExpPos)):(Hn(e,1,Qs),t===void 0?t=o.rounding:Hn(t,0,8),a=Je(new o(a),e,t),r=kt(a),n=mo(a,e<=r||r<=o.toExpNeg,e)),n};be.toSignificantDigits=be.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Hn(e,1,Qs),t===void 0?t=n.rounding:Hn(t,0,8)),Je(new n(r),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=kt(e),r=e.constructor;return mo(e,t<=r.toExpNeg||t>=r.toExpPos)};function xA(e,t){var r,n,a,o,u,c,f,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),ut?Je(t,g):t;if(f=e.d,h=t.d,u=e.e,a=t.e,f=f.slice(),o=u-a,o){for(o<0?(n=f,o=-o,c=h.length):(n=h,a=u,c=f.length),u=Math.ceil(g/st),c=u>c?u+1:c+1,o>c&&(o=c,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(c=f.length,o=h.length,c-o<0&&(o=c,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Tt|0,f[o]%=Tt;for(r&&(f.unshift(r),++a),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=a,ut?Je(t,g):t}function Hn(e,t,r){if(e!==~~e||er)throw Error(io+e)}function Dn(e){var t,r,n,a=e.length-1,o="",u=e[0];if(a>0){for(o+=u,t=1;tu?1:-1;else for(c=f=0;ca[c]?1:-1;break}return f}function r(n,a,o){for(var u=0;o--;)n[o]-=u,u=n[o]1;)n.shift()}return function(n,a,o,u){var c,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,D,B,F=n.constructor,z=n.s==a.s?1:-1,Y=n.d,U=a.d;if(!n.s)return new F(n);if(!a.s)throw Error(Zr+"Division by zero");for(f=n.e-a.e,D=U.length,_=Y.length,b=new F(z),j=b.d=[],h=0;U[h]==(Y[h]||0);)++h;if(U[h]>(Y[h]||0)&&--f,o==null?E=o=F.precision:u?E=o+(kt(n)-kt(a))+1:E=o,E<0)return new F(0);if(E=E/st+2|0,h=0,D==1)for(m=0,U=U[0],E++;(h<_||m)&&E--;h++)A=m*Tt+(Y[h]||0),j[h]=A/U|0,m=A%U|0;else{for(m=Tt/(U[0]+1)|0,m>1&&(U=e(U,m),Y=e(Y,m),D=U.length,_=Y.length),P=D,k=Y.slice(0,D),S=k.length;S=Tt/2&&++O;do m=0,c=t(U,k,D,S),c<0?(N=k[0],D!=S&&(N=N*Tt+(k[1]||0)),m=N/O|0,m>1?(m>=Tt&&(m=Tt-1),g=e(U,m),v=g.length,S=k.length,c=t(g,k,v,S),c==1&&(m--,r(g,D16)throw Error(Ky+kt(e));if(!e.s)return new m(Tr);for(ut=!1,c=g,u=new m(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(Fa(2,h))/Math.LN10*2+5|0,c+=n,r=a=o=new m(Tr),m.precision=c;;){if(a=Je(a.times(e),c),r=r.times(++f),u=o.plus(fi(a,r,c)),Dn(u.d).slice(0,c)===Dn(o.d).slice(0,c)){for(;h--;)o=Je(o.times(o),c);return m.precision=g,t==null?(ut=!0,Je(o,g)):o}o=u}}function kt(e){for(var t=e.e*st,r=e.d[0];r>=10;r/=10)t++;return t}function xg(e,t,r){if(t>e.LN10.sd())throw ut=!0,r&&(e.precision=r),Error(Zr+"LN10 precision limit exceeded");return Je(new e(e.LN10),t)}function Xi(e){for(var t="";e--;)t+="0";return t}function Au(e,t){var r,n,a,o,u,c,f,h,m,g=1,v=10,b=e,j=b.d,k=b.constructor,S=k.precision;if(b.s<1)throw Error(Zr+(b.s?"NaN":"-Infinity"));if(b.eq(Tr))return new k(0);if(t==null?(ut=!1,h=S):h=t,b.eq(10))return t==null&&(ut=!0),xg(k,h);if(h+=v,k.precision=h,r=Dn(j),n=r.charAt(0),o=kt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Dn(b.d),n=r.charAt(0),g++;o=kt(b),n>1?(b=new k("0."+r),o++):b=new k(n+"."+r.slice(1))}else return f=xg(k,h+2,S).times(o+""),b=Au(new k(n+"."+r.slice(1)),h-v).plus(f),k.precision=S,t==null?(ut=!0,Je(b,S)):b;for(c=u=b=fi(b.minus(Tr),b.plus(Tr),h),m=Je(b.times(b),h),a=3;;){if(u=Je(u.times(m),h),f=c.plus(fi(u,new k(a),h)),Dn(f.d).slice(0,h)===Dn(c.d).slice(0,h))return c=c.times(2),o!==0&&(c=c.plus(xg(k,h+2,S).times(o+""))),c=fi(c,new k(g),h),k.precision=S,t==null?(ut=!0,Je(c,S)):c;c=f,a+=2}}function Ej(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Ys(r/st),e.d=[],n=(r+1)%st,r<0&&(n+=st),nEf||e.e<-Ef))throw Error(Ky+r)}else e.s=0,e.e=0,e.d=[0];return e}function Je(e,t,r){var n,a,o,u,c,f,h,m,g=e.d;for(u=1,o=g[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=st,a=t,h=g[m=0];else{if(m=Math.ceil((n+1)/st),o=g.length,m>=o)return e;for(h=o=g[m],u=1;o>=10;o/=10)u++;n%=st,a=n-st+u}if(r!==void 0&&(o=Fa(10,u-a-1),c=h/o%10|0,f=t<0||g[m+1]!==void 0||h%o,f=r<4?(c||f)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||f||r==6&&(n>0?a>0?h/Fa(10,u-a):0:g[m-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=kt(e),g.length=1,t=t-o-1,g[0]=Fa(10,(st-t%st)%st),e.e=Ys(-t/st)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=m,o=1,m--):(g.length=m+1,o=Fa(10,st-n),g[m]=a>0?(h/Fa(10,u-a)%Fa(10,a)|0)*o:0),f)for(;;)if(m==0){(g[0]+=o)==Tt&&(g[0]=1,++e.e);break}else{if(g[m]+=o,g[m]!=Tt)break;g[m--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(ut&&(e.e>Ef||e.e<-Ef))throw Error(Ky+kt(e));return e}function wA(e,t){var r,n,a,o,u,c,f,h,m,g,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ut?Je(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(m=u<0,m?(r=f,u=-u,c=g.length):(r=g,n=h,c=f.length),a=Math.max(Math.ceil(b/st),c)+2,u>a&&(u=a,r.length=1),r.reverse(),a=u;a--;)r.push(0);r.reverse()}else{for(a=f.length,c=g.length,m=a0;--a)f[c++]=0;for(a=g.length;a>u;){if(f[--a]0?o=o.charAt(0)+"."+o.slice(1)+Xi(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+Xi(-a-1)+o,r&&(n=r-u)>0&&(o+=Xi(n))):a>=u?(o+=Xi(a+1-u),r&&(n=r-a-1)>0&&(o=o+"."+Xi(n))):((n=a+1)0&&(a+1===u&&(o+="."),o+=Xi(n))),e.s<0?"-"+o:o}function Aj(e,t){if(e.length>t)return e.length=t,!0}function kA(e){var t,r,n;function a(o){var u=this;if(!(u instanceof a))return new a(o);if(u.constructor=a,o instanceof a){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(io+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return Ej(u,o.toString())}else if(typeof o!="string")throw Error(io+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,AF.test(o))Ej(u,o);else throw Error(io+o)}if(a.prototype=be,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=kA,a.config=a.set=CF,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(io+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(io+r+": "+n);return this}var Gy=kA(EF);Tr=new Gy(1);const Ke=Gy;function jA(e){var t;return e===0?t=1:t=Math.floor(new Ke(e).abs().log(10).toNumber())+1,t}function SA(e,t,r){for(var n=new Ke(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}function Cu(e,t){return MF(e)||_F(e,t)||OF(e,t)||PF()}function PF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OF(e,t){if(e){if(typeof e=="string")return Cj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cj(e,t):void 0}}function Cj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=Cu(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]},Vy=(e,t,r)=>{if(e.lte(0))return new Ke(0);var n=jA(e.toNumber()),a=new Ke(10).pow(n),o=e.div(a),u=n!==1?.05:.1,c=new Ke(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=c.mul(a);return t?new Ke(f.toNumber()):new Ke(Math.ceil(f.toNumber()))},EA=(e,t,r)=>{var n;if(e.lte(0))return new Ke(0);var a=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new Ke(o).abs().log(10).toNumber()),c=new Ke(10).pow(u),f=e.div(c).toNumber(),h=a.findIndex(b=>b>=f-1e-10);if(h===-1&&(c=c.mul(10),h=0),h+=r,h>=a.length){var m=Math.floor(h/a.length);h%=a.length,c=c.mul(new Ke(10).pow(m))}var g=(n=a[h])!==null&&n!==void 0?n:1,v=new Ke(g).mul(c);return t?v:new Ke(Math.ceil(v.toNumber()))},IF=(e,t,r)=>{var n=new Ke(1),a=new Ke(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new Ke(10).pow(jA(e)-1),a=new Ke(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new Ke(Math.floor(e)))}else e===0?a=new Ke(Math.floor((t-1)/2)):r||(a=new Ke(Math.floor(e)));for(var u=Math.floor((t-1)/2),c=[],f=0;f4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Vy;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ke(0),tickMin:new Ke(0),tickMax:new Ke(0)};var c=u(new Ke(r).sub(t).div(n-1),a,o),f;t<=0&&r>=0?f=new Ke(0):(f=new Ke(t).add(r).div(2),f=f.sub(new Ke(f).mod(c)));var h=Math.ceil(f.sub(t).div(c).toNumber()),m=Math.ceil(new Ke(r).sub(f).div(c).toNumber()),g=h+m+1;return g>n?AA(t,r,n,a,o+1,u):(g0?m+(n-g):m,h=r>0?h:h+(n-g)),{step:c,tickMin:f.sub(new Ke(h).mul(c)),tickMax:f.add(new Ke(m).mul(c))})},Pj=function(t){var r=Cu(t,2),n=r[0],a=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=NA([n,a]),m=Cu(h,2),g=m[0],v=m[1];if(g===-1/0||v===1/0){var b=v===1/0?[g,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>a?b.reverse():b}if(g===v)return IF(g,o,u);var j=c==="snap125"?EA:Vy,k=AA(g,v,f,u,0,j),S=k.step,N=k.tickMin,E=k.tickMax,A=SA(N,E.add(new Ke(.1).mul(S)),S);return n>a?A.reverse():A},Oj=function(t,r){var n=Cu(t,2),a=n[0],o=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=NA([a,o]),h=Cu(f,2),m=h[0],g=h[1];if(m===-1/0||g===1/0)return[a,o];if(m===g)return[m];var v=c==="snap125"?EA:Vy,b=Math.max(r,2),j=v(new Ke(g).sub(m).div(b-1),u,0),k=[...SA(new Ke(m),new Ke(g),j),g];return u===!1&&(k=k.map(S=>Math.round(S))),a>o?k.reverse():k},TF=e=>e.rootProps.barCategoryGap,Mh=e=>e.rootProps.stackOffset,CA=e=>e.rootProps.reverseStackOrder,qy=e=>e.options.chartName,Qy=e=>e.rootProps.syncId,PA=e=>e.rootProps.syncMethod,Yy=e=>e.options.eventEmitter,DF=e=>e.rootProps.baseValue,dr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ma={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Cn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Ih=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Th(e,t,r){if(r!=="auto")return r;if(e!=null)return Gn(e,t)?"category":"number"}function _j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Af(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},Xy=q([zF,J5],(e,t)=>{var r;if(e!=null)return e;var n=(r=Th(t,"angleAxis",Mj.type))!==null&&r!==void 0?r:"category";return Af(Af({},Mj),{},{type:n})}),FF=(e,t)=>e.polarAxis.radiusAxis[t],Zy=q([FF,J5],(e,t)=>{var r;if(e!=null)return e;var n=(r=Th(t,"radiusAxis",Ij.type))!==null&&r!==void 0?r:"category";return Af(Af({},Ij),{},{type:n})}),Dh=e=>e.polarOptions,Jy=q([xi,bi,Qt],oF),OA=q([Dh,Jy],(e,t)=>{if(e!=null)return pa(e.innerRadius,t,0)}),_A=q([Dh,Jy],(e,t)=>{if(e!=null)return pa(e.outerRadius,t,t*.8)}),BF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},MA=q([Dh],BF);q([Xy,MA],Ih);var IA=q([Jy,OA,_A],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});q([Zy,IA],Ih);var TA=q([ct,Dh,OA,_A,xi,bi],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,c=t.cy,f=t.startAngle,h=t.endAngle;return{cx:pa(u,a,a/2),cy:pa(c,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Rt=(e,t)=>t,Rh=(e,t,r)=>r;function e0(e){return e==null?void 0:e.id}function DA(e,t,r){var n=t.chartData,a=n===void 0?[]:n,o=r.allowDuplicatedCategory,u=r.dataKey,c=new Map;return e.forEach(f=>{var h,m=(h=f.data)!==null&&h!==void 0?h:a;if(!(m==null||m.length===0)){var g=e0(f);m.forEach((v,b)=>{var j=u==null||o?b:String(Dt(v,u,null)),k=Dt(v,f.dataKey,0),S;c.has(j)?S=c.get(j):S={},Object.assign(S,{[g]:k}),c.set(j,S)})}}),Array.from(c.values())}function t0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Lh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function $h(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function UF(e,t){if(e.length===t.length){for(var r=0;r{var t=ct(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Xs=e=>e.tooltip.settings.axisId;function r0(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),a=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(o){var u=a[0],c=a[1];return u<=c?o>=u&&o<=c:o>=c&&o<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var c=e(o);if(c!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var HF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Rn(t)){for(var r,n,a=0;an)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function da(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function WF(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function n0(e){let t,r,n;e.length!==2?(t=da,r=(c,f)=>da(e(c),f),n=(c,f)=>e(c)-f):(t=e===da||e===WF?e:KF,r=e,n=e);function a(c,f,h=0,m=c.length){if(h>>1;r(c[g],f)<0?h=g+1:m=g}while(h>>1;r(c[g],f)<=0?h=g+1:m=g}while(hh&&n(c[g-1],f)>-n(c[g],f)?g-1:g}return{left:a,center:u,right:o}}function KF(){return 0}function RA(e){return e===null?NaN:+e}function*GF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const VF=n0(da),Xu=VF.right;n0(RA).center;class Tj extends Map{constructor(t,r=YF){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(Dj(this,t))}has(t){return super.has(Dj(this,t))}set(t,r){return super.set(qF(this,t),r)}delete(t){return super.delete(QF(this,t))}}function Dj({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function qF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function QF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function YF(e){return e!==null&&typeof e=="object"?e.valueOf():e}function XF(e=da){if(e===da)return LA;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function LA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const ZF=Math.sqrt(50),JF=Math.sqrt(10),e9=Math.sqrt(2);function Cf(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),u=o>=ZF?10:o>=JF?5:o>=e9?2:1;let c,f,h;return a<0?(h=Math.pow(10,-a)/u,c=Math.round(e*h),f=Math.round(t*h),c/ht&&--f,h=-h):(h=Math.pow(10,a)*u,c=Math.round(e/h),f=Math.round(t/h),c*ht&&--f),f0))return[];if(e===t)return[e];const n=t=a))return[];const c=o-a+1,f=new Array(c);if(n)if(u<0)for(let h=0;h=n)&&(r=n);return r}function Lj(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function $A(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?LA:XF(a);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,m=Math.log(f),g=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*g*(f-g)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*g/f+v)),j=Math.min(n,Math.floor(t+(f-h)*g/f+v));$A(e,t,b,j,a)}const o=e[t];let u=r,c=n;for(Xl(e,r,t),a(e[n],o)>0&&Xl(e,r,n);u0;)--c}a(e[r],o)===0?Xl(e,r,c):(++c,Xl(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function Xl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function t9(e,t,r){if(e=Float64Array.from(GF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Lj(e);if(t>=1)return Rj(e);var n,a=(n-1)*t,o=Math.floor(a),u=Rj($A(e,o).subarray(0,o+1)),c=Lj(e.subarray(o+1));return u+(c-u)*(a-o)}}function r9(e,t,r=RA){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),u=+r(e[o],o,e),c=+r(e[o+1],o+1,e);return u+(c-u)*(a-o)}}function n9(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Id(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Id(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=o9.exec(e))?new Sr(t[1],t[2],t[3],1):(t=s9.exec(e))?new Sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=l9.exec(e))?Id(t[1],t[2],t[3],t[4]):(t=u9.exec(e))?Id(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=c9.exec(e))?Wj(t[1],t[2]/100,t[3]/100,1):(t=d9.exec(e))?Wj(t[1],t[2]/100,t[3]/100,t[4]):$j.hasOwnProperty(e)?Bj($j[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function Bj(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function Id(e,t,r,n){return n<=0&&(e=t=r=NaN),new Sr(e,t,r,n)}function m9(e){return e instanceof Zu||(e=_u(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function Gv(e,t,r,n){return arguments.length===1?m9(e):new Sr(e,t,r,n??1)}function Sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}o0(Sr,Gv,FA(Zu,{brighter(e){return e=e==null?Pf:Math.pow(Pf,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pu:Math.pow(Pu,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(ao(this.r),ao(this.g),ao(this.b),Of(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Uj,formatHex:Uj,formatHex8:p9,formatRgb:Hj,toString:Hj}));function Uj(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}`}function p9(){return`#${Wa(this.r)}${Wa(this.g)}${Wa(this.b)}${Wa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Hj(){const e=Of(this.opacity);return`${e===1?"rgb(":"rgba("}${ao(this.r)}, ${ao(this.g)}, ${ao(this.b)}${e===1?")":`, ${e})`}`}function Of(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ao(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wa(e){return e=ao(e),(e<16?"0":"")+e.toString(16)}function Wj(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new mn(e,t,r,n)}function BA(e){if(e instanceof mn)return new mn(e.h,e.s,e.l,e.opacity);if(e instanceof Zu||(e=_u(e)),!e)return new mn;if(e instanceof mn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,c=o-a,f=(o+a)/2;return c?(t===o?u=(r-n)/c+(r0&&f<1?0:u,new mn(u,c,f,e.opacity)}function g9(e,t,r,n){return arguments.length===1?BA(e):new mn(e,t,r,n??1)}function mn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}o0(mn,g9,FA(Zu,{brighter(e){return e=e==null?Pf:Math.pow(Pf,e),new mn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pu:Math.pow(Pu,e),new mn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Sr(bg(e>=240?e-240:e+120,a,n),bg(e,a,n),bg(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new mn(Kj(this.h),Td(this.s),Td(this.l),Of(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Of(this.opacity);return`${e===1?"hsl(":"hsla("}${Kj(this.h)}, ${Td(this.s)*100}%, ${Td(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Kj(e){return e=(e||0)%360,e<0?e+360:e}function Td(e){return Math.max(0,Math.min(1,e||0))}function bg(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const s0=e=>()=>e;function v9(e,t){return function(r){return e+r*t}}function y9(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function x9(e){return(e=+e)==1?UA:function(t,r){return r-t?y9(t,r,e):s0(isNaN(t)?r:t)}}function UA(e,t){var r=t-e;return r?v9(e,r):s0(isNaN(e)?t:e)}const Gj=(function e(t){var r=x9(t);function n(a,o){var u=r((a=Gv(a)).r,(o=Gv(o)).r),c=r(a.g,o.g),f=r(a.b,o.b),h=UA(a.opacity,o.opacity);return function(m){return a.r=u(m),a.g=c(m),a.b=f(m),a.opacity=h(m),a+""}}return n.gamma=e,n})(1);function b9(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;ar&&(o=t.slice(r,o),c[u]?c[u]+=o:c[++u]=o),(n=n[0])===(a=a[0])?c[u]?c[u]+=a:c[++u]=a:(c[++u]=null,f.push({i:u,x:_f(n,a)})),r=wg.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function _9(e,t,r){var n=e[0],a=e[1],o=t[0],u=t[1];return a2?M9:_9,f=h=null,g}function g(v){return v==null||isNaN(v=+v)?o:(f||(f=c(e.map(n),t,r)))(n(u(v)))}return g.invert=function(v){return u(a((h||(h=c(t,e.map(n),_f)))(v)))},g.domain=function(v){return arguments.length?(e=Array.from(v,Mf),m()):e.slice()},g.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},g.rangeRound=function(v){return t=Array.from(v),r=l0,m()},g.clamp=function(v){return arguments.length?(u=v?!0:fr,m()):u!==fr},g.interpolate=function(v){return arguments.length?(r=v,m()):r},g.unknown=function(v){return arguments.length?(o=v,g):o},function(v,b){return n=v,a=b,m()}}function u0(){return zh()(fr,fr)}function I9(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function If(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $s(e){return e=If(Math.abs(e)),e?e[1]:NaN}function T9(e,t){return function(r,n){for(var a=r.length,o=[],u=0,c=e[0],f=0;a>0&&c>0&&(f+c+1>n&&(c=Math.max(1,n-f)),o.push(r.substring(a-=c,a+c)),!((f+=c+1)>n));)c=e[u=(u+1)%e.length];return o.reverse().join(t)}}function D9(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var R9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mu(e){if(!(t=R9.exec(e)))throw new Error("invalid format: "+e);var t;return new c0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Mu.prototype=c0.prototype;function c0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}c0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function L9(e){e:for(var t=e.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Tf;function $9(e,t){var r=If(e,t);if(!r)return Tf=void 0,e.toPrecision(t);var n=r[0],a=r[1],o=a-(Tf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+If(e,Math.max(0,t+o-1))[0]}function qj(e,t){var r=If(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Qj={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:I9,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>qj(e*100,t),r:qj,s:$9,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Yj(e){return e}var Xj=Array.prototype.map,Zj=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function z9(e){var t=e.grouping===void 0||e.thousands===void 0?Yj:T9(Xj.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Yj:D9(Xj.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,v){g=Mu(g);var b=g.fill,j=g.align,k=g.sign,S=g.symbol,N=g.zero,E=g.width,A=g.comma,P=g.precision,_=g.trim,O=g.type;O==="n"?(A=!0,O="g"):Qj[O]||(P===void 0&&(P=12),_=!0,O="g"),(N||b==="0"&&j==="=")&&(N=!0,b="0",j="=");var D=(v&&v.prefix!==void 0?v.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),B=(S==="$"?n:/[%p]/.test(O)?u:"")+(v&&v.suffix!==void 0?v.suffix:""),F=Qj[O],z=/[defgprs%]/.test(O);P=P===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function Y(U){var he=D,ue=B,ge,ie,se;if(O==="c")ue=F(U)+ue,U="";else{U=+U;var X=U<0||1/U<0;if(U=isNaN(U)?f:F(Math.abs(U),P),_&&(U=L9(U)),X&&+U==0&&k!=="+"&&(X=!1),he=(X?k==="("?k:c:k==="-"||k==="("?"":k)+he,ue=(O==="s"&&!isNaN(U)&&Tf!==void 0?Zj[8+Tf/3]:"")+ue+(X&&k==="("?")":""),z){for(ge=-1,ie=U.length;++gese||se>57){ue=(se===46?a+U.slice(ge+1):U.slice(ge))+ue,U=U.slice(0,ge);break}}}A&&!N&&(U=t(U,1/0));var te=he.length+U.length+ue.length,J=te>1)+he+U+ue+J.slice(te);break;default:U=J+he+U+ue;break}return o(U)}return Y.toString=function(){return g+""},Y}function m(g,v){var b=Math.max(-8,Math.min(8,Math.floor($s(v)/3)))*3,j=Math.pow(10,-b),k=h((g=Mu(g),g.type="f",g),{suffix:Zj[8+b/3]});return function(S){return k(j*S)}}return{format:h,formatPrefix:m}}var Dd,d0,HA;F9({thousands:",",grouping:[3],currency:["$",""]});function F9(e){return Dd=z9(e),d0=Dd.format,HA=Dd.formatPrefix,Dd}function B9(e){return Math.max(0,-$s(Math.abs(e)))}function U9(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($s(t)/3)))*3-$s(Math.abs(e)))}function H9(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$s(t)-$s(e))+1}function WA(e,t,r,n){var a=Wv(e,t,r),o;switch(n=Mu(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=U9(a,u))&&(n.precision=o),HA(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=H9(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=B9(a))&&(n.precision=o-(n.type==="%")*2);break}}return d0(n)}function ga(e){var t=e.domain;return e.ticks=function(r){var n=t();return Uv(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return WA(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,u=n[a],c=n[o],f,h,m=10;for(c0;){if(h=Hv(u,c,r),h===f)return n[a]=u,n[o]=c,t(n);if(h>0)u=Math.floor(u/h)*h,c=Math.ceil(c/h)*h;else if(h<0)u=Math.ceil(u*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function KA(){var e=u0();return e.copy=function(){return Ju(e,KA())},en.apply(e,arguments),ga(e)}function GA(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Mf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return GA(e).unknown(t)},e=arguments.length?Array.from(e,Mf):[0,1],ga(r)}function VA(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],u;return oMath.pow(e,t)}function q9(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function tS(e){return(t,r)=>-e(-t,r)}function f0(e){const t=e(Jj,eS),r=t.domain;let n=10,a,o;function u(){return a=q9(n),o=V9(n),r()[0]<0?(a=tS(a),o=tS(o),e(W9,K9)):e(Jj,eS),t}return t.base=function(c){return arguments.length?(n=+c,u()):n},t.domain=function(c){return arguments.length?(r(c),u()):r()},t.ticks=c=>{const f=r();let h=f[0],m=f[f.length-1];const g=m0){for(;v<=b;++v)for(j=1;jm)break;N.push(k)}}else for(;v<=b;++v)for(j=n-1;j>=1;--j)if(k=v>0?j/o(-v):j*o(v),!(km)break;N.push(k)}N.length*2{if(c==null&&(c=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Mu(f)).precision==null&&(f.trim=!0),f=d0(f)),c===1/0)return f;const h=Math.max(1,n*c/t.ticks().length);return m=>{let g=m/o(Math.round(a(m)));return g*nr(VA(r(),{floor:c=>o(Math.floor(a(c))),ceil:c=>o(Math.ceil(a(c)))})),t}function qA(){const e=f0(zh()).domain([1,10]);return e.copy=()=>Ju(e,qA()).base(e.base()),en.apply(e,arguments),e}function rS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function nS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function h0(e){var t=1,r=e(rS(t),nS(t));return r.constant=function(n){return arguments.length?e(rS(t=+n),nS(t)):t},ga(r)}function QA(){var e=h0(zh());return e.copy=function(){return Ju(e,QA()).constant(e.constant())},en.apply(e,arguments)}function iS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Q9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Y9(e){return e<0?-e*e:e*e}function m0(e){var t=e(fr,fr),r=1;function n(){return r===1?e(fr,fr):r===.5?e(Q9,Y9):e(iS(r),iS(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},ga(t)}function p0(){var e=m0(zh());return e.copy=function(){return Ju(e,p0()).exponent(e.exponent())},en.apply(e,arguments),e}function X9(){return p0.apply(null,arguments).exponent(.5)}function aS(e){return Math.sign(e)*e*e}function Z9(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function YA(){var e=u0(),t=[0,1],r=!1,n;function a(o){var u=Z9(e(o));return isNaN(u)?n:r?Math.round(u):u}return a.invert=function(o){return e.invert(aS(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,Mf)).map(aS)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return YA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},en.apply(a,arguments),ga(a)}function XA(){var e=[],t=[],r=[],n;function a(){var u=0,c=Math.max(1,t.length);for(r=new Array(c-1);++u0?r[c-1]:e[0],c=r?[n[r-1],t]:[n[h-1],n[h]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return ZA().domain([e,t]).range(a).unknown(o)},en.apply(ga(u),arguments)}function JA(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[Xu(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return JA().domain(e).range(t).unknown(r)},en.apply(a,arguments)}const kg=new Date,jg=new Date;function Ct(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const u=a(o),c=a.ceil(o);return o-u(t(o=new Date(+o),u==null?1:Math.floor(u)),o),a.range=(o,u,c)=>{const f=[];if(o=a.ceil(o),c=c==null?1:Math.floor(c),!(o0))return f;let h;do f.push(h=new Date(+o)),t(o,c),e(o);while(hCt(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,c)=>{if(u>=u)if(c<0)for(;++c<=0;)for(;t(u,-1),!o(u););else for(;--c>=0;)for(;t(u,1),!o(u););}),r&&(a.count=(o,u)=>(kg.setTime(+o),jg.setTime(+u),e(kg),e(jg),Math.floor(r(kg,jg))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?u=>n(u)%o===0:u=>a.count(0,u)%o===0):a)),a}const Df=Ct(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Df.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ct(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Df);Df.range;const ui=1e3,Qr=ui*60,ci=Qr*60,pi=ci*24,g0=pi*7,oS=pi*30,Sg=pi*365,Ka=Ct(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ui)},(e,t)=>(t-e)/ui,e=>e.getUTCSeconds());Ka.range;const v0=Ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui)},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getMinutes());v0.range;const y0=Ct(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getUTCMinutes());y0.range;const x0=Ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui-e.getMinutes()*Qr)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getHours());x0.range;const b0=Ct(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getUTCHours());b0.range;const ec=Ct(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qr)/pi,e=>e.getDate()-1);ec.range;const Fh=Ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/pi,e=>e.getUTCDate()-1);Fh.range;const eC=Ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/pi,e=>Math.floor(e/pi));eC.range;function wo(e){return Ct(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Qr)/g0)}const Bh=wo(0),Rf=wo(1),J9=wo(2),e7=wo(3),zs=wo(4),t7=wo(5),r7=wo(6);Bh.range;Rf.range;J9.range;e7.range;zs.range;t7.range;r7.range;function ko(e){return Ct(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/g0)}const Uh=ko(0),Lf=ko(1),n7=ko(2),i7=ko(3),Fs=ko(4),a7=ko(5),o7=ko(6);Uh.range;Lf.range;n7.range;i7.range;Fs.range;a7.range;o7.range;const w0=Ct(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());w0.range;const k0=Ct(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());k0.range;const gi=Ct(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());gi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ct(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});gi.range;const vi=Ct(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());vi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ct(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});vi.range;function tC(e,t,r,n,a,o){const u=[[Ka,1,ui],[Ka,5,5*ui],[Ka,15,15*ui],[Ka,30,30*ui],[o,1,Qr],[o,5,5*Qr],[o,15,15*Qr],[o,30,30*Qr],[a,1,ci],[a,3,3*ci],[a,6,6*ci],[a,12,12*ci],[n,1,pi],[n,2,2*pi],[r,1,g0],[t,1,oS],[t,3,3*oS],[e,1,Sg]];function c(h,m,g){const v=mS).right(u,v);if(b===u.length)return e.every(Wv(h/Sg,m/Sg,g));if(b===0)return Df.every(Math.max(Wv(h,m,g),1));const[j,k]=u[v/u[b-1][2]53)return null;"w"in ae||(ae.w=1),"Z"in ae?(Be=Eg(Zl(ae.y,0,1)),Pe=Be.getUTCDay(),Be=Pe>4||Pe===0?Lf.ceil(Be):Lf(Be),Be=Fh.offset(Be,(ae.V-1)*7),ae.y=Be.getUTCFullYear(),ae.m=Be.getUTCMonth(),ae.d=Be.getUTCDate()+(ae.w+6)%7):(Be=Ng(Zl(ae.y,0,1)),Pe=Be.getDay(),Be=Pe>4||Pe===0?Rf.ceil(Be):Rf(Be),Be=ec.offset(Be,(ae.V-1)*7),ae.y=Be.getFullYear(),ae.m=Be.getMonth(),ae.d=Be.getDate()+(ae.w+6)%7)}else("W"in ae||"U"in ae)&&("w"in ae||(ae.w="u"in ae?ae.u%7:"W"in ae?1:0),Pe="Z"in ae?Eg(Zl(ae.y,0,1)).getUTCDay():Ng(Zl(ae.y,0,1)).getDay(),ae.m=0,ae.d="W"in ae?(ae.w+6)%7+ae.W*7-(Pe+5)%7:ae.w+ae.U*7-(Pe+6)%7);return"Z"in ae?(ae.H+=ae.Z/100|0,ae.M+=ae.Z%100,Eg(ae)):Ng(ae)}}function B(re,we,_e,ae){for(var et=0,Be=we.length,Pe=_e.length,vt,Yt;et=Pe)return-1;if(vt=we.charCodeAt(et++),vt===37){if(vt=we.charAt(et++),Yt=_[vt in sS?we.charAt(et++):vt],!Yt||(ae=Yt(re,_e,ae))<0)return-1}else if(vt!=_e.charCodeAt(ae++))return-1}return ae}function F(re,we,_e){var ae=h.exec(we.slice(_e));return ae?(re.p=m.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function z(re,we,_e){var ae=b.exec(we.slice(_e));return ae?(re.w=j.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function Y(re,we,_e){var ae=g.exec(we.slice(_e));return ae?(re.w=v.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function U(re,we,_e){var ae=N.exec(we.slice(_e));return ae?(re.m=E.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function he(re,we,_e){var ae=k.exec(we.slice(_e));return ae?(re.m=S.get(ae[0].toLowerCase()),_e+ae[0].length):-1}function ue(re,we,_e){return B(re,t,we,_e)}function ge(re,we,_e){return B(re,r,we,_e)}function ie(re,we,_e){return B(re,n,we,_e)}function se(re){return u[re.getDay()]}function X(re){return o[re.getDay()]}function te(re){return f[re.getMonth()]}function J(re){return c[re.getMonth()]}function I(re){return a[+(re.getHours()>=12)]}function M(re){return 1+~~(re.getMonth()/3)}function H(re){return u[re.getUTCDay()]}function ne(re){return o[re.getUTCDay()]}function Z(re){return f[re.getUTCMonth()]}function me(re){return c[re.getUTCMonth()]}function pe(re){return a[+(re.getUTCHours()>=12)]}function Oe(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var we=O(re+="",A);return we.toString=function(){return re},we},parse:function(re){var we=D(re+="",!1);return we.toString=function(){return re},we},utcFormat:function(re){var we=O(re+="",P);return we.toString=function(){return re},we},utcParse:function(re){var we=D(re+="",!0);return we.toString=function(){return re},we}}}var sS={"-":"",_:" ",0:"0"},$t=/^\s*\d+/,f7=/^%/,h7=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o[t.toLowerCase(),r]))}function p7(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function g7(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function v7(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function y7(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function x7(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function lS(e,t,r){var n=$t.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function uS(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function b7(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function w7(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function k7(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function cS(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function j7(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function dS(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function S7(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function N7(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function E7(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function A7(e,t,r){var n=$t.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function C7(e,t,r){var n=f7.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function P7(e,t,r){var n=$t.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function O7(e,t,r){var n=$t.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function fS(e,t){return Ye(e.getDate(),t,2)}function _7(e,t){return Ye(e.getHours(),t,2)}function M7(e,t){return Ye(e.getHours()%12||12,t,2)}function I7(e,t){return Ye(1+ec.count(gi(e),e),t,3)}function rC(e,t){return Ye(e.getMilliseconds(),t,3)}function T7(e,t){return rC(e,t)+"000"}function D7(e,t){return Ye(e.getMonth()+1,t,2)}function R7(e,t){return Ye(e.getMinutes(),t,2)}function L7(e,t){return Ye(e.getSeconds(),t,2)}function $7(e){var t=e.getDay();return t===0?7:t}function z7(e,t){return Ye(Bh.count(gi(e)-1,e),t,2)}function nC(e){var t=e.getDay();return t>=4||t===0?zs(e):zs.ceil(e)}function F7(e,t){return e=nC(e),Ye(zs.count(gi(e),e)+(gi(e).getDay()===4),t,2)}function B7(e){return e.getDay()}function U7(e,t){return Ye(Rf.count(gi(e)-1,e),t,2)}function H7(e,t){return Ye(e.getFullYear()%100,t,2)}function W7(e,t){return e=nC(e),Ye(e.getFullYear()%100,t,2)}function K7(e,t){return Ye(e.getFullYear()%1e4,t,4)}function G7(e,t){var r=e.getDay();return e=r>=4||r===0?zs(e):zs.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function V7(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function hS(e,t){return Ye(e.getUTCDate(),t,2)}function q7(e,t){return Ye(e.getUTCHours(),t,2)}function Q7(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function Y7(e,t){return Ye(1+Fh.count(vi(e),e),t,3)}function iC(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function X7(e,t){return iC(e,t)+"000"}function Z7(e,t){return Ye(e.getUTCMonth()+1,t,2)}function J7(e,t){return Ye(e.getUTCMinutes(),t,2)}function eB(e,t){return Ye(e.getUTCSeconds(),t,2)}function tB(e){var t=e.getUTCDay();return t===0?7:t}function rB(e,t){return Ye(Uh.count(vi(e)-1,e),t,2)}function aC(e){var t=e.getUTCDay();return t>=4||t===0?Fs(e):Fs.ceil(e)}function nB(e,t){return e=aC(e),Ye(Fs.count(vi(e),e)+(vi(e).getUTCDay()===4),t,2)}function iB(e){return e.getUTCDay()}function aB(e,t){return Ye(Lf.count(vi(e)-1,e),t,2)}function oB(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function sB(e,t){return e=aC(e),Ye(e.getUTCFullYear()%100,t,2)}function lB(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function uB(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Fs(e):Fs.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function cB(){return"+0000"}function mS(){return"%"}function pS(e){return+e}function gS(e){return Math.floor(+e/1e3)}var ts,oC,sC;dB({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function dB(e){return ts=d7(e),oC=ts.format,ts.parse,sC=ts.utcFormat,ts.utcParse,ts}function fB(e){return new Date(e)}function hB(e){return e instanceof Date?+e:+new Date(+e)}function j0(e,t,r,n,a,o,u,c,f,h){var m=u0(),g=m.invert,v=m.domain,b=h(".%L"),j=h(":%S"),k=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),E=h("%b %d"),A=h("%B"),P=h("%Y");function _(O){return(f(O)t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>t9(e,o/n))},r.copy=function(){return dC(t).domain(e)},wi.apply(r,arguments)}function Wh(){var e=0,t=.5,r=1,n=1,a,o,u,c,f,h=fr,m,g=!1,v;function b(k){return isNaN(k=+k)?v:(k=.5+((k=+m(k))-o)*(n*k{if(e!=null){var n=e.scale,a=e.type;if(n==="auto")return a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof n=="string")return bB(n)?n:"point"}};function wB(e,t){for(var r=0,n=e.length,a=e[0]t)?r=o+1:n=o}return r}function vC(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),a=e.range();if(!(r.length===0||a.length<2))return o=>{var u,c,f=wB(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(u=n[f-1])!==null&&u!==void 0?u:0,m=(c=n[f])!==null&&c!==void 0?c:0;return Math.abs(o-h)<=Math.abs(o-m)?r[f-1]:r[f]}}}function kB(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):vC(e,void 0)}function yS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $f(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],ki=(e,t)=>{var r=xC(e,t);return r??Et},At={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Qv,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Gu},bC=(e,t)=>e.cartesianAxis.yAxis[t],ji=(e,t)=>{var r=bC(e,t);return r??At},OB={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},A0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??OB},mr=(e,t,r)=>{switch(t){case"xAxis":return ki(e,r);case"yAxis":return ji(e,r);case"zAxis":return A0(e,r);case"angleAxis":return Xy(e,r);case"radiusAxis":return Zy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},_B=(e,t,r)=>{switch(t){case"xAxis":return ki(e,r);case"yAxis":return ji(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},tc=(e,t,r)=>{switch(t){case"xAxis":return ki(e,r);case"yAxis":return ji(e,r);case"angleAxis":return Xy(e,r);case"radiusAxis":return Zy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},wC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function kC(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var jC=e=>e.graphicalItems.cartesianItems,MB=q([Rt,Rh],kC),SC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Js=q([jC,mr,MB],SC,{memoizeOptions:{resultEqualityCheck:$h}}),NC=q([Js],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(t0)),EC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),IB=q([Js],EC),AC=e=>e.map(t=>t.data).filter(Boolean).flat(1),TB=q([Js],e=>e.some(t=>!t.data)),CC=q([Js],AC,{memoizeOptions:{resultEqualityCheck:$h}}),PC=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,a=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(a,o+1)},C0=q([CC,_h],PC),DB=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Dt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Dt(a,n)}))):e.map(n=>({value:n})),OC=(e,t,r,n,a,o)=>{var u=n.chartData,c=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,m=DB(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var g=c.slice(f,h+1),v=g.map(b=>({value:Dt(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...m]}return m},rc=q([C0,mr,Js,_h,TB,CC],OC);function gs(e){if(Bn(e)||e instanceof Date){var t=Number(e);if(He(t))return t}}function bS(e){if(Array.isArray(e)){var t=[gs(e[0]),gs(e[1])];return Rn(t)?t:void 0}var r=gs(e);if(r!=null)return[r,r]}function Wn(e){return e.map(gs).filter(jr)}function RB(e,t){var r=gs(e),n=gs(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var LB=q([rc],e=>e==null?void 0:e.map(t=>t.value).sort(RB));function _C(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function $B(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Fn(t))n=t;else if(Array.isArray(t)){var a=Wn(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:Wn(r.flatMap(o=>{var u=Dt(e,o.dataKey),c,f;if(Array.isArray(u)){var h=yC(u,2);c=h[0],f=h[1]}else c=f=u;if(!(!He(c)||!He(f)))return[n-c,n+f]}))}var Pt=e=>{var t=Lt(e),r=Xs(e);return tc(e,t,r)},Bs=q([Pt],e=>e==null?void 0:e.dataKey),zB=q([NC,_h,Pt],DA),MC=(e,t,r,n)=>{var a={},o=t.reduce((u,c)=>{if(c.stackId==null)return u;var f=u[c.stackId];return f==null&&(f=[]),f.push(c),u[c.stackId]=f,u},a);return Object.fromEntries(Object.entries(o).map(u=>{var c=yC(u,2),f=c[0],h=c[1],m=n?[...h].reverse():h,g=m.map(e0);return[f,{stackedData:nz(e,g,r),graphicalItems:m}]}))},IC=q([zB,NC,Mh,CA],MC),TC=(e,t,r,n)=>{var a=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return sz(e,a,o)},FB=q([mr],e=>e.allowDataOverflow),P0=e=>{var t;if(e==null||!("domain"in e))return Qv;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Wn(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Qv},DC=q([mr],P0),RC=q([DC,FB],vA),BB=q([IC,bn,Rt,RC],TC,{memoizeOptions:{resultEqualityCheck:Lh}}),O0=e=>e.errorBars,UB=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>_C(r,n)),zf=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],c,f;if(n.length>0&&n.forEach(h=>{var m,g=h.data!=null?[...h.data]:u,v=(m=a[h.id])===null||m===void 0?void 0:m.filter(b=>_C(o,b));g.forEach(b=>{var j,k=Dt(b,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),S=$B(b,k,v);if(S.length>=2){var N=Math.min(...S),E=Math.max(...S);(c==null||Nf)&&(f=E)}var A=bS(k);A!=null&&(c=c==null?A[0]:Math.min(c,A[0]),f=f==null?A[1]:Math.max(f,A[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var m=bS(Dt(h,r.dataKey));m!=null&&(c=c==null?m[0]:Math.min(c,m[0]),f=f==null?m[1]:Math.max(f,m[1]))}),He(c)&&He(f))return[c,f]},HB=q([C0,mr,IB,O0,Rt,xF],LC,{memoizeOptions:{resultEqualityCheck:Lh}});function WB(e){var t=e.value;if(Bn(t)||t instanceof Date)return t}var KB=(e,t,r)=>{var n=e.map(WB).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&qE(n))?gA(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},$C=e=>e.referenceElements.dots,el=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),GB=q([$C,Rt,Rh],el),zC=e=>e.referenceElements.areas,VB=q([zC,Rt,Rh],el),FC=e=>e.referenceElements.lines,qB=q([FC,Rt,Rh],el),BC=(e,t)=>{if(e!=null){var r=Wn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},QB=q(GB,Rt,BC),UC=(e,t)=>{if(e!=null){var r=Wn(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},YB=q([VB,Rt],UC);function XB(e){var t;if(e.x!=null)return Wn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Wn(r)}function ZB(e){var t;if(e.y!=null)return Wn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Wn(r)}var HC=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?XB(n):ZB(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},JB=q([qB,Rt],HC),eU=q(QB,JB,YB,(e,t,r)=>zf(e,r,t)),WC=(e,t,r,n,a,o,u,c)=>{if(r!=null)return r;var f=u==="vertical"&&c==="xAxis"||u==="horizontal"&&c==="yAxis",h=f?zf(n,o,a):zf(o,a);return NF(t,h,e.allowDataOverflow)},tU=q([mr,DC,RC,BB,HB,eU,ct,Rt],WC,{memoizeOptions:{resultEqualityCheck:Lh}}),rU=[0,1],KC=(e,t,r,n,a,o,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var c=e.dataKey,f=e.type,h=Gn(t,o);if(h&&c==null){var m;return gA(0,(m=r==null?void 0:r.length)!==null&&m!==void 0?m:0)}return f==="category"?KB(n,e,h):a==="expand"&&!h?rU:u}},_0=q([mr,ct,C0,rc,Mh,Rt,tU],KC),tl=q([mr,wC,qy],gC),GC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=P0(t),o=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Rn(e)){if(o)return Pj(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return Oj(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Rn(e))return Pj(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Rn(e))return Oj(e,t.tickCount,t.allowDecimals,"adaptive")}}},M0=q([_0,tc,tl],GC),VC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Rn(t)&&Array.isArray(r)&&r.length>0){var a,o,u=t[0],c=(a=r[0])!==null&&a!==void 0?a:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,c),Math.max(f,h)]}return t},nU=q([mr,_0,M0,Rt],VC),iU=q(rc,mr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Wn(e.map(g=>g.value))).sort((g,v)=>g-v),a=n[0],o=n[n.length-1];if(a==null||o==null)return 1/0;var u=o-a;if(u===0)return 1/0;for(var c=0;ca,(e,t,r,n,a)=>{if(!He(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var u=pa(r,e*o),c=e*o/2;return c-u-(c-u)/o*u}return 0}),aU=(e,t,r)=>{var n=ki(e,t);return n==null||typeof n.padding!="string"?0:qC(e,"xAxis",t,r,n.padding)},oU=(e,t,r)=>{var n=ji(e,t);return n==null||typeof n.padding!="string"?0:qC(e,"yAxis",t,r,n.padding)},sU=q(ki,aU,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var a=e.padding;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),lU=q(ji,oU,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var a=e.padding;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),QC=q([Qt,sU,Nh,Sh,(e,t,r)=>r],(e,t,r,n,a)=>{var o=n.padding;return a?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),YC=q([Qt,ct,lU,Nh,Sh,(e,t,r)=>r],(e,t,r,n,a,o)=>{var u=a.padding;return o?[n.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),nc=(e,t,r,n)=>{var a;switch(t){case"xAxis":return QC(e,r,n);case"yAxis":return YC(e,r,n);case"zAxis":return(a=A0(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return MA(e);case"radiusAxis":return IA(e,r);default:return}},XC=q([mr,nc],Ih),uU=q([tl,nU],HF),I0=q([mr,tl,uU,XC],E0),ZC=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,o=r.scale,u=Gn(e,n);if(u&&(a==="number"||o!=="auto"))return t.map(c=>c.value)}},T0=q([ct,rc,tc,Rt],ZC),Kh=q([I0],r0);q([I0],kB);q([I0,LB],vC);q([Js,O0,Rt],UB);function JC(e,t){return e.idt.id?1:0}var Gh=(e,t)=>t,Vh=(e,t,r)=>r,cU=q(kh,Gh,Vh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(JC)),dU=q(jh,Gh,Vh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(JC)),eP=(e,t)=>({width:e.width,height:t.height}),fU=(e,t)=>{var r=typeof t.width=="number"?t.width:Gu;return{width:r,height:e.height}},hU=q(Qt,ki,eP),mU=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},pU=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},gU=q(bi,Qt,cU,Gh,Vh,(e,t,r,n,a)=>{var o={},u;return r.forEach(c=>{var f=eP(t,c);u==null&&(u=mU(t,n,e));var h=n==="top"&&!a||n==="bottom"&&a;o[c.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),o}),vU=q(xi,Qt,dU,Gh,Vh,(e,t,r,n,a)=>{var o={},u;return r.forEach(c=>{var f=fU(t,c);u==null&&(u=pU(t,n,e));var h=n==="left"&&!a||n==="right"&&a;o[c.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),o}),yU=(e,t)=>{var r=ki(e,t);if(r!=null)return gU(e,r.orientation,r.mirror)},xU=q([Qt,ki,yU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),bU=(e,t)=>{var r=ji(e,t);if(r!=null)return vU(e,r.orientation,r.mirror)},wU=q([Qt,ji,bU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),kU=q(Qt,ji,(e,t)=>{var r=typeof t.width=="number"?t.width:Gu;return{width:r,height:e.height}}),tP=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,o=r.type,u=r.dataKey,c=Gn(e,n),f=t.map(m=>m.value),h=f.filter(m=>m!=null);if(u&&c&&o==="category"&&a&&qE(h))return f}},D0=q([ct,rc,mr,Rt],tP),wS=q([ct,_B,tl,Kh,D0,T0,nc,M0,Rt],(e,t,r,n,a,o,u,c,f)=>{if(t!=null){var h=Gn(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:a,isCategorical:h,niceTicks:c,range:u,realScaleType:r,scale:n}}}),jU=(e,t,r,n,a,o,u,c,f)=>{if(!(t==null||n==null)){var h=Gn(e,f),m=t.type,g=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=m==="category"&&n.bandwidth?n.bandwidth()/b:0;j=f==="angleAxis"&&o!=null&&o.length>=2?Vr(o[0]-o[1])*2*j:j;var k=g||a;return k?k.map((S,N)=>{var E=u?u.indexOf(S):S,A=n.map(E);return He(A)?{index:N,coordinate:A+j,value:S,offset:j}:null}).filter(jr):h&&c?c.map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(jr):n.ticks?n.ticks(v).map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(jr):n.domain().map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:u?u[S]:S,index:N,offset:j}:null}).filter(jr)}},rP=q([ct,tc,tl,Kh,M0,nc,D0,T0,Rt],jU),SU=(e,t,r,n,a,o,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=Gn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?Vr(n[0]-n[1])*2*h:h,c&&o?o.map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(jr):r.ticks?r.ticks(f).map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(jr):r.domain().map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:a?a[m]:m,index:g,offset:h}:null}).filter(jr)}},nP=q([ct,tc,Kh,nc,D0,T0,Rt],SU),iP=q(mr,Kh,(e,t)=>{if(!(e==null||t==null))return $f($f({},e),{},{scale:t})}),NU=q([mr,tl,_0,XC],E0),EU=q([NU],r0);q((e,t,r)=>A0(e,r),EU,(e,t)=>{if(!(e==null||t==null))return $f($f({},e),{},{scale:t})});var AU=q([ct,kh,jh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),CU=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};q([CU],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,a=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);ue.options.defaultTooltipEventType,oP=e=>e.options.validateTooltipEventTypes;function sP(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function ic(e,t){var r=aP(e),n=oP(e);return sP(t,r,n)}function PU(e){return Me(t=>ic(t,e))}var lP=(e,t)=>{var r,n=Number(t);if(!(Fn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},OU=e=>e.tooltip.settings,Ji={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},_U={itemInteraction:{click:Ji,hover:Ji},axisInteraction:{click:Ji,hover:Ji},keyboardInteraction:Ji,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},uP=sr({name:"tooltip",initialState:_U,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ot()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=qr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=a)},prepare:ot()},removeTooltipEntrySettings:{reducer(e,t){var r=qr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ot()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),tn=uP.actions,MU=tn.addTooltipEntrySettings,IU=tn.replaceTooltipEntrySettings,TU=tn.removeTooltipEntrySettings,DU=tn.setTooltipSettingsState,RU=tn.setActiveMouseOverItemIndex;tn.mouseLeaveItem;var cP=tn.mouseLeaveChart;tn.setActiveClickItemIndex;var dP=tn.setMouseOverAxisIndex,LU=tn.setMouseClickAxisIndex,lu=tn.setSyncInteraction,Ff=tn.setKeyboardInteraction,$U=uP.reducer;function kS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rd(e){for(var t=1;t{if(t==null)return Ji;var a=UU(e,t,r);if(a==null)return Ji;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(HU(a)){if(o)return Rd(Rd({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Rd(Rd({},Ji),{},{coordinate:a.coordinate})};function WU(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function KU(e,t){var r=WU(e),n=t[0],a=t[1];if(r===void 0)return!1;var o=Math.min(n,a),u=Math.max(n,a);return r>=o&&r<=u}function GU(e,t,r){if(r==null||t==null)return!0;var n=Dt(e,t);return n==null||!Rn(r)?!0:KU(n,r)}var du=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!He(o))return a;var u=0,c=1/0;t.length>0&&(c=t.length-1);var f=Math.max(u,Math.min(o,c)),h=t[f];return h==null||GU(h,r,n)?String(f):null},hP=(e,t,r,n,a,o,u)=>{if(o!=null){var c=u[0],f=c==null?void 0:c.getPosition(o);if(f!=null)return f;var h=a==null?void 0:a[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},mP=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(r==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var c;return((c=u.settings)===null||c===void 0?void 0:c.graphicalItemId)===a})},pP=e=>e.options.tooltipPayloadSearcher,rl=e=>e.tooltip;function jS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function SS(e){for(var t=1;te(t)}function NS(e){if(typeof e=="string")return e}function JU(e){if(!(e==null||typeof e!="object")){var t="name"in e?YU(e.name):void 0,r="unit"in e?XU(e.unit):void 0,n="dataKey"in e?ZU(e.dataKey):void 0,a="payload"in e?e.payload:void 0,o="color"in e?NS(e.color):void 0,u="fill"in e?NS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:o,fill:u}}}function eH(e,t){return e??t}var gP=(e,t,r,n,a,o,u)=>{if(!(t==null||o==null)){var c=r.chartData,f=r.computedData,h=r.dataStartIndex,m=r.dataEndIndex,g=[];return e.reduce((v,b)=>{var j,k=b.dataDefinedOnItem,S=b.settings,N=eH(k,c),E=Array.isArray(N)?B5(N,h,m):N,A=(j=S==null?void 0:S.dataKey)!==null&&j!==void 0?j:n,P=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&u==="axis"?_=QE(E,n,a):_=o(E,t,f,P),Array.isArray(_))_.forEach(D=>{var B,F,z=JU(D),Y=z==null?void 0:z.name,U=z==null?void 0:z.dataKey,he=z==null?void 0:z.payload,ue=SS(SS({},S),{},{name:Y,unit:z==null?void 0:z.unit,color:(B=z==null?void 0:z.color)!==null&&B!==void 0?B:S==null?void 0:S.color,fill:(F=z==null?void 0:z.fill)!==null&&F!==void 0?F:S==null?void 0:S.fill});v.push(xk({tooltipEntrySettings:ue,dataKey:U,payload:he,value:Dt(he,U),name:Y==null?void 0:String(Y)}))});else{var O;v.push(xk({tooltipEntrySettings:S,dataKey:A,payload:_,value:Dt(_,A),name:(O=Dt(_,P))!==null&&O!==void 0?O:S==null?void 0:S.name}))}return v},g)}},R0=q([Pt,wC,qy],gC),tH=q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),rH=q([Lt,Xs],kC),jo=q([tH,Pt,rH],SC,{memoizeOptions:{resultEqualityCheck:$h}}),nH=q([jo],e=>e.filter(t0)),vP=q([jo],AC,{memoizeOptions:{resultEqualityCheck:$h}}),iH=q([jo],e=>e.some(t=>!t.data)),po=q([vP,bn],PC),aH=q([nH,bn,Pt],DA),L0=q([po,Pt,jo,bn,iH,vP],OC),yP=q([Pt],P0),oH=q([Pt],e=>e.allowDataOverflow),xP=q([yP,oH],vA),sH=q([jo],e=>e.filter(t0)),lH=q([aH,sH,Mh,CA],MC),uH=q([lH,bn,Lt,xP],TC),cH=q([jo],EC),dH=q([po,Pt,cH,O0,Lt,bF],LC,{memoizeOptions:{resultEqualityCheck:Lh}}),fH=q([$C,Lt,Xs],el),hH=q([fH,Lt],BC),mH=q([zC,Lt,Xs],el),pH=q([mH,Lt],UC),gH=q([FC,Lt,Xs],el),vH=q([gH,Lt],HC),yH=q([hH,vH,pH],zf),xH=q([Pt,yP,xP,uH,dH,yH,ct,Lt],WC),Us=q([Pt,ct,po,L0,Mh,Lt,xH],KC),bH=q([Us,Pt,R0],GC),wH=q([Pt,Us,bH,Lt],VC),bP=e=>{var t=Lt(e),r=Xs(e),n=!1;return nc(e,t,r,n)},wP=q([Pt,bP],Ih),kH=q([Pt,R0,wH,wP],E0),kP=q([kH],r0),jH=q([ct,L0,Pt,Lt],tP),SH=q([ct,L0,Pt,Lt],ZC),NH=(e,t,r,n,a,o,u,c)=>{if(t){var f=t.type,h=Gn(e,c);if(n){var m=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/m:0;return g=c==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Vr(a[0]-a[1])*2*g:g,h&&u?u.map((v,b)=>{var j=n.map(v);return He(j)?{coordinate:j+g,value:v,index:b,offset:g}:null}).filter(jr):n.domain().map((v,b)=>{var j=n.map(v);return He(j)?{coordinate:j+g,value:o?o[v]:v,index:b,offset:g}:null}).filter(jr)}}},Si=q([ct,Pt,R0,kP,bP,jH,SH,Lt],NH),$0=q([aP,oP,OU],(e,t,r)=>sP(r.shared,e,t)),jP=e=>e.tooltip.settings.trigger,z0=e=>e.tooltip.settings.defaultIndex,ac=q([rl,$0,jP,z0],fP),Iu=q([ac,po,Bs,Us],du),SP=q([Si,Iu],lP),EH=q([ac],e=>{if(e)return e.dataKey}),AH=q([ac],e=>{if(e)return e.graphicalItemId}),NP=q([rl,$0,jP,z0],mP),CH=q([xi,bi,ct,Qt,Si,z0,NP],hP),PH=q([ac,CH],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),OH=q([ac],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),_H=q([NP,Iu,bn,Bs,SP,pP,$0],gP),MH=q([_H],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function ES(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function AS(e){for(var t=1;tMe(Pt),LH=()=>{var e=RH(),t=Me(Si),r=Me(kP);return gf(!e||!r?void 0:AS(AS({},e),{},{scale:r}),t)};function CS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rs(e){for(var t=1;t{var a=t.find(o=>o&&o.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:a.coordinate}}return{x:0,y:0}},UH=(e,t,r,n)=>{var a=t.find(h=>h&&h.index===r);if(a){if(e==="centric"){var o=a.coordinate,u=n.radius;return rs(rs(rs({},n),Kt(n.cx,n.cy,u,o)),{},{angle:o,radius:u})}var c=a.coordinate,f=n.angle;return rs(rs(rs({},n),Kt(n.cx,n.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function HH(e,t){var r=e.relativeX,n=e.relativeY;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var EP=(e,t,r,n,a)=>{var o,u=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var c=0;c0?(f=r[c-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,j=(m=r[c])===null||m===void 0?void 0:m.coordinate,k=c>=u-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(v=r[c+1])===null||v===void 0?void 0:v.coordinate,S=void 0;if(!(b==null||j==null||k==null))if(Vr(j-b)!==Vr(k-j)){var N=[];if(Vr(k-j)===Vr(a[1]-a[0])){S=k;var E=j+a[1]-a[0];N[0]=Math.min(E,(E+b)/2),N[1]=Math.max(E,(E+b)/2)}else{S=b;var A=k+a[1]-a[0];N[0]=Math.min(j,(A+j)/2),N[1]=Math.max(j,(A+j)/2)}var P=[Math.min(j,(S+j)/2),Math.max(j,(S+j)/2)];if(e>P[0]&&e<=P[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[c])===null||_===void 0?void 0:_.index}}else{var O=Math.min(b,k),D=Math.max(b,k);if(e>(O+j)/2&&e<=(D+j)/2){var B;return(B=r[c])===null||B===void 0?void 0:B.index}}}else if(t)for(var F=0;F(z.coordinate+U.coordinate)/2||F>0&&F(z.coordinate+U.coordinate)/2&&e<=(z.coordinate+Y.coordinate)/2)return z.index}}return-1},AP=()=>Me(qy),F0=(e,t)=>t,CP=(e,t,r)=>r,B0=(e,t,r,n)=>n,WH=q(Si,e=>dh(e,t=>t.coordinate)),U0=q([rl,F0,CP,B0],fP),H0=q([U0,po,Bs,Us],du),KH=(e,t,r)=>{if(t!=null){var n=rl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},PP=q([rl,F0,CP,B0],mP),Bf=q([xi,bi,ct,Qt,Si,B0,PP],hP),GH=q([U0,Bf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),OP=q([Si,H0],lP),VH=q([PP,H0,bn,Bs,OP,pP,F0],gP),qH=q([U0,H0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),QH=(e,t,r,n,a,o,u)=>{if(!(!e||!r||!n||!a)&&HH(e,u)){var c=lz(e,t),f=EP(c,o,a,r,n),h=BH(t,a,f,e);return{activeIndex:String(f),activeCoordinate:h}}},YH=(e,t,r,n,a,o,u)=>{if(!(!e||!n||!a||!o||!r)){var c=dF(e,r);if(c){var f=uz(c,t),h=EP(f,u,o,n,a),m=UH(t,o,h,c);return{activeIndex:String(h),activeCoordinate:m}}}},XH=(e,t,r,n,a,o,u,c)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?QH(e,t,n,a,o,u,c):YH(e,t,r,n,a,o,u)},ZH=q(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),JH=q(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(dr)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:UF}});function PS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function OS(e){for(var t=1;tOS(OS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),nW)},aW=new Set(Object.values(dr));function oW(e){return aW.has(e)}var _P=sr({name:"zIndex",initialState:iW,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:ot()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!oW(r)&&delete e.zIndexMap[r])},prepare:ot()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,a=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:o?void 0:a,panoramaElement:o?a:void 0}},prepare:ot()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:ot()}}}),qh=_P.actions,sW=qh.registerZIndexPortal,Ag=qh.unregisterZIndexPortal,lW=qh.registerZIndexPortalElement,uW=qh.unregisterZIndexPortalElement,cW=_P.reducer;function Ni(e){var t=e.zIndex,r=e.children,n=Vz(),a=n&&t!==void 0&&t!==0,o=Nr(),u=y.useRef(void 0),c=y.useRef(new Set),f=jt(),h=Me(g=>ZH(g,t,o));if(y.useLayoutEffect(()=>{if(!a){var g=c.current;g.forEach(b=>{f(Ag({zIndex:b}))}),g.clear(),u.current=void 0;return}if(c.current.has(t)||(f(sW({zIndex:t})),c.current.add(t)),h){u.current=h;var v=c.current;v.forEach(b=>{b!==t&&(f(Ag({zIndex:b})),v.delete(b))})}},[f,t,a,h]),y.useLayoutEffect(()=>{var g=c.current;return()=>{g.forEach(v=>{f(Ag({zIndex:v}))}),g.clear()}},[f]),!a)return r;var m=h??u.current;return m?rh.createPortal(r,m):null}function Yv(){return Yv=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.useContext(MP),Cg={exports:{}},MS;function yW(){return MS||(MS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,g,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new a(m,g||f,v),j=r?r+h:h;return f._events[j]?f._events[j].fn?f._events[j]=[f._events[j],b]:f._events[j].push(b):(f._events[j]=b,f._eventsCount++),f}function u(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],m,g;if(this._eventsCount===0)return h;for(g in m=this._events)t.call(m,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},c.prototype.listeners=function(h){var m=r?r+h:h,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var v=0,b=g.length,j=new Array(b);v{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Fn(r))return e[r]}},kW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},IP=sr({name:"options",initialState:kW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),jW=IP.reducer,SW=IP.actions.createEventEmitter;function NW(e){return e.tooltip.syncInteraction}var EW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},TP=sr({name:"chartData",initialState:EW,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,a=r.endIndex;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),W0=TP.actions,TS=W0.setChartData,AW=W0.setDataStartEndIndexes;W0.setComputedData;var CW=TP.reducer,PW=["x","y"];function DS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ns(e){for(var t=1;tf.rootProps.className);y.useEffect(()=>{if(e==null)return Vs;var f=(h,m,g)=>{if(t!==g&&e===h){if(m.payload.active===!1){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(u&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,j=b.x,k=b.y,S=IW(b,PW),N=m.payload.sourceViewBox,E=N.x,A=N.y,P=N.width,_=N.height,O=ns(ns({},S),{},{x:u.x+(P?(j-E)/P:0)*u.width,y:u.y+(_?(k-A)/_:0)*u.height});r(ns(ns({},m),{},{payload:ns(ns({},m.payload),{},{coordinate:O})}))}else r(m);return}if(a!=null){var D;if(typeof n=="function"){var B={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},F=n(a,B);D=a[F]}else n==="value"&&(D=a.find(se=>String(se.value)===m.payload.label));var z=m.payload.coordinate;if(z==null||u==null){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(D==null){r(lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var Y=z.x,U=z.y,he=Math.min(Y,u.x+u.width),ue=Math.min(U,u.y+u.height),ge={x:o==="horizontal"?D.coordinate:he,y:o==="horizontal"?ue:D.coordinate},ie=lu({active:m.payload.active,coordinate:ge,dataKey:m.payload.dataKey,index:String(D.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});r(ie)}}};return Tu.on(Xv,f),()=>{Tu.off(Xv,f)}},[c,r,t,e,n,a,o,u])}function RW(){var e=Me(Qy),t=Me(Yy),r=jt();y.useEffect(()=>{if(e==null)return Vs;var n=(a,o,u)=>{t!==u&&e===a&&r(AW(o))};return Tu.on(IS,n),()=>{Tu.off(IS,n)}},[r,t,e])}function LW(){var e=jt();y.useEffect(()=>{e(SW())},[e]),DW(),RW()}function $W(e,t,r,n,a,o){var u=Me(j=>KH(j,e,t)),c=Me(AH),f=Me(Yy),h=Me(Qy),m=Me(PA),g=Me(NW),v=(g==null?void 0:g.sourceViewBox)!=null,b=Eh();y.useEffect(()=>{if(!v&&h!=null&&f!=null){var j=lu({active:o,coordinate:r,dataKey:u,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:c});Tu.emit(Xv,h,j,f)}},[v,r,u,c,a,n,f,h,m,o,b])}function RS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function LS(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{D(DU({shared:E,trigger:A,axisId:O,active:a,defaultIndex:B}))},[D,E,A,O,a,B]);var F=Eh(),z=lA(),Y=PU(E),U=(t=Me(_e=>qH(_e,Y,A,B)))!==null&&t!==void 0?t:{},he=U.activeIndex,ue=U.isActive,ge=Me(_e=>VH(_e,Y,A,B)),ie=Me(_e=>OP(_e,Y,A,B)),se=Me(_e=>GH(_e,Y,A,B)),X=ge,te=vW(),J=(r=a??ue)!==null&&r!==void 0?r:!1,I=qL([X,J]),M=UW(I,2),H=M[0],ne=M[1],Z=Y==="axis"?ie:void 0;$W(Y,A,se,Z,he,J);var me=_??te;if(me==null||F==null||Y==null)return null;var pe=X??zS;J||(pe=zS),h&&pe.length&&(pe=vL(pe.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),v,VW));var Oe=pe.length>0,re=LS(LS({},n),{},{payload:pe,label:Z,active:J,activeIndex:he,coordinate:se,accessibilityLayer:z}),we=y.createElement(a8,{allowEscapeViewBox:o,animationDuration:u,animationEasing:c,isAnimationActive:m,active:J,coordinate:se,hasPayload:Oe,offset:g,position:b,reverseDirection:j,useTranslate3d:k,viewBox:F,wrapperStyle:S,lastBoundingBox:H,innerRef:ne,hasPortalFromProps:!!_},qW(f,re));return y.createElement(y.Fragment,null,rh.createPortal(we,me),J&&y.createElement(gW,{cursor:N,tooltipEventType:Y,coordinate:se,payload:pe,index:he}))}function XW(e,t,r){return(t=ZW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZW(e){var t=JW(e,"string");return typeof t=="symbol"?t:t+""}function JW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class eK{constructor(t){XW(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function FS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tK(e){for(var t=1;t{try{var r=document.getElementById(US);r||(r=document.createElement("span"),r.setAttribute("id",US),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,oK,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},fu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Yu.isSsr)return{width:0,height:0};if(!DP.enableCache)return HS(t,r);var n=sK(t,r),a=BS.get(n);if(a)return a;var o=HS(t,r);return BS.set(n,o),o},RP;function Uf(e,t){return dK(e)||cK(e,t)||uK(e,t)||lK()}function lK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uK(e,t){if(e){if(typeof e=="string")return WS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?WS(e,t):void 0}}function WS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var a=[];Gt(t)||(r?a=t.toString().split(""):a=t.toString().split($P));var o=a.map(c=>({word:c,width:fu(c,n).width})),u=r?0:fu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function FP(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function _K(e){return Gt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var BP=(e,t,r,n)=>e.reduce((a,o)=>{var u=o.word,c=o.width,f=a[a.length-1];if(f&&c!=null&&(t==null||n||f.width+c+re.reduce((t,r)=>t.width>r.width?t:r),MK="…",XS=(e,t,r,n,a,o,u,c)=>{var f=e.slice(0,t),h=zP({breakAll:r,style:n,children:f+MK});if(!h)return[!1,[]];var m=BP(h.wordsWithComputedWidth,o,u,c),g=m.length>a||UP(m).width>Number(o);return[g,m]},IK=(e,t,r,n,a)=>{var o=e.maxLines,u=e.children,c=e.style,f=e.breakAll,h=Ee(o),m=String(u),g=BP(t,n,r,a);if(!h||a)return g;var v=g.length>o||UP(g).width>Number(n);if(!v)return g;for(var b=0,j=m.length-1,k=0,S;b<=j&&k<=m.length-1;){var N=Math.floor((b+j)/2),E=N-1,A=XS(m,E,f,c,o,n,r,a),P=QS(A,2),_=P[0],O=P[1],D=XS(m,N,f,c,o,n,r,a),B=QS(D,1),F=B[0];if(!_&&!F&&(b=N+1),_&&F&&(j=N-1),!_&&F){S=O;break}k++}return S||g},ZS=e=>{var t=Gt(e)?[]:e.toString().split($P);return[{words:t,width:void 0}]},TK=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,o=e.breakAll,u=e.maxLines;if((t||r)&&!Yu.isSsr){var c,f,h=zP({breakAll:o,children:n,style:a});if(h){var m=h.wordsWithComputedWidth,g=h.spaceWidth;c=m,f=g}else return ZS(n);return IK({breakAll:o,children:n,maxLines:u,style:a},c,f,t,!!r)}return ZS(n)},HP="#808080",DK={angle:0,breakAll:!1,capHeight:"0.71em",fill:HP,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},K0=y.forwardRef((e,t)=>{var r=Jr(e,DK),n=r.x,a=r.y,o=r.lineHeight,u=r.capHeight,c=r.fill,f=r.scaleToFit,h=r.textAnchor,m=r.verticalAnchor,g=qS(r,SK),v=y.useMemo(()=>TK({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:f,style:g.style,width:g.width}),[g.breakAll,g.children,g.maxLines,f,g.style,g.width]),b=g.dx,j=g.dy,k=g.angle,S=g.className,N=g.breakAll,E=qS(g,NK);if(!Bn(n)||!Bn(a)||v.length===0)return null;var A=Number(n)+(Ee(b)?b:0),P=Number(a)+(Ee(j)?j:0);if(!He(A)||!He(P))return null;var _;switch(m){case"start":_=Pg("calc(".concat(u,")"));break;case"middle":_=Pg("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:_=Pg("calc(".concat(v.length-1," * -").concat(o,")"));break}var O=[],D=v[0];if(f&&D!=null){var B=D.width,F=g.width;O.push("scale(".concat(Ee(F)&&Ee(B)?F/B:1,")"))}return k&&O.push("rotate(".concat(k,", ").concat(A,", ").concat(P,")")),O.length&&(E.transform=O.join(" ")),y.createElement("text",Zv({},Yr(E),{ref:t,x:A,y:P,className:rt("recharts-text",S),textAnchor:h,fill:c.includes("url")?HP:c}),v.map((z,Y)=>{var U=z.words.join(N?"":" ");return y.createElement("tspan",{x:A,dy:Y===0?_:o,key:"".concat(U,"-").concat(Y)},U)}))});K0.displayName="Text";function JS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,o=e.parentViewBox,u=zy(t),c=u.x,f=u.y,h=u.height,m=u.upperWidth,g=u.lowerWidth,v=c,b=c+(m-g)/2,j=(v+b)/2,k=(m+g)/2,S=v+m/2,N=h>=0?1:-1,E=N*a,A=N>0?"end":"start",P=N>0?"start":"end",_=m>=0?1:-1,O=_*a,D=_>0?"end":"start",B=_>0?"start":"end",F=o;if(r==="top"){var z={x:v+m/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:A};return F&&(z.height=Math.max(f-F.y,0),z.width=m),z}if(r==="bottom"){var Y={x:b+g/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:P};return F&&(Y.height=Math.max(F.y+F.height-(f+h),0),Y.width=g),Y}if(r==="left"){var U={x:j-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"};return F&&(U.width=Math.max(U.x-F.x,0),U.height=h),U}if(r==="right"){var he={x:j+k+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"};return F&&(he.width=Math.max(F.x+F.width-he.x,0),he.height=h),he}var ue=F?{width:k,height:h}:{};return r==="insideLeft"?Pn({x:j+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"},ue):r==="insideRight"?Pn({x:j+k-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"},ue):r==="insideTop"?Pn({x:v+m/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:P},ue):r==="insideBottom"?Pn({x:b+g/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:A},ue):r==="insideTopLeft"?Pn({x:v+O,y:f+E,horizontalAnchor:B,verticalAnchor:P},ue):r==="insideTopRight"?Pn({x:v+m-O,y:f+E,horizontalAnchor:D,verticalAnchor:P},ue):r==="insideBottomLeft"?Pn({x:b+O,y:f+h-E,horizontalAnchor:B,verticalAnchor:A},ue):r==="insideBottomRight"?Pn({x:b+g-O,y:f+h-E,horizontalAnchor:D,verticalAnchor:A},ue):r&&typeof r=="object"&&(Ee(r.x)||uo(r.x))&&(Ee(r.y)||uo(r.y))?Pn({x:c+pa(r.x,k),y:f+pa(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},ue):Pn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},ue)},FK=["labelRef"],BK=["content"];function e2(e,t){if(e==null)return{};var r,n,a=UK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,o=e.width,u=e.height,c=e.children,f=y.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:u}),[t,r,n,a,o,u]);return y.createElement(WP.Provider,{value:f},c)},KP=()=>{var e=y.useContext(WP),t=Eh();return e||(t?zy(t):void 0)},VK=y.createContext(null),qK=()=>{var e=y.useContext(VK),t=Me(TA);return e||t},QK=e=>{var t=e.value,r=e.formatter,n=Gt(e.children)?t:e.children;return typeof r=="function"?r(n):n},G0=e=>e!=null&&typeof e=="function",YK=(e,t)=>{var r=Vr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},XK=(e,t,r,n,a)=>{var o=e.offset,u=e.className,c=a.cx,f=a.cy,h=a.innerRadius,m=a.outerRadius,g=a.startAngle,v=a.endAngle,b=a.clockWise,j=(h+m)/2,k=YK(g,v),S=k>=0?1:-1,N,E;switch(t){case"insideStart":N=g+S*o,E=b;break;case"insideEnd":N=v-S*o,E=!b;break;case"end":N=v+S*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=k<=0?E:!E;var A=Kt(c,f,j,N),P=Kt(c,f,j,N+(E?1:-1)*359),_="M".concat(A.x,",").concat(A.y,` A`).concat(j,",").concat(j,",0,1,").concat(E?0:1,`, - `).concat(P.x,",").concat(P.y),O=Vt(e.id)?bu("recharts-radial-line-"):e.id;return y.createElement("text",si({},n,{dominantBaseline:"central",className:rt("recharts-radial-bar-label",u)}),y.createElement("defs",null,y.createElement("path",{id:O,d:_})),y.createElement("textPath",{xlinkHref:"#".concat(O)},r))},rG=(e,t,r)=>{var n=e.cx,i=e.cy,o=e.innerRadius,u=e.outerRadius,c=e.startAngle,f=e.endAngle,h=(c+f)/2;if(r==="outside"){var m=Gt(n,i,u+t,h),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var b=(o+u)/2,j=Gt(n,i,b,h),k=j.x,S=j.y;return{x:k,y:S,textAnchor:"middle",verticalAnchor:"middle"}},Qd=e=>e!=null&&"cx"in e&&Ee(e.cx),nG={angle:0,offset:5,zIndex:dr.label,position:"middle",textBreakAll:!1};function iG(e){if(!Qd(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function Zi(e){var t=Jr(e,nG),r=t.viewBox,n=t.parentViewBox,i=t.position,o=t.value,u=t.children,c=t.content,f=t.className,h=f===void 0?"":f,m=t.textBreakAll,g=t.labelRef,v=ZK(),b=qP(),j=i==="center"?b:v??b,k,S,N;r==null?k=j:Qd(r)?k=r:k=By(r);var E=iG(k);if(!k||Vt(o)&&Vt(u)&&!y.isValidElement(c)&&typeof c!="function")return null;var A=uu(uu({},t),{},{viewBox:k});if(y.isValidElement(c)){A.labelRef;var P=r2(A,WK);return y.cloneElement(c,P)}if(typeof c=="function"){A.content;var _=r2(A,KK);if(S=y.createElement(c,_),y.isValidElement(S))return S}else S=JK(t);var O=Yr(t);if(Qd(k)){if(i==="insideStart"||i==="insideEnd"||i==="end")return tG(t,i,S,O,k);N=rG(k,t.offset,t.position)}else{if(!E)return null;var D=HK({viewBox:E,position:i,offset:t.offset,parentViewBox:Qd(n)?void 0:n});N=uu(uu({x:D.x,y:D.y,textAnchor:D.horizontalAnchor,verticalAnchor:D.verticalAnchor},D.width!==void 0?{width:D.width}:{}),D.height!==void 0?{height:D.height}:{})}return y.createElement(Ni,{zIndex:t.zIndex},y.createElement(V0,si({ref:g,className:rt("recharts-label",h)},O,N,{textAnchor:HP(O.textAnchor)?O.textAnchor:N.textAnchor,breakAll:m}),S))}Zi.displayName="Label";var aG=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(Zi,si({key:"label-implicit"},n)):Bn(e)?y.createElement(Zi,si({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===Zi?y.cloneElement(e,uu({key:"label-implicit"},n)):y.createElement(Zi,si({key:"label-implicit",content:e},n)):q0(e)?y.createElement(Zi,si({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(Zi,si({},e,{key:"label-implicit"},n)):null};function oG(e){var t=e.label,r=e.labelRef,n=qP();return aG(t,n,r)||null}var sG=["valueAccessor"],lG=["dataKey","clockWise","id","textBreakAll","zIndex"];function Wf(){return Wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(DK(t))return t},QP=y.createContext(void 0),dG=QP.Provider,YP=y.createContext(void 0);YP.Provider;function fG(){return y.useContext(QP)}function hG(){return y.useContext(YP)}function Yd(e){var t=e.valueAccessor,r=t===void 0?cG:t,n=i2(e,sG),i=n.dataKey;n.clockWise;var o=n.id,u=n.textBreakAll,c=n.zIndex,f=i2(n,lG),h=fG(),m=hG(),g=h||m;return!g||!g.length?null:y.createElement(Ni,{zIndex:c??dr.label},y.createElement(Xr,{className:"recharts-label-list"},g.map((v,b)=>{var j,k=Vt(i)?r(v,b):Dt(v.payload,i),S=Vt(o)?{}:{id:"".concat(o,"-").concat(b)};return y.createElement(Zi,Wf({key:"label-".concat(b)},Yr(v),f,S,{fill:(j=n.fill)!==null&&j!==void 0?j:v.fill,parentViewBox:v.parentViewBox,value:k,textBreakAll:u,viewBox:v.viewBox,index:b,zIndex:0}))})))}Yd.displayName="LabelList";function mG(e){var t=e.label;return t?t===!0?y.createElement(Yd,{key:"labelList-implicit"}):y.isValidElement(t)||q0(t)?y.createElement(Yd,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(Yd,Wf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function ty(){return ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,i=e.className,o=rt("recharts-dot",i);return Ee(t)&&Ee(r)&&Ee(n)?y.createElement("circle",ty({},vn(e),_y(e),{className:o,cx:t,cy:r,r:n})):null},pG={radiusAxis:{},angleAxis:{}},ZP=sr({name:"polarAxis",initialState:pG,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),Yh=ZP.actions;Yh.addRadiusAxis;Yh.removeRadiusAxis;Yh.addAngleAxis;Yh.removeAngleAxis;var gG=ZP.reducer;function vG(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var JP=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function a2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function o2(e){for(var t=1;t{n||(i.current===null?r(RU(t)):i.current!==t&&r(LU({prev:i.current,next:t})),i.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{i.current&&(r($U(i.current)),i.current=null)},[r]),null}function AG(e){var t=e.legendPayload,r=jt(),n=Nr(),i=y.useRef(null);return y.useLayoutEffect(()=>{n||(i.current===null?r(c6(t)):i.current!==t&&r(d6({prev:i.current,next:t})),i.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{i.current&&(r(f6(i.current)),i.current=null)},[r]),null}function CG(e,t){return MG(e)||_G(e,t)||OG(e,t)||PG()}function PG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OG(e,t){if(e){if(typeof e=="string")return s2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s2(e,t):void 0}}function s2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var i of r)n.push({status:"removed",prev:i});for(var o=0;oe[Math.floor(o*r)]);return Y0(n,t)}function DG(e,t){var r=t.map((n,i)=>e[i]);return Y0(r,t)}function RG(e,t){for(var r=new Map,n=0;n{var b=r(g,v);if(b!=null){var j=n.get(b);if(j!==void 0)return i.add(b),j}}),u=[];for(var c of n){var f=CG(c,2),h=f[0],m=f[1];i.has(h)||u.push(m)}return Y0(o,t,u)}function ry(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===Q0?TG(e,t):r===IG?DG(e,t):LG(e,t,r)}function tO(e,t){var r=y.useRef(e),n=y.useRef(t.current),i=y.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,i.current=!1);var o=y.useCallback(function(u,c){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(c===0){i.current=!0;return}c===1&&(n.current=u),c>0&&i.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:o}}function $G(e,t){return UG(e)||BG(e,t)||FG(e,t)||zG()}function zG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FG(e,t){if(e){if(typeof e=="string")return l2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l2(e,t):void 0}}function l2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{typeof e=="function"&&e(),o(!0)},[e]),c=y.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:i,handleAnimationStart:u,handleAnimationEnd:c}}function WG(e){var t,r=e.animationInput,n=e.animationIdPrefix,i=e.items,o=e.previousItemsRef,u=e.isAnimationActive,c=e.animationBegin,f=e.animationDuration,h=e.animationEasing,m=e.onAnimationStart,g=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,j=e.shouldUpdatePreviousRef,k=e.children,S=e.layout,N=gA(r,n),E=tO(N,o),A=(t=E.startValue)!==null&&t!==void 0?t:null,P=ry(A,i,b??Q0);return y.createElement(pA,{animationId:N,begin:c,duration:f,isActive:u,easing:h,onAnimationEnd:g,onAnimationStart:m,key:N},_=>{var O=A==null,D=i==null?i:v(P,_,S),B=j?j(_):_>0;return E.syncStepValue(D,_,B),D==null?null:k(D,_,O)})}var _g;function KG(e,t){return QG(e)||qG(e,t)||VG(e,t)||GG()}function GG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VG(e,t){if(e){if(typeof e=="string")return u2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u2(e,t):void 0}}function u2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var e=y.useState(()=>bu("uid-")),t=KG(e,1),r=t[0];return r},rO=(_g=Zf.useId)!==null&&_g!==void 0?_g:YG;function XG(e,t){var r=rO();return t||(e?"".concat(e,"-").concat(r):r)}var ZG=y.createContext(void 0),JG=e=>{var t=e.id,r=e.type,n=e.children,i=XG("recharts-".concat(r),t);return y.createElement(ZG.Provider,{value:i},n(i))},eV={cartesianItems:[],polarItems:[]},nO=sr({name:"graphicalItems",initialState:eV,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ot()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=qr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=i)},prepare:ot()},removeCartesianGraphicalItem:{reducer(e,t){var r=qr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ot()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ot()},removePolarGraphicalItem:{reducer(e,t){var r=qr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ot()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=qr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=i)},prepare:ot()}}}),nl=nO.actions,tV=nl.addCartesianGraphicalItem,rV=nl.replaceCartesianGraphicalItem,nV=nl.removeCartesianGraphicalItem;nl.addPolarGraphicalItem;nl.removePolarGraphicalItem;nl.replacePolarGraphicalItem;var iV=nO.reducer,aV=e=>{var t=jt(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t(tV(e)):r.current!==e&&t(rV({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(nV(r.current)),r.current=null)},[t]),null},oV=y.memo(aV),sV=["points"];function c2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mg(e){for(var t=1;t{var N,E,A=Mg(Mg(Mg({r:3},u),v),{},{index:S,cx:(N=k.x)!==null&&N!==void 0?N:void 0,cy:(E=k.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:k.value,payload:k.payload,points:t});return y.createElement(hV,{key:"dot-".concat(S),option:r,dotProps:A,className:i})}),j={};return c&&f!=null&&(j.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),y.createElement(Ni,{zIndex:m},y.createElement(Xr,Kf({className:n},j),b))}function d2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function f2(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),PV=q([CV,xi,bi],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),X0=()=>Me(PV),OV=()=>Me(RH);function h2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ig(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,i=e.activeDot,o=e.dataKey,u=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var c={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Ig(Ig(Ig({},c),uh(i)),_y(i)),h;return y.isValidElement(i)?h=y.cloneElement(i,f):typeof i=="function"?h=i(f):h=y.createElement(XP,f),y.createElement(Xr,{className:"recharts-active-dot",clipPath:u},h)};function m2(e){var t=e.points,r=e.mainColor,n=e.activeDot,i=e.itemDataKey,o=e.clipPath,u=e.zIndex,c=u===void 0?dr.activeDot:u,f=Me(Iu),h=OV();if(t==null||h==null)return null;var m=t.find(g=>h.includes(g.payload));return Vt(m)?null:y.createElement(Ni,{zIndex:c},y.createElement(TV,{point:m,childIndex:Number(f),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var DV=e=>{var t=e.chartData,r=jt(),n=Nr();return y.useEffect(()=>n?()=>{}:(r(RS(t)),()=>{r(RS(void 0))}),[t,r,n]),null},p2={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},oO=sr({name:"brush",initialState:p2,reducers:{setBrushSettings(e,t){return t.payload==null?p2:t.payload}}});oO.actions.setBrushSettings;var RV=oO.reducer;function LV(e){return(e%180+180)%180}var $V=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=LV(i),u=o*Math.PI/180,c=Math.atan(n/r),f=u>c&&u{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=qr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=qr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=qr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),il=sO.actions;il.addDot;il.removeDot;il.addArea;il.removeArea;il.addLine;il.removeLine;var FV=sO.reducer;function BV(e,t){return KV(e)||WV(e,t)||HV(e,t)||UV()}function UV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HV(e,t){if(e){if(typeof e=="string")return g2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g2(e,t):void 0}}function g2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=y.useState("".concat(bu("recharts"),"-clip")),n=BV(r,1),i=n[0],o=X0();if(o==null)return null;var u=o.x,c=o.y,f=o.width,h=o.height;return y.createElement(GV.Provider,{value:i},y.createElement("defs",null,y.createElement("clipPath",{id:i},y.createElement("rect",{x:u,y:c,height:h,width:f}))),t)};function lO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function YV(e,t){return lO(e,t+1)}function XV(e,t,r,n,i){for(var o=(n||[]).slice(),u=t.start,c=t.end,f=0,h=1,m=u,g=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:lO(n,h)};var k=f,S,N=()=>(S===void 0&&(S=r(j,k)),S),E=j.coordinate,A=f===0||Du(e,E,N,m,c);A||(f=0,m=u,h+=1),A&&(m=E+e*(N()/2+i),f+=h)},v;h<=o.length;)if(v=g(),v)return v.v;return[]}function ZV(e,t,r,n,i){var o=(n||[]).slice(),u=o.length;if(u===0)return[];for(var c=t.start,f=t.end,h=1;h<=u;h++){for(var m=(u-1)%h,g=c,v=!0,b=function(){var P=n[k];if(P==null)return 0;var _=k,O,D=()=>(O===void 0&&(O=r(P,_)),O),B=P.coordinate,F=k===m||Du(e,B,D,g,f);if(!F)return v=!1,1;F&&(g=B+e*(D()/2+i))},j,k=m;k(k===void 0&&(k=r(b,v)),k);if(v===u-1){var N=e*(j.coordinate+e*S()/2-f);o[v]=j=nr(nr({},j),{},{tickCoord:N>0?j.coordinate-N*e:j.coordinate})}else o[v]=j=nr(nr({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var E=Du(e,j.tickCoord,S,c,f);E&&(f=j.tickCoord-e*(S()/2+i),o[v]=nr(nr({},j),{},{isShow:!0}))}},m=u-1;m>=0;m--)h(m);return o}function nq(e,t,r,n,i,o){var u=(n||[]).slice(),c=u.length,f=t.start,h=t.end;if(o){var m=n[c-1];if(m!=null){var g=r(m,c-1),v=e*(m.coordinate+e*g/2-h);if(u[c-1]=m=nr(nr({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var b=Du(e,m.tickCoord,()=>g,f,h);b&&(h=m.tickCoord-e*(g/2+i),u[c-1]=nr(nr({},m),{},{isShow:!0}))}}}for(var j=o?c-1:c,k=function(E){var A=u[E];if(A==null)return 1;var P=A,_,O=()=>(_===void 0&&(_=r(A,E)),_);if(E===0){var D=e*(P.coordinate-e*O()/2-f);u[E]=P=nr(nr({},P),{},{tickCoord:D<0?P.coordinate-D*e:P.coordinate})}else u[E]=P=nr(nr({},P),{},{tickCoord:P.coordinate});if(P.tickCoord!=null){var B=Du(e,P.tickCoord,O,f,h);B&&(f=P.tickCoord+e*(O()/2+i),u[E]=nr(nr({},P),{},{isShow:!0}))}},S=0;S{var D=typeof h=="function"?h(_.value,O):_.value;return j==="width"?qV(fu(D,{fontSize:t,letterSpacing:r}),k,g):fu(D,{fontSize:t,letterSpacing:r})[j]},N=i[0],E=i[1],A=i.length>=2&&N!=null&&E!=null?Vr(E.coordinate-N.coordinate):1,P=QV(o,A,j);return f==="equidistantPreserveStart"?XV(A,P,S,i,u):f==="equidistantPreserveEnd"?ZV(A,P,S,i,u):(f==="preserveStart"||f==="preserveStartEnd"?b=nq(A,P,S,i,u,f==="preserveStartEnd"):b=rq(A,P,S,i,u),b.filter(_=>_.isShow))}var iq=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=n,o=e.tickSize,u=o===void 0?0:o,c=e.tickMargin,f=c===void 0?0:c,h=0;if(t){Array.from(t).forEach(b=>{if(b){var j=b.getBoundingClientRect();j.width>h&&(h=j.width)}});var m=r?r.getBoundingClientRect().width:0,g=u+f,v=h+g+m+(r?i:0);return Math.round(v)}return 0},aq={xAxis:{},yAxis:{}},uO=sr({name:"renderedTicks",initialState:aq,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId,o=r.ticks;e[n][i]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId;delete e[n][i]}}}),cO=uO.actions,oq=cO.setRenderedTicks,sq=cO.removeRenderedTicks,lq=uO.reducer,uq=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function y2(e,t){return hq(e)||fq(e,t)||dq(e,t)||cq()}function cq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dq(e,t){if(e){if(typeof e=="string")return x2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x2(e,t):void 0}}function x2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return Vs;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return i(oq({ticks:o,axisId:n,axisType:r})),()=>{i(sq({axisId:n,axisType:r}))}},[i,t,n,r]),null}var Nq=y.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,i=e.tick,o=e.tickLine,u=e.stroke,c=e.tickFormatter,f=e.unit,h=e.padding,m=e.tickTextProps,g=e.orientation,v=e.mirror,b=e.x,j=e.y,k=e.width,S=e.height,N=e.tickSize,E=e.tickMargin,A=e.fontSize,P=e.letterSpacing,_=e.getTicksConfig,O=e.events,D=e.axisType,B=e.axisId,F=Z0(gt(gt({},_),{},{ticks:n}),A,P),z=vn(_),Y=uh(i),U=HP(z.textAnchor)?z.textAnchor:wq(g,v),he=kq(g,v),ue={};typeof o=="object"&&(ue=o);var ge=gt(gt({},z),{},{fill:"none"},ue),ie=F.map(te=>gt({entry:te},bq(te,b,j,k,S,g,N,v,E))),se=ie.map(te=>{var J=te.entry,I=te.line;return y.createElement(Xr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(J.value,"-").concat(J.coordinate,"-").concat(J.tickCoord)},o&&y.createElement("line",go({},ge,I,{className:rt("recharts-cartesian-axis-tick-line",bo(o,"className"))})))}),X=ie.map((te,J)=>{var I,M,H=te.entry,ne=te.tick,Z=gt(gt(gt(gt({verticalAnchor:he},z),{},{textAnchor:U,stroke:"none",fill:u},ne),{},{index:J,payload:H,visibleTicksCount:F.length,tickFormatter:c,padding:h},m),{},{angle:(I=(M=m==null?void 0:m.angle)!==null&&M!==void 0?M:z.angle)!==null&&I!==void 0?I:0}),me=gt(gt({},Z),Y);return y.createElement(Xr,go({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(H.value,"-").concat(H.coordinate,"-").concat(H.tickCoord)},PR(O,H,J)),i&&y.createElement(jq,{option:i,tickProps:me,value:"".concat(typeof c=="function"?c(H.value,J):H.value).concat(f||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(D,"-ticks")},y.createElement(Sq,{ticks:F,axisId:B,axisType:D}),X.length>0&&y.createElement(Ni,{zIndex:dr.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(D,"-tick-labels"),ref:t},X)),se.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(D,"-tick-lines")},se))}),Eq=y.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,o=e.className,u=e.hide,c=e.ticks,f=e.axisType,h=e.axisId,m=mq(e,uq),g=y.useState(""),v=y2(g,2),b=v[0],j=v[1],k=y.useState(""),S=y2(k,2),N=S[0],E=S[1],A=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return iq({ticks:A.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var P=y.useCallback(_=>{if(_){var O=_.getElementsByClassName("recharts-cartesian-axis-tick-value");A.current=O;var D=O[0];if(D){var B=window.getComputedStyle(D),F=B.fontSize,z=B.letterSpacing;(F!==b||z!==N)&&(j(F),E(z))}}},[b,N]);return u||n!=null&&n<=0||i!=null&&i<=0?null:y.createElement(Ni,{zIndex:e.zIndex},y.createElement(Xr,{className:rt("recharts-cartesian-axis",o)},y.createElement(xq,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:vn(e)}),y.createElement(Nq,{ref:P,axisType:f,events:m,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),y.createElement(YK,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(oG,{label:e.label,labelRef:e.labelRef}),e.children)))}),J0=y.forwardRef((e,t)=>{var r=Jr(e,hi);return y.createElement(Eq,go({},r,{ref:t}))});J0.displayName="CartesianAxis";var Aq=["x1","y1","x2","y2","key"],Cq=["offset"],Pq=["xAxisId","yAxisId"],Oq=["xAxisId","yAxisId"];function w2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,u=e.height,c=e.ry;return y.createElement("rect",{x:n,y:i,ry:c,width:o,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function dO(e){var t=e.option,r=e.lineItemProps,n;if(y.isValidElement(t))n=y.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,o=r.x1,u=r.y1,c=r.x2,f=r.y2,h=r.key,m=Gf(r,Aq),g=(i=vn(m))!==null&&i!==void 0?i:{};g.offset;var v=Gf(g,Cq);n=y.createElement("line",Ga({},v,{x1:o,y1:u,x2:c,y2:f,fill:"none",key:h}))}return n}function Rq(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Gf(e,Pq),c=o.map((f,h)=>{var m=ar(ar({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return y.createElement(dO,{key:"line-".concat(h),option:i,lineItemProps:m})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function Lq(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Gf(e,Oq),c=o.map((f,h)=>{var m=ar(ar({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return y.createElement(dO,{option:i,lineItemProps:m,key:"line-".concat(h)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function $q(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,u=e.height,c=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||c==null)return null;var m=c.map(v=>Math.round(v+i-i)).sort((v,b)=>v-b);i!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?i+u-v:j-v;if(S<=0)return null;var N=b%t.length;return y.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:S,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},g)}function zq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,u=e.y,c=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var m=h.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?o+c-v:j-v;if(S<=0)return null;var N=b%n.length;return y.createElement("rect",{key:"react-".concat(b),x:v,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},g)}var Fq=(e,t)=>{var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return KE(Z0(ar(ar(ar({},hi),r),{},{ticks:GE(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},Bq=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return KE(Z0(ar(ar(ar({},hi),r),{},{ticks:GE(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},Uq={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:dr.grid};function fO(e){var t=eA(),r=tA(),n=JE(),i=ar(ar({},Jr(e,Uq)),{},{x:Ee(e.x)?e.x:n.left,y:Ee(e.y)?e.y:n.top,width:Ee(e.width)?e.width:n.width,height:Ee(e.height)?e.height:n.height}),o=i.xAxisId,u=i.yAxisId,c=i.x,f=i.y,h=i.width,m=i.height,g=i.syncWithTicks,v=i.horizontalValues,b=i.verticalValues,j=Nr(),k=Me(F=>jS(F,"xAxis",o,j)),S=Me(F=>jS(F,"yAxis",u,j));if(!Un(h)||!Un(m)||!Ee(c)||!Ee(f))return null;var N=i.verticalCoordinatesGenerator||Fq,E=i.horizontalCoordinatesGenerator||Bq,A=i.horizontalPoints,P=i.verticalPoints;if((!A||!A.length)&&typeof E=="function"){var _=v&&v.length,O=E({yAxis:S?ar(ar({},S),{},{ticks:_?v:S.ticks}):void 0,width:t??h,height:r??m,offset:n},_?!0:g);yf(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(A=O)}if((!P||!P.length)&&typeof N=="function"){var D=b&&b.length,B=N({xAxis:k?ar(ar({},k),{},{ticks:D?b:k.ticks}):void 0,width:t??h,height:r??m,offset:n},D?!0:g);yf(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(P=B)}return y.createElement(Ni,{zIndex:i.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(Dq,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),y.createElement($q,Ga({},i,{horizontalPoints:A})),y.createElement(zq,Ga({},i,{verticalPoints:P})),y.createElement(Rq,Ga({},i,{offset:n,horizontalPoints:A,xAxis:k,yAxis:S})),y.createElement(Lq,Ga({},i,{offset:n,verticalPoints:P,xAxis:k,yAxis:S}))))}fO.displayName="CartesianGrid";var Hq={},hO=sr({name:"errorBars",initialState:Hq,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]||(e[n]=[]),e[n].push(i)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===i.dataKey&&u.direction===i.direction?o:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),ex=hO.actions;ex.addErrorBar;ex.replaceErrorBar;ex.removeErrorBar;var Wq=hO.reducer;function mO(e,t){var r,n,i=Me(h=>ki(h,e)),o=Me(h=>ji(h,t)),u=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:Et.allowDataOverflow,c=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:At.allowDataOverflow,f=u||c;return{needClip:f,needClipX:u,needClipY:c}}function Kq(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=X0(),o=mO(t,r),u=o.needClipX,c=o.needClipY,f=o.needClip,h=Me(A=>ZC(A,t,!1)),m=Me(A=>JC(A,r,!1));if(!f||!i)return null;var g=i.x,v=i.y,b=i.width,j=i.height,k=u&&h?Math.min(h[0],h[1]):g-b/2,S=c&&m?Math.min(m[0],m[1]):v-j/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,E=c&&m?Math.abs(m[1]-m[0]):j*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:k,y:S,width:N,height:E}))}function Gq(e){var t=uh(e),r=3,n=2;if(t!=null){var i=t.r,o=t.strokeWidth,u=Number(i),c=Number(o);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(c)||c<0)&&(c=n),{r:u,strokeWidth:c}}return{r,strokeWidth:n}}function tx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:iO}function rx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:iO}var pO=(e,t,r)=>sP(e,"xAxis",tx(e,t),r),gO=(e,t,r)=>oP(e,"xAxis",tx(e,t),r),vO=(e,t,r)=>sP(e,"yAxis",rx(e,t),r),yO=(e,t,r)=>oP(e,"yAxis",rx(e,t),r),Vq=q([ct,pO,vO,gO,yO],(e,t,r,n,i)=>Gn(e,"xAxis")?vf(t,n,!1):vf(r,i,!1)),qq=(e,t)=>t,xO=q([EC,qq],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),bO=e=>{var t=ct(e),r=Gn(t,"xAxis");return r?"yAxis":"xAxis"},Qq=(e,t)=>{var r=bO(e);return r==="yAxis"?rx(e,t):tx(e,t)},Yq=(e,t,r)=>RC(e,bO(e),Qq(e,t),r),Xq=q([xO,Yq],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=r0(e);if(!(n==null||i==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=o==null?void 0:o.find(c=>c.key===i);if(u!=null)return u.map(c=>[c[0],c[1]])}}}),Zq=q([ct,pO,vO,gO,yO,Xq,kF,Vq,xO,zF],(e,t,r,n,i,o,u,c,f,h)=>{var m=u.chartData,g=u.dataStartIndex,v=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||c==null)){var b=f.data,j;if(b&&b.length>0?j=b:j=m==null?void 0:m.slice(g,v+1),j!=null)return SQ({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:g,areaSettings:f,stackedData:o,displayedData:j,chartBaseValue:h,bandSize:c})}}),Jq=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],eQ=["id","baseLine"];function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.y||0));return Ee(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(g=>g.y||0),m)),Ee(m)?y.createElement("rect",{x:cg.x||0));return Ee(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(g=>g.x||0),m)),Ee(m)?y.createElement("rect",{x:0,y:ce==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Hs(Hs({},r.next),{},{x:li(r.prev.x,r.next.x,t),y:li(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),kO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:Q0,animationInterpolateFn:fQ,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:aQ,xAxisId:0,yAxisId:0,zIndex:dr.area};function qf(e,t){return e&&e!=="none"?e:t}var hQ=e=>{var t=e.dataKey,r=e.name,n=e.stroke,i=e.fill,o=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:o,color:qf(n,i),value:VE(r,t),payload:e}]},mQ=y.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,i=e.strokeWidth,o=e.fill,u=e.name,c=e.hide,f=e.unit,h=e.tooltipType,m=e.id,g={dataDefinedOnItem:r,getPosition:Vs,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:VE(u,t),hide:c,type:h,color:qf(n,o),unit:f,graphicalItemId:m}};return y.createElement(EG,{tooltipEntrySettings:g})});function pQ(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,u=n.dataKey,c=vn(n);return y.createElement(pV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:c,needClip:i,clipPathId:t})}function gQ(e){var t=e.showLabels,r=e.children,n=e.points,i=n.map(o=>{var u,c,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Hs(Hs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return y.createElement(dG,{value:t?i:void 0},r)}function vQ(e){var t=e.points,r=e.baseLine,n=e.needClip,i=e.clipPathId,o=e.props,u=e.animationElapsedTime,c=e.isAnimating,f=e.isEntrance,h=o.layout,m=o.type,g=o.stroke,v=o.connectNulls,b=o.isRange,j=o.shape,k=o.id,S=wO(o,oQ),N=Yr(S),E=Hs(Hs({},N),{},{id:k,points:t,connectNulls:v,type:m,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:u,isAnimating:c,isEntrance:f});return y.createElement(y.Fragment,null,(t==null?void 0:t.length)>1&&y.createElement(Xr,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},y.createElement(NG,{option:j,DefaultShape:kO.shape,shapeProps:E})),y.createElement(pQ,{points:t,props:S,clipPathId:i}))}function yQ(e,t,r){if(Ee(e)){var n=Ee(t)?t:void 0;return li(n,e,r)}if(Vt(e)||Fn(e)){var i=Ee(t)?t:void 0;return li(i,0,r)}return e}function xQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=e.previousPointsRef,o=e.previousBaselineRef,u=n.points,c=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,m=n.animationDuration,g=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,j=y.useMemo(()=>({points:u,baseLine:c}),[u,c]),k=tO(j,o),S=Uy(),N=HG(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,A=N.handleAnimationStart,P=N.handleAnimationEnd,_=k.startValue;if(S==null)return null;var O;return Array.isArray(c)&&Array.isArray(_)?O=ry(_,c,v):Array.isArray(c)?O=ry(null,c,v):O=null,y.createElement(WG,{animationInput:j,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:i,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:g,onAnimationStart:A,onAnimationEnd:P,animationInterpolateFn:b,animationMatchBy:v,layout:S},(D,B,F)=>{var z;return B===1?z=c:Array.isArray(c)?z=b(O,B,S):z=F?c:yQ(c,_,B),k.syncStepValue(z,B),y.createElement(gQ,{showLabels:!E,points:u},n.children,y.createElement(vQ,{points:D,baseLine:z,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:E||B<1,isEntrance:F}),y.createElement(mG,{label:n.label}))})}function bQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=y.useRef(null),o=y.useRef();return y.createElement(xQ,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class wQ extends y.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,u=t.top,c=t.left,f=t.needClip,h=t.xAxisId,m=t.yAxisId,g=t.width,v=t.height,b=t.id,j=t.baseLine,k=t.zIndex;if(r)return null;var S=rt("recharts-area",o),N=b,E=Gq(n),A=E.r,P=E.strokeWidth,_=JP(n),O=A*2+P,D=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return y.createElement(Ni,{zIndex:k},y.createElement(Xr,{className:S},f&&y.createElement("defs",null,y.createElement(Kq,{clipPathId:N,xAxisId:h,yAxisId:m}),!_&&y.createElement("clipPath",{id:"clipPath-dots-".concat(N)},y.createElement("rect",{x:c-O/2,y:u-O/2,width:g+O,height:v+O}))),y.createElement(bQ,{needClip:f,clipPathId:N,props:this.props})),y.createElement(m2,{points:i,mainColor:qf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(j)&&y.createElement(m2,{points:j,mainColor:qf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}}function kQ(e){var t,r=e.activeDot,n=e.animationBegin,i=e.animationDuration,o=e.animationEasing,u=e.connectNulls,c=e.dot,f=e.fill,h=e.fillOpacity,m=e.hide,g=e.isAnimationActive,v=e.legendType,b=e.stroke,j=e.xAxisId,k=e.yAxisId,S=wO(e,sQ),N=qs(),E=OP(),A=mO(j,k),P=A.needClip,_=Nr(),O=(t=Me(ge=>Zq(ge,e.id,_)))!==null&&t!==void 0?t:{},D=O.points,B=O.isRange,F=O.baseLine,z=X0();if(N!=="horizontal"&&N!=="vertical"||z==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var Y=z.height,U=z.width,he=z.x,ue=z.y;return!D||!D.length?null:y.createElement(wQ,Vf({},S,{activeDot:r,animationBegin:n,animationDuration:i,animationEasing:o,baseLine:F,connectNulls:u,dot:c,fill:f,fillOpacity:h,height:Y,hide:m,layout:N,isAnimationActive:g,isRange:B,legendType:v,needClip:P,points:D,stroke:b,width:U,left:he,top:ue,xAxisId:j,yAxisId:k}))}var jQ=(e,t,r,n,i)=>{var o=r??t;if(Ee(o))return o;var u=e==="horizontal"?i:n,c=u.scale.domain();if(u.type==="number"){var f=Math.max(c[0],c[1]),h=Math.min(c[0],c[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return o==="dataMin"?c[0]:o==="dataMax"?c[1]:c[0]};function SQ(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,i=t.dataKey,o=e.stackedData,u=e.layout,c=e.chartBaseValue,f=e.xAxis,h=e.yAxis,m=e.displayedData,g=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,j=e.bandSize,k=o&&o.length,S=jQ(u,c,n,f,h),N=u==="horizontal",E=!1,A=m.map((_,O)=>{var D,B,F,z;if(k)z=o[g+O];else{var Y=Dt(_,i);Array.isArray(Y)?(z=Y,E=!0):z=[S,Y]}var U=(D=(B=z)===null||B===void 0?void 0:B[1])!==null&&D!==void 0?D:null,he=U==null||k&&!r&&Dt(_,i)==null;if(N){var ue;return{x:yk({axis:f,ticks:v,bandSize:j,entry:_,index:O}),y:he?null:(ue=h.scale.map(U))!==null&&ue!==void 0?ue:null,value:z,payload:_}}return{x:he?null:(F=f.scale.map(U))!==null&&F!==void 0?F:null,y:yk({axis:h,ticks:b,bandSize:j,entry:_,index:O}),value:z,payload:_}}),P;return k||E?P=A.map(_=>{var O,D=Array.isArray(_.value)?_.value[0]:null;if(N){var B;return{x:_.x,y:D!=null&&_.y!=null&&(B=h.scale.map(D))!==null&&B!==void 0?B:null,payload:_.payload}}return{x:D!=null&&(O=f.scale.map(D))!==null&&O!==void 0?O:null,y:_.y,payload:_.payload}}):P=N?h.scale.map(S):f.scale.map(S),{points:A,baseLine:P??0,isRange:E}}function NQ(e){var t=Jr(e,kO),r=Nr();return y.createElement(JG,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement(AG,{legendPayload:hQ(t)}),y.createElement(mQ,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),y.createElement(oV,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:lz(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(kQ,Vf({},t,{id:n}))))}var jO=y.memo(NQ,_h);jO.displayName="Area";var EQ=["domain","range"],AQ=["domain","range"];function S2(e,t){if(e==null)return{};var r,n,i=CQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(u!=null)return A2(A2({},o),{},{type:u})},[o,u]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(bV(c)):r.current!==c&&t(wV({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(kV(r.current)),r.current=null)},[t]),null}var LQ=e=>{var t=e.xAxisId,r=e.className,n=Me(QE),i=Nr(),o="xAxis",u=Me(v=>aP(v,o,t,i)),c=Me(v=>vU(v,t)),f=Me(v=>jU(v,t)),h=Me(v=>kC(v,t));if(c==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=iy(e,OQ);h.id,h.scale;var g=iy(h,_Q);return y.createElement(J0,ny({},m,g,{x:f.x,y:f.y,width:c.width,height:c.height,className:rt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:u,axisType:o,axisId:t}))},$Q={allowDataOverflow:Et.allowDataOverflow,allowDecimals:Et.allowDecimals,allowDuplicatedCategory:Et.allowDuplicatedCategory,angle:Et.angle,axisLine:hi.axisLine,height:Et.height,hide:!1,includeHidden:Et.includeHidden,interval:Et.interval,label:!1,minTickGap:Et.minTickGap,mirror:Et.mirror,orientation:Et.orientation,padding:Et.padding,reversed:Et.reversed,scale:Et.scale,tick:Et.tick,tickCount:Et.tickCount,tickLine:hi.tickLine,tickSize:hi.tickSize,type:Et.type,niceTicks:Et.niceTicks,xAxisId:0},zQ=e=>{var t=Jr(e,$Q);return y.createElement(y.Fragment,null,y.createElement(RQ,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),y.createElement(LQ,t))},NO=y.memo(zQ,SO);NO.displayName="XAxis";var FQ=["type"],BQ=["dangerouslySetInnerHTML","ticks","scale"],UQ=["id","scale"];function ay(){return ay=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(u!=null)return P2(P2({},o),{},{type:u})},[u,o]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(jV(c)):r.current!==c&&t(SV({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(NV(r.current)),r.current=null)},[t]),null}function qQ(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=y.useRef(null),u=y.useRef(null),c=Me(QE),f=Nr(),h=jt(),m="yAxis",g=Me(N=>EU(N,t)),v=Me(N=>NU(N,t)),b=Me(N=>aP(N,m,t,f)),j=Me(N=>jC(N,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!g||q0(i)||y.isValidElement(i)||j==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(g.width)!==Math.round(E)&&h(EV({id:t,width:E}))}}},[b,g,h,i,t,n,j]),g==null||v==null||j==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=oy(e,BQ);j.id,j.scale;var S=oy(j,UQ);return y.createElement(J0,ay({},k,S,{ref:o,labelRef:u,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:rt("recharts-".concat(m," ").concat(m),r),viewBox:c,ticks:b,axisType:m,axisId:t}))}var QQ={allowDataOverflow:At.allowDataOverflow,allowDecimals:At.allowDecimals,allowDuplicatedCategory:At.allowDuplicatedCategory,angle:At.angle,axisLine:hi.axisLine,hide:!1,includeHidden:At.includeHidden,interval:At.interval,label:!1,minTickGap:At.minTickGap,mirror:At.mirror,orientation:At.orientation,padding:At.padding,reversed:At.reversed,scale:At.scale,tick:At.tick,tickCount:At.tickCount,tickLine:hi.tickLine,tickSize:hi.tickSize,type:At.type,niceTicks:At.niceTicks,width:At.width,yAxisId:0},YQ=e=>{var t=Jr(e,QQ);return y.createElement(y.Fragment,null,y.createElement(VQ,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),y.createElement(qQ,t))},EO=y.memo(YQ,SO);EO.displayName="YAxis";var XQ=(e,t)=>t,nx=q([XQ,ct,LA,$t,SP,Si,qH,Qt],tW);function ZQ(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function ix(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(ZQ(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(c,f)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>u(c.clientX,c.clientY)):u(e.clientX,e.clientY)}var AO=Lr("mouseClick"),CO=Ku();CO.startListening({actionCreator:AO,effect:(e,t)=>{var r=e.payload,n=nx(t.getState(),ix(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(BU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var sy=Lr("mouseMove"),PO=Ku(),is=null,Ia=null,Tg=null;PO.startListening({actionCreator:sy,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=n.eventSettings,o=i.throttleDelay,u=i.throttledEvents,c=u==="all"||(u==null?void 0:u.includes("mousemove"));is!==null&&(cancelAnimationFrame(is),is=null),Ia!==null&&(typeof o!="number"||!c)&&(clearTimeout(Ia),Ia=null),Tg=ix(r);var f=()=>{var h=t.getState(),m=ic(h,h.tooltip.settings.shared);if(!Tg){is=null,Ia=null;return}if(m==="axis"){var g=nx(h,Tg);(g==null?void 0:g.activeIndex)!=null?t.dispatch(mP({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(hP())}is=null,Ia=null};if(!c){f();return}o==="raf"?is=requestAnimationFrame(f):typeof o=="number"&&Ia===null&&(Ia=setTimeout(f,o))}});function JQ(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var O2={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},OO=sr({name:"rootProps",initialState:O2,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:O2.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),eY=OO.reducer,tY=OO.actions.updateOptions,rY=null,nY={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},_O=sr({name:"polarOptions",initialState:rY,reducers:nY});_O.actions.updatePolarOptions;var iY=_O.reducer,MO=Lr("keyDown"),IO=Lr("focus"),TO=Lr("blur"),Xh=Ku(),as=null,Ta=null,$d=null;Xh.startListening({actionCreator:MO,effect:(e,t)=>{$d=e.payload,as!==null&&(cancelAnimationFrame(as),as=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,u=o==="all"||o.includes("keydown");Ta!==null&&(typeof i!="number"||!u)&&(clearTimeout(Ta),Ta=null);var c=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var m=f.tooltip.keyboardInteraction,g=$d;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var v=du(m,po(f),Bs(f),Us(f)),b=v==null?-1:Number(v),j=!Number.isFinite(b)||b<0,k=Si(f),S=po(f),N=ic(f,f.tooltip.settings.shared);if(g==="Enter"){if(j)return;var E=Uf(f,N,"hover",String(m.index));t.dispatch(Bf({active:!m.active,activeIndex:m.index,activeCoordinate:E}));return}var A=_U(f),P=A==="left-to-right"?1:-1,_=g==="ArrowRight"?1:-1,O;if(j){var D=Bs(f),B=Us(f),F=_*P,z=ge=>({active:!1,index:String(ge),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,F>0){for(var Y=0;Y=0;U--)if(du(z(U),S,D,B)!=null){O=U;break}if(O<0)return}else{O=b+_*P;var he=(k==null?void 0:k.length)||S.length;if(he===0||O>=he||O<0)return}var ue=Uf(f,N,"hover",String(O));t.dispatch(Bf({active:!0,activeIndex:O.toString(),activeCoordinate:ue}))}finally{as=null,Ta=null}};if(!u){c();return}i==="raf"?as=requestAnimationFrame(c):typeof i=="number"&&Ta===null&&(c(),$d=null,Ta=setTimeout(()=>{$d?c():(Ta=null,as=null)},i))}});Xh.startListening({actionCreator:IO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;if(!i.active&&i.index==null){var o="0",u=ic(r,r.tooltip.settings.shared),c=Uf(r,u,"hover",String(o));t.dispatch(Bf({active:!0,activeIndex:o,activeCoordinate:c}))}}}});Xh.startListening({actionCreator:TO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(Bf({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function DO(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var Kr=Lr("externalEvent"),RO=Ku(),zd=new Map,tu=new Map,Dg=new Map;RO.startListening({actionCreator:Kr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,u=DO(i);Dg.set(o,{handler:n,reactEvent:u});var c=zd.get(o);c!==void 0&&(cancelAnimationFrame(c),zd.delete(o));var f=t.getState(),h=f.eventSettings,m=h.throttleDelay,g=h.throttledEvents,v=g,b=v==="all"||(v==null?void 0:v.includes(o)),j=tu.get(o);j!==void 0&&(typeof m!="number"||!b)&&(clearTimeout(j),tu.delete(o));var k=()=>{var E=Dg.get(o);try{if(!E)return;var A=E.handler,P=E.reactEvent,_=t.getState(),O={activeCoordinate:IH(_),activeDataKey:OH(_),activeIndex:Iu(_),activeLabel:AP(_),activeTooltipIndex:Iu(_),isTooltipActive:TH(_)};A&&A(O,P)}finally{zd.delete(o),tu.delete(o),Dg.delete(o)}};if(!b){k();return}if(m==="raf"){var S=requestAnimationFrame(k);zd.set(o,S)}else if(typeof m=="number"){if(!tu.has(o)){k();var N=setTimeout(k,m);tu.set(o,N)}}else k()}}});var aY=q([rl],e=>e.tooltipItemPayloads),oY=q([aY,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var i=n.getPosition;if(i!=null)return i(t)}}}),LO=Lr("touchMove"),$O=Ku(),Da=null,Vi=null,_2=null,ru=null;$O.startListening({actionCreator:LO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){ru=DO(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,u=i.throttledEvents,c=u==="all"||u.includes("touchmove");Da!==null&&(cancelAnimationFrame(Da),Da=null),Vi!==null&&(typeof o!="number"||!c)&&(clearTimeout(Vi),Vi=null),_2=Array.from(r.touches).map(h=>ix({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(ru!=null){var h=t.getState(),m=ic(h,h.tooltip.settings.shared);if(m==="axis"){var g,v=(g=_2)===null||g===void 0?void 0:g[0];if(v==null){Da=null,Vi=null;return}var b=nx(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(mP({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(m==="item"){var j,k=ru.touches[0];if(document.elementFromPoint==null||k==null)return;var S=document.elementFromPoint(k.clientX,k.clientY);if(!S||!S.getAttribute)return;var N=S.getAttribute(pz),E=(j=S.getAttribute(gz))!==null&&j!==void 0?j:void 0,A=jo(h).find(O=>O.id===E);if(N==null||A==null||E==null)return;var P=A.dataKey,_=oY(h,N,E);t.dispatch(FU({activeDataKey:P,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:E}))}Da=null,Vi=null}};if(!c){f();return}o==="raf"?Da=requestAnimationFrame(f):typeof o=="number"&&Vi===null&&(f(),ru=null,Vi=setTimeout(()=>{ru?f():(Vi=null,Da=null)},o))}}});var zO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},FO=sr({name:"eventSettings",initialState:zO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),sY=FO.actions.setEventSettings,lY=FO.reducer,uY=gE({brush:RV,cartesianAxis:AV,chartData:MW,errorBars:Wq,eventSettings:lY,graphicalItems:iV,layout:J$,legend:h6,options:AW,polarAxis:gG,polarOptions:iY,referenceElements:FV,renderedTicks:lq,rootProps:eY,tooltip:UU,zIndex:mW}),cY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return S$({reducer:uY,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([CO.middleware,PO.middleware,Xh.middleware,RO.middleware,$O.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(_E({type:"raf"}))},devTools:{serialize:{replacer:JQ},name:"recharts-".concat(r)}})};function dY(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=Nr(),o=y.useRef(null);if(i)return r;o.current==null&&(o.current=cY(t,n));var u=Iy;return y.createElement(P6,{context:u,store:o.current},r)}function fY(e){var t=e.layout,r=e.margin,n=jt(),i=Nr();return y.useEffect(()=>{i||(n(Y$(t)),n(Q$(r)))},[n,i,t,r]),null}var hY=y.memo(fY,_h);function mY(e){var t=jt();return y.useEffect(()=>{t(tY(e))},[t,e]),null}var pY=e=>{var t=jt();return y.useEffect(()=>{t(sY(e))},[t,e]),null},gY=y.memo(pY,_h);function M2(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),i=jt();return y.useLayoutEffect(()=>(n.current&&i(fW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(hW({zIndex:t,isPanorama:r}))}),[i,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function I2(e){var t=e.children,r=e.isPanorama,n=Me(nW);if(!n||n.length===0)return t;var i=n.filter(u=>u<0),o=n.filter(u=>u>0);return y.createElement(y.Fragment,null,i.map(u=>y.createElement(M2,{key:u,zIndex:u,isPanorama:r})),t,o.map(u=>y.createElement(M2,{key:u,zIndex:u,isPanorama:r})))}var vY=["children"];function yY(e,t){if(e==null)return{};var r,n,i=xY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=eA(),n=tA(),i=dA();if(!Un(r)||!Un(n))return null;var o=e.children,u=e.otherAttributes,c=e.title,f=e.desc,h,m;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=i?0:void 0,typeof u.role=="string"?m=u.role:m=i?"application":void 0),y.createElement(T5,Qf({},u,{title:c,desc:f,role:m,tabIndex:h,width:r,height:n,style:bY,ref:t}),o)}),kY=e=>{var t=e.children,r=Me(Eh);if(!r)return null;var n=r.width,i=r.height,o=r.y,u=r.x;return y.createElement(T5,{width:n,height:i,x:u,y:o},t)},T2=y.forwardRef((e,t)=>{var r=e.children,n=yY(e,vY),i=Nr();return i?y.createElement(kY,null,y.createElement(I2,{isPanorama:!0},r)):y.createElement(wY,Qf({ref:t},n),y.createElement(I2,{isPanorama:!1},r))});function jY(e,t){return AY(e)||EY(e,t)||NY(e,t)||SY()}function SY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NY(e,t){if(e){if(typeof e=="string")return D2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D2(e,t):void 0}}function D2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var u=n.getBoundingClientRect(),c=u.width/n.offsetWidth;He(c)&&c!==o&&e(Z$(c))}},[n,e,o]),i}function R2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function PY(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(BW(),null);function Xf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var $Y=y.forwardRef((e,t)=>{var r,n,i=y.useRef(null),o=y.useState({containerWidth:Xf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Xf((n=e.style)===null||n===void 0?void 0:n.height)}),u=Yf(o,2),c=u[0],f=u[1],h=y.useCallback((g,v)=>{f(b=>{var j=Math.round(g),k=Math.round(v);return b.containerWidth===j&&b.containerHeight===k?b:{containerWidth:j,containerHeight:k}})},[]),m=y.useCallback(g=>{if(typeof t=="function"&&t(g),i.current!=null&&(i.current.disconnect(),i.current=null),g!=null&&typeof ResizeObserver<"u"){var v=g.getBoundingClientRect(),b=v.width,j=v.height;h(b,j);var k=N=>{var E=N[0];if(E!=null){var A=E.contentRect,P=A.width,_=A.height;h(P,_)}},S=new ResizeObserver(k);S.observe(g),i.current=S}},[t,h]);return y.useEffect(()=>()=>{var g=i.current;g!=null&&g.disconnect()},[h]),y.createElement(y.Fragment,null,y.createElement(Vu,{width:c.containerWidth,height:c.containerHeight}),y.createElement("div",fa({ref:m},e)))}),zY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,i=y.useState({containerWidth:Xf(r),containerHeight:Xf(n)}),o=Yf(i,2),u=o[0],c=o[1],f=y.useCallback((m,g)=>{c(v=>{var b=Math.round(m),j=Math.round(g);return v.containerWidth===b&&v.containerHeight===j?v:{containerWidth:b,containerHeight:j}})},[]),h=y.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var g=m.getBoundingClientRect(),v=g.width,b=g.height;f(v,b)}},[t,f]);return y.createElement(y.Fragment,null,y.createElement(Vu,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",fa({ref:h},e)))}),FY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement("div",fa({ref:t},e)))}),BY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(zY,fa({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(FY,fa({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement("div",fa({ref:t},e)))});function UY(e){return e?$Y:BY}var HY=y.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,u=e.onContextMenu,c=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,m=e.onMouseLeave,g=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,j=e.onTouchMove,k=e.onTouchStart,S=e.style,N=e.width,E=e.responsive,A=e.dispatchTouchEvents,P=A===void 0?!0:A,_=y.useRef(null),O=jt(),D=y.useState(null),B=Yf(D,2),F=B[0],z=B[1],Y=y.useState(null),U=Yf(Y,2),he=U[0],ue=U[1],ge=CY(),ie=Fy(),se=(ie==null?void 0:ie.width)>0?ie.width:N,X=(ie==null?void 0:ie.height)>0?ie.height:i,te=y.useCallback(Pe=>{ge(Pe),typeof t=="function"&&t(Pe),z(Pe),ue(Pe),Pe!=null&&(_.current=Pe)},[ge,t,z,ue]),J=y.useCallback(Pe=>{O(AO(Pe)),O(Kr({handler:o,reactEvent:Pe}))},[O,o]),I=y.useCallback(Pe=>{O(sy(Pe)),O(Kr({handler:h,reactEvent:Pe}))},[O,h]),M=y.useCallback(Pe=>{O(hP()),O(Kr({handler:m,reactEvent:Pe}))},[O,m]),H=y.useCallback(Pe=>{O(sy(Pe)),O(Kr({handler:g,reactEvent:Pe}))},[O,g]),ne=y.useCallback(()=>{O(IO())},[O]),Z=y.useCallback(()=>{O(TO())},[O]),me=y.useCallback(Pe=>{O(MO(Pe.key))},[O]),pe=y.useCallback(Pe=>{O(Kr({handler:u,reactEvent:Pe}))},[O,u]),Oe=y.useCallback(Pe=>{O(Kr({handler:c,reactEvent:Pe}))},[O,c]),re=y.useCallback(Pe=>{O(Kr({handler:f,reactEvent:Pe}))},[O,f]),we=y.useCallback(Pe=>{O(Kr({handler:v,reactEvent:Pe}))},[O,v]),_e=y.useCallback(Pe=>{O(Kr({handler:k,reactEvent:Pe}))},[O,k]),ae=y.useCallback(Pe=>{P&&O(LO(Pe)),O(Kr({handler:j,reactEvent:Pe}))},[O,P,j]),et=y.useCallback(Pe=>{O(Kr({handler:b,reactEvent:Pe}))},[O,b]),Be=UY(E);return y.createElement(DP.Provider,{value:F},y.createElement(nR.Provider,{value:he},y.createElement(Be,{width:se??(S==null?void 0:S.width),height:X??(S==null?void 0:S.height),className:rt("recharts-wrapper",n),style:PY({position:"relative",cursor:"default",width:se,height:X},S),onClick:J,onContextMenu:pe,onDoubleClick:Oe,onFocus:ne,onBlur:Z,onKeyDown:me,onMouseDown:re,onMouseEnter:I,onMouseLeave:M,onMouseMove:H,onMouseUp:we,onTouchEnd:et,onTouchMove:ae,onTouchStart:_e,ref:te},y.createElement(LY,null),r)))}),WY=["width","height","responsive","children","className","style","compact","title","desc"];function KY(e,t){if(e==null)return{};var r,n,i=GY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,i=e.responsive,o=e.children,u=e.className,c=e.style,f=e.compact,h=e.title,m=e.desc,g=KY(e,WY),v=vn(g);return f?y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement(T2,{otherAttributes:v,title:h,desc:m},o)):y.createElement(HY,{className:u,style:c,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},y.createElement(T2,{otherAttributes:v,title:h,desc:m,ref:t},y.createElement(VV,null,o)))});function ly(){return ly=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(eX,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:tX,tooltipPayloadSearcher:NW,categoricalChartProps:e,ref:t}));const nX="rgba(130,130,150,0.14)",z2="rgba(130,130,150,0.85)";function iX(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function BO(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function aX({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:l.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:l.jsx("div",{className:"space-y-1",children:t.map(n=>l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),l.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),l.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:BO(n.value,r)})]},n.dataKey))})})}function UO({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176}){const o=e.reduce((c,f)=>t.reduce((h,m)=>Math.max(h,Number(f[m.key])||0),c),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(iX(o*1.15),10);return l.jsx("div",{style:{height:i},className:"w-full",children:l.jsx(Qz,{width:"100%",height:"100%",children:l.jsxs(rX,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[l.jsx("defs",{children:t.map(c=>l.jsxs("linearGradient",{id:`grad-${c.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"0%",stopColor:c.color,stopOpacity:.22}),l.jsx("stop",{offset:"100%",stopColor:c.color,stopOpacity:0})]},c.key))}),l.jsx(fO,{vertical:!1,stroke:nX}),l.jsx(NO,{dataKey:"t",hide:!0}),l.jsx(EO,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:c=>BO(c,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:z2}}),l.jsx(eK,{content:l.jsx(aX,{unit:r}),cursor:{stroke:z2,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(c=>l.jsx(jO,{type:"monotone",dataKey:c.key,name:c.label,stroke:c.color,strokeWidth:2,fill:`url(#grad-${c.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},c.key))]})})})}const oX=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function HO(){var u,c,f,h;const{sys:e,hist:t}=KD(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=oX.filter(m=>m.key!=="gpu"||r),i={cpu:(u=e==null?void 0:e.cpu)==null?void 0:u.percent,ram:(c=e==null?void 0:e.ram)==null?void 0:c.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Yi(e.ram.used)}/${Yi(e.ram.total)} GB`:"",gpu:r?`${Yi(e.gpu.gtt_used)}/${Yi(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Yi(e.disk.used)}/${Yi(e.disk.total)} GB`:""};return l.jsxs("div",{className:"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:[l.jsxs("div",{children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx($n,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(m=>l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:m.color}}),l.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label}),l.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(i[m.key]??0),"%"]}),o[m.key]&&l.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[m.key]})]},m.key))}),l.jsx(UO,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):l.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&l.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&l.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&l.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function nu({label:e,value:t,tone:r}){return l.jsxs("div",{className:ee("flex items-center justify-between rounded-lg border px-3 py-1.5 text-xs",r==="alert"?"border-amber-500/30 bg-amber-500/5 font-semibold text-amber-400":r==="accent"?"border-primary/30 bg-primary/5 font-semibold text-primary":"border-border/30 bg-background/25 text-muted-foreground"),children:[l.jsx("span",{className:"flex items-center gap-1.5",children:e}),l.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function sX(){var r;const{data:e}=lh(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return l.jsxs("div",{className:"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:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(R4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&l.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground/80",children:["Zuletzt gesucht: ",new Date(e.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),e?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(nu,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),l.jsx(nu,{label:"Inferenz-Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),l.jsx(nu,{label:"Router (llama-swap)",tone:e.swap>0?"alert":"muted",value:e.swap>0?"Update verfügbar":"aktuell"}),l.jsx(nu,{label:"Modell-Upgrades",tone:e.models>0?"accent":"muted",value:e.models>0?`${e.models} verfügbar`:"aktuell"}),(r=e.components)==null?void 0:r.map(n=>l.jsx(nu,{tone:n.update===!0?"alert":"muted",label:l.jsxs(l.Fragment,{children:[n.name,n.reachable===!1&&l.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),value:n.update===!0?`Update: ${n.latest}`:n.update===!1?"aktuell":n.latest?`neueste: ${n.latest}`:"—"},n.key))]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),l.jsxs("button",{onClick:t,className:"mt-4 flex h-9 w-full items-center justify-center gap-1.5 rounded-lg bg-primary text-xs font-semibold text-primary-foreground shadow-md shadow-primary/10 transition-all hover:opacity-90 cursor-pointer",children:["Updates verwalten & Pflege ",l.jsx(eh,{className:"h-3.5 w-3.5"})]})]})}function WO({type:e,title:t,message:r,defaultValue:n,autoValue:i,autoLabel:o,onConfirm:u,onCancel:c}){const f=y.useRef(null);return l.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":t,children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),l.jsx("button",{onClick:c||(()=>u()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{ref:f,type:"text",defaultValue:n,"aria-label":t,className:"flex-1 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:h=>{var m;h.key==="Enter"&&u((m=f.current)==null?void 0:m.value)}}),i!==void 0&&l.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=i)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),l.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&l.jsx("button",{onClick:c,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"}),l.jsx("button",{onClick:()=>{var m;const h=e==="prompt"?(m=f.current)==null?void 0:m.value:void 0;u(h)},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:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function ya(){const[e,t]=y.useState(null),r=y.useCallback(()=>t(null),[]),n=y.useCallback((c,f,h)=>{t({type:"alert",title:c,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),i=y.useCallback((c,f,h,m)=>{t({type:"confirm",title:c,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),m==null||m()}})},[]),o=y.useCallback((c,f,h,m,g,v)=>{t({type:"prompt",title:c,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),m(b)},onCancel:()=>{t(null),g==null||g()}})},[]),u=e?l.jsx(WO,{...e}):null;return{showAlert:n,showConfirm:i,showPrompt:o,close:r,dialogElement:u}}function lX(){const e=Kn(),{data:t}=Ny(3e3),{data:r}=yi(),{showAlert:n,dialogElement:i}=ya(),[o,u]=y.useState(!1),c=(r==null?void 0:r.models)??[];async function f(h){try{await je("/api/agent/brain",{method:"POST",body:JSON.stringify({model:h})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${h}' geändert. Der Gateway-Dienst wurde neu gestartet.`),e.invalidateQueries({queryKey:Ge.agentStatus}),u(!1)}catch(m){n("Fehler",`Fehler beim Wechseln des Gehirns: ${m.message}`)}}return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.terminal_url)&&l.jsxs("a",{href:Ds(t.terminal_url),target:"_blank",rel:"noopener",className:ee("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",t.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[l.jsx(Ms,{className:"h-3 w-3"})," Terminal öffnen"]})]}),t?l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Terminal"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",t.terminal_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.terminal_reachable?"Online":"Offline"})]})]}),l.jsxs("div",{onClick:()=>u(!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:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),l.jsx($n,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[l.jsx(gy,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),l.jsx(Uu,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[l.jsxs("div",{children:["Config: ",t.has_config?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Skills: ",t.has_skills?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Memory: ",t.has_memories?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):l.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&l.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"Telegram"}),l.jsx("span",{className:ee("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"MCP-Server"}),l.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"PC Executor"}),l.jsx("span",{className:ee("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx($n,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),l.jsx("button",{onClick:()=>u(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.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 (',l.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),l.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...c.map(h=>{var m;return((m=h.name.split("/").pop())==null?void 0:m.replace(".gguf",""))||h.name})].map(h=>{const m=["auto","fast","heavy"].includes(h);return l.jsxs("button",{onClick:()=>f(h),className:ee("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",t.brain_model===h||!t.brain_model&&h==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[l.jsxs("div",{className:"flex flex-col text-left",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:m?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&l.jsx(or,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),i]})}function uX(){const e=Kn(),{data:t=[]}=cv({limit:3}),[r,n]=y.useState(""),[i,o]=y.useState("stable"),[u,c]=y.useState(!1);async function f(){if(!(!r.trim()||u)){c(!0);try{await je("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:i,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{c(!1)}}}return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(vo,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("textarea",{value:r,onChange:h=>n(h.target.value),"aria-label":"Fakt oder Regel im Gedächtnis speichern",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"}),l.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[l.jsxs("select",{value:i,onChange:h=>o(h.target.value),"aria-label":"Kategorie",className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[l.jsx("option",{value:"stable",children:"🔵 Fakt"}),l.jsx("option",{value:"instruction",children:"📋 Regel"}),l.jsx("option",{value:"user",children:"👤 User"}),l.jsx("option",{value:"versioned",children:"🟡 Version"})]}),l.jsxs("button",{onClick:f,disabled:!r.trim()||u,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:[l.jsx(tf,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),l.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[l.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),l.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?l.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>l.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[l.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:h.category}),l.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),l.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."})]})}const F2=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function KO(){const{data:e}=Sy(3e3),t=HD(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Jf,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&l.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[l.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&l.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[l.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",l.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),l.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),l.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:F2.map(i=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:i.label}),l.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[i.key])??0)})]},i.key))})]}),e?l.jsx(UO,{data:t,series:F2,unit:" tok/s",yMode:"auto",height:150}):l.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),l.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}function cX(){const{data:e}=A5(3e3),{showAlert:t,dialogElement:r}=ya(),[n,i]=y.useState({});async function o(u){i(c=>({...c,[u]:!0}));try{const c=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:u})});c.ok||t("Fehler",`Neustart fehlgeschlagen: ${c.err||"Unbekannt"}`)}catch(c){t("Fehler",`Fehler: ${c.message}`)}finally{i(c=>({...c,[u]:!1}))}}return l.jsxs("div",{className:"flex flex-col rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(rh,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),l.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground transition-colors hover:text-primary cursor-pointer",children:"Logs / Pflege"})]}),e?l.jsxs("div",{className:"flex flex-1 flex-col",children:[l.jsx("div",{className:"space-y-1.5",children:e.services.map(u=>l.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("span",{className:ee("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",u.ok?"bg-emerald-500":"bg-amber-500")}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:u.name}),l.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:u.url})]})]}),l.jsx("button",{onClick:()=>o(u.unit),disabled:n[u.unit],className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-primary/5 hover:text-primary group-hover:opacity-100",title:"Dienst neu starten",children:l.jsx(ro,{className:ee("h-3.5 w-3.5",n[u.unit]&&"animate-spin")})})]},u.unit))}),l.jsxs("div",{className:"mt-auto flex flex-wrap gap-3 border-t border-border/20 pt-2.5 text-[10px] font-semibold text-muted-foreground",children:[l.jsxs("a",{href:Ds(e.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[l.jsx(Ms,{className:"h-3 w-3"})," Engine"]}),l.jsxs("a",{href:Ds(e.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[l.jsx(Ms,{className:"h-3 w-3"})," Gateway"]})]})]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}const Rg=[{key:"stt",label:"STT",hint:"Sprache → Text"},{key:"vision",label:"Bildschirm-Sicht",hint:"Vision-Beschreibung"},{key:"chat_ttfb",label:"Chat-TTFB",hint:"Zeit bis 1. Token"},{key:"tts",label:"TTS",hint:"Text → Sprache"}];function Fd(e){return e==null?"—":e>=1e3?`${(e/1e3).toFixed(2)} s`:`${Math.round(e)} ms`}function dX({stat:e,label:t,hint:r,maxP95:n}){const i=!!e&&e.count>0,o=i&&e.p95_ms&&n>0?Math.max(4,Math.min(100,e.p95_ms/n*100)):0;return l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[l.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[l.jsx("span",{className:"text-xs font-semibold text-foreground",children:t}),l.jsx("span",{className:"truncate text-[10px] text-muted-foreground/60",children:r})]}),i?l.jsx("span",{className:"shrink-0 font-mono text-sm font-bold tabular-nums text-foreground",children:Fd(e.p50_ms)}):l.jsx("span",{className:"shrink-0 text-[10px] italic text-muted-foreground/50",children:"noch keine Messungen"})]}),l.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-background/50 border border-border/30",children:l.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-teal-500 to-indigo-500 transition-all duration-500",style:{width:`${o}%`}})}),i&&l.jsxs("div",{className:"flex items-center gap-3 font-mono text-[10px] text-muted-foreground/65",children:[l.jsxs("span",{children:["p50 ",Fd(e.p50_ms)]}),l.jsxs("span",{children:["p95 ",Fd(e.p95_ms)]}),l.jsxs("span",{children:["zuletzt ",Fd(e.last_ms)]}),l.jsxs("span",{className:"text-muted-foreground/45",children:["· n=",e.count]})]})]})}function GO(){const{data:e}=ID(5e3),t=Math.max(1,...Rg.map(n=>{var i;return((i=e==null?void 0:e[n.key])==null?void 0:i.p95_ms)??0})),r=Rg.some(n=>{var i;return(((i=e==null?void 0:e[n.key])==null?void 0:i.count)??0)>0});return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(MN,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Sprach-Latenz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),l.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:Rg.map(n=>l.jsx(dX,{stat:e==null?void 0:e[n.key],label:n.label,hint:n.hint,maxP95:t},n.key))}),l.jsx("div",{className:"mt-4 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:r?"Server-seitige Dauer je Pipeline-Stufe (p50 prominent). Rollender Schnitt über die letzten Turns; Reset bei Neustart.":"Noch keine Voice-Turns gemessen — sprich einmal über den „Sprechen“-Tab, dann erscheinen hier STT/Vision/Chat/TTS."})]})}const VO=[{role:"hermes",label:"Lucys Hirn",short:"Hirn",icon:vo,desc:"Lucys Alltags-Verstand — denkt und redet mit dir. Immer bereit.",tone:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25",protected:!0},{role:"embed",label:"Lucys Gedächtnis",short:"Gedächtnis",icon:AN,desc:"Merkt sich Wichtiges und findet es später wieder.",tone:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",protected:!0},{role:"vision",label:"Lucys Augen",short:"Augen",icon:vu,desc:"Sieht Bilder und Screenshots und beschreibt, was drauf ist.",tone:"bg-pink-500/15 text-pink-400 border-pink-500/25"},{role:"heavy",label:"Großes Hirn",short:"Groß",icon:e4,desc:"Das schwere Geschütz — wird für besonders knifflige Fragen dazugeholt.",tone:"bg-amber-500/15 text-amber-400 border-amber-500/25"},{role:"coder-lite",label:"Programmierer (schnell)",short:"Code schnell",icon:Os,desc:"Schnelles Programmieren im Alltag.",tone:"bg-violet-500/15 text-violet-400 border-violet-500/25"},{role:"coder",label:"Programmierer (gründlich)",short:"Code gründlich",icon:Os,desc:"Schreibt und prüft Code besonders sorgfältig — für schwere Coding-Aufgaben.",tone:"bg-fuchsia-500/15 text-fuchsia-400 border-fuchsia-500/25"},{role:"scout",label:"Späher",short:"Späher",icon:B4,desc:"Schneller erster Blick und grobe Einschätzung.",tone:"bg-teal-500/15 text-teal-400 border-teal-500/25"}],qO=VO.map(e=>e.role),B2=Object.fromEntries(VO.map(e=>[e.role,e])),U2=e=>({role:e||"?",label:e||"unbekannt",short:e||"?",icon:vo,desc:"Rolle ohne hinterlegten Klartext-Namen.",tone:"bg-slate-500/15 text-slate-300 border-slate-500/25"}),fX={fast:"hermes",coder_lite:"coder-lite"};function ir(e){return e&&(B2[e]||B2[fX[e]])||U2(e)}function oo({role:e,dense:t=!1,className:r}){const n=ir(e),i=n.icon;return l.jsxs("span",{className:ee("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold border tracking-wide",n.tone,r),title:`${n.desc} (${n.role})`,children:[l.jsx(i,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),t?n.short:n.label]})}function hX({fit:e}){const t={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"}[e.level];return l.jsxs("span",{className:ee("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function H2(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.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 mX(){var b,j,k;const{data:e}=yi(2e3),{data:t}=Sy(2e3),{data:r}=xo(),n=(e==null?void 0:e.models)??[],i=(e==null?void 0:e.running)??[],o=((b=r==null?void 0:r.gpu)==null?void 0:b.gtt_total)||((j=r==null?void 0:r.gpu)==null?void 0:j.vram_total)||0,u=((k=r==null?void 0:r.gpu)==null?void 0:k.gtt_used)||0,c=o>0?Math.min(100,u/o*100):0,f=c>=88?"bg-red-500":c>=70?"bg-amber-500":"bg-teal-500",h=c>=88?"text-red-400":c>=70?"text-amber-400":"text-foreground",m=y.useRef(null),[g,v]=y.useState(!1);return y.useEffect(()=>{if(!t)return;const S=t.total_tokens;if(m.current!==null&&S>m.current){v(!0);const N=setTimeout(()=>v(!1),4e3);return m.current=S,()=>clearTimeout(N)}m.current=S},[t==null?void 0:t.total_tokens]),l.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",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Jd,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Modelle"})]}),l.jsxs("span",{className:ee("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",g?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[g?l.jsx(ha,{className:"h-3 w-3 animate-pulse"}):l.jsx(A4,{className:"h-3 w-3"}),g?"Inferenz aktiv":"Idle"]})]}),o>0&&l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-muted-foreground/80 mb-1",children:[l.jsx("span",{className:"uppercase tracking-wider font-semibold",children:"Speicher-Pool"}),l.jsxs("span",{children:[l.jsx("span",{className:ee("font-bold",h),children:Yi(u)})," / ",Yi(o)," GB belegt"]})]}),l.jsx("div",{className:"h-1.5 w-full rounded-full bg-background/50 border border-border/30 overflow-hidden",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",f),style:{width:`${c}%`}})})]}),l.jsx("div",{className:"space-y-2 flex-1",children:qO.map(S=>{var A;const N=n.find(P=>P.role===S),E=N?i.includes(N.name):!1;return l.jsxs("div",{className:ee("flex items-center justify-between gap-2 p-2 rounded-xl border transition-all duration-300",E?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":N?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[l.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[l.jsx(oo,{role:S,className:"shrink-0"}),l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:N?(A=N.name.split("/").pop())==null?void 0:A.replace(/\.gguf$/i,""):"nicht zugewiesen"}),N&&l.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap text-muted-foreground/70",children:[l.jsx("span",{className:"text-[9px] font-mono",children:_r(N.size_bytes)}),N.prompt_cache&&l.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"}),N.spec_active&&l.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: ${N.spec_draft_model})`,children:"SPEC"}),N.parallel_slots>1&&l.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:`${N.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",N.parallel_slots]}),N.incomplete&&l.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"})]})]})]}),l.jsx("span",{className:"shrink-0",children:N?E?l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[l.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full bg-emerald-500",g&&"animate-pulse")})," warm"]}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},S)})}),l.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. Details & Routing im Modell-Manager."})]})}function pX(){var P,_,O,D,B,F;const{data:e}=jy(),{data:t}=A5(),{data:r}=yi(),{data:n}=xo(),i=!!e&&!!t,o=z=>{var Y;return(Y=t==null?void 0:t.services.find(U=>U.name.toLowerCase().includes(z)))==null?void 0:Y.ok},u=e==null?void 0:e.engine_reachable,c=(P=e==null?void 0:e.brain)==null?void 0:P.ready,f=((_=e==null?void 0:e.brain)==null?void 0:_.model)||((O=r==null?void 0:r.models.find(z=>z.role==="hermes"))==null?void 0:O.name)||"",h=[];h.push((()=>{const z={id:"brain",label:"Lucys Hirn",icon:vo,critical:!0};return i?u===!1?{...z,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:c===!1?{...z,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:f?{kind:"loadModel",model:f,label:"Hirn aufwecken"}:void 0}:{...z,status:"ok",detail:"Wach und ansprechbar."}:{...z,status:"loading",detail:"Wird geprüft …"}})()),h.push((()=>{const z={id:"vision",label:"Lucys Augen",icon:vu,critical:!1};if(!i||!r)return{...z,status:"loading",detail:"Wird geprüft …"};const Y=r.models.find(he=>he.role==="vision");return Y?(r.running??[]).includes(Y.name)?{...z,status:"ok",detail:"Sieht Bildschirm und Bilder."}:{...z,status:"warn",detail:"Lucys Augen sind eingeschlafen — das erste Bild-Ansehen dauert dann kurz.",repair:{kind:"loadModel",model:Y.name,label:"Augen aufwecken"}}:{...z,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),h.push((()=>{const z={id:"memory",label:"Lucys Gedächtnis",icon:AN,critical:!0},Y=o("mem0");return!i||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...z,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),h.push((()=>{const z={id:"gateway",label:"Verbindung (Gateway)",icon:ef,critical:!0},Y=e?e.gateway_reachable:o("integriert");return!i||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...z,status:"down",detail:"Die Verbindungs-Zentrale antwortet nicht — Apps erreichen Lucy nicht.",repair:{kind:"restart",service:"mission-control-2",label:"Zentrale neu starten"}}})()),h.push((()=>{const z={id:"agent",label:"Lucys Agent (Hermes)",icon:pn,critical:!0},Y=o("hermes-gateway");return!i||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...z,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),h.push((()=>{const z={id:"voice",label:"Lucys Stimme",icon:E4,critical:!1},Y=o("voice");return!i||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Lucy kann hören und sprechen."}:{...z,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const m=((D=n==null?void 0:n.gpu)==null?void 0:D.gtt_total)||((B=n==null?void 0:n.gpu)==null?void 0:B.vram_total)||0,g=((F=n==null?void 0:n.gpu)==null?void 0:F.gtt_used)||0,v=m>0?Math.min(100,g/m*100):0,b=1024**3,j=m?v>=90?{status:"full",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=72?{status:"warn",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:g/b,totalGb:m/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},k=h.some(z=>z.status==="loading"),S=h.filter(z=>z.critical&&z.status==="down"),N=h.filter(z=>z.status==="warn"||!z.critical&&z.status==="down"),E=j.status==="full";return{verdict:k&&!S.length?"loading":S.length?"problem":N.length||E?"warn":"gut",checks:h,memory:j,problems:S}}const gX={ok:"bg-emerald-500",warn:"bg-amber-500",down:"bg-red-500",loading:"bg-muted-foreground/40"};function QO({frame:e="lucy"}={}){const{verdict:t,checks:r,memory:n,problems:i}=pX(),{showAlert:o,dialogElement:u}=ya(),c=Kn(),[f,h]=y.useState({});async function m(S,N){h(E=>({...E,[S]:!0}));try{if(N.kind==="loadModel")await je(`/api/models/${encodeURIComponent(N.model)}/load`,{method:"POST"});else{const E=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:N.service})});E.ok||o("Reparatur nicht ganz geklappt",(E.err||"Unbekannter Fehler")+(N.needsSudo?` + `).concat(P.x,",").concat(P.y),O=Gt(e.id)?bu("recharts-radial-line-"):e.id;return y.createElement("text",si({},n,{dominantBaseline:"central",className:rt("recharts-radial-bar-label",u)}),y.createElement("defs",null,y.createElement("path",{id:O,d:_})),y.createElement("textPath",{xlinkHref:"#".concat(O)},r))},ZK=(e,t,r)=>{var n=e.cx,a=e.cy,o=e.innerRadius,u=e.outerRadius,c=e.startAngle,f=e.endAngle,h=(c+f)/2;if(r==="outside"){var m=Kt(n,a,u+t,h),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var b=(o+u)/2,j=Kt(n,a,b,h),k=j.x,S=j.y;return{x:k,y:S,textAnchor:"middle",verticalAnchor:"middle"}},qd=e=>e!=null&&"cx"in e&&Ee(e.cx),JK={angle:0,offset:5,zIndex:dr.label,position:"middle",textBreakAll:!1};function eG(e){if(!qd(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,a=n*2;return{x:t-n,y:r-n,width:a,upperWidth:a,lowerWidth:a,height:a}}function Zi(e){var t=Jr(e,JK),r=t.viewBox,n=t.parentViewBox,a=t.position,o=t.value,u=t.children,c=t.content,f=t.className,h=f===void 0?"":f,m=t.textBreakAll,g=t.labelRef,v=qK(),b=KP(),j=a==="center"?b:v??b,k,S,N;r==null?k=j:qd(r)?k=r:k=zy(r);var E=eG(k);if(!k||Gt(o)&&Gt(u)&&!y.isValidElement(c)&&typeof c!="function")return null;var A=uu(uu({},t),{},{viewBox:k});if(y.isValidElement(c)){A.labelRef;var P=e2(A,FK);return y.cloneElement(c,P)}if(typeof c=="function"){A.content;var _=e2(A,BK);if(S=y.createElement(c,_),y.isValidElement(S))return S}else S=QK(t);var O=Yr(t);if(qd(k)){if(a==="insideStart"||a==="insideEnd"||a==="end")return XK(t,a,S,O,k);N=ZK(k,t.offset,t.position)}else{if(!E)return null;var D=zK({viewBox:E,position:a,offset:t.offset,parentViewBox:qd(n)?void 0:n});N=uu(uu({x:D.x,y:D.y,textAnchor:D.horizontalAnchor,verticalAnchor:D.verticalAnchor},D.width!==void 0?{width:D.width}:{}),D.height!==void 0?{height:D.height}:{})}return y.createElement(Ni,{zIndex:t.zIndex},y.createElement(K0,si({ref:g,className:rt("recharts-label",h)},O,N,{textAnchor:FP(O.textAnchor)?O.textAnchor:N.textAnchor,breakAll:m}),S))}Zi.displayName="Label";var tG=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(Zi,si({key:"label-implicit"},n)):Bn(e)?y.createElement(Zi,si({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===Zi?y.cloneElement(e,uu({key:"label-implicit"},n)):y.createElement(Zi,si({key:"label-implicit",content:e},n)):G0(e)?y.createElement(Zi,si({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(Zi,si({},e,{key:"label-implicit"},n)):null};function rG(e){var t=e.label,r=e.labelRef,n=KP();return tG(t,n,r)||null}var nG=["valueAccessor"],iG=["dataKey","clockWise","id","textBreakAll","zIndex"];function Hf(){return Hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(_K(t))return t},GP=y.createContext(void 0),sG=GP.Provider,VP=y.createContext(void 0);VP.Provider;function lG(){return y.useContext(GP)}function uG(){return y.useContext(VP)}function Qd(e){var t=e.valueAccessor,r=t===void 0?oG:t,n=r2(e,nG),a=n.dataKey;n.clockWise;var o=n.id,u=n.textBreakAll,c=n.zIndex,f=r2(n,iG),h=lG(),m=uG(),g=h||m;return!g||!g.length?null:y.createElement(Ni,{zIndex:c??dr.label},y.createElement(Xr,{className:"recharts-label-list"},g.map((v,b)=>{var j,k=Gt(a)?r(v,b):Dt(v.payload,a),S=Gt(o)?{}:{id:"".concat(o,"-").concat(b)};return y.createElement(Zi,Hf({key:"label-".concat(b)},Yr(v),f,S,{fill:(j=n.fill)!==null&&j!==void 0?j:v.fill,parentViewBox:v.parentViewBox,value:k,textBreakAll:u,viewBox:v.viewBox,index:b,zIndex:0}))})))}Qd.displayName="LabelList";function cG(e){var t=e.label;return t?t===!0?y.createElement(Qd,{key:"labelList-implicit"}):y.isValidElement(t)||G0(t)?y.createElement(Qd,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(Qd,Hf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Jv(){return Jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,a=e.className,o=rt("recharts-dot",a);return Ee(t)&&Ee(r)&&Ee(n)?y.createElement("circle",Jv({},vn(e),Py(e),{className:o,cx:t,cy:r,r:n})):null},dG={radiusAxis:{},angleAxis:{}},QP=sr({name:"polarAxis",initialState:dG,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),Qh=QP.actions;Qh.addRadiusAxis;Qh.removeRadiusAxis;Qh.addAngleAxis;Qh.removeAngleAxis;var fG=QP.reducer;function hG(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var YP=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function n2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function i2(e){for(var t=1;t{n||(a.current===null?r(MU(t)):a.current!==t&&r(IU({prev:a.current,next:t})),a.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{a.current&&(r(TU(a.current)),a.current=null)},[r]),null}function jG(e){var t=e.legendPayload,r=jt(),n=Nr(),a=y.useRef(null);return y.useLayoutEffect(()=>{n||(a.current===null?r(o6(t)):a.current!==t&&r(s6({prev:a.current,next:t})),a.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{a.current&&(r(l6(a.current)),a.current=null)},[r]),null}function SG(e,t){return CG(e)||AG(e,t)||EG(e,t)||NG()}function NG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EG(e,t){if(e){if(typeof e=="string")return a2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a2(e,t):void 0}}function a2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var a of r)n.push({status:"removed",prev:a});for(var o=0;oe[Math.floor(o*r)]);return q0(n,t)}function _G(e,t){var r=t.map((n,a)=>e[a]);return q0(r,t)}function MG(e,t){for(var r=new Map,n=0;n{var b=r(g,v);if(b!=null){var j=n.get(b);if(j!==void 0)return a.add(b),j}}),u=[];for(var c of n){var f=SG(c,2),h=f[0],m=f[1];a.has(h)||u.push(m)}return q0(o,t,u)}function ey(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===V0?OG(e,t):r===PG?_G(e,t):IG(e,t,r)}function ZP(e,t){var r=y.useRef(e),n=y.useRef(t.current),a=y.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,a.current=!1);var o=y.useCallback(function(u,c){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(c===0){a.current=!0;return}c===1&&(n.current=u),c>0&&a.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:o}}function TG(e,t){return $G(e)||LG(e,t)||RG(e,t)||DG()}function DG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RG(e,t){if(e){if(typeof e=="string")return o2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o2(e,t):void 0}}function o2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{typeof e=="function"&&e(),o(!0)},[e]),c=y.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:a,handleAnimationStart:u,handleAnimationEnd:c}}function FG(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,o=e.previousItemsRef,u=e.isAnimationActive,c=e.animationBegin,f=e.animationDuration,h=e.animationEasing,m=e.onAnimationStart,g=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,j=e.shouldUpdatePreviousRef,k=e.children,S=e.layout,N=hA(r,n),E=ZP(N,o),A=(t=E.startValue)!==null&&t!==void 0?t:null,P=ey(A,a,b??V0);return y.createElement(fA,{animationId:N,begin:c,duration:f,isActive:u,easing:h,onAnimationEnd:g,onAnimationStart:m,key:N},_=>{var O=A==null,D=a==null?a:v(P,_,S),B=j?j(_):_>0;return E.syncStepValue(D,_,B),D==null?null:k(D,_,O)})}var Og;function BG(e,t){return KG(e)||WG(e,t)||HG(e,t)||UG()}function UG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HG(e,t){if(e){if(typeof e=="string")return s2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s2(e,t):void 0}}function s2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var e=y.useState(()=>bu("uid-")),t=BG(e,1),r=t[0];return r},JP=(Og=Xf.useId)!==null&&Og!==void 0?Og:GG;function VG(e,t){var r=JP();return t||(e?"".concat(e,"-").concat(r):r)}var qG=y.createContext(void 0),QG=e=>{var t=e.id,r=e.type,n=e.children,a=VG("recharts-".concat(r),t);return y.createElement(qG.Provider,{value:a},n(a))},YG={cartesianItems:[],polarItems:[]},eO=sr({name:"graphicalItems",initialState:YG,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ot()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=qr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=a)},prepare:ot()},removeCartesianGraphicalItem:{reducer(e,t){var r=qr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ot()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ot()},removePolarGraphicalItem:{reducer(e,t){var r=qr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ot()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=qr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=a)},prepare:ot()}}}),nl=eO.actions,XG=nl.addCartesianGraphicalItem,ZG=nl.replaceCartesianGraphicalItem,JG=nl.removeCartesianGraphicalItem;nl.addPolarGraphicalItem;nl.removePolarGraphicalItem;nl.replacePolarGraphicalItem;var eV=eO.reducer,tV=e=>{var t=jt(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t(XG(e)):r.current!==e&&t(ZG({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(JG(r.current)),r.current=null)},[t]),null},rV=y.memo(tV),nV=["points"];function l2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _g(e){for(var t=1;t{var N,E,A=_g(_g(_g({r:3},u),v),{},{index:S,cx:(N=k.x)!==null&&N!==void 0?N:void 0,cy:(E=k.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:k.value,payload:k.payload,points:t});return y.createElement(uV,{key:"dot-".concat(S),option:r,dotProps:A,className:a})}),j={};return c&&f!=null&&(j.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),y.createElement(Ni,{zIndex:m},y.createElement(Xr,Wf({className:n},j),b))}function u2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function c2(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),NV=q([SV,xi,bi],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),Q0=()=>Me(NV),EV=()=>Me(MH);function d2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mg(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,a=e.activeDot,o=e.dataKey,u=e.clipPath;if(a===!1||t.x==null||t.y==null)return null;var c={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Mg(Mg(Mg({},c),lh(a)),Py(a)),h;return y.isValidElement(a)?h=y.cloneElement(a,f):typeof a=="function"?h=a(f):h=y.createElement(qP,f),y.createElement(Xr,{className:"recharts-active-dot",clipPath:u},h)};function f2(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,o=e.clipPath,u=e.zIndex,c=u===void 0?dr.activeDot:u,f=Me(Iu),h=EV();if(t==null||h==null)return null;var m=t.find(g=>h.includes(g.payload));return Gt(m)?null:y.createElement(Ni,{zIndex:c},y.createElement(OV,{point:m,childIndex:Number(f),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var _V=e=>{var t=e.chartData,r=jt(),n=Nr();return y.useEffect(()=>n?()=>{}:(r(TS(t)),()=>{r(TS(void 0))}),[t,r,n]),null},h2={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},nO=sr({name:"brush",initialState:h2,reducers:{setBrushSettings(e,t){return t.payload==null?h2:t.payload}}});nO.actions.setBrushSettings;var MV=nO.reducer;function IV(e){return(e%180+180)%180}var TV=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=IV(a),u=o*Math.PI/180,c=Math.atan(n/r),f=u>c&&u{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=qr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=qr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=qr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),il=iO.actions;il.addDot;il.removeDot;il.addArea;il.removeArea;il.addLine;il.removeLine;var RV=iO.reducer;function LV(e,t){return BV(e)||FV(e,t)||zV(e,t)||$V()}function $V(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zV(e,t){if(e){if(typeof e=="string")return m2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m2(e,t):void 0}}function m2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=y.useState("".concat(bu("recharts"),"-clip")),n=LV(r,1),a=n[0],o=Q0();if(o==null)return null;var u=o.x,c=o.y,f=o.width,h=o.height;return y.createElement(UV.Provider,{value:a},y.createElement("defs",null,y.createElement("clipPath",{id:a},y.createElement("rect",{x:u,y:c,height:h,width:f}))),t)};function aO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function GV(e,t){return aO(e,t+1)}function VV(e,t,r,n,a){for(var o=(n||[]).slice(),u=t.start,c=t.end,f=0,h=1,m=u,g=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:aO(n,h)};var k=f,S,N=()=>(S===void 0&&(S=r(j,k)),S),E=j.coordinate,A=f===0||Du(e,E,N,m,c);A||(f=0,m=u,h+=1),A&&(m=E+e*(N()/2+a),f+=h)},v;h<=o.length;)if(v=g(),v)return v.v;return[]}function qV(e,t,r,n,a){var o=(n||[]).slice(),u=o.length;if(u===0)return[];for(var c=t.start,f=t.end,h=1;h<=u;h++){for(var m=(u-1)%h,g=c,v=!0,b=function(){var P=n[k];if(P==null)return 0;var _=k,O,D=()=>(O===void 0&&(O=r(P,_)),O),B=P.coordinate,F=k===m||Du(e,B,D,g,f);if(!F)return v=!1,1;F&&(g=B+e*(D()/2+a))},j,k=m;k(k===void 0&&(k=r(b,v)),k);if(v===u-1){var N=e*(j.coordinate+e*S()/2-f);o[v]=j=nr(nr({},j),{},{tickCoord:N>0?j.coordinate-N*e:j.coordinate})}else o[v]=j=nr(nr({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var E=Du(e,j.tickCoord,S,c,f);E&&(f=j.tickCoord-e*(S()/2+a),o[v]=nr(nr({},j),{},{isShow:!0}))}},m=u-1;m>=0;m--)h(m);return o}function JV(e,t,r,n,a,o){var u=(n||[]).slice(),c=u.length,f=t.start,h=t.end;if(o){var m=n[c-1];if(m!=null){var g=r(m,c-1),v=e*(m.coordinate+e*g/2-h);if(u[c-1]=m=nr(nr({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var b=Du(e,m.tickCoord,()=>g,f,h);b&&(h=m.tickCoord-e*(g/2+a),u[c-1]=nr(nr({},m),{},{isShow:!0}))}}}for(var j=o?c-1:c,k=function(E){var A=u[E];if(A==null)return 1;var P=A,_,O=()=>(_===void 0&&(_=r(A,E)),_);if(E===0){var D=e*(P.coordinate-e*O()/2-f);u[E]=P=nr(nr({},P),{},{tickCoord:D<0?P.coordinate-D*e:P.coordinate})}else u[E]=P=nr(nr({},P),{},{tickCoord:P.coordinate});if(P.tickCoord!=null){var B=Du(e,P.tickCoord,O,f,h);B&&(f=P.tickCoord+e*(O()/2+a),u[E]=nr(nr({},P),{},{isShow:!0}))}},S=0;S{var D=typeof h=="function"?h(_.value,O):_.value;return j==="width"?WV(fu(D,{fontSize:t,letterSpacing:r}),k,g):fu(D,{fontSize:t,letterSpacing:r})[j]},N=a[0],E=a[1],A=a.length>=2&&N!=null&&E!=null?Vr(E.coordinate-N.coordinate):1,P=KV(o,A,j);return f==="equidistantPreserveStart"?VV(A,P,S,a,u):f==="equidistantPreserveEnd"?qV(A,P,S,a,u):(f==="preserveStart"||f==="preserveStartEnd"?b=JV(A,P,S,a,u,f==="preserveStartEnd"):b=ZV(A,P,S,a,u),b.filter(_=>_.isShow))}var eq=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,o=e.tickSize,u=o===void 0?0:o,c=e.tickMargin,f=c===void 0?0:c,h=0;if(t){Array.from(t).forEach(b=>{if(b){var j=b.getBoundingClientRect();j.width>h&&(h=j.width)}});var m=r?r.getBoundingClientRect().width:0,g=u+f,v=h+g+m+(r?a:0);return Math.round(v)}return 0},tq={xAxis:{},yAxis:{}},oO=sr({name:"renderedTicks",initialState:tq,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId,o=r.ticks;e[n][a]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId;delete e[n][a]}}}),sO=oO.actions,rq=sO.setRenderedTicks,nq=sO.removeRenderedTicks,iq=oO.reducer,aq=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function g2(e,t){return uq(e)||lq(e,t)||sq(e,t)||oq()}function oq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sq(e,t){if(e){if(typeof e=="string")return v2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v2(e,t):void 0}}function v2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return Vs;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return a(rq({ticks:o,axisId:n,axisType:r})),()=>{a(nq({axisId:n,axisType:r}))}},[a,t,n,r]),null}var wq=y.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,o=e.tickLine,u=e.stroke,c=e.tickFormatter,f=e.unit,h=e.padding,m=e.tickTextProps,g=e.orientation,v=e.mirror,b=e.x,j=e.y,k=e.width,S=e.height,N=e.tickSize,E=e.tickMargin,A=e.fontSize,P=e.letterSpacing,_=e.getTicksConfig,O=e.events,D=e.axisType,B=e.axisId,F=Y0(gt(gt({},_),{},{ticks:n}),A,P),z=vn(_),Y=lh(a),U=FP(z.textAnchor)?z.textAnchor:vq(g,v),he=yq(g,v),ue={};typeof o=="object"&&(ue=o);var ge=gt(gt({},z),{},{fill:"none"},ue),ie=F.map(te=>gt({entry:te},gq(te,b,j,k,S,g,N,v,E))),se=ie.map(te=>{var J=te.entry,I=te.line;return y.createElement(Xr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(J.value,"-").concat(J.coordinate,"-").concat(J.tickCoord)},o&&y.createElement("line",go({},ge,I,{className:rt("recharts-cartesian-axis-tick-line",bo(o,"className"))})))}),X=ie.map((te,J)=>{var I,M,H=te.entry,ne=te.tick,Z=gt(gt(gt(gt({verticalAnchor:he},z),{},{textAnchor:U,stroke:"none",fill:u},ne),{},{index:J,payload:H,visibleTicksCount:F.length,tickFormatter:c,padding:h},m),{},{angle:(I=(M=m==null?void 0:m.angle)!==null&&M!==void 0?M:z.angle)!==null&&I!==void 0?I:0}),me=gt(gt({},Z),Y);return y.createElement(Xr,go({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(H.value,"-").concat(H.coordinate,"-").concat(H.tickCoord)},NR(O,H,J)),a&&y.createElement(xq,{option:a,tickProps:me,value:"".concat(typeof c=="function"?c(H.value,J):H.value).concat(f||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(D,"-ticks")},y.createElement(bq,{ticks:F,axisId:B,axisType:D}),X.length>0&&y.createElement(Ni,{zIndex:dr.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(D,"-tick-labels"),ref:t},X)),se.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(D,"-tick-lines")},se))}),kq=y.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,o=e.className,u=e.hide,c=e.ticks,f=e.axisType,h=e.axisId,m=cq(e,aq),g=y.useState(""),v=g2(g,2),b=v[0],j=v[1],k=y.useState(""),S=g2(k,2),N=S[0],E=S[1],A=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return eq({ticks:A.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var P=y.useCallback(_=>{if(_){var O=_.getElementsByClassName("recharts-cartesian-axis-tick-value");A.current=O;var D=O[0];if(D){var B=window.getComputedStyle(D),F=B.fontSize,z=B.letterSpacing;(F!==b||z!==N)&&(j(F),E(z))}}},[b,N]);return u||n!=null&&n<=0||a!=null&&a<=0?null:y.createElement(Ni,{zIndex:e.zIndex},y.createElement(Xr,{className:rt("recharts-cartesian-axis",o)},y.createElement(pq,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:vn(e)}),y.createElement(wq,{ref:P,axisType:f,events:m,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),y.createElement(GK,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(rG,{label:e.label,labelRef:e.labelRef}),e.children)))}),X0=y.forwardRef((e,t)=>{var r=Jr(e,hi);return y.createElement(kq,go({},r,{ref:t}))});X0.displayName="CartesianAxis";var jq=["x1","y1","x2","y2","key"],Sq=["offset"],Nq=["xAxisId","yAxisId"],Eq=["xAxisId","yAxisId"];function x2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,c=e.ry;return y.createElement("rect",{x:n,y:a,ry:c,width:o,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function lO(e){var t=e.option,r=e.lineItemProps,n;if(y.isValidElement(t))n=y.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,o=r.x1,u=r.y1,c=r.x2,f=r.y2,h=r.key,m=Kf(r,jq),g=(a=vn(m))!==null&&a!==void 0?a:{};g.offset;var v=Kf(g,Sq);n=y.createElement("line",Ga({},v,{x1:o,y1:u,x2:c,y2:f,fill:"none",key:h}))}return n}function Mq(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,o=e.horizontalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Kf(e,Nq),c=o.map((f,h)=>{var m=ar(ar({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return y.createElement(lO,{key:"line-".concat(h),option:a,lineItemProps:m})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function Iq(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,o=e.verticalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Kf(e,Eq),c=o.map((f,h)=>{var m=ar(ar({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return y.createElement(lO,{option:a,lineItemProps:m,key:"line-".concat(h)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function Tq(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,c=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||c==null)return null;var m=c.map(v=>Math.round(v+a-a)).sort((v,b)=>v-b);a!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?a+u-v:j-v;if(S<=0)return null;var N=b%t.length;return y.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:S,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},g)}function Dq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,u=e.y,c=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var m=h.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?o+c-v:j-v;if(S<=0)return null;var N=b%n.length;return y.createElement("rect",{key:"react-".concat(b),x:v,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},g)}var Rq=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,o=e.offset;return U5(Y0(ar(ar(ar({},hi),r),{},{ticks:H5(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},Lq=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,o=e.offset;return U5(Y0(ar(ar(ar({},hi),r),{},{ticks:H5(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},$q={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:dr.grid};function uO(e){var t=X5(),r=Z5(),n=Y5(),a=ar(ar({},Jr(e,$q)),{},{x:Ee(e.x)?e.x:n.left,y:Ee(e.y)?e.y:n.top,width:Ee(e.width)?e.width:n.width,height:Ee(e.height)?e.height:n.height}),o=a.xAxisId,u=a.yAxisId,c=a.x,f=a.y,h=a.width,m=a.height,g=a.syncWithTicks,v=a.horizontalValues,b=a.verticalValues,j=Nr(),k=Me(F=>wS(F,"xAxis",o,j)),S=Me(F=>wS(F,"yAxis",u,j));if(!Un(h)||!Un(m)||!Ee(c)||!Ee(f))return null;var N=a.verticalCoordinatesGenerator||Rq,E=a.horizontalCoordinatesGenerator||Lq,A=a.horizontalPoints,P=a.verticalPoints;if((!A||!A.length)&&typeof E=="function"){var _=v&&v.length,O=E({yAxis:S?ar(ar({},S),{},{ticks:_?v:S.ticks}):void 0,width:t??h,height:r??m,offset:n},_?!0:g);vf(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(A=O)}if((!P||!P.length)&&typeof N=="function"){var D=b&&b.length,B=N({xAxis:k?ar(ar({},k),{},{ticks:D?b:k.ticks}):void 0,width:t??h,height:r??m,offset:n},D?!0:g);vf(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(P=B)}return y.createElement(Ni,{zIndex:a.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(_q,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),y.createElement(Tq,Ga({},a,{horizontalPoints:A})),y.createElement(Dq,Ga({},a,{verticalPoints:P})),y.createElement(Mq,Ga({},a,{offset:n,horizontalPoints:A,xAxis:k,yAxis:S})),y.createElement(Iq,Ga({},a,{offset:n,verticalPoints:P,xAxis:k,yAxis:S}))))}uO.displayName="CartesianGrid";var zq={},cO=sr({name:"errorBars",initialState:zq,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===a.dataKey&&u.direction===a.direction?o:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==a.dataKey||o.direction!==a.direction))}}}),Z0=cO.actions;Z0.addErrorBar;Z0.replaceErrorBar;Z0.removeErrorBar;var Fq=cO.reducer;function dO(e,t){var r,n,a=Me(h=>ki(h,e)),o=Me(h=>ji(h,t)),u=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:Et.allowDataOverflow,c=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:At.allowDataOverflow,f=u||c;return{needClip:f,needClipX:u,needClipY:c}}function Bq(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=Q0(),o=dO(t,r),u=o.needClipX,c=o.needClipY,f=o.needClip,h=Me(A=>QC(A,t,!1)),m=Me(A=>YC(A,r,!1));if(!f||!a)return null;var g=a.x,v=a.y,b=a.width,j=a.height,k=u&&h?Math.min(h[0],h[1]):g-b/2,S=c&&m?Math.min(m[0],m[1]):v-j/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,E=c&&m?Math.abs(m[1]-m[0]):j*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:k,y:S,width:N,height:E}))}function Uq(e){var t=lh(e),r=3,n=2;if(t!=null){var a=t.r,o=t.strokeWidth,u=Number(a),c=Number(o);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(c)||c<0)&&(c=n),{r:u,strokeWidth:c}}return{r,strokeWidth:n}}function J0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:tO}function ex(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:tO}var fO=(e,t,r)=>iP(e,"xAxis",J0(e,t),r),hO=(e,t,r)=>nP(e,"xAxis",J0(e,t),r),mO=(e,t,r)=>iP(e,"yAxis",ex(e,t),r),pO=(e,t,r)=>nP(e,"yAxis",ex(e,t),r),Hq=q([ct,fO,mO,hO,pO],(e,t,r,n,a)=>Gn(e,"xAxis")?gf(t,n,!1):gf(r,a,!1)),Wq=(e,t)=>t,gO=q([jC,Wq],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),vO=e=>{var t=ct(e),r=Gn(t,"xAxis");return r?"yAxis":"xAxis"},Kq=(e,t)=>{var r=vO(e);return r==="yAxis"?ex(e,t):J0(e,t)},Gq=(e,t,r)=>IC(e,vO(e),Kq(e,t),r),Vq=q([gO,Gq],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=e0(e);if(!(n==null||a==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=o==null?void 0:o.find(c=>c.key===a);if(u!=null)return u.map(c=>[c[0],c[1]])}}}),qq=q([ct,fO,mO,hO,pO,Vq,yF,Hq,gO,DF],(e,t,r,n,a,o,u,c,f,h)=>{var m=u.chartData,g=u.dataStartIndex,v=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||c==null)){var b=f.data,j;if(b&&b.length>0?j=b:j=m==null?void 0:m.slice(g,v+1),j!=null)return bQ({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:g,areaSettings:f,stackedData:o,displayedData:j,chartBaseValue:h,bandSize:c})}}),Qq=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],Yq=["id","baseLine"];function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.y||0));return Ee(a)?m=Math.max(a,m):a&&Array.isArray(a)&&a.length&&(m=Math.max(...a.map(g=>g.y||0),m)),Ee(m)?y.createElement("rect",{x:cg.x||0));return Ee(a)?m=Math.max(a,m):a&&Array.isArray(a)&&a.length&&(m=Math.max(...a.map(g=>g.x||0),m)),Ee(m)?y.createElement("rect",{x:0,y:ce==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Hs(Hs({},r.next),{},{x:li(r.prev.x,r.next.x,t),y:li(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),xO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:V0,animationInterpolateFn:lQ,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:tQ,xAxisId:0,yAxisId:0,zIndex:dr.area};function Vf(e,t){return e&&e!=="none"?e:t}var uQ=e=>{var t=e.dataKey,r=e.name,n=e.stroke,a=e.fill,o=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:o,color:Vf(n,a),value:W5(r,t),payload:e}]},cQ=y.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,o=e.fill,u=e.name,c=e.hide,f=e.unit,h=e.tooltipType,m=e.id,g={dataDefinedOnItem:r,getPosition:Vs,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:W5(u,t),hide:c,type:h,color:Vf(n,o),unit:f,graphicalItemId:m}};return y.createElement(kG,{tooltipEntrySettings:g})});function dQ(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,o=n.dot,u=n.dataKey,c=vn(n);return y.createElement(dV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:c,needClip:a,clipPathId:t})}function fQ(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(o=>{var u,c,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Hs(Hs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return y.createElement(sG,{value:t?a:void 0},r)}function hQ(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,o=e.props,u=e.animationElapsedTime,c=e.isAnimating,f=e.isEntrance,h=o.layout,m=o.type,g=o.stroke,v=o.connectNulls,b=o.isRange,j=o.shape,k=o.id,S=yO(o,rQ),N=Yr(S),E=Hs(Hs({},N),{},{id:k,points:t,connectNulls:v,type:m,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:u,isAnimating:c,isEntrance:f});return y.createElement(y.Fragment,null,(t==null?void 0:t.length)>1&&y.createElement(Xr,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},y.createElement(wG,{option:j,DefaultShape:xO.shape,shapeProps:E})),y.createElement(dQ,{points:t,props:S,clipPathId:a}))}function mQ(e,t,r){if(Ee(e)){var n=Ee(t)?t:void 0;return li(n,e,r)}if(Gt(e)||Fn(e)){var a=Ee(t)?t:void 0;return li(a,0,r)}return e}function pQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,u=n.points,c=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,m=n.animationDuration,g=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,j=y.useMemo(()=>({points:u,baseLine:c}),[u,c]),k=ZP(j,o),S=Fy(),N=zG(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,A=N.handleAnimationStart,P=N.handleAnimationEnd,_=k.startValue;if(S==null)return null;var O;return Array.isArray(c)&&Array.isArray(_)?O=ey(_,c,v):Array.isArray(c)?O=ey(null,c,v):O=null,y.createElement(FG,{animationInput:j,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:a,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:g,onAnimationStart:A,onAnimationEnd:P,animationInterpolateFn:b,animationMatchBy:v,layout:S},(D,B,F)=>{var z;return B===1?z=c:Array.isArray(c)?z=b(O,B,S):z=F?c:mQ(c,_,B),k.syncStepValue(z,B),y.createElement(fQ,{showLabels:!E,points:u},n.children,y.createElement(hQ,{points:D,baseLine:z,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:E||B<1,isEntrance:F}),y.createElement(cG,{label:n.label}))})}function gQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=y.useRef(null),o=y.useRef();return y.createElement(pQ,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class vQ extends y.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,o=t.className,u=t.top,c=t.left,f=t.needClip,h=t.xAxisId,m=t.yAxisId,g=t.width,v=t.height,b=t.id,j=t.baseLine,k=t.zIndex;if(r)return null;var S=rt("recharts-area",o),N=b,E=Uq(n),A=E.r,P=E.strokeWidth,_=YP(n),O=A*2+P,D=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return y.createElement(Ni,{zIndex:k},y.createElement(Xr,{className:S},f&&y.createElement("defs",null,y.createElement(Bq,{clipPathId:N,xAxisId:h,yAxisId:m}),!_&&y.createElement("clipPath",{id:"clipPath-dots-".concat(N)},y.createElement("rect",{x:c-O/2,y:u-O/2,width:g+O,height:v+O}))),y.createElement(gQ,{needClip:f,clipPathId:N,props:this.props})),y.createElement(f2,{points:a,mainColor:Vf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(j)&&y.createElement(f2,{points:j,mainColor:Vf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}}function yQ(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,o=e.animationEasing,u=e.connectNulls,c=e.dot,f=e.fill,h=e.fillOpacity,m=e.hide,g=e.isAnimationActive,v=e.legendType,b=e.stroke,j=e.xAxisId,k=e.yAxisId,S=yO(e,nQ),N=qs(),E=AP(),A=dO(j,k),P=A.needClip,_=Nr(),O=(t=Me(ge=>qq(ge,e.id,_)))!==null&&t!==void 0?t:{},D=O.points,B=O.isRange,F=O.baseLine,z=Q0();if(N!=="horizontal"&&N!=="vertical"||z==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var Y=z.height,U=z.width,he=z.x,ue=z.y;return!D||!D.length?null:y.createElement(vQ,Gf({},S,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:o,baseLine:F,connectNulls:u,dot:c,fill:f,fillOpacity:h,height:Y,hide:m,layout:N,isAnimationActive:g,isRange:B,legendType:v,needClip:P,points:D,stroke:b,width:U,left:he,top:ue,xAxisId:j,yAxisId:k}))}var xQ=(e,t,r,n,a)=>{var o=r??t;if(Ee(o))return o;var u=e==="horizontal"?a:n,c=u.scale.domain();if(u.type==="number"){var f=Math.max(c[0],c[1]),h=Math.min(c[0],c[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return o==="dataMin"?c[0]:o==="dataMax"?c[1]:c[0]};function bQ(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,o=e.stackedData,u=e.layout,c=e.chartBaseValue,f=e.xAxis,h=e.yAxis,m=e.displayedData,g=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,j=e.bandSize,k=o&&o.length,S=xQ(u,c,n,f,h),N=u==="horizontal",E=!1,A=m.map((_,O)=>{var D,B,F,z;if(k)z=o[g+O];else{var Y=Dt(_,a);Array.isArray(Y)?(z=Y,E=!0):z=[S,Y]}var U=(D=(B=z)===null||B===void 0?void 0:B[1])!==null&&D!==void 0?D:null,he=U==null||k&&!r&&Dt(_,a)==null;if(N){var ue;return{x:gk({axis:f,ticks:v,bandSize:j,entry:_,index:O}),y:he?null:(ue=h.scale.map(U))!==null&&ue!==void 0?ue:null,value:z,payload:_}}return{x:he?null:(F=f.scale.map(U))!==null&&F!==void 0?F:null,y:gk({axis:h,ticks:b,bandSize:j,entry:_,index:O}),value:z,payload:_}}),P;return k||E?P=A.map(_=>{var O,D=Array.isArray(_.value)?_.value[0]:null;if(N){var B;return{x:_.x,y:D!=null&&_.y!=null&&(B=h.scale.map(D))!==null&&B!==void 0?B:null,payload:_.payload}}return{x:D!=null&&(O=f.scale.map(D))!==null&&O!==void 0?O:null,y:_.y,payload:_.payload}}):P=N?h.scale.map(S):f.scale.map(S),{points:A,baseLine:P??0,isRange:E}}function wQ(e){var t=Jr(e,xO),r=Nr();return y.createElement(QG,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement(jG,{legendPayload:uQ(t)}),y.createElement(cQ,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),y.createElement(rV,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:iz(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(yQ,Gf({},t,{id:n}))))}var bO=y.memo(wQ,Oh);bO.displayName="Area";var kQ=["domain","range"],jQ=["domain","range"];function k2(e,t){if(e==null)return{};var r,n,a=SQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(u!=null)return N2(N2({},o),{},{type:u})},[o,u]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(gV(c)):r.current!==c&&t(vV({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(yV(r.current)),r.current=null)},[t]),null}var IQ=e=>{var t=e.xAxisId,r=e.className,n=Me(G5),a=Nr(),o="xAxis",u=Me(v=>rP(v,o,t,a)),c=Me(v=>hU(v,t)),f=Me(v=>xU(v,t)),h=Me(v=>xC(v,t));if(c==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=ry(e,EQ);h.id,h.scale;var g=ry(h,AQ);return y.createElement(X0,ty({},m,g,{x:f.x,y:f.y,width:c.width,height:c.height,className:rt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:u,axisType:o,axisId:t}))},TQ={allowDataOverflow:Et.allowDataOverflow,allowDecimals:Et.allowDecimals,allowDuplicatedCategory:Et.allowDuplicatedCategory,angle:Et.angle,axisLine:hi.axisLine,height:Et.height,hide:!1,includeHidden:Et.includeHidden,interval:Et.interval,label:!1,minTickGap:Et.minTickGap,mirror:Et.mirror,orientation:Et.orientation,padding:Et.padding,reversed:Et.reversed,scale:Et.scale,tick:Et.tick,tickCount:Et.tickCount,tickLine:hi.tickLine,tickSize:hi.tickSize,type:Et.type,niceTicks:Et.niceTicks,xAxisId:0},DQ=e=>{var t=Jr(e,TQ);return y.createElement(y.Fragment,null,y.createElement(MQ,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),y.createElement(IQ,t))},kO=y.memo(DQ,wO);kO.displayName="XAxis";var RQ=["type"],LQ=["dangerouslySetInnerHTML","ticks","scale"],$Q=["id","scale"];function ny(){return ny=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(u!=null)return A2(A2({},o),{},{type:u})},[u,o]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(xV(c)):r.current!==c&&t(bV({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(wV(r.current)),r.current=null)},[t]),null}function WQ(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,o=y.useRef(null),u=y.useRef(null),c=Me(G5),f=Nr(),h=jt(),m="yAxis",g=Me(N=>kU(N,t)),v=Me(N=>wU(N,t)),b=Me(N=>rP(N,m,t,f)),j=Me(N=>bC(N,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!g||G0(a)||y.isValidElement(a)||j==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(g.width)!==Math.round(E)&&h(kV({id:t,width:E}))}}},[b,g,h,a,t,n,j]),g==null||v==null||j==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=iy(e,LQ);j.id,j.scale;var S=iy(j,$Q);return y.createElement(X0,ny({},k,S,{ref:o,labelRef:u,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:rt("recharts-".concat(m," ").concat(m),r),viewBox:c,ticks:b,axisType:m,axisId:t}))}var KQ={allowDataOverflow:At.allowDataOverflow,allowDecimals:At.allowDecimals,allowDuplicatedCategory:At.allowDuplicatedCategory,angle:At.angle,axisLine:hi.axisLine,hide:!1,includeHidden:At.includeHidden,interval:At.interval,label:!1,minTickGap:At.minTickGap,mirror:At.mirror,orientation:At.orientation,padding:At.padding,reversed:At.reversed,scale:At.scale,tick:At.tick,tickCount:At.tickCount,tickLine:hi.tickLine,tickSize:hi.tickSize,type:At.type,niceTicks:At.niceTicks,width:At.width,yAxisId:0},GQ=e=>{var t=Jr(e,KQ);return y.createElement(y.Fragment,null,y.createElement(HQ,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),y.createElement(WQ,t))},jO=y.memo(GQ,wO);jO.displayName="YAxis";var VQ=(e,t)=>t,tx=q([VQ,ct,TA,Lt,wP,Si,WH,Qt],XH);function qQ(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function rx(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(qQ(e)){var a=e.currentTarget.getBBox();r=a.width>0?t.width/a.width:1,n=a.height>0?t.height/a.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(c,f)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>u(c.clientX,c.clientY)):u(e.clientX,e.clientY)}var SO=Lr("mouseClick"),NO=Ku();NO.startListening({actionCreator:SO,effect:(e,t)=>{var r=e.payload,n=tx(t.getState(),rx(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(LU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var ay=Lr("mouseMove"),EO=Ku(),is=null,Ia=null,Ig=null;EO.startListening({actionCreator:ay,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,c=u==="all"||(u==null?void 0:u.includes("mousemove"));is!==null&&(cancelAnimationFrame(is),is=null),Ia!==null&&(typeof o!="number"||!c)&&(clearTimeout(Ia),Ia=null),Ig=rx(r);var f=()=>{var h=t.getState(),m=ic(h,h.tooltip.settings.shared);if(!Ig){is=null,Ia=null;return}if(m==="axis"){var g=tx(h,Ig);(g==null?void 0:g.activeIndex)!=null?t.dispatch(dP({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(cP())}is=null,Ia=null};if(!c){f();return}o==="raf"?is=requestAnimationFrame(f):typeof o=="number"&&Ia===null&&(Ia=setTimeout(f,o))}});function QQ(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var C2={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},AO=sr({name:"rootProps",initialState:C2,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:C2.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),YQ=AO.reducer,XQ=AO.actions.updateOptions,ZQ=null,JQ={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},CO=sr({name:"polarOptions",initialState:ZQ,reducers:JQ});CO.actions.updatePolarOptions;var eY=CO.reducer,PO=Lr("keyDown"),OO=Lr("focus"),_O=Lr("blur"),Yh=Ku(),as=null,Ta=null,$d=null;Yh.startListening({actionCreator:PO,effect:(e,t)=>{$d=e.payload,as!==null&&(cancelAnimationFrame(as),as=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,o=n.throttledEvents,u=o==="all"||o.includes("keydown");Ta!==null&&(typeof a!="number"||!u)&&(clearTimeout(Ta),Ta=null);var c=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var m=f.tooltip.keyboardInteraction,g=$d;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var v=du(m,po(f),Bs(f),Us(f)),b=v==null?-1:Number(v),j=!Number.isFinite(b)||b<0,k=Si(f),S=po(f),N=ic(f,f.tooltip.settings.shared);if(g==="Enter"){if(j)return;var E=Bf(f,N,"hover",String(m.index));t.dispatch(Ff({active:!m.active,activeIndex:m.index,activeCoordinate:E}));return}var A=AU(f),P=A==="left-to-right"?1:-1,_=g==="ArrowRight"?1:-1,O;if(j){var D=Bs(f),B=Us(f),F=_*P,z=ge=>({active:!1,index:String(ge),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,F>0){for(var Y=0;Y=0;U--)if(du(z(U),S,D,B)!=null){O=U;break}if(O<0)return}else{O=b+_*P;var he=(k==null?void 0:k.length)||S.length;if(he===0||O>=he||O<0)return}var ue=Bf(f,N,"hover",String(O));t.dispatch(Ff({active:!0,activeIndex:O.toString(),activeCoordinate:ue}))}finally{as=null,Ta=null}};if(!u){c();return}a==="raf"?as=requestAnimationFrame(c):typeof a=="number"&&Ta===null&&(c(),$d=null,Ta=setTimeout(()=>{$d?c():(Ta=null,as=null)},a))}});Yh.startListening({actionCreator:OO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;if(!a.active&&a.index==null){var o="0",u=ic(r,r.tooltip.settings.shared),c=Bf(r,u,"hover",String(o));t.dispatch(Ff({active:!0,activeIndex:o,activeCoordinate:c}))}}}});Yh.startListening({actionCreator:_O,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(Ff({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function MO(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var a=Reflect.get(r,n);return typeof a=="function"?a.bind(r):a}})}var Kr=Lr("externalEvent"),IO=Ku(),zd=new Map,tu=new Map,Tg=new Map;IO.startListening({actionCreator:Kr,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var o=a.type,u=MO(a);Tg.set(o,{handler:n,reactEvent:u});var c=zd.get(o);c!==void 0&&(cancelAnimationFrame(c),zd.delete(o));var f=t.getState(),h=f.eventSettings,m=h.throttleDelay,g=h.throttledEvents,v=g,b=v==="all"||(v==null?void 0:v.includes(o)),j=tu.get(o);j!==void 0&&(typeof m!="number"||!b)&&(clearTimeout(j),tu.delete(o));var k=()=>{var E=Tg.get(o);try{if(!E)return;var A=E.handler,P=E.reactEvent,_=t.getState(),O={activeCoordinate:PH(_),activeDataKey:EH(_),activeIndex:Iu(_),activeLabel:SP(_),activeTooltipIndex:Iu(_),isTooltipActive:OH(_)};A&&A(O,P)}finally{zd.delete(o),tu.delete(o),Tg.delete(o)}};if(!b){k();return}if(m==="raf"){var S=requestAnimationFrame(k);zd.set(o,S)}else if(typeof m=="number"){if(!tu.has(o)){k();var N=setTimeout(k,m);tu.set(o,N)}}else k()}}});var tY=q([rl],e=>e.tooltipItemPayloads),rY=q([tY,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var a=n.getPosition;if(a!=null)return a(t)}}}),TO=Lr("touchMove"),DO=Ku(),Da=null,Vi=null,P2=null,ru=null;DO.startListening({actionCreator:TO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){ru=MO(r);var n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,c=u==="all"||u.includes("touchmove");Da!==null&&(cancelAnimationFrame(Da),Da=null),Vi!==null&&(typeof o!="number"||!c)&&(clearTimeout(Vi),Vi=null),P2=Array.from(r.touches).map(h=>rx({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(ru!=null){var h=t.getState(),m=ic(h,h.tooltip.settings.shared);if(m==="axis"){var g,v=(g=P2)===null||g===void 0?void 0:g[0];if(v==null){Da=null,Vi=null;return}var b=tx(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(dP({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(m==="item"){var j,k=ru.touches[0];if(document.elementFromPoint==null||k==null)return;var S=document.elementFromPoint(k.clientX,k.clientY);if(!S||!S.getAttribute)return;var N=S.getAttribute(dz),E=(j=S.getAttribute(fz))!==null&&j!==void 0?j:void 0,A=jo(h).find(O=>O.id===E);if(N==null||A==null||E==null)return;var P=A.dataKey,_=rY(h,N,E);t.dispatch(RU({activeDataKey:P,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:E}))}Da=null,Vi=null}};if(!c){f();return}o==="raf"?Da=requestAnimationFrame(f):typeof o=="number"&&Vi===null&&(f(),ru=null,Vi=setTimeout(()=>{ru?f():(Vi=null,Da=null)},o))}}});var RO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},LO=sr({name:"eventSettings",initialState:RO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),nY=LO.actions.setEventSettings,iY=LO.reducer,aY=h5({brush:MV,cartesianAxis:jV,chartData:CW,errorBars:Fq,eventSettings:iY,graphicalItems:eV,layout:Q$,legend:u6,options:jW,polarAxis:fG,polarOptions:eY,referenceElements:RV,renderedTicks:iq,rootProps:YQ,tooltip:$U,zIndex:cW}),oY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return b$({reducer:aY,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([NO.middleware,EO.middleware,Yh.middleware,IO.middleware,DO.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(C5({type:"raf"}))},devTools:{serialize:{replacer:QQ},name:"recharts-".concat(r)}})};function sY(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=Nr(),o=y.useRef(null);if(a)return r;o.current==null&&(o.current=oY(t,n));var u=_y;return y.createElement(N6,{context:u,store:o.current},r)}function lY(e){var t=e.layout,r=e.margin,n=jt(),a=Nr();return y.useEffect(()=>{a||(n(G$(t)),n(K$(r)))},[n,a,t,r]),null}var uY=y.memo(lY,Oh);function cY(e){var t=jt();return y.useEffect(()=>{t(XQ(e))},[t,e]),null}var dY=e=>{var t=jt();return y.useEffect(()=>{t(nY(e))},[t,e]),null},fY=y.memo(dY,Oh);function O2(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),a=jt();return y.useLayoutEffect(()=>(n.current&&a(lW({zIndex:t,element:n.current,isPanorama:r})),()=>{a(uW({zIndex:t,isPanorama:r}))}),[a,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function _2(e){var t=e.children,r=e.isPanorama,n=Me(JH);if(!n||n.length===0)return t;var a=n.filter(u=>u<0),o=n.filter(u=>u>0);return y.createElement(y.Fragment,null,a.map(u=>y.createElement(O2,{key:u,zIndex:u,isPanorama:r})),t,o.map(u=>y.createElement(O2,{key:u,zIndex:u,isPanorama:r})))}var hY=["children"];function mY(e,t){if(e==null)return{};var r,n,a=pY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=X5(),n=Z5(),a=lA();if(!Un(r)||!Un(n))return null;var o=e.children,u=e.otherAttributes,c=e.title,f=e.desc,h,m;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=a?0:void 0,typeof u.role=="string"?m=u.role:m=a?"application":void 0),y.createElement(_E,qf({},u,{title:c,desc:f,role:m,tabIndex:h,width:r,height:n,style:gY,ref:t}),o)}),yY=e=>{var t=e.children,r=Me(Nh);if(!r)return null;var n=r.width,a=r.height,o=r.y,u=r.x;return y.createElement(_E,{width:n,height:a,x:u,y:o},t)},M2=y.forwardRef((e,t)=>{var r=e.children,n=mY(e,hY),a=Nr();return a?y.createElement(yY,null,y.createElement(_2,{isPanorama:!0},r)):y.createElement(vY,qf({ref:t},n),y.createElement(_2,{isPanorama:!1},r))});function xY(e,t){return jY(e)||kY(e,t)||wY(e,t)||bY()}function bY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wY(e,t){if(e){if(typeof e=="string")return I2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I2(e,t):void 0}}function I2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var u=n.getBoundingClientRect(),c=u.width/n.offsetWidth;He(c)&&c!==o&&e(q$(c))}},[n,e,o]),a}function T2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function NY(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(LW(),null);function Yf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var TY=y.forwardRef((e,t)=>{var r,n,a=y.useRef(null),o=y.useState({containerWidth:Yf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Yf((n=e.style)===null||n===void 0?void 0:n.height)}),u=Qf(o,2),c=u[0],f=u[1],h=y.useCallback((g,v)=>{f(b=>{var j=Math.round(g),k=Math.round(v);return b.containerWidth===j&&b.containerHeight===k?b:{containerWidth:j,containerHeight:k}})},[]),m=y.useCallback(g=>{if(typeof t=="function"&&t(g),a.current!=null&&(a.current.disconnect(),a.current=null),g!=null&&typeof ResizeObserver<"u"){var v=g.getBoundingClientRect(),b=v.width,j=v.height;h(b,j);var k=N=>{var E=N[0];if(E!=null){var A=E.contentRect,P=A.width,_=A.height;h(P,_)}},S=new ResizeObserver(k);S.observe(g),a.current=S}},[t,h]);return y.useEffect(()=>()=>{var g=a.current;g!=null&&g.disconnect()},[h]),y.createElement(y.Fragment,null,y.createElement(Vu,{width:c.containerWidth,height:c.containerHeight}),y.createElement("div",fa({ref:m},e)))}),DY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,a=y.useState({containerWidth:Yf(r),containerHeight:Yf(n)}),o=Qf(a,2),u=o[0],c=o[1],f=y.useCallback((m,g)=>{c(v=>{var b=Math.round(m),j=Math.round(g);return v.containerWidth===b&&v.containerHeight===j?v:{containerWidth:b,containerHeight:j}})},[]),h=y.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var g=m.getBoundingClientRect(),v=g.width,b=g.height;f(v,b)}},[t,f]);return y.createElement(y.Fragment,null,y.createElement(Vu,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",fa({ref:h},e)))}),RY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement("div",fa({ref:t},e)))}),LY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(DY,fa({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(RY,fa({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement("div",fa({ref:t},e)))});function $Y(e){return e?TY:LY}var zY=y.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,o=e.onClick,u=e.onContextMenu,c=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,m=e.onMouseLeave,g=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,j=e.onTouchMove,k=e.onTouchStart,S=e.style,N=e.width,E=e.responsive,A=e.dispatchTouchEvents,P=A===void 0?!0:A,_=y.useRef(null),O=jt(),D=y.useState(null),B=Qf(D,2),F=B[0],z=B[1],Y=y.useState(null),U=Qf(Y,2),he=U[0],ue=U[1],ge=SY(),ie=$y(),se=(ie==null?void 0:ie.width)>0?ie.width:N,X=(ie==null?void 0:ie.height)>0?ie.height:a,te=y.useCallback(Pe=>{ge(Pe),typeof t=="function"&&t(Pe),z(Pe),ue(Pe),Pe!=null&&(_.current=Pe)},[ge,t,z,ue]),J=y.useCallback(Pe=>{O(SO(Pe)),O(Kr({handler:o,reactEvent:Pe}))},[O,o]),I=y.useCallback(Pe=>{O(ay(Pe)),O(Kr({handler:h,reactEvent:Pe}))},[O,h]),M=y.useCallback(Pe=>{O(cP()),O(Kr({handler:m,reactEvent:Pe}))},[O,m]),H=y.useCallback(Pe=>{O(ay(Pe)),O(Kr({handler:g,reactEvent:Pe}))},[O,g]),ne=y.useCallback(()=>{O(OO())},[O]),Z=y.useCallback(()=>{O(_O())},[O]),me=y.useCallback(Pe=>{O(PO(Pe.key))},[O]),pe=y.useCallback(Pe=>{O(Kr({handler:u,reactEvent:Pe}))},[O,u]),Oe=y.useCallback(Pe=>{O(Kr({handler:c,reactEvent:Pe}))},[O,c]),re=y.useCallback(Pe=>{O(Kr({handler:f,reactEvent:Pe}))},[O,f]),we=y.useCallback(Pe=>{O(Kr({handler:v,reactEvent:Pe}))},[O,v]),_e=y.useCallback(Pe=>{O(Kr({handler:k,reactEvent:Pe}))},[O,k]),ae=y.useCallback(Pe=>{P&&O(TO(Pe)),O(Kr({handler:j,reactEvent:Pe}))},[O,P,j]),et=y.useCallback(Pe=>{O(Kr({handler:b,reactEvent:Pe}))},[O,b]),Be=$Y(E);return y.createElement(MP.Provider,{value:F},y.createElement(JD.Provider,{value:he},y.createElement(Be,{width:se??(S==null?void 0:S.width),height:X??(S==null?void 0:S.height),className:rt("recharts-wrapper",n),style:NY({position:"relative",cursor:"default",width:se,height:X},S),onClick:J,onContextMenu:pe,onDoubleClick:Oe,onFocus:ne,onBlur:Z,onKeyDown:me,onMouseDown:re,onMouseEnter:I,onMouseLeave:M,onMouseMove:H,onMouseUp:we,onTouchEnd:et,onTouchMove:ae,onTouchStart:_e,ref:te},y.createElement(IY,null),r)))}),FY=["width","height","responsive","children","className","style","compact","title","desc"];function BY(e,t){if(e==null)return{};var r,n,a=UY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,a=e.responsive,o=e.children,u=e.className,c=e.style,f=e.compact,h=e.title,m=e.desc,g=BY(e,FY),v=vn(g);return f?y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement(M2,{otherAttributes:v,title:h,desc:m},o)):y.createElement(zY,{className:u,style:c,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},y.createElement(M2,{otherAttributes:v,title:h,desc:m,ref:t},y.createElement(HV,null,o)))});function oy(){return oy=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(YY,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:XY,tooltipPayloadSearcher:wW,categoricalChartProps:e,ref:t}));const JY="rgba(130,130,150,0.14)",L2="rgba(130,130,150,0.85)";function eX(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function $O(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function tX({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:l.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:l.jsx("div",{className:"space-y-1",children:t.map(n=>l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),l.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),l.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:$O(n.value,r)})]},n.dataKey))})})}function zO({data:e,series:t,unit:r="%",yMode:n="percent",height:a=176}){const o=e.reduce((c,f)=>t.reduce((h,m)=>Math.max(h,Number(f[m.key])||0),c),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(eX(o*1.15),10);return l.jsx("div",{style:{height:a},className:"w-full",children:l.jsx(Kz,{width:"100%",height:"100%",children:l.jsxs(ZY,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[l.jsx("defs",{children:t.map(c=>l.jsxs("linearGradient",{id:`grad-${c.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"0%",stopColor:c.color,stopOpacity:.22}),l.jsx("stop",{offset:"100%",stopColor:c.color,stopOpacity:0})]},c.key))}),l.jsx(uO,{vertical:!1,stroke:JY}),l.jsx(kO,{dataKey:"t",hide:!0}),l.jsx(jO,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:c=>$O(c,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:L2}}),l.jsx(YW,{content:l.jsx(tX,{unit:r}),cursor:{stroke:L2,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(c=>l.jsx(bO,{type:"monotone",dataKey:c.key,name:c.label,stroke:c.color,strokeWidth:2,fill:`url(#grad-${c.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},c.key))]})})})}const rX=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function FO(){var u,c,f,h;const{sys:e,hist:t}=BD(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=rX.filter(m=>m.key!=="gpu"||r),a={cpu:(u=e==null?void 0:e.cpu)==null?void 0:u.percent,ram:(c=e==null?void 0:e.ram)==null?void 0:c.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Yi(e.ram.used)}/${Yi(e.ram.total)} GB`:"",gpu:r?`${Yi(e.gpu.gtt_used)}/${Yi(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Yi(e.disk.used)}/${Yi(e.disk.total)} GB`:""};return l.jsxs("div",{className:"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:[l.jsxs("div",{children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx($n,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(m=>l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:m.color}}),l.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label}),l.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(a[m.key]??0),"%"]}),o[m.key]&&l.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[m.key]})]},m.key))}),l.jsx(zO,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):l.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&l.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&l.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&l.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function nu({label:e,value:t,tone:r}){return l.jsxs("div",{className:ee("flex items-center justify-between rounded-lg border px-3 py-1.5 text-xs",r==="alert"?"border-amber-500/30 bg-amber-500/5 font-semibold text-amber-400":r==="accent"?"border-primary/30 bg-primary/5 font-semibold text-primary":"border-border/30 bg-background/25 text-muted-foreground"),children:[l.jsx("span",{className:"flex items-center gap-1.5",children:e}),l.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function nX(){var r;const{data:e}=sh(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return l.jsxs("div",{className:"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:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(I4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&l.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground/80",children:["Zuletzt gesucht: ",new Date(e.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),e?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(nu,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),l.jsx(nu,{label:"Inferenz-Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),l.jsx(nu,{label:"Router (llama-swap)",tone:e.swap>0?"alert":"muted",value:e.swap>0?"Update verfügbar":"aktuell"}),l.jsx(nu,{label:"Modell-Upgrades",tone:e.models>0?"accent":"muted",value:e.models>0?`${e.models} verfügbar`:"aktuell"}),(r=e.components)==null?void 0:r.map(n=>l.jsx(nu,{tone:n.update===!0?"alert":"muted",label:l.jsxs(l.Fragment,{children:[n.name,n.reachable===!1&&l.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),value:n.update===!0?`Update: ${n.latest}`:n.update===!1?"aktuell":n.latest?`neueste: ${n.latest}`:"—"},n.key))]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),l.jsxs("button",{onClick:t,className:"mt-4 flex h-9 w-full items-center justify-center gap-1.5 rounded-lg bg-primary text-xs font-semibold text-primary-foreground shadow-md shadow-primary/10 transition-all hover:opacity-90 cursor-pointer",children:["Updates verwalten & Pflege ",l.jsx(Jf,{className:"h-3.5 w-3.5"})]})]})}function BO({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:o,onConfirm:u,onCancel:c}){const f=y.useRef(null);return l.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":t,children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),l.jsx("button",{onClick:c||(()=>u()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{ref:f,type:"text",defaultValue:n,"aria-label":t,className:"flex-1 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:h=>{var m;h.key==="Enter"&&u((m=f.current)==null?void 0:m.value)}}),a!==void 0&&l.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=a)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),l.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&l.jsx("button",{onClick:c,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"}),l.jsx("button",{onClick:()=>{var m;const h=e==="prompt"?(m=f.current)==null?void 0:m.value:void 0;u(h)},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:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function ya(){const[e,t]=y.useState(null),r=y.useCallback(()=>t(null),[]),n=y.useCallback((c,f,h)=>{t({type:"alert",title:c,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),a=y.useCallback((c,f,h,m)=>{t({type:"confirm",title:c,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),m==null||m()}})},[]),o=y.useCallback((c,f,h,m,g,v)=>{t({type:"prompt",title:c,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),m(b)},onCancel:()=>{t(null),g==null||g()}})},[]),u=e?l.jsx(BO,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:o,close:r,dialogElement:u}}function iX(){const e=Kn(),{data:t}=jy(3e3),{data:r}=yi(),{showAlert:n,dialogElement:a}=ya(),[o,u]=y.useState(!1),c=(r==null?void 0:r.models)??[];async function f(h){try{await je("/api/agent/brain",{method:"POST",body:JSON.stringify({model:h})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${h}' geändert. Der Gateway-Dienst wurde neu gestartet.`),e.invalidateQueries({queryKey:Ve.agentStatus}),u(!1)}catch(m){n("Fehler",`Fehler beim Wechseln des Gehirns: ${m.message}`)}}return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.terminal_url)&&l.jsxs("a",{href:Ds(t.terminal_url),target:"_blank",rel:"noopener",className:ee("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",t.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[l.jsx(Ms,{className:"h-3 w-3"})," Terminal öffnen"]})]}),t?l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Terminal"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",t.terminal_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.terminal_reachable?"Online":"Offline"})]})]}),l.jsxs("div",{onClick:()=>u(!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:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),l.jsx($n,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[l.jsx(my,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),l.jsx(Uu,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[l.jsxs("div",{children:["Config: ",t.has_config?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Skills: ",t.has_skills?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Memory: ",t.has_memories?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):l.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&l.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"Telegram"}),l.jsx("span",{className:ee("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"MCP-Server"}),l.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"PC Executor"}),l.jsx("span",{className:ee("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx($n,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),l.jsx("button",{onClick:()=>u(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.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 (',l.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),l.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...c.map(h=>{var m;return((m=h.name.split("/").pop())==null?void 0:m.replace(".gguf",""))||h.name})].map(h=>{const m=["auto","fast","heavy"].includes(h);return l.jsxs("button",{onClick:()=>f(h),className:ee("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",t.brain_model===h||!t.brain_model&&h==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[l.jsxs("div",{className:"flex flex-col text-left",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:m?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&l.jsx(or,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),a]})}function aX(){const e=Kn(),{data:t=[]}=lv({limit:3}),[r,n]=y.useState(""),[a,o]=y.useState("stable"),[u,c]=y.useState(!1);async function f(){if(!(!r.trim()||u)){c(!0);try{await je("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:a,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{c(!1)}}}return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(vo,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("textarea",{value:r,onChange:h=>n(h.target.value),"aria-label":"Fakt oder Regel im Gedächtnis speichern",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"}),l.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[l.jsxs("select",{value:a,onChange:h=>o(h.target.value),"aria-label":"Kategorie",className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[l.jsx("option",{value:"stable",children:"🔵 Fakt"}),l.jsx("option",{value:"instruction",children:"📋 Regel"}),l.jsx("option",{value:"user",children:"👤 User"}),l.jsx("option",{value:"versioned",children:"🟡 Version"})]}),l.jsxs("button",{onClick:f,disabled:!r.trim()||u,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:[l.jsx(ef,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),l.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[l.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),l.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?l.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>l.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[l.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:h.category}),l.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),l.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."})]})}const $2=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function UO(){const{data:e}=ky(3e3),t=zD(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Zf,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&l.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[l.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&l.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[l.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",l.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),l.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),l.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:$2.map(a=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:a.color}}),l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:a.label}),l.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[a.key])??0)})]},a.key))})]}),e?l.jsx(zO,{data:t,series:$2,unit:" tok/s",yMode:"auto",height:150}):l.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),l.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}function oX(){const{data:e}=SE(3e3),{showAlert:t,dialogElement:r}=ya(),[n,a]=y.useState({});async function o(u){a(c=>({...c,[u]:!0}));try{const c=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:u})});c.ok||t("Fehler",`Neustart fehlgeschlagen: ${c.err||"Unbekannt"}`)}catch(c){t("Fehler",`Fehler: ${c.message}`)}finally{a(c=>({...c,[u]:!1}))}}return l.jsxs("div",{className:"flex flex-col rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(th,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),l.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground transition-colors hover:text-primary cursor-pointer",children:"Logs / Pflege"})]}),e?l.jsxs("div",{className:"flex flex-1 flex-col",children:[l.jsx("div",{className:"space-y-1.5",children:e.services.map(u=>l.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("span",{className:ee("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",u.ok?"bg-emerald-500":"bg-amber-500")}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:u.name}),l.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:u.url})]})]}),l.jsx("button",{onClick:()=>o(u.unit),disabled:n[u.unit],className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-primary/5 hover:text-primary group-hover:opacity-100",title:"Dienst neu starten",children:l.jsx(ro,{className:ee("h-3.5 w-3.5",n[u.unit]&&"animate-spin")})})]},u.unit))}),l.jsxs("div",{className:"mt-auto flex flex-wrap gap-3 border-t border-border/20 pt-2.5 text-[10px] font-semibold text-muted-foreground",children:[l.jsxs("a",{href:Ds(e.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[l.jsx(Ms,{className:"h-3 w-3"})," Engine"]}),l.jsxs("a",{href:Ds(e.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[l.jsx(Ms,{className:"h-3 w-3"})," Gateway"]})]})]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}const HO=[{role:"hermes",label:"Lucys Hirn",short:"Hirn",icon:vo,desc:"Lucys Alltags-Verstand — denkt und redet mit dir. Immer bereit.",tone:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25",protected:!0},{role:"embed",label:"Lucys Gedächtnis",short:"Gedächtnis",icon:NN,desc:"Merkt sich Wichtiges und findet es später wieder.",tone:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",protected:!0},{role:"vision",label:"Lucys Augen",short:"Augen",icon:vu,desc:"Sieht Bilder und Screenshots und beschreibt, was drauf ist.",tone:"bg-pink-500/15 text-pink-400 border-pink-500/25"},{role:"heavy",label:"Großes Hirn",short:"Groß",icon:YM,desc:"Das schwere Geschütz — wird für besonders knifflige Fragen dazugeholt.",tone:"bg-amber-500/15 text-amber-400 border-amber-500/25"},{role:"coder-lite",label:"Programmierer (schnell)",short:"Code schnell",icon:Os,desc:"Schnelles Programmieren im Alltag.",tone:"bg-violet-500/15 text-violet-400 border-violet-500/25"},{role:"coder",label:"Programmierer (gründlich)",short:"Code gründlich",icon:Os,desc:"Schreibt und prüft Code besonders sorgfältig — für schwere Coding-Aufgaben.",tone:"bg-fuchsia-500/15 text-fuchsia-400 border-fuchsia-500/25"},{role:"scout",label:"Späher",short:"Späher",icon:$4,desc:"Schneller erster Blick und grobe Einschätzung.",tone:"bg-teal-500/15 text-teal-400 border-teal-500/25"}],WO=HO.map(e=>e.role),z2=Object.fromEntries(HO.map(e=>[e.role,e])),F2=e=>({role:e||"?",label:e||"unbekannt",short:e||"?",icon:vo,desc:"Rolle ohne hinterlegten Klartext-Namen.",tone:"bg-slate-500/15 text-slate-300 border-slate-500/25"}),sX={fast:"hermes",coder_lite:"coder-lite"};function ir(e){return e&&(z2[e]||z2[sX[e]])||F2(e)}function oo({role:e,dense:t=!1,className:r}){const n=ir(e),a=n.icon;return l.jsxs("span",{className:ee("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold border tracking-wide",n.tone,r),title:`${n.desc} (${n.role})`,children:[l.jsx(a,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),t?n.short:n.label]})}function lX({fit:e}){const t={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"}[e.level];return l.jsxs("span",{className:ee("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function B2(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.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 uX(){var b,j,k;const{data:e}=yi(2e3),{data:t}=ky(2e3),{data:r}=xo(),n=(e==null?void 0:e.models)??[],a=(e==null?void 0:e.running)??[],o=((b=r==null?void 0:r.gpu)==null?void 0:b.gtt_total)||((j=r==null?void 0:r.gpu)==null?void 0:j.vram_total)||0,u=((k=r==null?void 0:r.gpu)==null?void 0:k.gtt_used)||0,c=o>0?Math.min(100,u/o*100):0,f=c>=88?"bg-red-500":c>=70?"bg-amber-500":"bg-teal-500",h=c>=88?"text-red-400":c>=70?"text-amber-400":"text-foreground",m=y.useRef(null),[g,v]=y.useState(!1);return y.useEffect(()=>{if(!t)return;const S=t.total_tokens;if(m.current!==null&&S>m.current){v(!0);const N=setTimeout(()=>v(!1),4e3);return m.current=S,()=>clearTimeout(N)}m.current=S},[t==null?void 0:t.total_tokens]),l.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",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Zd,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Modelle"})]}),l.jsxs("span",{className:ee("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",g?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[g?l.jsx(ha,{className:"h-3 w-3 animate-pulse"}):l.jsx(S4,{className:"h-3 w-3"}),g?"Inferenz aktiv":"Idle"]})]}),o>0&&l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-muted-foreground/80 mb-1",children:[l.jsx("span",{className:"uppercase tracking-wider font-semibold",children:"Speicher-Pool"}),l.jsxs("span",{children:[l.jsx("span",{className:ee("font-bold",h),children:Yi(u)})," / ",Yi(o)," GB belegt"]})]}),l.jsx("div",{className:"h-1.5 w-full rounded-full bg-background/50 border border-border/30 overflow-hidden",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",f),style:{width:`${c}%`}})})]}),l.jsx("div",{className:"space-y-2 flex-1",children:WO.map(S=>{var A;const N=n.find(P=>P.role===S),E=N?a.includes(N.name):!1;return l.jsxs("div",{className:ee("flex items-center justify-between gap-2 p-2 rounded-xl border transition-all duration-300",E?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":N?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[l.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[l.jsx(oo,{role:S,className:"shrink-0"}),l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:N?(A=N.name.split("/").pop())==null?void 0:A.replace(/\.gguf$/i,""):"nicht zugewiesen"}),N&&l.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap text-muted-foreground/70",children:[l.jsx("span",{className:"text-[9px] font-mono",children:_r(N.size_bytes)}),N.prompt_cache&&l.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"}),N.spec_active&&l.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: ${N.spec_draft_model})`,children:"SPEC"}),N.parallel_slots>1&&l.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:`${N.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",N.parallel_slots]}),N.incomplete&&l.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"})]})]})]}),l.jsx("span",{className:"shrink-0",children:N?E?l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[l.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full bg-emerald-500",g&&"animate-pulse")})," warm"]}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},S)})}),l.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. Details & Routing im Modell-Manager."})]})}function cX(){var P,_,O,D,B,F;const{data:e}=wy(),{data:t}=SE(),{data:r}=yi(),{data:n}=xo(),a=!!e&&!!t,o=z=>{var Y;return(Y=t==null?void 0:t.services.find(U=>U.name.toLowerCase().includes(z)))==null?void 0:Y.ok},u=e==null?void 0:e.engine_reachable,c=(P=e==null?void 0:e.brain)==null?void 0:P.ready,f=((_=e==null?void 0:e.brain)==null?void 0:_.model)||((O=r==null?void 0:r.models.find(z=>z.role==="hermes"))==null?void 0:O.name)||"",h=[];h.push((()=>{const z={id:"brain",label:"Lucys Hirn",icon:vo,critical:!0};return a?u===!1?{...z,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:c===!1?{...z,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:f?{kind:"loadModel",model:f,label:"Hirn aufwecken"}:void 0}:{...z,status:"ok",detail:"Wach und ansprechbar."}:{...z,status:"loading",detail:"Wird geprüft …"}})()),h.push((()=>{const z={id:"vision",label:"Lucys Augen",icon:vu,critical:!1};if(!a||!r)return{...z,status:"loading",detail:"Wird geprüft …"};const Y=r.models.find(he=>he.role==="vision");return Y?(r.running??[]).includes(Y.name)?{...z,status:"ok",detail:"Sieht Bildschirm und Bilder."}:{...z,status:"warn",detail:"Lucys Augen sind eingeschlafen — das erste Bild-Ansehen dauert dann kurz.",repair:{kind:"loadModel",model:Y.name,label:"Augen aufwecken"}}:{...z,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),h.push((()=>{const z={id:"memory",label:"Lucys Gedächtnis",icon:NN,critical:!0},Y=o("mem0");return!a||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...z,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),h.push((()=>{const z={id:"gateway",label:"Verbindung (Gateway)",icon:Jd,critical:!0},Y=e?e.gateway_reachable:o("integriert");return!a||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...z,status:"down",detail:"Die Verbindungs-Zentrale antwortet nicht — Apps erreichen Lucy nicht.",repair:{kind:"restart",service:"mission-control-2",label:"Zentrale neu starten"}}})()),h.push((()=>{const z={id:"agent",label:"Lucys Agent (Hermes)",icon:pn,critical:!0},Y=o("hermes-gateway");return!a||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...z,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),h.push((()=>{const z={id:"voice",label:"Lucys Stimme",icon:j4,critical:!1},Y=o("voice");return!a||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Lucy kann hören und sprechen."}:{...z,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const m=((D=n==null?void 0:n.gpu)==null?void 0:D.gtt_total)||((B=n==null?void 0:n.gpu)==null?void 0:B.vram_total)||0,g=((F=n==null?void 0:n.gpu)==null?void 0:F.gtt_used)||0,v=m>0?Math.min(100,g/m*100):0,b=1024**3,j=m?v>=90?{status:"full",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=72?{status:"warn",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:g/b,totalGb:m/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},k=h.some(z=>z.status==="loading"),S=h.filter(z=>z.critical&&z.status==="down"),N=h.filter(z=>z.status==="warn"||!z.critical&&z.status==="down"),E=j.status==="full";return{verdict:k&&!S.length?"loading":S.length?"problem":N.length||E?"warn":"gut",checks:h,memory:j,problems:S}}const dX={ok:"bg-emerald-500",warn:"bg-amber-500",down:"bg-red-500",loading:"bg-muted-foreground/40"};function KO({frame:e="lucy"}={}){const{verdict:t,checks:r,memory:n,problems:a}=cX(),{showAlert:o,dialogElement:u}=ya(),c=Kn(),[f,h]=y.useState({});async function m(S,N){h(E=>({...E,[S]:!0}));try{if(N.kind==="loadModel")await je(`/api/models/${encodeURIComponent(N.model)}/load`,{method:"POST"});else{const E=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:N.service})});E.ok||o("Reparatur nicht ganz geklappt",(E.err||"Unbekannter Fehler")+(N.needsSudo?` -Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}c.invalidateQueries({queryKey:Ge.health}),c.invalidateQueries({queryKey:Ge.services}),c.invalidateQueries({queryKey:Ge.models})}catch(E){o("Reparatur fehlgeschlagen",String((E==null?void 0:E.message)||E))}finally{h(E=>({...E,[S]:!1}))}}const g=e==="box"?{loading:"Box wird geprüft …",gut:"Alles okay",warn:"Kleinigkeit an der Box",problem:"Box braucht Hilfe"}:{loading:"Lucy wird geprüft …",gut:"Lucy geht's gut 💚",warn:"Kleinigkeit bei Lucy",problem:"Lucy braucht Hilfe"},v={loading:{ring:"border-border/60 bg-card/45",icon:th,iconCls:"text-muted-foreground animate-spin",title:g.loading,sub:"Einen Moment, ich schaue nach dem Rechten."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:p4,iconCls:"text-emerald-400",title:g.gut,sub:"Alle wichtigen Fähigkeiten laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:gn,iconCls:"text-amber-400",title:g.warn,sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:gn,iconCls:"text-red-400",title:g.problem,sub:`${i.length} wichtige${i.length===1?"s":""} Problem${i.length===1?"":"e"} gefunden.`}}[t],b=v.icon,j={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[n.status],k={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[n.status];return l.jsxs("div",{className:ee("rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors",v.ring),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:l.jsx(b,{className:ee("h-6 w-6",v.iconCls)})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:v.title}),l.jsx("p",{className:"text-xs text-muted-foreground",children:v.sub})]})]}),l.jsxs("div",{className:"mt-4 rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[l.jsx(cu,{className:"h-3.5 w-3.5"})," Speicher"]}),l.jsx("span",{className:ee("font-mono font-bold",k),children:n.status==="unknown"?"—":`${n.usedGb.toFixed(0)} / ${n.totalGb.toFixed(0)} GB`})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",j),style:{width:`${n.pct}%`}})}),l.jsx("p",{className:ee("mt-1.5 text-[11px]",k),children:n.text})]}),l.jsx("div",{className:"mt-4 space-y-1.5",children:r.map(S=>l.jsx(vX,{c:S,busy:!!f[S.id],onRepair:()=>S.repair&&m(S.id,S.repair)},S.id))}),u]})}function vX({c:e,busy:t,onRepair:r}){const n=e.icon,i=e.status==="down"||e.status==="warn";return l.jsxs("div",{className:ee("flex items-center justify-between gap-3 rounded-xl border p-2.5 transition-colors",e.status==="down"?"border-red-500/25 bg-red-500/5":e.status==="warn"?"border-amber-500/20 bg-amber-500/5":"border-border/30 bg-background/15"),children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsxs("span",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-foreground/80",children:[l.jsx(n,{className:"h-4 w-4"}),l.jsx("span",{className:ee("absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-black/40",gX[e.status],e.status==="down"&&"animate-pulse")})]}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-foreground",children:[e.label,e.status==="ok"&&l.jsx(or,{className:"h-3 w-3 text-emerald-400"}),!e.critical&&l.jsx("span",{className:"rounded bg-background/40 px-1 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"optional"})]}),l.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:e.detail})]})]}),i&&e.repair&&l.jsxs("button",{onClick:r,disabled:t,className:ee("flex h-8 shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer disabled:opacity-60",e.status==="down"?"border-red-500/40 bg-red-500/10 text-red-300 hover:bg-red-500/20":"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20"),title:e.repair.label,children:[t?l.jsx(th,{className:"h-3.5 w-3.5 animate-spin"}):l.jsx(Uu,{className:"h-3.5 w-3.5"}),e.repair.label]}),i&&!e.repair&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] font-semibold text-muted-foreground",title:"Keine Auto-Reparatur bekannt",children:[l.jsx(L4,{className:"h-3.5 w-3.5"})," manuell"]})]})}function W2({children:e}){return l.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function yX(){return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),l.jsx(QO,{}),l.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[l.jsx(HO,{}),l.jsx(KO,{}),l.jsx(mX,{})]}),l.jsxs("section",{children:[l.jsx(W2,{children:"Stack & Telemetrie"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx(cX,{}),l.jsx(GO,{})]})]}),l.jsxs("section",{children:[l.jsx(W2,{children:"Betrieb & Wissen"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[l.jsx(sX,{}),l.jsx(lX,{}),l.jsx(uX,{})]})]})]})}function xX(){const e=Kn(),{data:t=[]}=DD(2e3),{showAlert:r,dialogElement:n}=ya();async function i(c){try{await je(`/api/jobs/${c}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:Ge.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(c=>c.state==="running"||c.state==="queued"),u=t.filter(c=>c.state!=="running"&&c.state!=="queued").slice(-3);return o.length===0&&u.length===0?null:l.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:[l.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(c=>l.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:c.label}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-muted-foreground font-mono",children:[c.progress??0,"% • ",mv(c.done_bytes),"/",mv(c.total_bytes),c.eta_s?` • ETA ${GD(c.eta_s)}`:""]}),l.jsx("button",{onClick:()=>i(c.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"})]})]}),l.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:l.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${c.progress??0}%`}})})]},c.id)),u.map(c=>l.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[l.jsx("span",{className:"truncate",children:c.label}),l.jsx("span",{className:ee("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",c.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:c.state})]},c.id)),n]})}function Ra({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return l.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function K2({caps:e}){return e?l.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&l.jsx(Ra,{children:"💻 Code"}),e.vision&&l.jsx(Ra,{children:"👁 Bild"}),e.reasoning&&l.jsx(Ra,{children:"🧠 Reason"}),e.moe&&l.jsxs(Ra,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&l.jsx(Ra,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&l.jsx(Ra,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&l.jsx(Ra,{children:"🔢 Embed"})]}):null}function bX({model:e,onClose:t,onChanged:r}){var k,S;const{data:n,isLoading:i}=LD(e.gguf_path),[o,u]=y.useState(null),[c,f]=y.useState(""),h=n==null?void 0:n.target_vocab,m=(n==null?void 0:n.drafts)??[],g=m.filter(N=>N.compatible===!0),v=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await je(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(E){f(String((E==null?void 0:E.message)||E)),u(null)}}const j=N=>{var E;return N?`${N.pre??"?"} · ${((E=N.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[l.jsx(ha,{className:"h-4 w-4"})," Speculative Draft"]}),l.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.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 ',l.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),l.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:[l.jsx("span",{className:"text-muted-foreground",children:(k=e.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-foreground",children:["Vocab: ",j(h)]})]}),e.spec_active&&v&&l.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:[l.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[l.jsx(or,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),l.jsx("button",{onClick:()=>b(null),disabled:o!==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"})]}),!(n!=null&&n.target_exists)&&l.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:[l.jsx(gn,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),l.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:i?l.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):m.length===0?l.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 ",l.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."]}):m.map(N=>{var P,_;const E=N.filename===v,A=N.compatible===!0;return l.jsxs("div",{className:ee("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",A?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate flex items-center gap-1.5",children:[N.filename,N.mtp&&l.jsx("span",{className:"shrink-0 rounded bg-indigo-500/15 px-1.5 py-0.5 text-[8px] font-bold uppercase tracking-wider text-indigo-400 border border-indigo-500/25",title:"MTP-Kopf (Multi-Token-Prediction) — by-construction vocab-identisch, höchste Akzeptanzrate",children:"MTP"})]}),l.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[_r(N.size_bytes)," · Vocab: ",j(N.vocab)]})]}),A?E?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("button",{onClick:()=>b(N.path),disabled:o!==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"}):l.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(P=N.vocab)==null?void 0:P.pre}/${(_=N.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[l.jsx(gn,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!i&&(n==null?void 0:n.target_exists)&&m.length>0&&g.length===0&&l.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=",l.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",l.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),c&&l.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:c})]})})}const wX=e=>!!ir(e).protected;function kX({role:e,roleRec:t,models:r,onAssign:n,onClose:i}){var f,h;const o=t&&t.role===e?t:null,u={};o==null||o.models.forEach(m=>{u[m.name]=m});const c=o?o.models.map(m=>r.find(g=>g.name===m.name)).filter(Boolean):r;return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":`${ir(e).label} konfigurieren`,children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx(oo,{role:e})," festlegen"]}),l.jsx("button",{onClick:i,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für ",l.jsx("strong",{className:"text-foreground",children:ir(e).label}),l.jsx("span",{className:"block text-[10px] text-muted-foreground/70 mt-0.5",children:ir(e).desc})]}),(o==null?void 0:o.recommended)&&l.jsxs("button",{onClick:()=>n(o.recommended),title:(f=u[o.recommended])==null?void 0:f.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[l.jsx(ha,{className:"h-3 w-3"})," Auto: ",(h=o.recommended.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")]})]}),l.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[wX(e)?l.jsx("div",{className:"w-full px-3 py-2 rounded-lg text-[11px] text-muted-foreground border border-border/30 bg-background/20 flex items-center gap-1.5",children:"🔒 Diese Rolle ist lebenswichtig und kann nicht leer bleiben — wähle stattdessen ein anderes Modell."}):l.jsx("button",{onClick:()=>n(""),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:l.jsx("span",{children:"Zuweisung entfernen"})}),c.map(m=>{var k;const g=u[m.name],v=m.role===e,b=!!(g!=null&&g.recommended),j=!!g&&!g.suitable;return l.jsxs("button",{onClick:()=>n(m.name),className:ee("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",b?"border-primary/50 bg-primary/10":v?"text-primary font-bold bg-primary/5 border-primary/30":j?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[l.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[l.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(k=m.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,""),b&&l.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:g?`${g.params_b}B · ${m.quant} · ${g.reason}`:`${_r(m.size_bytes)} · ${m.quant}`})]}),v&&l.jsx(or,{className:"h-4 w-4 shrink-0 text-primary"})]},m.name)})]})]})})}const jX=["fast","heavy","heavy_chars"],SX=["coder_lite","coder","coding_escalate_chars"];function NX(){const e=Kn(),{data:t,isLoading:r}=TD(),[n,i]=y.useState(null),[o,u]=y.useState(!1),[c,f]=y.useState(""),[h,m]=y.useState(0);if(y.useEffect(()=>{t!=null&&t.policy&&!n&&i({...t.policy})},[t,n]),r||!t||!n)return l.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-xs text-muted-foreground",children:"Lade Routing-Policy…"});const g=N=>t.fields.find(E=>E.key===N),v=Object.keys(n).some(N=>n[N]!==t.policy[N]),b=(N,E)=>{i(A=>A&&{...A,[N]:E}),f("")},j=N=>b(N,t.defaults[N]);async function k(){if(!n)return;const N={};for(const E of Object.keys(n))n[E]!==t.policy[E]&&(N[E]=n[E]);if(Object.keys(N).length!==0){u(!0),f("");try{const{policy:E}=await _D(N);i({...E}),e.invalidateQueries({queryKey:Ge.routingPolicy}),e.invalidateQueries({queryKey:Ge.routing}),m(Date.now()),setTimeout(()=>m(0),2e3)}catch(E){f(E.message||String(E))}finally{u(!1)}}}function S({k:N}){const E=g(N),A=n[N],P=n[N]===t.defaults[N];return l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("label",{className:"text-[10px] font-semibold text-muted-foreground",children:E.label}),!P&&l.jsxs("button",{onClick:()=>j(N),className:"flex items-center gap-0.5 text-[9px] text-muted-foreground/60 hover:text-foreground transition-colors cursor-pointer",title:`Auf Default zurücksetzen (${String(t.defaults[N])||"leer"})`,children:[l.jsx(M4,{className:"h-2.5 w-2.5"})," Default"]})]}),E.type==="bool"?l.jsxs("button",{onClick:()=>b(N,!A),className:ee("flex h-8 w-full items-center justify-between rounded-lg border px-3 text-[11px] font-semibold transition-all cursor-pointer",A?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-border/40 bg-background/40 text-muted-foreground"),children:[l.jsx("span",{children:A?"An":"Aus"}),l.jsx("span",{className:ee("h-3.5 w-3.5 rounded-full transition-colors",A?"bg-emerald-400":"bg-muted-foreground/40")})]}):E.type==="int"?l.jsx("input",{type:"number",value:A,min:E.min,max:E.max,"aria-label":E.label,onChange:_=>b(N,Number(_.target.value)),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"}):l.jsx("input",{type:"text",value:A,"aria-label":E.label,spellCheck:!1,placeholder:N==="coder_lite"?"(leer = aus)":"",onChange:_=>b(N,_.target.value),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"})]})}return l.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:[l.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(z4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lane-Routing & Policy"}),l.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-300 border border-emerald-500/20",children:"hot-reload"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[c&&l.jsx("span",{className:"text-[10px] text-red-400 max-w-[280px] truncate",title:c,children:c}),h>0&&l.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-400",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," gespeichert"]}),l.jsxs("button",{onClick:k,disabled:!v||o,className:ee("h-8 px-4 rounded-lg text-[10px] font-bold uppercase tracking-wide transition-all flex items-center gap-1.5",v&&!o?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer shadow-md shadow-primary/10":"bg-background/40 text-muted-foreground/50 border border-border/40 cursor-not-allowed"),children:[o?l.jsx(th,{className:"h-3.5 w-3.5 animate-spin"}):null,"Speichern"]})]})]}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed -mt-1",children:["Welches echte Modell hinter den virtuellen Lanes ",l.jsx("code",{className:"text-cyan-300",children:"chat"})," und"," ",l.jsx("code",{className:"text-cyan-300",children:"coding"})," steckt. Änderungen greifen sofort (kein Neustart). Die Keyword-Heuristiken bleiben im Code."]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(S4,{className:"h-4 w-4 text-teal-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"chat"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(= auto)"})]}),jX.map(N=>l.jsx(S,{k:N},N))]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(o4,{className:"h-4 w-4 text-indigo-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"coding"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(agentisch → immer Coder)"})]}),SX.map(N=>l.jsx(S,{k:N},N))]})]}),l.jsx("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4",children:l.jsx("div",{className:"max-w-xs",children:l.jsx(S,{k:"fast_no_think"})})})]})}function EX(){var he,ue,ge;const e=Kn(),{data:t}=yi(4e3),{data:r}=C5(),{data:n}=xo(),{data:i}=P5(),{showAlert:o,dialogElement:u}=ya(),[c,f]=y.useState(!1),[h,m]=y.useState(!1),g=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=(he=r==null?void 0:r.groups)==null?void 0:he.brains,j=(b==null?void 0:b.members)??[],k=ie=>g.find(se=>se.name===ie),S=ie=>{var se;return((se=ie.split("/").pop())==null?void 0:se.replace(/\.gguf$/i,""))||ie},N=j.map(k).filter(Boolean),E=1024**3,A=i==null?void 0:i.budget,P=N.reduce((ie,se)=>ie+(se.size_bytes||0),0)/E,_=((ue=n==null?void 0:n.gpu)==null?void 0:ue.gtt_total)||((ge=n==null?void 0:n.gpu)==null?void 0:ge.vram_total)||0,O=(A==null?void 0:A.gtt_gb)||(_?_/E:0),D=(A==null?void 0:A.warm_projected_gb)??P,B=O>0?Math.min(100,D/O*100):0,F=g.filter(ie=>!j.includes(ie.name)&&!ie.incomplete);async function z(ie){m(!0);try{await E5("brains",ie,(b==null?void 0:b.swap)??!1,(b==null?void 0:b.persist)??!0),e.invalidateQueries({queryKey:Ge.groups}),e.invalidateQueries({queryKey:Ge.models}),e.invalidateQueries({queryKey:Ge.hermesBrain})}catch(se){o("Fehler",`Immer-bereit-Set konnte nicht geändert werden: ${(se==null?void 0:se.message)||se}`)}finally{m(!1)}}function Y(ie){const se=k(ie);if(se&&ir(se.role).protected){o("Geschützt",`„${ir(se.role).label}" ist lebenswichtig und bleibt immer bereit.`);return}z(j.filter(X=>X!==ie))}function U(ie){f(!1),z([...j,ie])}return b?l.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:[l.jsx(G2,{}),l.jsxs("div",{className:"space-y-1.5",children:[N.length===0&&l.jsx("div",{className:"text-xs text-muted-foreground",children:"Noch keine Modelle im Set."}),N.map(ie=>{const se=v.includes(ie.name),X=ir(ie.role).protected;return l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full ring-2 ring-black/40",se?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"),title:se?"Gerade warm (bereit)":"Reserviert — lädt bei Bedarf sofort"}),ie.role&&l.jsx(oo,{role:ie.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",title:ie.name,children:S(ie.name)}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:_r(ie.size_bytes)})]}),X?l.jsx("span",{className:"shrink-0 text-[10px] font-semibold text-muted-foreground",title:"Lebenswichtig — bleibt immer im Set.",children:"🔒"}):l.jsx("button",{onClick:()=>Y(ie.name),disabled:h,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground transition-colors hover:bg-red-500/5 hover:text-red-400 cursor-pointer disabled:opacity-50",title:"Aus dem Immer-bereit-Set nehmen (lädt dann nur noch bei Bedarf)",children:l.jsx(zn,{className:"h-3.5 w-3.5"})})]},ie.name)})]}),l.jsxs("button",{onClick:()=>f(!0),disabled:h||F.length===0,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border/50 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary cursor-pointer disabled:opacity-50",children:[l.jsx(tf,{className:"h-3.5 w-3.5"})," Modell dauerhaft bereithalten"]}),l.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",title:"Modellgewichte + KV-Cache, berechnet aus den echten Architektur-Daten jedes Modells (Layer × KV-Köpfe × Kontext) und seiner KV-Quantisierung. So viel legt llama.cpp beim Laden wirklich für den eingestellten Kontext an — kein Aufschlag mehr.",children:[l.jsx(cu,{className:"h-3.5 w-3.5"})," Reserviert fürs Set"]}),l.jsxs("span",{className:"font-mono font-bold text-foreground",children:[D.toFixed(1),O>0?` / ${O.toFixed(0)}`:""," GB"]})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",B>=85?"bg-red-500":B>=65?"bg-amber-500":"bg-teal-500"),style:{width:`${B}%`}})}),A&&!A.fits&&l.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[11px] text-amber-400",children:[l.jsx(gn,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),l.jsxs("span",{children:["Zusammen mit dem größten Gelegenheits-Modell (~",A.largest_ondemand_gb," GB) wird der Speicher knapp. Das Set bleibt dabei immer geladen — wird es wirklich eng, schlägt das Laden des großen Modells fehl (es wartet dann, statt das Set zu verdrängen)."]})]}),A&&A.fits&&l.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-emerald-400",children:[l.jsx(or,{className:"h-3.5 w-3.5 shrink-0"})," Passt auch neben dem größten Gelegenheits-Modell — nichts wird verdrängt."]})]}),c&&l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":"Modell zum Immer-bereit-Set hinzufügen",children:l.jsxs("div",{className:"w-full max-w-md space-y-3 rounded-2xl border border-border/80 bg-card p-6 shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Dauerhaft bereithalten"}),l.jsx("button",{onClick:()=>f(!1),className:"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Wähle ein Modell, das ohne Ladezeit bereitstehen soll:"}),l.jsx("div",{className:"max-h-60 space-y-1.5 overflow-y-auto pr-1",children:F.map(ie=>l.jsxs("button",{onClick:()=>U(ie.name),className:"flex w-full items-center justify-between gap-2 rounded-lg border border-border/30 bg-background/20 px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[ie.role&&l.jsx(oo,{role:ie.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:S(ie.name)})]}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:_r(ie.size_bytes)})]},ie.name))})]})}),u]}):l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsx(G2,{}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Es gibt noch kein Immer-bereit-Set. Es entsteht automatisch, sobald Lucys Hirn zugewiesen ist."}),u]})}function G2(){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ha,{className:"h-4.5 w-4.5 text-primary"}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-foreground",children:"Immer-bereit-Set"}),l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Diese Modelle hält Lucy immer bereit — sie antworten ohne Ladezeit."})]})]})}function YO(){var Be,Pe,vt,Yt;const e=Kn(),{data:t,isLoading:r,error:n}=yi(4e3),{data:i}=lh(4e3),{data:o}=P5(),{data:u}=xo(),{data:c}=C5(),{showAlert:f,showConfirm:h,showPrompt:m,dialogElement:g}=ya(),v=y5(),b=K=>!!ir(K).protected,j=(t==null?void 0:t.models)??[],k=(t==null?void 0:t.running)??[],S=n?String(n):"",N=()=>{e.invalidateQueries({queryKey:Ge.models}),e.invalidateQueries({queryKey:Ge.routing})},E=(Be=c==null?void 0:c.groups)==null?void 0:Be.brains,A=(E==null?void 0:E.members)??[],P=K=>A.includes(K),_=A.some(K=>k.includes(K));async function O(K){if(!E){f("Keine brains-Gruppe","Es existiert noch keine Ko-Residenz-Gruppe „brains“ in der Engine-Konfiguration. Lege sie erst über die Gruppen-Verwaltung an.");return}const Se=A.includes(K)?A.filter(qe=>qe!==K):[...A,K];try{await E5("brains",Se,E.swap??!1,E.persist??!0),e.invalidateQueries({queryKey:Ge.groups}),N()}catch(qe){f("Fehler",`Ko-Residenz konnte nicht geändert werden: ${qe.message||qe}`)}}const[D,B]=y.useState(null),[F,z]=y.useState(null),[Y,U]=y.useState(null),[he,ue]=y.useState("grid"),[ge,ie]=y.useState("all"),se=j.filter(K=>ge==="in_use"?!!K.role||k.includes(K.name):!0);async function X(K){try{await je(`/api/models/${encodeURIComponent(K)}/load`,{method:"POST"}),N()}catch(Ae){f("Fehler",`Fehler beim Laden des Modells: ${Ae.message}`)}}async function te(K){if(E&&_&&!P(K)){const Ae=A.filter(Se=>k.includes(Se)).map(Se=>Se.split("/").pop()).join(", ");h("Verdrängt das Hirn?",`„${K.split("/").pop()}“ ist nicht in der Ko-Residenz-Gruppe „brains“. Beim Laden wirft es das aktuell warme Hirn (${Ae}) raus — Lucy verliert Hirn bzw. Augen. +Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}c.invalidateQueries({queryKey:Ve.health}),c.invalidateQueries({queryKey:Ve.services}),c.invalidateQueries({queryKey:Ve.models})}catch(E){o("Reparatur fehlgeschlagen",String((E==null?void 0:E.message)||E))}finally{h(E=>({...E,[S]:!1}))}}const g=e==="box"?{loading:"Box wird geprüft …",gut:"Alles okay",warn:"Kleinigkeit an der Box",problem:"Box braucht Hilfe"}:{loading:"Lucy wird geprüft …",gut:"Lucy geht's gut 💚",warn:"Kleinigkeit bei Lucy",problem:"Lucy braucht Hilfe"},v={loading:{ring:"border-border/60 bg-card/45",icon:eh,iconCls:"text-muted-foreground animate-spin",title:g.loading,sub:"Einen Moment, ich schaue nach dem Rechten."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:f4,iconCls:"text-emerald-400",title:g.gut,sub:"Alle wichtigen Fähigkeiten laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:gn,iconCls:"text-amber-400",title:g.warn,sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:gn,iconCls:"text-red-400",title:g.problem,sub:`${a.length} wichtige${a.length===1?"s":""} Problem${a.length===1?"":"e"} gefunden.`}}[t],b=v.icon,j={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[n.status],k={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[n.status];return l.jsxs("div",{className:ee("rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors",v.ring),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:l.jsx(b,{className:ee("h-6 w-6",v.iconCls)})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:v.title}),l.jsx("p",{className:"text-xs text-muted-foreground",children:v.sub})]})]}),l.jsxs("div",{className:"mt-4 rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[l.jsx(cu,{className:"h-3.5 w-3.5"})," Speicher"]}),l.jsx("span",{className:ee("font-mono font-bold",k),children:n.status==="unknown"?"—":`${n.usedGb.toFixed(0)} / ${n.totalGb.toFixed(0)} GB`})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",j),style:{width:`${n.pct}%`}})}),l.jsx("p",{className:ee("mt-1.5 text-[11px]",k),children:n.text})]}),l.jsx("div",{className:"mt-4 space-y-1.5",children:r.map(S=>l.jsx(fX,{c:S,busy:!!f[S.id],onRepair:()=>S.repair&&m(S.id,S.repair)},S.id))}),u]})}function fX({c:e,busy:t,onRepair:r}){const n=e.icon,a=e.status==="down"||e.status==="warn";return l.jsxs("div",{className:ee("flex items-center justify-between gap-3 rounded-xl border p-2.5 transition-colors",e.status==="down"?"border-red-500/25 bg-red-500/5":e.status==="warn"?"border-amber-500/20 bg-amber-500/5":"border-border/30 bg-background/15"),children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsxs("span",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-foreground/80",children:[l.jsx(n,{className:"h-4 w-4"}),l.jsx("span",{className:ee("absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-black/40",dX[e.status],e.status==="down"&&"animate-pulse")})]}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-foreground",children:[e.label,e.status==="ok"&&l.jsx(or,{className:"h-3 w-3 text-emerald-400"}),!e.critical&&l.jsx("span",{className:"rounded bg-background/40 px-1 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"optional"})]}),l.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:e.detail})]})]}),a&&e.repair&&l.jsxs("button",{onClick:r,disabled:t,className:ee("flex h-8 shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer disabled:opacity-60",e.status==="down"?"border-red-500/40 bg-red-500/10 text-red-300 hover:bg-red-500/20":"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20"),title:e.repair.label,children:[t?l.jsx(eh,{className:"h-3.5 w-3.5 animate-spin"}):l.jsx(Uu,{className:"h-3.5 w-3.5"}),e.repair.label]}),a&&!e.repair&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] font-semibold text-muted-foreground",title:"Keine Auto-Reparatur bekannt",children:[l.jsx(T4,{className:"h-3.5 w-3.5"})," manuell"]})]})}function U2({children:e}){return l.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function hX(){return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),l.jsx(KO,{}),l.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[l.jsx(FO,{}),l.jsx(UO,{}),l.jsx(uX,{})]}),l.jsxs("section",{children:[l.jsx(U2,{children:"Stack & Telemetrie"}),l.jsx(oX,{})]}),l.jsxs("section",{children:[l.jsx(U2,{children:"Betrieb & Wissen"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[l.jsx(nX,{}),l.jsx(iX,{}),l.jsx(aX,{})]})]})]})}function mX(){const e=Kn(),{data:t=[]}=_D(2e3),{showAlert:r,dialogElement:n}=ya();async function a(c){try{await je(`/api/jobs/${c}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:Ve.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(c=>c.state==="running"||c.state==="queued"),u=t.filter(c=>c.state!=="running"&&c.state!=="queued").slice(-3);return o.length===0&&u.length===0?null:l.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:[l.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(c=>l.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:c.label}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-muted-foreground font-mono",children:[c.progress??0,"% • ",fv(c.done_bytes),"/",fv(c.total_bytes),c.eta_s?` • ETA ${UD(c.eta_s)}`:""]}),l.jsx("button",{onClick:()=>a(c.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"})]})]}),l.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:l.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${c.progress??0}%`}})})]},c.id)),u.map(c=>l.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[l.jsx("span",{className:"truncate",children:c.label}),l.jsx("span",{className:ee("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",c.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:c.state})]},c.id)),n]})}function Ra({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return l.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function H2({caps:e}){return e?l.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&l.jsx(Ra,{children:"💻 Code"}),e.vision&&l.jsx(Ra,{children:"👁 Bild"}),e.reasoning&&l.jsx(Ra,{children:"🧠 Reason"}),e.moe&&l.jsxs(Ra,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&l.jsx(Ra,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&l.jsx(Ra,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&l.jsx(Ra,{children:"🔢 Embed"})]}):null}function pX({model:e,onClose:t,onChanged:r}){var k,S;const{data:n,isLoading:a}=ID(e.gguf_path),[o,u]=y.useState(null),[c,f]=y.useState(""),h=n==null?void 0:n.target_vocab,m=(n==null?void 0:n.drafts)??[],g=m.filter(N=>N.compatible===!0),v=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await je(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(E){f(String((E==null?void 0:E.message)||E)),u(null)}}const j=N=>{var E;return N?`${N.pre??"?"} · ${((E=N.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[l.jsx(ha,{className:"h-4 w-4"})," Speculative Draft"]}),l.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.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 ',l.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),l.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:[l.jsx("span",{className:"text-muted-foreground",children:(k=e.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-foreground",children:["Vocab: ",j(h)]})]}),e.spec_active&&v&&l.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:[l.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[l.jsx(or,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),l.jsx("button",{onClick:()=>b(null),disabled:o!==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"})]}),!(n!=null&&n.target_exists)&&l.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:[l.jsx(gn,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),l.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:a?l.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):m.length===0?l.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 ",l.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."]}):m.map(N=>{var P,_;const E=N.filename===v,A=N.compatible===!0;return l.jsxs("div",{className:ee("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",A?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate flex items-center gap-1.5",children:[N.filename,N.mtp&&l.jsx("span",{className:"shrink-0 rounded bg-indigo-500/15 px-1.5 py-0.5 text-[8px] font-bold uppercase tracking-wider text-indigo-400 border border-indigo-500/25",title:"MTP-Kopf (Multi-Token-Prediction) — by-construction vocab-identisch, höchste Akzeptanzrate",children:"MTP"})]}),l.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[_r(N.size_bytes)," · Vocab: ",j(N.vocab)]})]}),A?E?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("button",{onClick:()=>b(N.path),disabled:o!==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"}):l.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(P=N.vocab)==null?void 0:P.pre}/${(_=N.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[l.jsx(gn,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!a&&(n==null?void 0:n.target_exists)&&m.length>0&&g.length===0&&l.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=",l.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",l.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),c&&l.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:c})]})})}const gX=e=>!!ir(e).protected;function vX({role:e,roleRec:t,models:r,onAssign:n,onClose:a}){var f,h;const o=t&&t.role===e?t:null,u={};o==null||o.models.forEach(m=>{u[m.name]=m});const c=o?o.models.map(m=>r.find(g=>g.name===m.name)).filter(Boolean):r;return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":`${ir(e).label} konfigurieren`,children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx(oo,{role:e})," festlegen"]}),l.jsx("button",{onClick:a,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für ",l.jsx("strong",{className:"text-foreground",children:ir(e).label}),l.jsx("span",{className:"block text-[10px] text-muted-foreground/70 mt-0.5",children:ir(e).desc})]}),(o==null?void 0:o.recommended)&&l.jsxs("button",{onClick:()=>n(o.recommended),title:(f=u[o.recommended])==null?void 0:f.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[l.jsx(ha,{className:"h-3 w-3"})," Auto: ",(h=o.recommended.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")]})]}),l.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[gX(e)?l.jsx("div",{className:"w-full px-3 py-2 rounded-lg text-[11px] text-muted-foreground border border-border/30 bg-background/20 flex items-center gap-1.5",children:"🔒 Diese Rolle ist lebenswichtig und kann nicht leer bleiben — wähle stattdessen ein anderes Modell."}):l.jsx("button",{onClick:()=>n(""),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:l.jsx("span",{children:"Zuweisung entfernen"})}),c.map(m=>{var k;const g=u[m.name],v=m.role===e,b=!!(g!=null&&g.recommended),j=!!g&&!g.suitable;return l.jsxs("button",{onClick:()=>n(m.name),className:ee("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",b?"border-primary/50 bg-primary/10":v?"text-primary font-bold bg-primary/5 border-primary/30":j?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[l.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[l.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(k=m.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,""),b&&l.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:g?`${g.params_b}B · ${m.quant} · ${g.reason}`:`${_r(m.size_bytes)} · ${m.quant}`})]}),v&&l.jsx(or,{className:"h-4 w-4 shrink-0 text-primary"})]},m.name)})]})]})})}const yX=["fast","heavy","heavy_chars"],xX=["coder_lite","coder","coding_escalate_chars"];function bX(){const e=Kn(),{data:t,isLoading:r}=OD(),[n,a]=y.useState(null),[o,u]=y.useState(!1),[c,f]=y.useState(""),[h,m]=y.useState(0);if(y.useEffect(()=>{t!=null&&t.policy&&!n&&a({...t.policy})},[t,n]),r||!t||!n)return l.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-xs text-muted-foreground",children:"Lade Routing-Policy…"});const g=N=>t.fields.find(E=>E.key===N),v=Object.keys(n).some(N=>n[N]!==t.policy[N]),b=(N,E)=>{a(A=>A&&{...A,[N]:E}),f("")},j=N=>b(N,t.defaults[N]);async function k(){if(!n)return;const N={};for(const E of Object.keys(n))n[E]!==t.policy[E]&&(N[E]=n[E]);if(Object.keys(N).length!==0){u(!0),f("");try{const{policy:E}=await CD(N);a({...E}),e.invalidateQueries({queryKey:Ve.routingPolicy}),e.invalidateQueries({queryKey:Ve.routing}),m(Date.now()),setTimeout(()=>m(0),2e3)}catch(E){f(E.message||String(E))}finally{u(!1)}}}function S({k:N}){const E=g(N),A=n[N],P=n[N]===t.defaults[N];return l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("label",{className:"text-[10px] font-semibold text-muted-foreground",children:E.label}),!P&&l.jsxs("button",{onClick:()=>j(N),className:"flex items-center gap-0.5 text-[9px] text-muted-foreground/60 hover:text-foreground transition-colors cursor-pointer",title:`Auf Default zurücksetzen (${String(t.defaults[N])||"leer"})`,children:[l.jsx(P4,{className:"h-2.5 w-2.5"})," Default"]})]}),E.type==="bool"?l.jsxs("button",{onClick:()=>b(N,!A),className:ee("flex h-8 w-full items-center justify-between rounded-lg border px-3 text-[11px] font-semibold transition-all cursor-pointer",A?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-border/40 bg-background/40 text-muted-foreground"),children:[l.jsx("span",{children:A?"An":"Aus"}),l.jsx("span",{className:ee("h-3.5 w-3.5 rounded-full transition-colors",A?"bg-emerald-400":"bg-muted-foreground/40")})]}):E.type==="int"?l.jsx("input",{type:"number",value:A,min:E.min,max:E.max,"aria-label":E.label,onChange:_=>b(N,Number(_.target.value)),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"}):l.jsx("input",{type:"text",value:A,"aria-label":E.label,spellCheck:!1,placeholder:N==="coder_lite"?"(leer = aus)":"",onChange:_=>b(N,_.target.value),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"})]})}return l.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:[l.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(R4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lane-Routing & Policy"}),l.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-300 border border-emerald-500/20",children:"hot-reload"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[c&&l.jsx("span",{className:"text-[10px] text-red-400 max-w-[280px] truncate",title:c,children:c}),h>0&&l.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-400",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," gespeichert"]}),l.jsxs("button",{onClick:k,disabled:!v||o,className:ee("h-8 px-4 rounded-lg text-[10px] font-bold uppercase tracking-wide transition-all flex items-center gap-1.5",v&&!o?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer shadow-md shadow-primary/10":"bg-background/40 text-muted-foreground/50 border border-border/40 cursor-not-allowed"),children:[o?l.jsx(eh,{className:"h-3.5 w-3.5 animate-spin"}):null,"Speichern"]})]})]}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed -mt-1",children:["Welches echte Modell hinter den virtuellen Lanes ",l.jsx("code",{className:"text-cyan-300",children:"chat"})," und"," ",l.jsx("code",{className:"text-cyan-300",children:"coding"})," steckt. Änderungen greifen sofort (kein Neustart). Die Keyword-Heuristiken bleiben im Code."]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(w4,{className:"h-4 w-4 text-teal-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"chat"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(= auto)"})]}),yX.map(N=>l.jsx(S,{k:N},N))]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(r4,{className:"h-4 w-4 text-indigo-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"coding"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(agentisch → immer Coder)"})]}),xX.map(N=>l.jsx(S,{k:N},N))]})]}),l.jsx("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4",children:l.jsx("div",{className:"max-w-xs",children:l.jsx(S,{k:"fast_no_think"})})})]})}function wX(){var he,ue,ge;const e=Kn(),{data:t}=yi(4e3),{data:r}=NE(),{data:n}=xo(),{data:a}=EE(),{showAlert:o,dialogElement:u}=ya(),[c,f]=y.useState(!1),[h,m]=y.useState(!1),g=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=(he=r==null?void 0:r.groups)==null?void 0:he.brains,j=(b==null?void 0:b.members)??[],k=ie=>g.find(se=>se.name===ie),S=ie=>{var se;return((se=ie.split("/").pop())==null?void 0:se.replace(/\.gguf$/i,""))||ie},N=j.map(k).filter(Boolean),E=1024**3,A=a==null?void 0:a.budget,P=N.reduce((ie,se)=>ie+(se.size_bytes||0),0)/E,_=((ue=n==null?void 0:n.gpu)==null?void 0:ue.gtt_total)||((ge=n==null?void 0:n.gpu)==null?void 0:ge.vram_total)||0,O=(A==null?void 0:A.gtt_gb)||(_?_/E:0),D=(A==null?void 0:A.warm_projected_gb)??P,B=O>0?Math.min(100,D/O*100):0,F=g.filter(ie=>!j.includes(ie.name)&&!ie.incomplete);async function z(ie){m(!0);try{await jE("brains",ie,(b==null?void 0:b.swap)??!1,(b==null?void 0:b.persist)??!0),e.invalidateQueries({queryKey:Ve.groups}),e.invalidateQueries({queryKey:Ve.models}),e.invalidateQueries({queryKey:Ve.hermesBrain})}catch(se){o("Fehler",`Immer-bereit-Set konnte nicht geändert werden: ${(se==null?void 0:se.message)||se}`)}finally{m(!1)}}function Y(ie){const se=k(ie);if(se&&ir(se.role).protected){o("Geschützt",`„${ir(se.role).label}" ist lebenswichtig und bleibt immer bereit.`);return}z(j.filter(X=>X!==ie))}function U(ie){f(!1),z([...j,ie])}return b?l.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:[l.jsx(W2,{}),l.jsxs("div",{className:"space-y-1.5",children:[N.length===0&&l.jsx("div",{className:"text-xs text-muted-foreground",children:"Noch keine Modelle im Set."}),N.map(ie=>{const se=v.includes(ie.name),X=ir(ie.role).protected;return l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full ring-2 ring-black/40",se?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"),title:se?"Gerade warm (bereit)":"Reserviert — lädt bei Bedarf sofort"}),ie.role&&l.jsx(oo,{role:ie.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",title:ie.name,children:S(ie.name)}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:_r(ie.size_bytes)})]}),X?l.jsx("span",{className:"shrink-0 text-[10px] font-semibold text-muted-foreground",title:"Lebenswichtig — bleibt immer im Set.",children:"🔒"}):l.jsx("button",{onClick:()=>Y(ie.name),disabled:h,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground transition-colors hover:bg-red-500/5 hover:text-red-400 cursor-pointer disabled:opacity-50",title:"Aus dem Immer-bereit-Set nehmen (lädt dann nur noch bei Bedarf)",children:l.jsx(zn,{className:"h-3.5 w-3.5"})})]},ie.name)})]}),l.jsxs("button",{onClick:()=>f(!0),disabled:h||F.length===0,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border/50 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary cursor-pointer disabled:opacity-50",children:[l.jsx(ef,{className:"h-3.5 w-3.5"})," Modell dauerhaft bereithalten"]}),l.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",title:"Modellgewichte + KV-Cache, berechnet aus den echten Architektur-Daten jedes Modells (Layer × KV-Köpfe × Kontext) und seiner KV-Quantisierung. So viel legt llama.cpp beim Laden wirklich für den eingestellten Kontext an — kein Aufschlag mehr.",children:[l.jsx(cu,{className:"h-3.5 w-3.5"})," Reserviert fürs Set"]}),l.jsxs("span",{className:"font-mono font-bold text-foreground",children:[D.toFixed(1),O>0?` / ${O.toFixed(0)}`:""," GB"]})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",B>=85?"bg-red-500":B>=65?"bg-amber-500":"bg-teal-500"),style:{width:`${B}%`}})}),A&&!A.fits&&l.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[11px] text-amber-400",children:[l.jsx(gn,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),l.jsxs("span",{children:["Zusammen mit dem größten Gelegenheits-Modell (~",A.largest_ondemand_gb," GB) wird der Speicher knapp. Das Set bleibt dabei immer geladen — wird es wirklich eng, schlägt das Laden des großen Modells fehl (es wartet dann, statt das Set zu verdrängen)."]})]}),A&&A.fits&&l.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-emerald-400",children:[l.jsx(or,{className:"h-3.5 w-3.5 shrink-0"})," Passt auch neben dem größten Gelegenheits-Modell — nichts wird verdrängt."]})]}),c&&l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":"Modell zum Immer-bereit-Set hinzufügen",children:l.jsxs("div",{className:"w-full max-w-md space-y-3 rounded-2xl border border-border/80 bg-card p-6 shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Dauerhaft bereithalten"}),l.jsx("button",{onClick:()=>f(!1),className:"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Wähle ein Modell, das ohne Ladezeit bereitstehen soll:"}),l.jsx("div",{className:"max-h-60 space-y-1.5 overflow-y-auto pr-1",children:F.map(ie=>l.jsxs("button",{onClick:()=>U(ie.name),className:"flex w-full items-center justify-between gap-2 rounded-lg border border-border/30 bg-background/20 px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[ie.role&&l.jsx(oo,{role:ie.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:S(ie.name)})]}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:_r(ie.size_bytes)})]},ie.name))})]})}),u]}):l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsx(W2,{}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Es gibt noch kein Immer-bereit-Set. Es entsteht automatisch, sobald Lucys Hirn zugewiesen ist."}),u]})}function W2(){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ha,{className:"h-4.5 w-4.5 text-primary"}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-foreground",children:"Immer-bereit-Set"}),l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Diese Modelle hält Lucy immer bereit — sie antworten ohne Ladezeit."})]})]})}function GO(){var Be,Pe,vt,Yt;const e=Kn(),{data:t,isLoading:r,error:n}=yi(4e3),{data:a}=sh(4e3),{data:o}=EE(),{data:u}=xo(),{data:c}=NE(),{showAlert:f,showConfirm:h,showPrompt:m,dialogElement:g}=ya(),v=pE(),b=K=>!!ir(K).protected,j=(t==null?void 0:t.models)??[],k=(t==null?void 0:t.running)??[],S=n?String(n):"",N=()=>{e.invalidateQueries({queryKey:Ve.models}),e.invalidateQueries({queryKey:Ve.routing})},E=(Be=c==null?void 0:c.groups)==null?void 0:Be.brains,A=(E==null?void 0:E.members)??[],P=K=>A.includes(K),_=A.some(K=>k.includes(K));async function O(K){if(!E){f("Keine brains-Gruppe","Es existiert noch keine Ko-Residenz-Gruppe „brains“ in der Engine-Konfiguration. Lege sie erst über die Gruppen-Verwaltung an.");return}const Se=A.includes(K)?A.filter(qe=>qe!==K):[...A,K];try{await jE("brains",Se,E.swap??!1,E.persist??!0),e.invalidateQueries({queryKey:Ve.groups}),N()}catch(qe){f("Fehler",`Ko-Residenz konnte nicht geändert werden: ${qe.message||qe}`)}}const[D,B]=y.useState(null),[F,z]=y.useState(null),[Y,U]=y.useState(null),[he,ue]=y.useState("grid"),[ge,ie]=y.useState("all"),se=j.filter(K=>ge==="in_use"?!!K.role||k.includes(K.name):!0);async function X(K){try{await je(`/api/models/${encodeURIComponent(K)}/load`,{method:"POST"}),N()}catch(Ae){f("Fehler",`Fehler beim Laden des Modells: ${Ae.message}`)}}async function te(K){if(E&&_&&!P(K)){const Ae=A.filter(Se=>k.includes(Se)).map(Se=>Se.split("/").pop()).join(", ");h("Verdrängt das Hirn?",`„${K.split("/").pop()}“ ist nicht in der Ko-Residenz-Gruppe „brains“. Beim Laden wirft es das aktuell warme Hirn (${Ae}) raus — Lucy verliert Hirn bzw. Augen. Trotzdem exklusiv laden? Tipp: Mit dem 🧠-Schalter machst du das Modell dauerhaft ko-resident, dann bleiben beide warm.`,()=>X(K));return}X(K)}async function J(K){const Ae=j.find(Se=>Se.name===K);if(Ae&&b(Ae.role)){f("Geschützt",`„${ir(Ae.role).label}" ist lebenswichtig für Lucy und bleibt geladen. Zum Entladen erst im Experten-Modus die Rolle einem anderen Modell geben.`);return}try{await je(`/api/models/${encodeURIComponent(K)}/unload`,{method:"POST"}),N()}catch(Se){f("Fehler",`Fehler beim Entladen des Modells: ${Se.message}`)}}async function I(){try{await je("/api/models/unload",{method:"POST"}),N()}catch(K){f("Fehler",`Fehler beim Entladen aller Modelle: ${K.message}`)}}async function M(K,Ae){try{const Se=await je(`/api/models/${encodeURIComponent(Ae)}/role`,{method:"POST",body:JSON.stringify({role:K||null})});N(),Se!=null&&Se.warning&&f("Hirn gesetzt — Hinweis",Se.warning)}catch(Se){f("Fehler",`Fehler beim Zuweisen der Rolle: ${Se.message||Se}`)}}function H(K){B(K),z(null),je(`/api/roles/${encodeURIComponent(K)}/recommend`).then(Ae=>z(Ae)).catch(()=>{})}async function ne(K,Ae){let Se=null;try{Se=await je(`/api/models/${encodeURIComponent(K)}/ctx/auto`)}catch{}const qe=Se?`Optimal für dein Setup: ${(Se.ctx/1024).toFixed(0)}k (${Se.ctx}) — GTT ${Se.gtt_gb} GB − reserviert ${Se.reserved_gb} GB (${Se.mode}) → ${Se.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";m("Kontextlänge anpassen",qe,String(Ae||32768),async G=>{if(G)try{await je(`/api/models/${encodeURIComponent(K)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(G,10)})}),N()}catch(Ie){f("Fehler",`Fehler beim Setzen des Kontexts: ${Ie.message||Ie}`)}},void 0,Se?{autoValue:String(Se.ctx),autoLabel:`Auto (${(Se.ctx/1024).toFixed(0)}k)`}:void 0)}async function Z(K){const Ae=j.find(Se=>Se.name===K);if(Ae&&b(Ae.role)){f("Geschützt",`„${ir(Ae.role).label}" ist lebenswichtig für Lucy und kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}h("Modell löschen?",`Modell '${K}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await je(`/api/models/${encodeURIComponent(K)}`,{method:"DELETE"}),N()}catch(Se){f("Fehler",`Fehler beim Löschen: ${Se.message||Se}`)}})}async function me(K,Ae,Se,qe){try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:Ae,quant:Se,jinja:qe})}),f("Herunterladen gestartet",`Download für '${K}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(G){f("Fehler",`Fehler beim Starten des Upgrades: ${G.message||G}`)}}async function pe(K){const Ae=o==null?void 0:o.budget,Se=Ae&&!Ae.fits?` @@ -649,16 +649,16 @@ Trotzdem exklusiv laden? Tipp: Mit dem 🧠-Schalter machst du das Modell dauerh stroke-dasharray: 4 6; animation: flow-dash 1s linear infinite; } - `}),l.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:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(cu,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",_r(re)," Gewichte",_e>0?` · ${_r(_e)} real belegt (inkl. KV)`:""," / ",_r(et)]}),v&&k.length>0&&l.jsx("button",{onClick:I,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"})]})]}),l.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:Oe.length===0?l.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"}):Oe.map((K,Ae)=>{var G;const Se=(K.size_bytes||0)/et*100,qe=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][Ae%4];return l.jsxs("div",{style:{width:`${Se}%`},className:ee("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",qe),title:`${K.name} (${_r(K.size_bytes)})`,children:[l.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[K.role?`[${ir(K.role).short}] `:"",(G=K.name.split("/").pop())==null?void 0:G.replace(".gguf","")]}),l.jsx("span",{className:"text-[8px] font-mono opacity-80",children:_r(K.size_bytes)})]},K.name)})})]}),l.jsx(EX,{}),v&&l.jsx(NX,{}),l.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:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:v?"Gateway Steckplatz-Belegung (Slot-Zuweisung)":"Wer macht was bei Lucy — zum Ändern antippen"}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:qO.map(K=>{var qe;const Ae=j.find(G=>G.role===K),Se=Ae?k.includes(Ae.name):!1;return l.jsxs("div",{onClick:()=>H(K),className:ee("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]",Se?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":Ae?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(oo,{role:K}),Se&&l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),l.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:Ae==null?void 0:Ae.name,children:Ae?(qe=Ae.name.split("/").pop())==null?void 0:qe.replace(/\.gguf$/i,""):"nicht zugewiesen"}),l.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},K)})})]}),(o==null?void 0:o.current)&&l.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:[l.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pn,{className:"h-4.5 w-4.5 text-indigo-400"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),o.current.version!=null&&l.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",o.current.version]})]}),l.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"agent"}})),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",title:"Hirn-Wechsel passiert jetzt zentral im Hermes-Tab",children:"Im Hermes-Tab wechseln →"})]}),l.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:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:o.current.name,children:o.current.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsx("span",{children:o.current.params_b?`${o.current.params_b}B`:"—"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:o.current.quant||"GGUF"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:_r(o.current.size_bytes||0)})]})]}),o.update_available&&o.recommended?l.jsxs("button",{onClick:()=>pe(o.recommended.repo),className:ee("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",o.budget&&!o.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:[l.jsx(_s,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):l.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:[l.jsx(or,{className:"h-4 w-4"})," Neueste Generation"]})]}),o.update_available&&o.recommended&&l.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",l.jsx("span",{className:"font-mono font-bold",children:o.recommended.name.replace(/-GGUF$/i,"")}),"(v",o.recommended.version,", ",o.recommended.params_b,"B) — von NousResearch."]}),o.budget&&l.jsxs("div",{className:ee("text-[10px] flex items-start gap-1.5 leading-relaxed",o.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[l.jsx(cu,{className:"h-3 w-3 shrink-0 mt-0.5"}),l.jsxs("span",{children:["Always-On-Brain ~",o.budget.brain_gb," GB + größtes on-demand (~",o.budget.largest_ondemand_gb," GB) = ",(o.budget.brain_gb+o.budget.largest_ondemand_gb).toFixed(1)," / ",o.budget.gtt_gb," GB",o.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[l.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",se.length," von ",j.length,")"]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ie("all"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),l.jsx("button",{onClick:()=>ie("in_use"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ue("grid"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",he==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),l.jsx("button",{onClick:()=>ue("list"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",he==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),he==="grid"?l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:se.length===0?l.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:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(K=>{const Ae=k.includes(K.name),Se=i==null?void 0:i.model_list.find(G=>G.role===K.role),qe=H2(K.name);return l.jsxs("div",{className:ee("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",Ae?"border-primary/45 shadow-primary/5":K.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"flex items-start justify-between gap-3",children:l.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[l.jsx("div",{className:ee("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",qe.color),title:qe.name,children:qe.initial}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:K.name,children:K.name.split("/").pop()}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[l.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:K.quant||"GGUF"}),Ae&&l.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[l.jsx(Jf,{className:"h-3 w-3 animate-pulse"})," Warm"]}),K.role&&l.jsx(oo,{role:K.role,dense:!0}),b(K.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[9px] font-semibold text-muted-foreground",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(K.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[9px] font-mono text-fuchsia-300 font-bold uppercase",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm, verdrängt es nicht.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&l.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"}),v&&(K.spec_active?l.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: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?l.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 (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&l.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:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&l.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"})]})]})]})}),l.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:l.jsx(K2,{caps:K.capabilities})})]}),l.jsxs("div",{className:"space-y-3 pt-1",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(cu,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),l.jsx("div",{className:"text-foreground font-semibold",children:_r(K.size_bytes)})]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(P4,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),l.jsx("div",{className:"text-foreground font-semibold",children:$w(K.ctx)})]})]})]}),Se&&l.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:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),l.jsxs("span",{children:["Upgrade verfügbar: ",Se.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>me(Se.repo,K.role,K.quant||"Q4_K_M",K.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:[l.jsx(_s,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[(()=>{const G=b(K.role),Ie=Ae&&G,Xt=K.incomplete&&!Ae||Ie;return l.jsx("button",{onClick:()=>Ae?J(K.name):te(K.name),disabled:Xt,title:Ie?`„${ir(K.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",Xt?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ae?"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:Ie?"🔒 geladen":Ae?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ne(K.name,K.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"}),v&&E&&l.jsx("button",{onClick:()=>O(K.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(K),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.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:[l.jsx(ha,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(K.name),disabled:b(K.role),className:ee("h-7 w-7 rounded-lg border border-border/40 flex items-center justify-center transition-colors",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${ir(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(nv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})}):l.jsx("div",{className:"space-y-2",children:se.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(K=>{const Ae=k.includes(K.name),Se=H2(K.name);return l.jsxs("div",{className:ee("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",Ae?"border-primary/45":K.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l.jsx("div",{className:ee("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Se.color),title:Se.name,children:Se.initial}),l.jsxs("div",{className:"min-w-0 text-left",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:K.name,children:K.name.split("/").pop()}),K.role&&l.jsx(oo,{role:K.role,dense:!0,className:"shrink-0"}),b(K.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[8px] font-semibold text-muted-foreground shrink-0",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(K.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[8px] font-mono text-fuchsia-300 font-bold uppercase shrink-0",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&l.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"}),v&&(K.spec_active?l.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: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?l.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 (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&l.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:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&l.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"}),Ae&&l.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsxs("span",{children:["Größe: ",_r(K.size_bytes)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Kontext: ",$w(K.ctx)]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:"font-mono text-[9px]",children:K.quant||"GGUF"})]})]})]}),l.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[l.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:l.jsx(K2,{caps:K.capabilities})}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[(()=>{const qe=b(K.role),G=Ae&&qe,Ie=K.incomplete&&!Ae||G;return l.jsx("button",{onClick:()=>Ae?J(K.name):te(K.name),disabled:Ie,title:G?`„${ir(K.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",Ie?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ae?"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:G?"🔒 geladen":Ae?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ne(K.name,K.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"}),v&&E&&l.jsx("button",{onClick:()=>O(K.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(K),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.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:[l.jsx(ha,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(K.name),disabled:b(K.role),className:ee("h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 transition-all",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${ir(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(nv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})})]}),D&&l.jsx(kX,{role:D,roleRec:F,models:j,onAssign:K=>{M(D,K),B(null)},onClose:()=>B(null)}),Y&&l.jsx(bX,{model:Y,onClose:()=>U(null),onChanged:N}),g]})}const AX=[{key:"popular",label:"Beliebt",q:""},{key:"coder",label:"Coder",q:"coder"},{key:"vision",label:"Vision",q:"vision"},{key:"reasoning",label:"Reasoning",q:"reasoning"},{key:"small",label:"Klein (≤4B)",q:"3B"}],CX=["fast","heavy","coder","vision","hermes","scout"],PX=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1});function V2(e){return PX.format(e)}function OX(){const{data:e}=yi(),t=(e==null?void 0:e.models)??[],[r,n]=y.useState(""),[i,o]=y.useState([]),[u,c]=y.useState(!1),[f,h]=y.useState(""),[m,g]=y.useState("popular"),[v,b]=y.useState(""),[j,k]=y.useState(null),[S,N]=y.useState([]),[E,A]=y.useState("Q4_K_M"),[P,_]=y.useState(""),[O,D]=y.useState(null),[B,F]=y.useState(!1),[z,Y]=y.useState({});async function U(M){c(!0),h("");try{const H=await je(`/api/hf/search?q=${encodeURIComponent(M)}`);o(H.results),H.results.length||h("Keine Ergebnisse.")}catch(H){h(`Suche fehlgeschlagen: ${H}`)}finally{c(!1)}}y.useEffect(()=>{U("")},[]);function he(M){g(M.key),n(""),U(M.q)}function ue(){g(""),U(r)}async function ge(M,H,ne){F(!1);try{const Z=await je(`/api/fit?params_b=0&quant=${encodeURIComponent(H)}&ctx=8192&name=${encodeURIComponent(M)}&role=${encodeURIComponent(ne)}`);D(Z)}catch{D(null)}}async function ie(M){if(j===M){k(null);return}k(M),N([]),D(null),_(""),F(!1),h("Analysiere Repository…");try{const H=await je(`/api/hf/quants?repo=${encodeURIComponent(M)}`);N(H.quants);const ne=H.quants.includes("Q4_K_M")?"Q4_K_M":H.quants[0]||"Q4_K_M";A(ne),h(H.quants.length?"":"Keine GGUF-Dateien in diesem Repo gefunden."),H.quants.length&&ge(H.repo,ne,"")}catch(H){h(`Fehler: ${H}`)}}function se(){const M=v.trim();M&&(o(H=>H.some(ne=>ne.repo===M)?H:[{repo:M,downloads:0,likes:0},...H]),b(""),ie(M))}const X=P?t.find(M=>(M.role||"").toLowerCase()===P):void 0;async function te(M){if((O==null?void 0:O.fit.level)==="too_tight"&&!B){F(!0);return}Y(H=>({...H,[M]:"Starte…"}));try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:M,quant:E,role:P||void 0,jinja:!0})}),Y(H=>({...H,[M]:"Download läuft"})),F(!1)}catch{Y(ne=>({...ne,[M]:"Fehler"}))}}const J=M=>{var ne;const H=((ne=M.split("/").pop())==null?void 0:ne.toLowerCase().replace(/-gguf$/i,""))||"";return H.length>3&&t.some(Z=>Z.name.toLowerCase().includes(H))},I=M=>M==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":M==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(vy,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),l.jsx("input",{value:r,onChange:M=>n(M.target.value),onKeyDown:M=>M.key==="Enter"&&ue(),"aria-label":"HuggingFace durchsuchen",type:"search",spellCheck:!1,placeholder:"HuggingFace durchsuchen (z.B. Qwen Coder, Llama-3.1, gemma)…",className:"w-full h-10 pl-9 pr-3 rounded-xl border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),l.jsx("button",{onClick:ue,className:"h-10 px-5 rounded-xl bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Suchen"})]}),l.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:AX.map(M=>l.jsxs("button",{onClick:()=>he(M),className:ee("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all cursor-pointer border",m===M.key?"bg-primary/15 text-primary border-primary/30":"border-border/50 text-muted-foreground hover:text-foreground hover:border-border"),children:[M.key==="popular"&&l.jsx(d4,{className:"h-3 w-3"}),M.label]},M.key))}),u?l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:"Lade GGUF-Modelle von HuggingFace…"}):l.jsxs("div",{className:"space-y-2",children:[i.map(M=>{const H=j===M.repo,ne=J(M.repo),Z=M.repo.includes("/")?M.repo.split("/")[0]:"—",me=M.repo.split("/").pop();return l.jsxs("div",{className:ee("rounded-xl border bg-card/45 backdrop-blur-md transition-all",H?"border-primary/40 shadow-lg shadow-primary/5":"border-border/50 hover:border-primary/30"),children:[l.jsxs("button",{onClick:()=>ie(M.repo),className:"w-full flex items-center gap-3 p-3.5 text-left cursor-pointer",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:"text-xs font-bold font-mono text-foreground truncate max-w-[280px]",title:M.repo,children:me}),ne&&l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-1.5 py-0.5 rounded",children:[l.jsx(or,{className:"h-2.5 w-2.5"})," installiert"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-3 mt-0.5 font-mono",children:[l.jsx("span",{children:Z}),l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(_s,{className:"h-3 w-3"})," ",V2(M.downloads)]}),M.likes>0&&l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(g4,{className:"h-3 w-3"})," ",V2(M.likes)]})]})]}),H?l.jsx(PN,{className:"h-4 w-4 text-muted-foreground shrink-0"}):l.jsx(CN,{className:"h-4 w-4 text-muted-foreground shrink-0"})]}),H&&l.jsx("div",{className:"border-t border-border/30 p-3.5 space-y-3",children:S.length===0?l.jsx("div",{className:"text-[11px] text-muted-foreground font-mono",children:f||"Lade Quants…"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Quant"}),l.jsx("select",{value:E,onChange:pe=>{A(pe.target.value),ge(M.repo,pe.target.value,P)},"aria-label":"Quantisierung",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:S.map(pe=>l.jsx("option",{value:pe,className:"bg-popover text-foreground",children:pe},pe))}),l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1",children:"Rolle"}),l.jsxs("select",{value:P,onChange:pe=>{_(pe.target.value),ge(M.repo,E,pe.target.value)},"aria-label":"Rolle",title:"Optional — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:[l.jsx("option",{value:"",className:"bg-popover text-foreground",children:"keine"}),CX.map(pe=>l.jsx("option",{value:pe,className:"bg-popover text-foreground",children:pe},pe))]}),l.jsx("button",{onClick:()=>te(M.repo),disabled:!!z[M.repo]&&z[M.repo]==="Download läuft",className:ee("h-8 px-3.5 ml-auto rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5",B?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"),children:z[M.repo]?z[M.repo]:B?l.jsxs(l.Fragment,{children:[l.jsx(gn,{className:"h-3.5 w-3.5"})," OOM — trotzdem laden"]}):l.jsxs(l.Fragment,{children:[l.jsx(_s,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]}),O&&l.jsxs("div",{className:ee("flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium",I(O.fit.level)),children:[l.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),l.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"?l.jsxs("span",{className:"font-mono opacity-80",children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}):l.jsx("span",{className:"opacity-90",children:"— passt nicht, würde beim Laden abstürzen (OOM)."})]}),X&&l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-400",children:[l.jsx(gn,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),l.jsxs("span",{children:["Rolle ",l.jsxs("strong",{children:["„",P,'"']})," hält aktuell ",l.jsx("strong",{children:X.name.split("/").pop()})," — wird beim Download übernommen."]})]})]})})]},M.repo)}),!i.length&&!u&&l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:f||"Keine Ergebnisse."})]}),l.jsxs("div",{className:"border-t border-border/30 pt-4 flex flex-col sm:flex-row gap-2 items-stretch sm:items-center",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground shrink-0",children:"Direkt:"}),l.jsx("input",{value:v,onChange:M=>b(M.target.value),onKeyDown:M=>M.key==="Enter"&&se(),"aria-label":"Repository oder URL direkt eingeben",spellCheck:!1,placeholder:"org/repo oder HF-URL (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 font-mono"}),l.jsx("button",{onClick:se,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:"Laden"})]})]})}const _X={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:ha},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:vo},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Os},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:vu},hermes:{title:"Lucys Hirn (Agent)",desc:"Lucys dauer-warmes Agent-Hirn mit Tool-Calling — bleibt ko-resident, lädt nie kalt nach.",icon:J3},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:tv}};function MX(){const{data:e,isLoading:t,error:r}=RD(),{data:n}=yi(),{data:i}=lh(),o=(n==null?void 0:n.models)??[],u=r?String(r):"",[c,f]=y.useState({}),[h,m]=y.useState({}),[g,v]=y.useState("recommended");async function b(j,k,S,N){f(E=>({...E,[j]:"Starte..."}));try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:j,role:k,quant:S,jinja:N})}),f(E=>({...E,[j]:"Download läuft"}))}catch{f(A=>({...A,[j]:"Fehler"}))}}return l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 w-fit",children:[["recommended","Empfohlen"],["browse","Stöbern & Suchen"]].map(([j,k])=>l.jsx("button",{onClick:()=>v(j),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide transition-all cursor-pointer",g===j?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:k},j))}),g==="browse"?l.jsx(OX,{}):t?l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?l.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 (",u,")."]}):l.jsxs("div",{className:"space-y-8",children:[l.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:[l.jsxs("div",{children:["Modell-Registry geladen für ",l.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(F4,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),l.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),l.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(j=>{const k=_X[j.role]||{title:j.title||j.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:gy},S=k.icon,N=o.find(D=>D.role===j.role),E=i==null?void 0:i.model_list.find(D=>D.role===j.role),A=j.models.find(D=>D.repo===j.recommended)||j.models[0];if(!A)return null;const P=c[A.repo],_=j.models.filter(D=>D.repo!==j.recommended),O=!!h[j.role];return l.jsxs("div",{className:ee("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",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.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:l.jsx(S,{className:"h-5.5 w-5.5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:k.title}),l.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: ",j.role]})]})]}),N?l.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:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):l.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"})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:k.desc}),l.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[l.jsxs("span",{children:["Größe: ",mv(N.size_bytes||0)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:A.name,children:A.name}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[l.jsxs("span",{children:["Ersteller: ",A.author]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",A.quant]})]}),l.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:l.jsx(hX,{fit:A.fit})})]})}),l.jsx("div",{className:"pt-1",children:N?E?l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),l.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>b(E.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!c[E.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:[l.jsx(_s,{className:"h-3.5 w-3.5"}),c[E.repo]||"Auf neue Version aktualisieren"]})]}):l.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:[l.jsx(or,{className:"h-4 w-4"})," Auf neuestem Stand"]}):l.jsxs("button",{onClick:()=>b(A.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!P,className:ee("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",P?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[l.jsx(_s,{className:"h-3.5 w-3.5"}),P||"Optimales Modell einsetzen"]})})]}),_.length>0&&l.jsxs("div",{className:"border-t border-border/20 pt-3",children:[l.jsxs("button",{onClick:()=>m(D=>({...D,[j.role]:!O})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[O?l.jsx(PN,{className:"h-3 w-3"}):l.jsx(CN,{className:"h-3 w-3"}),l.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),O&&l.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(D=>l.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:D.name,children:D.name}),l.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[l.jsxs("span",{children:["Quant: ",D.quant]}),l.jsx("span",{children:"•"}),l.jsx("span",{children:D.fit.text})]})]}),l.jsx("button",{onClick:()=>b(D.repo,j.role,D.quant||"Q4_K_M",D.caps.tools!=="no"),disabled:!!c[D.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:c[D.repo]||"Installieren"})]},D.repo))})]})]},j.role)})})]})]})}function IX(){const[e,t]=y.useState("cockpit");return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>l.jsx("button",{onClick:()=>t(r),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Cockpit":"Modelle finden"},r))})]}),l.jsx(xX,{}),l.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?l.jsx(YO,{}):l.jsx(MX,{})})]})}const TX={zed:"Zed: settings.json",kilo:"Kilo: Einstellungen → API Provider",claude_code:"env / Übersetzer"};function q2({line:e,loading:t}){return t||!e?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[l.jsx(th,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[l.jsx(ON,{className:"h-3 w-3"})," ",e.detail]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[l.jsx(a4,{className:"h-3 w-3"})," ",e.detail]})}function Q2({tool:e,fileName:t,accent:r,copied:n,onCopy:i}){return l.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[l.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),l.jsx("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:l.jsx("span",{children:t})}),l.jsxs("button",{onClick:i,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:[n?l.jsx(or,{className:"h-3.5 w-3.5 text-emerald-400"}):l.jsx(rv,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),l.jsx("pre",{className:ee("p-5 overflow-x-auto text-xs font-mono whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",r==="teal"?"text-cyan-200/90":"text-violet-200/90"),children:l.jsx("code",{children:e.snippet})})]})}function XO(){const[e,t]=y.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=y.useState(localStorage.getItem("mc_mcp_path")||""),[i,o]=y.useState("zed"),[u,c]=y.useState(null),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:m}=$D(f.toString()),{data:g,isLoading:v}=zD(),b=m?String(m):"";function j(E){t(E),E&&localStorage.setItem("mc_host",E)}function k(E){n(E),localStorage.setItem("mc_mcp_path",E)}const S=h==null?void 0:h.tools[i];async function N(E,A){A&&(await navigator.clipboard.writeText(A),c(E),setTimeout(()=>c(null),1500))}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.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"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Binde deinen lokalen Agenten an die Box an — über ",l.jsx("span",{className:"text-foreground",children:"zwei getrennte Leitungen"}),": das Modell (Gateway) und das geteilte Gedächtnis (MCP)."]})]}),l.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[l.jsx(y4,{className:"h-7 w-7 mx-auto text-muted-foreground"}),l.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Cline · Cursor · Zed …"})]}),l.jsxs("div",{className:"flex flex-col gap-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Zd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[l.jsx($n,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),l.jsx(q2,{line:g==null?void 0:g.gateway,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · Lanes chat / coding"})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Zd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[l.jsx(vo,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),l.jsx(q2,{line:g==null?void 0:g.memory,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]})]})]}),l.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",l.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",l.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," — beide werden unabhängig eingerichtet."]})]}),l.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:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(m4,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),l.jsx("input",{value:e,onChange:E=>j(E.target.value),"aria-label":"Box LAN IP-Adresse",spellCheck:!1,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"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(f4,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",l.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),l.jsx("input",{value:r,onChange:E=>k(E.target.value),"aria-label":"Lokaler MCP-Scriptpfad",spellCheck:!1,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-violet-500/50 text-foreground"})]})]}),b&&l.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: ",b]}),h&&l.jsxs("div",{className:"grid gap-5 lg:grid-cols-2",children:[l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-primary/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-primary/15 text-primary text-[11px]",children:"1"}),"Modell anbinden"]}),l.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(h.tools).map(([E,A])=>l.jsx("button",{onClick:()=>o(E),className:ee("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",i===E?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:A.label},E))}),S&&l.jsxs(l.Fragment,{children:[S.note&&l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(mw,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),l.jsx("span",{children:S.note})]}),l.jsx(Q2,{tool:S,fileName:TX[i]||"config.json",accent:"teal",copied:u==="model",onCopy:()=>N("model",S.snippet)})]})]}),l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-violet-500/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-violet-500/15 text-violet-300 text-[11px]",children:"2"}),"Gedächtnis anbinden",l.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",l.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-violet-500/5 border border-violet-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(mw,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),l.jsx("span",{children:h.memory.note})]}),l.jsx(Q2,{tool:h.memory,fileName:"mcp.json",accent:"violet",copied:u==="memory",onCopy:()=>N("memory",h.memory.snippet)})]})]})]})}const DX="modulepreload",RX=function(e){return"/"+e},Y2={},LX=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=u(r.map(h=>{if(h=RX(h),h in Y2)return;Y2[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":DX,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,j)=>{v.addEventListener("load",b),v.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return i.then(u=>{for(const c of u||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};class $X extends y.Component{constructor(){super(...arguments);qo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?l.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[l.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),l.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const zX=y.lazy(()=>LX(()=>import("./GraphView-CCAApGf_.js"),[]).then(e=>({default:e.GraphView}))),Bd=["identity","knowledge","rules","events"],X2=new Set(["auto","agent","hermes"]),Lg={identity:{label:"Identität",icon:U4,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:Ks,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:I4,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:_N,bg:"bg-amber-500/10",text:"text-amber-400"}},Z2={label:"Gedächtnis",icon:ev,text:"text-muted-foreground"},FX={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},J2=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu: + `}),l.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:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(cu,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",_r(re)," Gewichte",_e>0?` · ${_r(_e)} real belegt (inkl. KV)`:""," / ",_r(et)]}),v&&k.length>0&&l.jsx("button",{onClick:I,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"})]})]}),l.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:Oe.length===0?l.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"}):Oe.map((K,Ae)=>{var G;const Se=(K.size_bytes||0)/et*100,qe=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][Ae%4];return l.jsxs("div",{style:{width:`${Se}%`},className:ee("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",qe),title:`${K.name} (${_r(K.size_bytes)})`,children:[l.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[K.role?`[${ir(K.role).short}] `:"",(G=K.name.split("/").pop())==null?void 0:G.replace(".gguf","")]}),l.jsx("span",{className:"text-[8px] font-mono opacity-80",children:_r(K.size_bytes)})]},K.name)})})]}),l.jsx(wX,{}),v&&l.jsx(bX,{}),l.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:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:v?"Gateway Steckplatz-Belegung (Slot-Zuweisung)":"Wer macht was bei Lucy — zum Ändern antippen"}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:WO.map(K=>{var qe;const Ae=j.find(G=>G.role===K),Se=Ae?k.includes(Ae.name):!1;return l.jsxs("div",{onClick:()=>H(K),className:ee("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]",Se?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":Ae?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(oo,{role:K}),Se&&l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),l.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:Ae==null?void 0:Ae.name,children:Ae?(qe=Ae.name.split("/").pop())==null?void 0:qe.replace(/\.gguf$/i,""):"nicht zugewiesen"}),l.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},K)})})]}),(o==null?void 0:o.current)&&l.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:[l.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pn,{className:"h-4.5 w-4.5 text-indigo-400"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),o.current.version!=null&&l.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",o.current.version]})]}),l.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"agent"}})),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",title:"Hirn-Wechsel passiert jetzt zentral im Hermes-Tab",children:"Im Hermes-Tab wechseln →"})]}),l.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:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:o.current.name,children:o.current.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsx("span",{children:o.current.params_b?`${o.current.params_b}B`:"—"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:o.current.quant||"GGUF"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:_r(o.current.size_bytes||0)})]})]}),o.update_available&&o.recommended?l.jsxs("button",{onClick:()=>pe(o.recommended.repo),className:ee("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",o.budget&&!o.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:[l.jsx(_s,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):l.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:[l.jsx(or,{className:"h-4 w-4"})," Neueste Generation"]})]}),o.update_available&&o.recommended&&l.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",l.jsx("span",{className:"font-mono font-bold",children:o.recommended.name.replace(/-GGUF$/i,"")}),"(v",o.recommended.version,", ",o.recommended.params_b,"B) — von NousResearch."]}),o.budget&&l.jsxs("div",{className:ee("text-[10px] flex items-start gap-1.5 leading-relaxed",o.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[l.jsx(cu,{className:"h-3 w-3 shrink-0 mt-0.5"}),l.jsxs("span",{children:["Always-On-Brain ~",o.budget.brain_gb," GB + größtes on-demand (~",o.budget.largest_ondemand_gb," GB) = ",(o.budget.brain_gb+o.budget.largest_ondemand_gb).toFixed(1)," / ",o.budget.gtt_gb," GB",o.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[l.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",se.length," von ",j.length,")"]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ie("all"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),l.jsx("button",{onClick:()=>ie("in_use"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ue("grid"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",he==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),l.jsx("button",{onClick:()=>ue("list"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",he==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),he==="grid"?l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:se.length===0?l.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:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(K=>{const Ae=k.includes(K.name),Se=a==null?void 0:a.model_list.find(G=>G.role===K.role),qe=B2(K.name);return l.jsxs("div",{className:ee("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",Ae?"border-primary/45 shadow-primary/5":K.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"flex items-start justify-between gap-3",children:l.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[l.jsx("div",{className:ee("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",qe.color),title:qe.name,children:qe.initial}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:K.name,children:K.name.split("/").pop()}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[l.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:K.quant||"GGUF"}),Ae&&l.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[l.jsx(Zf,{className:"h-3 w-3 animate-pulse"})," Warm"]}),K.role&&l.jsx(oo,{role:K.role,dense:!0}),b(K.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[9px] font-semibold text-muted-foreground",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(K.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[9px] font-mono text-fuchsia-300 font-bold uppercase",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm, verdrängt es nicht.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&l.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"}),v&&(K.spec_active?l.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: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?l.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 (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&l.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:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&l.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"})]})]})]})}),l.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:l.jsx(H2,{caps:K.capabilities})})]}),l.jsxs("div",{className:"space-y-3 pt-1",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(cu,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),l.jsx("div",{className:"text-foreground font-semibold",children:_r(K.size_bytes)})]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(E4,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),l.jsx("div",{className:"text-foreground font-semibold",children:Rw(K.ctx)})]})]})]}),Se&&l.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:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),l.jsxs("span",{children:["Upgrade verfügbar: ",Se.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>me(Se.repo,K.role,K.quant||"Q4_K_M",K.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:[l.jsx(_s,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[(()=>{const G=b(K.role),Ie=Ae&&G,Xt=K.incomplete&&!Ae||Ie;return l.jsx("button",{onClick:()=>Ae?J(K.name):te(K.name),disabled:Xt,title:Ie?`„${ir(K.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",Xt?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ae?"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:Ie?"🔒 geladen":Ae?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ne(K.name,K.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"}),v&&E&&l.jsx("button",{onClick:()=>O(K.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(K),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.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:[l.jsx(ha,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(K.name),disabled:b(K.role),className:ee("h-7 w-7 rounded-lg border border-border/40 flex items-center justify-center transition-colors",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${ir(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(tv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})}):l.jsx("div",{className:"space-y-2",children:se.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(K=>{const Ae=k.includes(K.name),Se=B2(K.name);return l.jsxs("div",{className:ee("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",Ae?"border-primary/45":K.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l.jsx("div",{className:ee("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Se.color),title:Se.name,children:Se.initial}),l.jsxs("div",{className:"min-w-0 text-left",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:K.name,children:K.name.split("/").pop()}),K.role&&l.jsx(oo,{role:K.role,dense:!0,className:"shrink-0"}),b(K.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[8px] font-semibold text-muted-foreground shrink-0",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(K.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[8px] font-mono text-fuchsia-300 font-bold uppercase shrink-0",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&l.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"}),v&&(K.spec_active?l.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: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?l.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 (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&l.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:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&l.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"}),Ae&&l.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsxs("span",{children:["Größe: ",_r(K.size_bytes)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Kontext: ",Rw(K.ctx)]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:"font-mono text-[9px]",children:K.quant||"GGUF"})]})]})]}),l.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[l.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:l.jsx(H2,{caps:K.capabilities})}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[(()=>{const qe=b(K.role),G=Ae&&qe,Ie=K.incomplete&&!Ae||G;return l.jsx("button",{onClick:()=>Ae?J(K.name):te(K.name),disabled:Ie,title:G?`„${ir(K.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",Ie?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ae?"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:G?"🔒 geladen":Ae?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ne(K.name,K.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"}),v&&E&&l.jsx("button",{onClick:()=>O(K.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(K),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.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:[l.jsx(ha,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(K.name),disabled:b(K.role),className:ee("h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 transition-all",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${ir(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(tv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})})]}),D&&l.jsx(vX,{role:D,roleRec:F,models:j,onAssign:K=>{M(D,K),B(null)},onClose:()=>B(null)}),Y&&l.jsx(pX,{model:Y,onClose:()=>U(null),onChanged:N}),g]})}const kX=[{key:"popular",label:"Beliebt",q:""},{key:"coder",label:"Coder",q:"coder"},{key:"vision",label:"Vision",q:"vision"},{key:"reasoning",label:"Reasoning",q:"reasoning"},{key:"small",label:"Klein (≤4B)",q:"3B"}],jX=["fast","heavy","coder","vision","hermes","scout"],SX=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1});function K2(e){return SX.format(e)}function NX(){const{data:e}=yi(),t=(e==null?void 0:e.models)??[],[r,n]=y.useState(""),[a,o]=y.useState([]),[u,c]=y.useState(!1),[f,h]=y.useState(""),[m,g]=y.useState("popular"),[v,b]=y.useState(""),[j,k]=y.useState(null),[S,N]=y.useState([]),[E,A]=y.useState("Q4_K_M"),[P,_]=y.useState(""),[O,D]=y.useState(null),[B,F]=y.useState(!1),[z,Y]=y.useState({});async function U(M){c(!0),h("");try{const H=await je(`/api/hf/search?q=${encodeURIComponent(M)}`);o(H.results),H.results.length||h("Keine Ergebnisse.")}catch(H){h(`Suche fehlgeschlagen: ${H}`)}finally{c(!1)}}y.useEffect(()=>{U("")},[]);function he(M){g(M.key),n(""),U(M.q)}function ue(){g(""),U(r)}async function ge(M,H,ne){F(!1);try{const Z=await je(`/api/fit?params_b=0&quant=${encodeURIComponent(H)}&ctx=8192&name=${encodeURIComponent(M)}&role=${encodeURIComponent(ne)}`);D(Z)}catch{D(null)}}async function ie(M){if(j===M){k(null);return}k(M),N([]),D(null),_(""),F(!1),h("Analysiere Repository…");try{const H=await je(`/api/hf/quants?repo=${encodeURIComponent(M)}`);N(H.quants);const ne=H.quants.includes("Q4_K_M")?"Q4_K_M":H.quants[0]||"Q4_K_M";A(ne),h(H.quants.length?"":"Keine GGUF-Dateien in diesem Repo gefunden."),H.quants.length&&ge(H.repo,ne,"")}catch(H){h(`Fehler: ${H}`)}}function se(){const M=v.trim();M&&(o(H=>H.some(ne=>ne.repo===M)?H:[{repo:M,downloads:0,likes:0},...H]),b(""),ie(M))}const X=P?t.find(M=>(M.role||"").toLowerCase()===P):void 0;async function te(M){if((O==null?void 0:O.fit.level)==="too_tight"&&!B){F(!0);return}Y(H=>({...H,[M]:"Starte…"}));try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:M,quant:E,role:P||void 0,jinja:!0})}),Y(H=>({...H,[M]:"Download läuft"})),F(!1)}catch{Y(ne=>({...ne,[M]:"Fehler"}))}}const J=M=>{var ne;const H=((ne=M.split("/").pop())==null?void 0:ne.toLowerCase().replace(/-gguf$/i,""))||"";return H.length>3&&t.some(Z=>Z.name.toLowerCase().includes(H))},I=M=>M==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":M==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(py,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),l.jsx("input",{value:r,onChange:M=>n(M.target.value),onKeyDown:M=>M.key==="Enter"&&ue(),"aria-label":"HuggingFace durchsuchen",type:"search",spellCheck:!1,placeholder:"HuggingFace durchsuchen (z.B. Qwen Coder, Llama-3.1, gemma)…",className:"w-full h-10 pl-9 pr-3 rounded-xl border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),l.jsx("button",{onClick:ue,className:"h-10 px-5 rounded-xl bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Suchen"})]}),l.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:kX.map(M=>l.jsxs("button",{onClick:()=>he(M),className:ee("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all cursor-pointer border",m===M.key?"bg-primary/15 text-primary border-primary/30":"border-border/50 text-muted-foreground hover:text-foreground hover:border-border"),children:[M.key==="popular"&&l.jsx(s4,{className:"h-3 w-3"}),M.label]},M.key))}),u?l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:"Lade GGUF-Modelle von HuggingFace…"}):l.jsxs("div",{className:"space-y-2",children:[a.map(M=>{const H=j===M.repo,ne=J(M.repo),Z=M.repo.includes("/")?M.repo.split("/")[0]:"—",me=M.repo.split("/").pop();return l.jsxs("div",{className:ee("rounded-xl border bg-card/45 backdrop-blur-md transition-all",H?"border-primary/40 shadow-lg shadow-primary/5":"border-border/50 hover:border-primary/30"),children:[l.jsxs("button",{onClick:()=>ie(M.repo),className:"w-full flex items-center gap-3 p-3.5 text-left cursor-pointer",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:"text-xs font-bold font-mono text-foreground truncate max-w-[280px]",title:M.repo,children:me}),ne&&l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-1.5 py-0.5 rounded",children:[l.jsx(or,{className:"h-2.5 w-2.5"})," installiert"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-3 mt-0.5 font-mono",children:[l.jsx("span",{children:Z}),l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(_s,{className:"h-3 w-3"})," ",K2(M.downloads)]}),M.likes>0&&l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(h4,{className:"h-3 w-3"})," ",K2(M.likes)]})]})]}),H?l.jsx(AN,{className:"h-4 w-4 text-muted-foreground shrink-0"}):l.jsx(EN,{className:"h-4 w-4 text-muted-foreground shrink-0"})]}),H&&l.jsx("div",{className:"border-t border-border/30 p-3.5 space-y-3",children:S.length===0?l.jsx("div",{className:"text-[11px] text-muted-foreground font-mono",children:f||"Lade Quants…"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Quant"}),l.jsx("select",{value:E,onChange:pe=>{A(pe.target.value),ge(M.repo,pe.target.value,P)},"aria-label":"Quantisierung",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:S.map(pe=>l.jsx("option",{value:pe,className:"bg-popover text-foreground",children:pe},pe))}),l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1",children:"Rolle"}),l.jsxs("select",{value:P,onChange:pe=>{_(pe.target.value),ge(M.repo,E,pe.target.value)},"aria-label":"Rolle",title:"Optional — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:[l.jsx("option",{value:"",className:"bg-popover text-foreground",children:"keine"}),jX.map(pe=>l.jsx("option",{value:pe,className:"bg-popover text-foreground",children:pe},pe))]}),l.jsx("button",{onClick:()=>te(M.repo),disabled:!!z[M.repo]&&z[M.repo]==="Download läuft",className:ee("h-8 px-3.5 ml-auto rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5",B?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"),children:z[M.repo]?z[M.repo]:B?l.jsxs(l.Fragment,{children:[l.jsx(gn,{className:"h-3.5 w-3.5"})," OOM — trotzdem laden"]}):l.jsxs(l.Fragment,{children:[l.jsx(_s,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]}),O&&l.jsxs("div",{className:ee("flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium",I(O.fit.level)),children:[l.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),l.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"?l.jsxs("span",{className:"font-mono opacity-80",children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}):l.jsx("span",{className:"opacity-90",children:"— passt nicht, würde beim Laden abstürzen (OOM)."})]}),X&&l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-400",children:[l.jsx(gn,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),l.jsxs("span",{children:["Rolle ",l.jsxs("strong",{children:["„",P,'"']})," hält aktuell ",l.jsx("strong",{children:X.name.split("/").pop()})," — wird beim Download übernommen."]})]})]})})]},M.repo)}),!a.length&&!u&&l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:f||"Keine Ergebnisse."})]}),l.jsxs("div",{className:"border-t border-border/30 pt-4 flex flex-col sm:flex-row gap-2 items-stretch sm:items-center",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground shrink-0",children:"Direkt:"}),l.jsx("input",{value:v,onChange:M=>b(M.target.value),onKeyDown:M=>M.key==="Enter"&&se(),"aria-label":"Repository oder URL direkt eingeben",spellCheck:!1,placeholder:"org/repo oder HF-URL (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 font-mono"}),l.jsx("button",{onClick:se,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:"Laden"})]})]})}const EX={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:ha},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:vo},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Os},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:vu},hermes:{title:"Lucys Hirn (Agent)",desc:"Lucys dauer-warmes Agent-Hirn mit Tool-Calling — bleibt ko-resident, lädt nie kalt nach.",icon:QM},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Jg}};function AX(){const{data:e,isLoading:t,error:r}=MD(),{data:n}=yi(),{data:a}=sh(),o=(n==null?void 0:n.models)??[],u=r?String(r):"",[c,f]=y.useState({}),[h,m]=y.useState({}),[g,v]=y.useState("recommended");async function b(j,k,S,N){f(E=>({...E,[j]:"Starte..."}));try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:j,role:k,quant:S,jinja:N})}),f(E=>({...E,[j]:"Download läuft"}))}catch{f(A=>({...A,[j]:"Fehler"}))}}return l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 w-fit",children:[["recommended","Empfohlen"],["browse","Stöbern & Suchen"]].map(([j,k])=>l.jsx("button",{onClick:()=>v(j),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide transition-all cursor-pointer",g===j?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:k},j))}),g==="browse"?l.jsx(NX,{}):t?l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?l.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 (",u,")."]}):l.jsxs("div",{className:"space-y-8",children:[l.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:[l.jsxs("div",{children:["Modell-Registry geladen für ",l.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(L4,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),l.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),l.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(j=>{const k=EX[j.role]||{title:j.title||j.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:my},S=k.icon,N=o.find(D=>D.role===j.role),E=a==null?void 0:a.model_list.find(D=>D.role===j.role),A=j.models.find(D=>D.repo===j.recommended)||j.models[0];if(!A)return null;const P=c[A.repo],_=j.models.filter(D=>D.repo!==j.recommended),O=!!h[j.role];return l.jsxs("div",{className:ee("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",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.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:l.jsx(S,{className:"h-5.5 w-5.5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:k.title}),l.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: ",j.role]})]})]}),N?l.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:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):l.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"})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:k.desc}),l.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[l.jsxs("span",{children:["Größe: ",fv(N.size_bytes||0)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:A.name,children:A.name}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[l.jsxs("span",{children:["Ersteller: ",A.author]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",A.quant]})]}),l.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:l.jsx(lX,{fit:A.fit})})]})}),l.jsx("div",{className:"pt-1",children:N?E?l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),l.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>b(E.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!c[E.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:[l.jsx(_s,{className:"h-3.5 w-3.5"}),c[E.repo]||"Auf neue Version aktualisieren"]})]}):l.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:[l.jsx(or,{className:"h-4 w-4"})," Auf neuestem Stand"]}):l.jsxs("button",{onClick:()=>b(A.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!P,className:ee("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",P?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[l.jsx(_s,{className:"h-3.5 w-3.5"}),P||"Optimales Modell einsetzen"]})})]}),_.length>0&&l.jsxs("div",{className:"border-t border-border/20 pt-3",children:[l.jsxs("button",{onClick:()=>m(D=>({...D,[j.role]:!O})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[O?l.jsx(AN,{className:"h-3 w-3"}):l.jsx(EN,{className:"h-3 w-3"}),l.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),O&&l.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(D=>l.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:D.name,children:D.name}),l.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[l.jsxs("span",{children:["Quant: ",D.quant]}),l.jsx("span",{children:"•"}),l.jsx("span",{children:D.fit.text})]})]}),l.jsx("button",{onClick:()=>b(D.repo,j.role,D.quant||"Q4_K_M",D.caps.tools!=="no"),disabled:!!c[D.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:c[D.repo]||"Installieren"})]},D.repo))})]})]},j.role)})})]})]})}function CX(){const[e,t]=y.useState("cockpit");return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>l.jsx("button",{onClick:()=>t(r),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Cockpit":"Modelle finden"},r))})]}),l.jsx(mX,{}),l.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?l.jsx(GO,{}):l.jsx(AX,{})})]})}const PX={zed:"Zed: settings.json",kilo:"Kilo: Einstellungen → API Provider",claude_code:"env / Übersetzer"};function G2({line:e,loading:t}){return t||!e?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[l.jsx(eh,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[l.jsx(CN,{className:"h-3 w-3"})," ",e.detail]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[l.jsx(t4,{className:"h-3 w-3"})," ",e.detail]})}function V2({tool:e,fileName:t,accent:r,copied:n,onCopy:a}){return l.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[l.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),l.jsx("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:l.jsx("span",{children:t})}),l.jsxs("button",{onClick:a,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:[n?l.jsx(or,{className:"h-3.5 w-3.5 text-emerald-400"}):l.jsx(ev,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),l.jsx("pre",{className:ee("p-5 overflow-x-auto text-xs font-mono whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",r==="teal"?"text-cyan-200/90":"text-violet-200/90"),children:l.jsx("code",{children:e.snippet})})]})}function VO(){const[e,t]=y.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=y.useState(localStorage.getItem("mc_mcp_path")||""),[a,o]=y.useState("zed"),[u,c]=y.useState(null),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:m}=TD(f.toString()),{data:g,isLoading:v}=DD(),b=m?String(m):"";function j(E){t(E),E&&localStorage.setItem("mc_host",E)}function k(E){n(E),localStorage.setItem("mc_mcp_path",E)}const S=h==null?void 0:h.tools[a];async function N(E,A){A&&(await navigator.clipboard.writeText(A),c(E),setTimeout(()=>c(null),1500))}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.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"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Binde deinen lokalen Agenten an die Box an — über ",l.jsx("span",{className:"text-foreground",children:"zwei getrennte Leitungen"}),": das Modell (Gateway) und das geteilte Gedächtnis (MCP)."]})]}),l.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[l.jsx(p4,{className:"h-7 w-7 mx-auto text-muted-foreground"}),l.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Cline · Cursor · Zed …"})]}),l.jsxs("div",{className:"flex flex-col gap-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Xd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[l.jsx($n,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),l.jsx(G2,{line:g==null?void 0:g.gateway,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · Lanes chat / coding"})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Xd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[l.jsx(vo,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),l.jsx(G2,{line:g==null?void 0:g.memory,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]})]})]}),l.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",l.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",l.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," — beide werden unabhängig eingerichtet."]})]}),l.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:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(d4,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),l.jsx("input",{value:e,onChange:E=>j(E.target.value),"aria-label":"Box LAN IP-Adresse",spellCheck:!1,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"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(l4,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",l.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),l.jsx("input",{value:r,onChange:E=>k(E.target.value),"aria-label":"Lokaler MCP-Scriptpfad",spellCheck:!1,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-violet-500/50 text-foreground"})]})]}),b&&l.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: ",b]}),h&&l.jsxs("div",{className:"grid gap-5 lg:grid-cols-2",children:[l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-primary/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-primary/15 text-primary text-[11px]",children:"1"}),"Modell anbinden"]}),l.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(h.tools).map(([E,A])=>l.jsx("button",{onClick:()=>o(E),className:ee("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",a===E?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:A.label},E))}),S&&l.jsxs(l.Fragment,{children:[S.note&&l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(fw,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),l.jsx("span",{children:S.note})]}),l.jsx(V2,{tool:S,fileName:PX[a]||"config.json",accent:"teal",copied:u==="model",onCopy:()=>N("model",S.snippet)})]})]}),l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-violet-500/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-violet-500/15 text-violet-300 text-[11px]",children:"2"}),"Gedächtnis anbinden",l.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",l.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-violet-500/5 border border-violet-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(fw,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),l.jsx("span",{children:h.memory.note})]}),l.jsx(V2,{tool:h.memory,fileName:"mcp.json",accent:"violet",copied:u==="memory",onCopy:()=>N("memory",h.memory.snippet)})]})]})]})}const OX="modulepreload",_X=function(e){return"/"+e},q2={},MX=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));a=u(r.map(h=>{if(h=_X(h),h in q2)return;q2[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":OX,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,j)=>{v.addEventListener("load",b),v.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return a.then(u=>{for(const c of u||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};class IX extends y.Component{constructor(){super(...arguments);qo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?l.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[l.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),l.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const TX=y.lazy(()=>MX(()=>import("./GraphView-U6KSfAcr.js"),[]).then(e=>({default:e.GraphView}))),Fd=["identity","knowledge","rules","events"],Q2=new Set(["auto","agent","hermes"]),Dg={identity:{label:"Identität",icon:z4,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:Ks,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:O4,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:PN,bg:"bg-amber-500/10",text:"text-amber-400"}},Y2={label:"Gedächtnis",icon:Zg,text:"text-muted-foreground"},DX={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},X2=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu: 1) wer ich bin und woran ich gerade arbeite, 2) wie ich angesprochen werden möchte, 3) meine bevorzugten Tools, Sprachen und Arbeitsweise, 4) wichtige Regeln/Konventionen, die du beachten sollst, 5) meine Infrastruktur (Server, Dienste – ohne Geheimnisse). -Frag immer nur eine Sache auf einmal und fass am Ende zusammen, was du dir gemerkt hast.`;function ZO(){const[e,t]=y.useState(""),[r,n]=y.useState(""),[i,o]=y.useState(""),[u,c]=y.useState("knowledge"),[f,h]=y.useState(!1),[m,g]=y.useState(!1),[v,b]=y.useState("liste"),[j,k]=y.useState(!1),S=Kn(),{showAlert:N,showConfirm:E,dialogElement:A}=ya(),{data:P=[]}=cv({}),{data:_=[],error:O}=cv({q:r,category:e}),{data:D}=MD(v==="graph"),B=O?String(O):"",F=()=>{S.invalidateQueries({queryKey:["memory"]}),S.invalidateQueries({queryKey:["memory-graph"]})},z=y.useMemo(()=>{const I=P.length,M=P.filter(H=>X2.has(H.source)).length;return{total:I,auto:M,manual:I-M,cats:new Set(P.map(H=>H.category)).size}},[P]),Y=P.length===0,U=y.useMemo(()=>{const I=D??{nodes:[],edges:[]};if(!r.trim())return I;const M=r.toLowerCase(),H=I.nodes.filter(Z=>Z.content.toLowerCase().includes(M)),ne=new Set(H.map(Z=>Z.id));return{nodes:H,edges:I.edges.filter(Z=>ne.has(Z.source)&&ne.has(Z.target))}},[D,r]),he=y.useMemo(()=>{const I={};return _.forEach(M=>{var H;(I[H=M.category]??(I[H]=[])).push(M)}),I},[_]),ue=y.useMemo(()=>_.filter(I=>!Bd.includes(I.category)),[_]);async function ge(){i.trim()&&(await je("/api/memory",{method:"POST",body:JSON.stringify({content:i,category:u,source:"ui"})}),o(""),k(!1),F())}function ie(I){E("Eintrag löschen?","Diesen Gedächtnis-Eintrag dauerhaft entfernen?",async()=>{try{await je(`/api/memory/${I}`,{method:"DELETE"}),F()}catch(M){N("Fehler",`Löschen fehlgeschlagen: ${M.message||M}`)}})}async function se(){try{await navigator.clipboard.writeText(J2),g(!0),setTimeout(()=>g(!1),1800)}catch{N("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function X(){se(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function te(){h(!0);try{const I=await je("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(I.duplicate_count===0){N("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}E("Deduplizierung bestätigen",`${I.duplicate_count} Dublette(n) in ${I.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await je("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),F()}catch(M){N("Fehler",`Fehler beim Löschen: ${M.message}`)}})}catch(I){N("Fehler",`Fehler bei der Deduplizierung: ${I.message}`)}finally{h(!1)}}const J=({value:I,label:M,accent:H})=>l.jsxs("span",{className:ee("flex items-center gap-1.5 text-[11px] rounded-lg px-2.5 py-1 border",H==="auto"?"text-emerald-400 bg-emerald-500/[0.07] border-emerald-500/20":"text-muted-foreground bg-card/40 border-border/50"),children:[H==="auto"&&l.jsx(us,{className:"h-3 w-3"}),l.jsx("b",{className:ee("font-semibold",H==="auto"?"":"text-foreground"),children:I})," ",M]});return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP."})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsxs("div",{className:"relative",children:[l.jsx("input",{value:r,onChange:I=>n(I.target.value),"aria-label":"Gedächtnis durchsuchen",type:"search",placeholder:"Semantisch suchen…",className:"w-52 h-9 pl-8 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),l.jsx(vy,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),l.jsxs("button",{onClick:()=>k(I=>!I),className:"h-9 px-3 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:[l.jsx(tf,{className:"h-4 w-4"})," Eintrag"]}),l.jsx("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[["liste",k4,"Liste"],["graph",D4,"Graph"]].map(([I,M,H])=>l.jsxs("button",{onClick:()=>b(I),className:ee("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",v===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(M,{className:"h-3.5 w-3.5"})," ",H]},I))}),l.jsx("button",{onClick:te,disabled:f,className:"flex h-9 w-9 items-center justify-center rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50","aria-label":"Duplikate bereinigen",title:"Deduplizieren",children:l.jsx(us,{className:"h-4 w-4 text-primary","aria-hidden":"true"})})]})]}),!Y&&l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(J,{value:z.total,label:"Fakten"}),l.jsx(J,{value:z.auto,label:"auto gelernt",accent:"auto"}),l.jsx(J,{value:z.manual,label:"manuell"}),l.jsx(J,{value:z.cats,label:"Kategorien"}),l.jsxs("span",{className:"ml-auto text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(us,{className:"h-3 w-3 text-emerald-400"})," lernt automatisch aus Hermes-Gesprächen"]})]}),j&&l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),l.jsx("button",{onClick:()=>k(!1),"aria-label":"Schließen",className:"text-muted-foreground hover:text-foreground",children:l.jsx(zn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("textarea",{value:i,onChange:I=>o(I.target.value),rows:2,"aria-label":"Eintragstext",placeholder:"Eine Regel, Vorliebe oder einen stabilen Fakt über dich oder das Projekt…",className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("select",{value:u,onChange:I=>c(I.target.value),"aria-label":"Kategorie",className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 text-xs outline-none font-semibold text-foreground cursor-pointer",children:Bd.map(I=>{var M;return l.jsx("option",{value:I,className:"bg-popover text-foreground",children:((M=Lg[I])==null?void 0:M.label)||I},I)})}),l.jsxs("button",{onClick:ge,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",children:[l.jsx(tf,{className:"h-4 w-4"})," Speichern"]})]})]}),B&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler: ",B]}),Y?l.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 sm:p-10 flex flex-col items-center text-center gap-5",children:[l.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:l.jsx(N4,{className:"h-7 w-7 text-primary"})}),l.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[l.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Statt Fakten einzutippen: führ ein kurzes Onboarding-Gespräch mit Hermes. Was ihr besprecht, merkt sich das Gedächtnis automatisch — du musst nichts manuell pflegen."})]}),l.jsxs("div",{className:"w-full max-w-lg text-left",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),l.jsx("button",{onClick:se,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:m?l.jsxs(l.Fragment,{children:[l.jsx(or,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):l.jsxs(l.Fragment,{children:[l.jsx(rv,{className:"h-3 w-3"})," Kopieren"]})})]}),l.jsx("pre",{className:"w-full rounded-xl border border-border/60 bg-background/40 p-3.5 text-[11px] leading-relaxed text-foreground/90 whitespace-pre-wrap font-mono",children:J2})]}),l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[l.jsxs("button",{onClick:X,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",children:[l.jsx(RN,{className:"h-4 w-4"})," Im Terminal starten"]}),l.jsxs("button",{onClick:se,className:"h-9 px-4 rounded-lg border border-border/60 bg-card text-xs font-semibold hover:border-primary/50 transition-all flex items-center gap-1.5 cursor-pointer",children:[m?l.jsx(or,{className:"h-4 w-4 text-emerald-400"}):l.jsx(rv,{className:"h-4 w-4"})," Prompt kopieren"]})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(T4,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",l.jsx("button",{onClick:()=>k(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):v==="graph"?l.jsx($X,{children:l.jsx(y.Suspense,{fallback:l.jsx("div",{className:"h-[480px] rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:l.jsx(zX,{data:U,onDelete:ie})})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl w-fit",children:[l.jsx("button",{onClick:()=>t(""),className:ee("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Bd.map(I=>{const M=Lg[I]||Z2,H=M.icon;return l.jsxs("button",{onClick:()=>t(I),className:ee("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1",e===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(H,{className:"h-3 w-3"})," ",M.label]},I)})]}),_.length===0?l.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.jsx("div",{className:"space-y-5",children:[...Bd,"__other"].map(I=>{const M=I==="__other"?ue:he[I]||[];if(!M.length)return null;const H=Lg[I]||Z2,ne=H.icon;return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[l.jsx(ne,{className:ee("h-3.5 w-3.5",H.text)}),l.jsx("span",{className:ee("text-[11px] font-bold uppercase tracking-wider",H.text),children:H.label}),l.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/60 bg-card/50 rounded px-1.5 py-0.5",children:M.length}),l.jsx("div",{className:"ml-1 h-px flex-1 bg-border/30"})]}),l.jsx("div",{className:"space-y-2",children:M.map(Z=>{const me=X2.has(Z.source);return l.jsxs("div",{className:ee("flex items-start justify-between gap-4 p-3.5 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 hover:border-primary/20 transition-all group",FX[Z.category]||"border-l-muted"),children:[l.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1 min-w-0",children:Z.content}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[typeof Z.score=="number"&&l.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded",title:"Relevanz der semantischen Suche",children:[Math.round(Z.score*100),"%"]}),l.jsxs("span",{className:ee("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded",me?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:me?"Automatisch gelernt":"Manuell angelegt",children:[me&&l.jsx(us,{className:"h-2.5 w-2.5"}),Z.source]}),l.jsx("button",{onClick:()=>ie(Z.id),"aria-label":"Eintrag löschen",title:"Eintrag löschen",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",children:l.jsx(nv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]},Z.id)})})]},I)})})]}),A]})}const BX=["chat","coding","fast","heavy"];function JO(){const{data:e,error:t}=Ny(5e3),{data:r}=yi(),{showAlert:n,dialogElement:i}=ya(),o=Kn(),u=t?String(t):"",[c,f]=y.useState(!1),h=(r==null?void 0:r.models)??[];async function m(v){try{await je("/api/agent/brain",{method:"POST",body:JSON.stringify({model:v})}),n("Erledigt",`Hermes-Hirn zeigt jetzt auf das Alias '${v}'. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:Ge.agentStatus}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}async function g(v){try{await je("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:v})}),n("Erledigt","Agent-Hirn gewechselt (warm gehalten). Gateway wurde neugestartet."),o.invalidateQueries({queryKey:Ge.agentStatus}),o.invalidateQueries({queryKey:Ge.models}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.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"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",l.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&l.jsxs("a",{href:Ds(e.terminal_url),target:"_blank",rel:"noopener",className:ee("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",e.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[l.jsx(Ms,{className:"h-4 w-4"}),l.jsx("span",{children:"Terminal öffnen"})]})]}),u&&l.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 (",u,")."]}),e&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(pn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Fluss"})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-stretch gap-3",children:[l.jsxs("button",{onClick:()=>e.terminal_reachable&&window.open(Ds(e.terminal_url),"_blank"),title:e.terminal_reachable?"Hermes-Terminal öffnen":"Terminal offline",className:"lg:w-40 shrink-0 rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/40 transition-all cursor-pointer flex flex-col justify-center",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(Jf,{className:ee("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Terminal"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full animate-pulse",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:"hermes chat · Clients"})]}),l.jsx("div",{className:"hidden lg:flex items-center text-muted-foreground text-lg select-none",children:"→"}),l.jsxs("div",{className:"flex-1 flex flex-col gap-2.5",children:[l.jsxs("div",{className:"rounded-xl border border-primary/40 bg-primary/5 px-3.5 py-2.5 flex items-center gap-2",children:[l.jsx(pn,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-xs font-semibold text-primary",children:"Agent Gateway"}),l.jsx("span",{className:"text-[11px] font-mono text-muted-foreground",children:":8642"}),l.jsxs("span",{className:ee("ml-auto inline-flex items-center gap-1.5 text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded-full border",e.gateway_reachable?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-red-500/10 text-red-400 border-red-500/20"),children:[l.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full",e.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-red-500")}),e.gateway_reachable?"online":"offline"]})]}),l.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-3",children:[l.jsxs("button",{onClick:()=>f(!0),className:"rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/45 transition-all cursor-pointer",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx($n,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Hirn"}),l.jsx("span",{className:"ml-auto text-[9px] text-primary/70 font-bold uppercase",children:"wechseln →"})]}),l.jsx("div",{className:"text-[11px] font-mono font-medium text-foreground truncate mt-1",title:e.brain_model,children:e.brain_model||"chat"})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(Uu,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 flex flex-wrap gap-x-2 text-muted-foreground",children:[l.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),l.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),l.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(pw,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"PC"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")})]}),l.jsxs("div",{className:ee("text-[11px] font-mono mt-1",e.pc_executor_reachable?"text-emerald-400":"text-muted-foreground"),children:[":7777 ",e.pc_executor_reachable?"verbunden":"offline"]})]})]})]})]})]}),l.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:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pw,{className:"h-5 w-5 text-primary"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("p",{children:["Der ",l.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",l.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."]}),l.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",l.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."]})]}),l.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?l.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[l.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),l.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",l.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",l.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",l.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),l.jsxs("p",{children:["Starte ",l.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",l.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),l.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"})]})})]})]}),!e.gateway_reachable&&l.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:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ks,{className:"h-5 w-5 text-amber-500"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),l.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[l.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),l.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",l.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),l.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[l.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),l.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",l.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"}),"."]})]})]})]}),e&&c&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":"Hermes-Hirn konfigurieren",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx($n,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Hirn konfigurieren"})]}),l.jsx("button",{onClick:()=>f(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Lane / Gateway-Alias"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:BX.map(v=>{const b=e.brain_model===v;return l.jsxs("button",{onClick:()=>m(v),className:ee("px-3 py-1.5 rounded-lg text-xs font-mono font-semibold border transition-all cursor-pointer flex items-center gap-1.5",b?"border-primary/40 bg-primary/10 text-primary":"border-border/30 bg-background/20 text-foreground hover:bg-accent"),children:[v,b&&l.jsx(or,{className:"h-3.5 w-3.5"})]},v)})}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Schlank & flexibel: das Hirn folgt dem Lane-Routing (z.B. ",l.jsx("code",{className:"text-primary",children:"chat"})," = fast↔heavy)."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Installiertes Modell (warm gehalten)"}),l.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto pr-1",children:h.map(v=>{var j;const b=v.role==="hermes";return l.jsxs("button",{onClick:()=>!b&&g(v.name),disabled:b||v.incomplete,className:ee("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",b?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":v.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:[l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(j=v.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[v.capabilities.params_b?`${v.capabilities.params_b}B`:"?"," · ",v.capabilities.tools!=="no"?"Tools ✓":"ohne Tools",v.role&&` · Rolle: ${v.role}`]})]}),b?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Warm setzen →"})]},v.name)})})]}),l.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[l.jsx("span",{children:"💡"}),l.jsxs("span",{children:["Für einen ",l.jsx("strong",{children:"Agenten"}),' sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl. Neues Modell? Erst über „Modell-Manager → Modelle finden" laden.']})]})]})}),i]})}function UX(){const{data:e}=Ny(5e3),t=e!=null&&e.terminal_url?Ds(e.terminal_url):void 0,r=e==null?void 0:e.terminal_reachable;return l.jsxs("div",{className:"flex h-full flex-col gap-4",children:[l.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Hermes Terminal"}),l.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Interaktiver Agent (",l.jsx("code",{className:"rounded bg-background/40 px-1 font-mono text-[11px] text-primary",children:"hermes chat"}),') mit Tools & PC-Steuerung — „mehr als Chatten".']})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[l.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&l.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[l.jsx(Ms,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?l.jsxs("div",{className:"relative min-h-[68vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&l.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[l.jsx(gn,{className:"h-8 w-8 text-amber-400"}),l.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Terminal nicht erreichbar"}),l.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",l.jsx("code",{className:"font-mono text-primary",children:"hermes-terminal"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",l.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-terminal"}),"."]})]}),l.jsx("iframe",{src:t,title:"Hermes Terminal",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):l.jsxs("div",{className:"flex min-h-[68vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[l.jsx(DN,{className:"mr-2 h-4 w-4"})," Lade Terminal…"]})]})}const eN=[{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function HX(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function Or({id:e,icon:t,color:r,title:n,kicker:i,children:o,wide:u}){return l.jsxs("section",{id:e,className:ee("scroll-mt-20 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-3",u&&"md:col-span-2"),children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(t,{className:ee("h-5 w-5 shrink-0",r)}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),i&&l.jsx("span",{className:ee("text-[9px] font-mono",r),children:i})]})]}),l.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function La({children:e}){return l.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[l.jsx(us,{className:"h-3 w-3"})," Bei dir konkret"]}),l.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function ze({children:e}){return l.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:e})}function bt({href:e,name:t,note:r}){return l.jsxs("li",{className:"leading-relaxed",children:[l.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,l.jsx(Y3,{className:"h-3 w-3 opacity-60"})]}),l.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function WX(){const[e,t]=y.useState(!1);return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 flex items-start gap-4",children:[l.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:l.jsx(ev,{className:"h-6 w-6 text-primary"})}),l.jsxs("div",{className:"space-y-1",children:[l.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:"Die AI-Bibel"}),l.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Allgemeines Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",l.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",l.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),l.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:l.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx(tv,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?eN:eN.slice(0,9)).map(r=>l.jsx("button",{onClick:()=>HX(r.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:r.label},r.id)),l.jsx("button",{onClick:()=>t(r=>!r),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:e?"weniger":"+ mehr"})]})})}),l.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[l.jsxs(Or,{id:"grundlagen",icon:$n,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[l.jsxs("p",{children:["Ein LLM ist im Kern ein ",l.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),l.jsxs("li",{children:[l.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",l.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),l.jsxs(Or,{id:"moe",icon:gy,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",l.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",l.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),l.jsxs("p",{children:[l.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx(ze,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),l.jsxs(La,{children:["VRAM/RAM ist die harte Grenze — ",l.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",l.jsx(ze,{children:"Q4_K_M"}),"/",l.jsx(ze,{children:"Q6_K"}),"."]})]}),l.jsxs(Or,{id:"lokal",icon:rh,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"llama-swap"})," — Proxy, der ",l.jsx("em",{children:"mehrere"})," Modelle hinter ",l.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx(ze,{children:"CUDA"})," NVIDIA · ",l.jsx(ze,{children:"ROCm"})," AMD · ",l.jsx(ze,{children:"Vulkan"})," herstellerübergreifend · ",l.jsx(ze,{children:"Metal"})," Apple"]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",l.jsx(ze,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",l.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),l.jsxs(La,{children:["Deine Box hat eine AMD-APU (gfx1151). ",l.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",l.jsx(ze,{children:"Vulkan/RADV"})," das offizielle ",l.jsx(ze,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",l.jsx(ze,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",l.jsx(ze,{children:"coder"})," nutzt Spec-Decoding."]})]}),l.jsxs(Or,{id:"modelle",icon:Jd,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Llama"})," (Meta), ",l.jsx("strong",{children:"Gemma"})," (Google), ",l.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"DeepSeek"}),", ",l.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Frontier (Cloud-API):"})}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx("strong",{children:"Claude"})," (Anthropic), ",l.jsx("strong",{children:"GPT"})," (OpenAI), ",l.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),l.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),l.jsxs(La,{children:["Dein Line-up via llama-swap: ",l.jsx(ze,{children:"fast"})," (Alltag/Vision/MoE) · ",l.jsx(ze,{children:"heavy"})," (schwere Logik) ·",l.jsx(ze,{children:"coder"})," · ",l.jsx(ze,{children:"scout"})," · ",l.jsx(ze,{children:"vision"})," · ",l.jsx(ze,{children:"embed"})," (fürs Gedächtnis) ·",l.jsx(ze,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",l.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),l.jsxs(Or,{id:"gateway",icon:C4,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[l.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",l.jsx("strong",{children:"OpenAI-Format"})," (",l.jsx(ze,{children:"/v1/chat/completions"}),"). Ein",l.jsx("strong",{children:" Gateway"})," davor gibt dir ",l.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",l.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),l.jsxs("p",{children:["Die ",l.jsx(ze,{children:"model:auto"}),'-Idee: du sagst „auto", das Gateway wählt das passende Modell je nach Anfrage und lädt es bei Bedarf.']}),l.jsxs(La,{children:["Dein Gateway: ",l.jsx(ze,{children:"http://192.168.178.151:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",l.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),l.jsxs(Or,{id:"mcp",icon:ef,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[l.jsxs("p",{children:["Das ",l.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",l.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),l.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),l.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[l.jsx(j4,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),l.jsxs(Or,{id:"skills",icon:_4,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",l.jsx(ze,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),l.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:`--- +Frag immer nur eine Sache auf einmal und fass am Ende zusammen, was du dir gemerkt hast.`;function qO(){const[e,t]=y.useState(""),[r,n]=y.useState(""),[a,o]=y.useState(""),[u,c]=y.useState("knowledge"),[f,h]=y.useState(!1),[m,g]=y.useState(!1),[v,b]=y.useState("liste"),[j,k]=y.useState(!1),S=Kn(),{showAlert:N,showConfirm:E,dialogElement:A}=ya(),{data:P=[]}=lv({}),{data:_=[],error:O}=lv({q:r,category:e}),{data:D}=PD(v==="graph"),B=O?String(O):"",F=()=>{S.invalidateQueries({queryKey:["memory"]}),S.invalidateQueries({queryKey:["memory-graph"]})},z=y.useMemo(()=>{const I=P.length,M=P.filter(H=>Q2.has(H.source)).length;return{total:I,auto:M,manual:I-M,cats:new Set(P.map(H=>H.category)).size}},[P]),Y=P.length===0,U=y.useMemo(()=>{const I=D??{nodes:[],edges:[]};if(!r.trim())return I;const M=r.toLowerCase(),H=I.nodes.filter(Z=>Z.content.toLowerCase().includes(M)),ne=new Set(H.map(Z=>Z.id));return{nodes:H,edges:I.edges.filter(Z=>ne.has(Z.source)&&ne.has(Z.target))}},[D,r]),he=y.useMemo(()=>{const I={};return _.forEach(M=>{var H;(I[H=M.category]??(I[H]=[])).push(M)}),I},[_]),ue=y.useMemo(()=>_.filter(I=>!Fd.includes(I.category)),[_]);async function ge(){a.trim()&&(await je("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"ui"})}),o(""),k(!1),F())}function ie(I){E("Eintrag löschen?","Diesen Gedächtnis-Eintrag dauerhaft entfernen?",async()=>{try{await je(`/api/memory/${I}`,{method:"DELETE"}),F()}catch(M){N("Fehler",`Löschen fehlgeschlagen: ${M.message||M}`)}})}async function se(){try{await navigator.clipboard.writeText(X2),g(!0),setTimeout(()=>g(!1),1800)}catch{N("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function X(){se(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function te(){h(!0);try{const I=await je("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(I.duplicate_count===0){N("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}E("Deduplizierung bestätigen",`${I.duplicate_count} Dublette(n) in ${I.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await je("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),F()}catch(M){N("Fehler",`Fehler beim Löschen: ${M.message}`)}})}catch(I){N("Fehler",`Fehler bei der Deduplizierung: ${I.message}`)}finally{h(!1)}}const J=({value:I,label:M,accent:H})=>l.jsxs("span",{className:ee("flex items-center gap-1.5 text-[11px] rounded-lg px-2.5 py-1 border",H==="auto"?"text-emerald-400 bg-emerald-500/[0.07] border-emerald-500/20":"text-muted-foreground bg-card/40 border-border/50"),children:[H==="auto"&&l.jsx(us,{className:"h-3 w-3"}),l.jsx("b",{className:ee("font-semibold",H==="auto"?"":"text-foreground"),children:I})," ",M]});return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP."})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsxs("div",{className:"relative",children:[l.jsx("input",{value:r,onChange:I=>n(I.target.value),"aria-label":"Gedächtnis durchsuchen",type:"search",placeholder:"Semantisch suchen…",className:"w-52 h-9 pl-8 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),l.jsx(py,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),l.jsxs("button",{onClick:()=>k(I=>!I),className:"h-9 px-3 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:[l.jsx(ef,{className:"h-4 w-4"})," Eintrag"]}),l.jsx("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[["liste",x4,"Liste"],["graph",M4,"Graph"]].map(([I,M,H])=>l.jsxs("button",{onClick:()=>b(I),className:ee("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",v===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(M,{className:"h-3.5 w-3.5"})," ",H]},I))}),l.jsx("button",{onClick:te,disabled:f,className:"flex h-9 w-9 items-center justify-center rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50","aria-label":"Duplikate bereinigen",title:"Deduplizieren",children:l.jsx(us,{className:"h-4 w-4 text-primary","aria-hidden":"true"})})]})]}),!Y&&l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(J,{value:z.total,label:"Fakten"}),l.jsx(J,{value:z.auto,label:"auto gelernt",accent:"auto"}),l.jsx(J,{value:z.manual,label:"manuell"}),l.jsx(J,{value:z.cats,label:"Kategorien"}),l.jsxs("span",{className:"ml-auto text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(us,{className:"h-3 w-3 text-emerald-400"})," lernt automatisch aus Hermes-Gesprächen"]})]}),j&&l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),l.jsx("button",{onClick:()=>k(!1),"aria-label":"Schließen",className:"text-muted-foreground hover:text-foreground",children:l.jsx(zn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("textarea",{value:a,onChange:I=>o(I.target.value),rows:2,"aria-label":"Eintragstext",placeholder:"Eine Regel, Vorliebe oder einen stabilen Fakt über dich oder das Projekt…",className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("select",{value:u,onChange:I=>c(I.target.value),"aria-label":"Kategorie",className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 text-xs outline-none font-semibold text-foreground cursor-pointer",children:Fd.map(I=>{var M;return l.jsx("option",{value:I,className:"bg-popover text-foreground",children:((M=Dg[I])==null?void 0:M.label)||I},I)})}),l.jsxs("button",{onClick:ge,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",children:[l.jsx(ef,{className:"h-4 w-4"})," Speichern"]})]})]}),B&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler: ",B]}),Y?l.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 sm:p-10 flex flex-col items-center text-center gap-5",children:[l.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:l.jsx(k4,{className:"h-7 w-7 text-primary"})}),l.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[l.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Statt Fakten einzutippen: führ ein kurzes Onboarding-Gespräch mit Hermes. Was ihr besprecht, merkt sich das Gedächtnis automatisch — du musst nichts manuell pflegen."})]}),l.jsxs("div",{className:"w-full max-w-lg text-left",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),l.jsx("button",{onClick:se,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:m?l.jsxs(l.Fragment,{children:[l.jsx(or,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):l.jsxs(l.Fragment,{children:[l.jsx(ev,{className:"h-3 w-3"})," Kopieren"]})})]}),l.jsx("pre",{className:"w-full rounded-xl border border-border/60 bg-background/40 p-3.5 text-[11px] leading-relaxed text-foreground/90 whitespace-pre-wrap font-mono",children:X2})]}),l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[l.jsxs("button",{onClick:X,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",children:[l.jsx(IN,{className:"h-4 w-4"})," Im Terminal starten"]}),l.jsxs("button",{onClick:se,className:"h-9 px-4 rounded-lg border border-border/60 bg-card text-xs font-semibold hover:border-primary/50 transition-all flex items-center gap-1.5 cursor-pointer",children:[m?l.jsx(or,{className:"h-4 w-4 text-emerald-400"}):l.jsx(ev,{className:"h-4 w-4"})," Prompt kopieren"]})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(_4,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",l.jsx("button",{onClick:()=>k(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):v==="graph"?l.jsx(IX,{children:l.jsx(y.Suspense,{fallback:l.jsx("div",{className:"h-[480px] rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:l.jsx(TX,{data:U,onDelete:ie})})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl w-fit",children:[l.jsx("button",{onClick:()=>t(""),className:ee("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Fd.map(I=>{const M=Dg[I]||Y2,H=M.icon;return l.jsxs("button",{onClick:()=>t(I),className:ee("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1",e===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(H,{className:"h-3 w-3"})," ",M.label]},I)})]}),_.length===0?l.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.jsx("div",{className:"space-y-5",children:[...Fd,"__other"].map(I=>{const M=I==="__other"?ue:he[I]||[];if(!M.length)return null;const H=Dg[I]||Y2,ne=H.icon;return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[l.jsx(ne,{className:ee("h-3.5 w-3.5",H.text)}),l.jsx("span",{className:ee("text-[11px] font-bold uppercase tracking-wider",H.text),children:H.label}),l.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/60 bg-card/50 rounded px-1.5 py-0.5",children:M.length}),l.jsx("div",{className:"ml-1 h-px flex-1 bg-border/30"})]}),l.jsx("div",{className:"space-y-2",children:M.map(Z=>{const me=Q2.has(Z.source);return l.jsxs("div",{className:ee("flex items-start justify-between gap-4 p-3.5 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 hover:border-primary/20 transition-all group",DX[Z.category]||"border-l-muted"),children:[l.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1 min-w-0",children:Z.content}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[typeof Z.score=="number"&&l.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded",title:"Relevanz der semantischen Suche",children:[Math.round(Z.score*100),"%"]}),l.jsxs("span",{className:ee("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded",me?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:me?"Automatisch gelernt":"Manuell angelegt",children:[me&&l.jsx(us,{className:"h-2.5 w-2.5"}),Z.source]}),l.jsx("button",{onClick:()=>ie(Z.id),"aria-label":"Eintrag löschen",title:"Eintrag löschen",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",children:l.jsx(tv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]},Z.id)})})]},I)})})]}),A]})}const RX=["chat","coding","fast","heavy"];function QO(){const{data:e,error:t}=jy(5e3),{data:r}=yi(),{showAlert:n,dialogElement:a}=ya(),o=Kn(),u=t?String(t):"",[c,f]=y.useState(!1),h=(r==null?void 0:r.models)??[];async function m(v){try{await je("/api/agent/brain",{method:"POST",body:JSON.stringify({model:v})}),n("Erledigt",`Hermes-Hirn zeigt jetzt auf das Alias '${v}'. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:Ve.agentStatus}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}async function g(v){try{await je("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:v})}),n("Erledigt","Agent-Hirn gewechselt (warm gehalten). Gateway wurde neugestartet."),o.invalidateQueries({queryKey:Ve.agentStatus}),o.invalidateQueries({queryKey:Ve.models}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.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"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",l.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&l.jsxs("a",{href:Ds(e.terminal_url),target:"_blank",rel:"noopener",className:ee("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",e.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[l.jsx(Ms,{className:"h-4 w-4"}),l.jsx("span",{children:"Terminal öffnen"})]})]}),u&&l.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 (",u,")."]}),e&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(pn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Fluss"})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-stretch gap-3",children:[l.jsxs("button",{onClick:()=>e.terminal_reachable&&window.open(Ds(e.terminal_url),"_blank"),title:e.terminal_reachable?"Hermes-Terminal öffnen":"Terminal offline",className:"lg:w-40 shrink-0 rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/40 transition-all cursor-pointer flex flex-col justify-center",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(Zf,{className:ee("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Terminal"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full animate-pulse",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:"hermes chat · Clients"})]}),l.jsx("div",{className:"hidden lg:flex items-center text-muted-foreground text-lg select-none",children:"→"}),l.jsxs("div",{className:"flex-1 flex flex-col gap-2.5",children:[l.jsxs("div",{className:"rounded-xl border border-primary/40 bg-primary/5 px-3.5 py-2.5 flex items-center gap-2",children:[l.jsx(pn,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-xs font-semibold text-primary",children:"Agent Gateway"}),l.jsx("span",{className:"text-[11px] font-mono text-muted-foreground",children:":8642"}),l.jsxs("span",{className:ee("ml-auto inline-flex items-center gap-1.5 text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded-full border",e.gateway_reachable?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-red-500/10 text-red-400 border-red-500/20"),children:[l.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full",e.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-red-500")}),e.gateway_reachable?"online":"offline"]})]}),l.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-3",children:[l.jsxs("button",{onClick:()=>f(!0),className:"rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/45 transition-all cursor-pointer",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx($n,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Hirn"}),l.jsx("span",{className:"ml-auto text-[9px] text-primary/70 font-bold uppercase",children:"wechseln →"})]}),l.jsx("div",{className:"text-[11px] font-mono font-medium text-foreground truncate mt-1",title:e.brain_model,children:e.brain_model||"chat"})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(Uu,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 flex flex-wrap gap-x-2 text-muted-foreground",children:[l.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),l.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),l.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(hw,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"PC"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")})]}),l.jsxs("div",{className:ee("text-[11px] font-mono mt-1",e.pc_executor_reachable?"text-emerald-400":"text-muted-foreground"),children:[":7777 ",e.pc_executor_reachable?"verbunden":"offline"]})]})]})]})]})]}),l.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:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(hw,{className:"h-5 w-5 text-primary"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("p",{children:["Der ",l.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",l.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."]}),l.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",l.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."]})]}),l.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?l.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[l.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),l.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",l.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",l.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",l.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),l.jsxs("p",{children:["Starte ",l.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",l.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),l.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"})]})})]})]}),!e.gateway_reachable&&l.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:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ks,{className:"h-5 w-5 text-amber-500"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),l.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[l.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),l.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",l.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),l.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[l.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),l.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",l.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"}),"."]})]})]})]}),e&&c&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":"Hermes-Hirn konfigurieren",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx($n,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Hirn konfigurieren"})]}),l.jsx("button",{onClick:()=>f(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Lane / Gateway-Alias"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:RX.map(v=>{const b=e.brain_model===v;return l.jsxs("button",{onClick:()=>m(v),className:ee("px-3 py-1.5 rounded-lg text-xs font-mono font-semibold border transition-all cursor-pointer flex items-center gap-1.5",b?"border-primary/40 bg-primary/10 text-primary":"border-border/30 bg-background/20 text-foreground hover:bg-accent"),children:[v,b&&l.jsx(or,{className:"h-3.5 w-3.5"})]},v)})}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Schlank & flexibel: das Hirn folgt dem Lane-Routing (z.B. ",l.jsx("code",{className:"text-primary",children:"chat"})," = fast↔heavy)."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Installiertes Modell (warm gehalten)"}),l.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto pr-1",children:h.map(v=>{var j;const b=v.role==="hermes";return l.jsxs("button",{onClick:()=>!b&&g(v.name),disabled:b||v.incomplete,className:ee("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",b?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":v.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:[l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(j=v.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[v.capabilities.params_b?`${v.capabilities.params_b}B`:"?"," · ",v.capabilities.tools!=="no"?"Tools ✓":"ohne Tools",v.role&&` · Rolle: ${v.role}`]})]}),b?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Warm setzen →"})]},v.name)})})]}),l.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[l.jsx("span",{children:"💡"}),l.jsxs("span",{children:["Für einen ",l.jsx("strong",{children:"Agenten"}),' sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl. Neues Modell? Erst über „Modell-Manager → Modelle finden" laden.']})]})]})}),a]})}function LX(){const{data:e}=jy(5e3),t=e!=null&&e.terminal_url?Ds(e.terminal_url):void 0,r=e==null?void 0:e.terminal_reachable;return l.jsxs("div",{className:"flex h-full flex-col gap-4",children:[l.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Hermes Terminal"}),l.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Interaktiver Agent (",l.jsx("code",{className:"rounded bg-background/40 px-1 font-mono text-[11px] text-primary",children:"hermes chat"}),') mit Tools & PC-Steuerung — „mehr als Chatten".']})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[l.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&l.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[l.jsx(Ms,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?l.jsxs("div",{className:"relative min-h-[68vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&l.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[l.jsx(gn,{className:"h-8 w-8 text-amber-400"}),l.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Terminal nicht erreichbar"}),l.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",l.jsx("code",{className:"font-mono text-primary",children:"hermes-terminal"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",l.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-terminal"}),"."]})]}),l.jsx("iframe",{src:t,title:"Hermes Terminal",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):l.jsxs("div",{className:"flex min-h-[68vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[l.jsx(MN,{className:"mr-2 h-4 w-4"})," Lade Terminal…"]})]})}const Z2=[{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function $X(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function Or({id:e,icon:t,color:r,title:n,kicker:a,children:o,wide:u}){return l.jsxs("section",{id:e,className:ee("scroll-mt-20 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-3",u&&"md:col-span-2"),children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(t,{className:ee("h-5 w-5 shrink-0",r)}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),a&&l.jsx("span",{className:ee("text-[9px] font-mono",r),children:a})]})]}),l.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function La({children:e}){return l.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[l.jsx(us,{className:"h-3 w-3"})," Bei dir konkret"]}),l.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function ze({children:e}){return l.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:e})}function bt({href:e,name:t,note:r}){return l.jsxs("li",{className:"leading-relaxed",children:[l.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,l.jsx(GM,{className:"h-3 w-3 opacity-60"})]}),l.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function zX(){const[e,t]=y.useState(!1);return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 flex items-start gap-4",children:[l.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:l.jsx(Zg,{className:"h-6 w-6 text-primary"})}),l.jsxs("div",{className:"space-y-1",children:[l.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:"Die AI-Bibel"}),l.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Allgemeines Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",l.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",l.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),l.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:l.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx(Jg,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?Z2:Z2.slice(0,9)).map(r=>l.jsx("button",{onClick:()=>$X(r.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:r.label},r.id)),l.jsx("button",{onClick:()=>t(r=>!r),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:e?"weniger":"+ mehr"})]})})}),l.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[l.jsxs(Or,{id:"grundlagen",icon:$n,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[l.jsxs("p",{children:["Ein LLM ist im Kern ein ",l.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),l.jsxs("li",{children:[l.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",l.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),l.jsxs(Or,{id:"moe",icon:my,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",l.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",l.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),l.jsxs("p",{children:[l.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx(ze,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),l.jsxs(La,{children:["VRAM/RAM ist die harte Grenze — ",l.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",l.jsx(ze,{children:"Q4_K_M"}),"/",l.jsx(ze,{children:"Q6_K"}),"."]})]}),l.jsxs(Or,{id:"lokal",icon:th,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"llama-swap"})," — Proxy, der ",l.jsx("em",{children:"mehrere"})," Modelle hinter ",l.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx(ze,{children:"CUDA"})," NVIDIA · ",l.jsx(ze,{children:"ROCm"})," AMD · ",l.jsx(ze,{children:"Vulkan"})," herstellerübergreifend · ",l.jsx(ze,{children:"Metal"})," Apple"]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",l.jsx(ze,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",l.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),l.jsxs(La,{children:["Deine Box hat eine AMD-APU (gfx1151). ",l.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",l.jsx(ze,{children:"Vulkan/RADV"})," das offizielle ",l.jsx(ze,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",l.jsx(ze,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",l.jsx(ze,{children:"coder"})," nutzt Spec-Decoding."]})]}),l.jsxs(Or,{id:"modelle",icon:Zd,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Llama"})," (Meta), ",l.jsx("strong",{children:"Gemma"})," (Google), ",l.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"DeepSeek"}),", ",l.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Frontier (Cloud-API):"})}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx("strong",{children:"Claude"})," (Anthropic), ",l.jsx("strong",{children:"GPT"})," (OpenAI), ",l.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),l.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),l.jsxs(La,{children:["Dein Line-up via llama-swap: ",l.jsx(ze,{children:"fast"})," (Alltag/Vision/MoE) · ",l.jsx(ze,{children:"heavy"})," (schwere Logik) ·",l.jsx(ze,{children:"coder"})," · ",l.jsx(ze,{children:"scout"})," · ",l.jsx(ze,{children:"vision"})," · ",l.jsx(ze,{children:"embed"})," (fürs Gedächtnis) ·",l.jsx(ze,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",l.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),l.jsxs(Or,{id:"gateway",icon:N4,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[l.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",l.jsx("strong",{children:"OpenAI-Format"})," (",l.jsx(ze,{children:"/v1/chat/completions"}),"). Ein",l.jsx("strong",{children:" Gateway"})," davor gibt dir ",l.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",l.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),l.jsxs("p",{children:["Die ",l.jsx(ze,{children:"model:auto"}),'-Idee: du sagst „auto", das Gateway wählt das passende Modell je nach Anfrage und lädt es bei Bedarf.']}),l.jsxs(La,{children:["Dein Gateway: ",l.jsx(ze,{children:"http://192.168.178.151:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",l.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),l.jsxs(Or,{id:"mcp",icon:Jd,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[l.jsxs("p",{children:["Das ",l.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",l.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),l.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),l.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[l.jsx(b4,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),l.jsxs(Or,{id:"skills",icon:C4,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",l.jsx(ze,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),l.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: Treibt Entwicklung mit strikter TDD-Praxis --- # Instructions -...`}),l.jsxs("p",{children:["Suchen & installieren über die ",l.jsx("strong",{children:"skills.sh"}),"-Registry: ",l.jsx(ze,{children:"npx skills find"})," /",l.jsx(ze,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),l.jsxs(Or,{id:"memory",icon:u4,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["LLMs sind ",l.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",l.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:["extrahiert Fakten ",l.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),l.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),l.jsxs("li",{children:[l.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",l.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),l.jsxs(La,{children:["Dein Gedächtnis (Tab ",l.jsx("strong",{children:"Gedächtnis"}),") ist ",l.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",l.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",l.jsx(ze,{children:"Identität"})," · ",l.jsx(ze,{children:"Wissen"})," · ",l.jsx(ze,{children:"Regeln"})," · ",l.jsx(ze,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",l.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",l.jsx("br",{}),l.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),l.jsxs(Or,{id:"agents",icon:pn,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",l.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),l.jsxs("p",{children:[l.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",l.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),l.jsxs(La,{children:[l.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",l.jsx(ze,{children:"fast"}),"). Reden tust du mit ihm im",l.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",l.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",l.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",l.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),l.jsxs(Or,{id:"ide",icon:Os,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[l.jsxs("p",{children:["Jede ",l.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Cline"})," & ",l.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Continue"}),", ",l.jsx("strong",{children:"aider"})," (CLI), ",l.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),l.jsxs(La,{children:["Tipp den Kram nicht ab: der ",l.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",l.jsx(ze,{children:"…:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", Key beliebig."]})]}),l.jsx(Or,{id:"tricks",icon:w4,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:l.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([r,n])=>l.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[l.jsx(ha,{className:"h-3 w-3 text-amber-400"})," ",r]}),l.jsx("p",{className:"text-[11px]",children:n})]},r))})}),l.jsx(Or,{id:"wartung",icon:Ks,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(MN,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(Uu,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",l.jsx(ze,{children:"restore.sh"})," (Doku in ",l.jsx(ze,{children:"docs/BACKUP.md"}),")."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",l.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",l.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),l.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),l.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(tv,{className:"h-5 w-5 text-primary"}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),l.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(Jd,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),l.jsx(bt,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),l.jsx(bt,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),l.jsx(bt,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),l.jsx(bt,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),l.jsx(bt,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(ef,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),l.jsx(bt,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),l.jsx(bt,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),l.jsx(bt,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),l.jsx(bt,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(pn,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),l.jsx(bt,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),l.jsx(bt,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),l.jsx(bt,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),l.jsx(bt,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(ev,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),l.jsx(bt,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),l.jsx(bt,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),l.jsx(bt,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),l.jsx(bt,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),l.jsx(Or,{id:"troubleshooting",icon:b4,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:l.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",l.jsx(ze,{children:":9001"}),")? Backend-Status in der ",l.jsx("strong",{children:"Zentrale"})," prüfen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",l.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",l.jsx(ze,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",l.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",l.jsx(ze,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),l.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juni 2026 — lebendes Dokument, wächst mit dem Stack."})]})}function KX({title:e,hint:t}){return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl font-semibold",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),l.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:[l.jsx(l4,{className:"h-8 w-8 text-muted-foreground"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const tN=[{id:"mission-control-2",label:"Mission Control",type:"user",reach:"gateway (integr"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user",reach:"hermes-gateway"},{id:"mem0-service",label:"Mem0 (Gedächtnis)",type:"user",reach:"mem0"},{id:"voice-service",label:"Voice (Sprache)",type:"user",reach:"voice"},{id:"hermes-terminal",label:"Hermes Terminal",type:"user",reach:"hermes-terminal"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function iu({icon:e,iconClass:t,name:r,status:n,available:i,busy:o,actionLabel:u,onAction:c}){return l.jsxs("div",{className:ee("flex items-center gap-3 rounded-lg border px-3 py-2",i?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[l.jsx(e,{className:ee("h-4 w-4 shrink-0",t)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:r}),l.jsx("div",{className:ee("text-[10px] truncate",i?"text-amber-400/90":"text-muted-foreground"),children:n})]}),l.jsx("button",{onClick:c,disabled:!i||o,className:ee("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",i?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":u})]})}function GX({label:e,ok:t,system:r,busy:n,onRestart:i,onLogs:o}){return l.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[l.jsx("span",{className:ee("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),l.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&l.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),l.jsx("button",{onClick:i,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:l.jsx(ro,{className:ee("h-3.5 w-3.5",n&&"animate-spin")})}),l.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:l.jsx(c4,{className:"h-3.5 w-3.5"})})]})}function $g(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}const VX=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,qX=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function QX(e){return VX.test(e)?"error":qX.test(e)?"warn":"info"}const YX={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function XX({service:e,text:t,loading:r,logStatus:n,onRefresh:i,onOpenSettings:o}){const[u,c]=y.useState(!1),[f,h]=y.useState(""),m=y.useRef(null),g=y.useMemo(()=>t?t.split(` -`).map(S=>({t:S,level:QX(S)})):[],[t]),v=y.useMemo(()=>g.filter(S=>S.level!=="info").length,[g]),b=f.trim().toLowerCase(),j=g.filter(S=>(!u||S.level!=="info")&&(!b||S.t.toLowerCase().includes(b))),k=n==="password_required"||n==="incorrect_password";return l.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:[l.jsxs("div",{className:"flex h-10 items-center justify-between gap-2 px-3 border-b border-border/40 bg-black/30 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[l.jsx(RN,{className:"h-3 w-3 text-primary"}),l.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsxs("div",{className:"relative",children:[l.jsx(vy,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{value:f,onChange:S=>h(S.target.value),placeholder:"filtern…",className:"h-7 w-24 sm:w-36 rounded-md border border-border/50 bg-background/40 pl-6 pr-2 text-[10px] text-foreground outline-none focus:border-primary/50"})]}),l.jsxs("button",{onClick:()=>c(S=>!S),title:"Nur Fehler und Warnungen zeigen",className:ee("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",u?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[l.jsx(gn,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),l.jsx("button",{onClick:i,disabled:r,title:"Neu laden",className:"flex h-7 w-7 items-center justify-center rounded-md border border-border/50 bg-background/20 text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",children:l.jsx(ro,{className:ee("h-3 w-3",r&&"animate-spin")})})]})]}),l.jsx("div",{ref:m,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:k?l.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[l.jsx(gn,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),l.jsx("div",{className:"text-xs font-semibold text-amber-300",children:n==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),l.jsxs("p",{className:"max-w-xs text-[10px] leading-normal text-muted-foreground",children:["Für das Auslesen der systemd-Logs von ",e," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),l.jsx("button",{onClick:o,className:"mt-2 rounded-md bg-primary px-3 py-1.5 text-[10px] font-semibold text-primary-foreground transition-colors hover:bg-primary/95",children:"Sudo-Passwort eintragen"})]}):r&&!t?l.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):g.length===0?l.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):j.length===0?l.jsx("span",{className:"text-muted-foreground",children:u?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):j.map((S,N)=>l.jsx("div",{className:ee("whitespace-pre-wrap",YX[S.level]),children:S.t||" "},N))})]})}function ZX({open:e,showAlert:t}){const[r,n]=y.useState(""),[i,o]=y.useState(""),[u,c]=y.useState(!1),[f,h]=y.useState(!1);return y.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),l.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."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(Ks,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:u?"text":"password",value:r,onChange:m=>n(m.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,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"}),l.jsx("button",{type:"button",onClick:()=>c(!u),"aria-label":u?"Passwort verbergen":"Passwort anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:u?l.jsx(hw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(vu,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.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."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(v4,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:f?"text":"password",value:i,onChange:m=>o(m.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,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"}),l.jsx("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:f?l.jsx(hw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(vu,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.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."})]}),l.jsxs("div",{className:"flex gap-3 pt-2",children:[l.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",i),t("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"}),l.jsx("button",{onClick:()=>{n(""),o(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),t("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"})]})]})}function JX({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var f,h;const i=e.data,o={os:{icon:Ks,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:rh,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:TN,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:pn,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],u=o.icon,c=i?e.kind==="os"?(i.count??0)===0:e.kind==="hermes"?(i.behind??0)===0:i.installed_build!=null&&i.latest_build!=null&&i.latest_build<=i.installed_build:!0;return l.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[l.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),l.jsxs("div",{className:"relative w-full max-w-lg max-h-[80vh] flex flex-col rounded-2xl border border-border/60 bg-card shadow-2xl font-sans text-foreground",children:[l.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(u,{className:ee("h-4.5 w-4.5",o.cls)}),l.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),l.jsx("button",{onClick:r,className:"flex h-7 w-7 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?l.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[l.jsx(ro,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):i!=null&&i.error?l.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:i.error}):l.jsxs(l.Fragment,{children:[(i==null?void 0:i.action_needed)!=null&&l.jsxs("div",{className:ee("flex items-start gap-2 rounded-lg border p-3",i.action_needed?"border-amber-500/40 bg-amber-500/10":"border-emerald-500/40 bg-emerald-500/10"),children:[i.action_needed?l.jsx(gn,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):l.jsx(ON,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:ee("text-xs font-semibold",i.action_needed?"text-amber-300":"text-emerald-300"),children:["Musst du etwas tun? ",i.action_needed?"Ja":"Nein — die Box regelt das (Fangnetz)"]}),i.action_needed&&i.action_text&&l.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:i.action_text})]})]}),(i==null?void 0:i.summary)&&l.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),l.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:i.summary})]}),e.kind==="os"?l.jsxs(l.Fragment,{children:[((i==null?void 0:i.count)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[i.count," Paket(e) werden aktualisiert:"]}),l.jsx("div",{className:"space-y-1",children:i.packages.map(m=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(gw,{className:"h-3 w-3 text-cyan-400 shrink-0"}),m.name]}),l.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[l.jsx("span",{children:m.current}),l.jsx(Zd,{className:"h-3 w-3"}),l.jsx("span",{className:"text-emerald-400",children:m.candidate})]})]},m.name))})]}),(((f=i==null?void 0:i.held_back)==null?void 0:f.length)??0)>0&&l.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[l.jsx(_N,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),l.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Pakete gäbe es bereits, Ubuntu spielt sie aber gestaffelt aus (Phasen-Rollout) bzw. hält sie kurz zurück. Sie kommen bei einem der nächsten automatischen Läufe von selbst — das ist kein Fehler und nichts hängt fest."}),l.jsx("div",{className:"space-y-1",children:i.held_back.map(m=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/30 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(gw,{className:"h-3 w-3 text-muted-foreground shrink-0"}),m.name]}),l.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:m.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},m.name))})]})]}):e.kind==="engine"||e.kind==="swap"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[l.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(i==null?void 0:i.installed_build)??"?"]}),l.jsx(Zd,{className:"h-3.5 w-3.5 text-muted-foreground"}),l.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(i==null?void 0:i.latest_build)??"?"]})]}),((i==null?void 0:i.name)||(i==null?void 0:i.latest_tag))&&l.jsxs("div",{className:"text-muted-foreground",children:["Release: ",l.jsx("span",{className:"text-foreground",children:i==null?void 0:i.name}),i!=null&&i.latest_tag?` (${i.latest_tag})`:""]}),(i==null?void 0:i.url)&&l.jsxs("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Original-Release-Notes auf GitHub ",l.jsx(Ms,{className:"h-3 w-3"})]}),(i==null?void 0:i.body)&&l.jsxs("details",{className:"group",children:[l.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),l.jsx("pre",{className:"mt-1.5 whitespace-pre-wrap rounded-lg border border-border/40 bg-background/30 p-3 text-[10px] leading-relaxed text-muted-foreground max-h-60 overflow-y-auto scrollbar-thin",children:i.body})]})]}):(((h=i==null?void 0:i.commits)==null?void 0:h.length)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[i.behind," neue Commit(s) auf ",l.jsxs("span",{className:"font-mono text-foreground",children:["origin/",i.branch]}),":"]}),l.jsx("div",{className:"space-y-1",children:i.commits.map(m=>l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsx(h4,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[11px] truncate",children:m.subject}),l.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[m.hash," · ",m.when]})]})]},m.hash))})]}),e.kind!=="os"&&!c&&l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[l.jsx(IN,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),l.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Vor dem Update sichert die Box automatisch den alten Stand. Danach prüft sie den ganzen Stack per echter Anfrage — läuft etwas nicht, rollt sie von selbst zurück",e.kind==="hermes"?" und startet den Gateway neu":"","."]})]})]})}),l.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[l.jsx("button",{onClick:r,className:"h-9 flex-1 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold text-muted-foreground hover:bg-accent transition-colors cursor-pointer",children:"Schließen"}),l.jsx("button",{onClick:n,disabled:e.loading||c||!!t,title:t?`Update läuft bereits: ${t.label}`:void 0,className:"h-9 flex-1 rounded-lg bg-primary text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-40 disabled:cursor-default",children:t?"Update läuft…":"Jetzt aktualisieren"})]})]})]})}function e_({open:e,onClose:t,defaultTab:r="maintenance"}){var qe;const[n,i]=y.useState(null),[o,u]=y.useState([]),[c,f]=y.useState("llama-swap"),[h,m]=y.useState(""),[g,v]=y.useState(!1),[b,j]=y.useState(null),[k,S]=y.useState({}),[N,E]=y.useState("maintenance"),[A,P]=y.useState(!1),[_,O]=y.useState(""),[D,B]=y.useState(!1),[F,z]=y.useState(null),[Y,U]=y.useState([]),[he,ue]=y.useState(!1),[ge,ie]=y.useState(null),[se,X]=y.useState(null);function te(G,Ie,Xt){X({type:"alert",title:G,message:Ie,onConfirm:()=>{X(null),Xt&&Xt()}})}function J(G,Ie,Xt){X({type:"confirm",title:G,message:Ie,onConfirm:()=>{X(null),Xt()},onCancel:()=>X(null)})}function I(G){return G?new Date(G*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}y.useEffect(()=>{e&&r&&E(r)},[e,r]);function M(){je("/api/maintenance/updates").then(i).catch(G=>console.error("Error loading updates",G))}function H(){je("/api/jobs").then(G=>u(G.jobs||[])).catch(G=>console.error("Error loading jobs",G))}function ne(){je("/api/system/services").then(z).catch(()=>{})}function Z(){je("/api/system/backups").then(G=>U(G.backups||[])).catch(()=>{})}function me(G){v(!0),j(null),je(`/api/maintenance/logs?service=${G}&lines=150`).then(Ie=>{Ie.ok?m(Ie.text):(m(`Fehler beim Laden der Logs: ${Ie.err||"Unbekannter Fehler"}`),(Ie.status==="incorrect_password"||Ie.status==="password_required")&&j(Ie.status))}).catch(Ie=>m(`Fehler: ${Ie.message}`)).finally(()=>v(!1))}y.useEffect(()=>{if(!e)return;M(),H(),ne(),Z();const G=setInterval(()=>{H(),M(),ne()},3e3);return()=>clearInterval(G)},[e]),y.useEffect(()=>{!e||N!=="logs"||me(c)},[e,N,c]);function pe(G){return(G==null?void 0:G.status)==="busy"?(te("Update läuft bereits",`Es läuft gerade „${G.running}". Bitte warte, bis es fertig ist.`),H(),!0):!1}async function Oe(){try{const G=await je("/api/maintenance/os-update",{method:"POST"});if(pe(G))return;H(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Starten des OS-Updates: ${G.message}`)}}async function re(){try{const G=await je("/api/maintenance/engine-update",{method:"POST"});if(pe(G))return;H(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Engine-Update: ${G.message}`)}}async function we(){try{const G=await je("/api/maintenance/swap-update",{method:"POST"});if(pe(G))return;H(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Router-Update: ${G.message}`)}}async function _e(){ue(!0);try{const G=await je("/api/maintenance/hermes-update",{method:"POST"});if(pe(G))return;H()}catch(G){te("Fehler",`Hermes-Update fehlgeschlagen: ${G.message}`)}finally{ue(!1)}}async function ae(G){ie({kind:G,loading:!0,data:null});try{const Ie=await je(`/api/maintenance/update-details?kind=${G}`);ie({kind:G,loading:!1,data:Ie})}catch(Ie){ie({kind:G,loading:!1,data:{kind:G,error:Ie.message}})}}function et(){const G=ge==null?void 0:ge.kind;ie(null),G==="os"?Oe():G==="engine"?re():G==="swap"?we():G==="hermes"&&_e()}async function Be(){P(!0);try{await je("/api/maintenance/check-updates",{method:"POST"}),H(),E("maintenance")}catch(G){te("Fehler",`Fehler bei der Update-Suche: ${G.message}`)}finally{P(!1)}}async function Pe(G,Ie){try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:G,role:Ie})}),te("Gestartet",`Modell-Upgrade für '${Ie}' (${G}) gestartet.`),H(),E("maintenance")}catch(Xt){te("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Xt.message}`)}}async function vt(){J("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await je("/api/maintenance/reboot",{method:"POST"}),te("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(G){te("Fehler",`Fehler beim Reboot: ${G.message}`)}})}async function Yt(){B(!0),O("Snapshot wird erzeugt...");try{const G=await je("/api/system/backup",{method:"POST"});O(G.ok?`Snapshot erzeugt: ${G.snapshot} (${G.files.length} Komponenten)`:"Backup fehlgeschlagen."),Z()}catch(G){O(`Fehler: ${G.message}`)}finally{B(!1)}}async function K(G){S(Ie=>({...Ie,[G]:!0}));try{const Ie=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:G})});Ie.ok?te("Dienst neu gestartet",`Dienst ${G} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&c===G&&me(G)}):te("Fehler",`Fehler beim Neustart: ${Ie.err||"Unbekannter Fehler"}`)}catch(Ie){te("Fehler",`Fehler beim Neustart: ${Ie.message}`)}finally{S(Ie=>({...Ie,[G]:!1}))}}async function Ae(G){try{await je(`/api/jobs/${G}/cancel`,{method:"POST"}),H()}catch(Ie){te("Fehler",`Fehler beim Abbrechen: ${Ie.message}`)}}const Se=o.find(G=>(G.state==="running"||G.state==="queued")&&G.group==="maintenance");return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ee("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),l.jsxs("div",{className:ee("fixed inset-y-0 right-0 w-full sm:w-[640px] 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",e?"translate-x-0":"translate-x-full"),children:[l.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx($n,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),l.jsx("button",{onClick:t,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:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[l.jsx("button",{onClick:()=>E("maintenance"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),l.jsx("button",{onClick:()=>E("logs"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),l.jsx("button",{onClick:()=>E("settings"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"space-y-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),l.jsxs("button",{onClick:Be,disabled:A||!!Se,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[l.jsx(ro,{className:ee("h-3 w-3",A&&"animate-spin")})," Nach Updates suchen"]})]}),(n==null?void 0:n.last_check)&&l.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",I(n.last_check)]}),Se&&l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-300",children:[l.jsx(ro,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),l.jsxs("span",{children:["Update läuft: ",l.jsx("span",{className:"font-semibold",children:Se.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(iu,{icon:Ks,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("os")}),l.jsx(iu,{icon:rh,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("engine")}),l.jsx(iu,{icon:TN,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(n!=null&&n.swap),status:n!=null&&n.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("swap")}),(()=>{var Ie;const G=(Ie=n==null?void 0:n.components)==null?void 0:Ie.find(Xt=>Xt.key==="hermes_agent");return l.jsx(iu,{icon:pn,iconClass:"text-amber-400",name:"Hermes-Agent",available:(G==null?void 0:G.update)===!0,busy:he,status:(G==null?void 0:G.update)===!0?`Update: ${G.latest}`:(G==null?void 0:G.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("hermes")})})(),(qe=n==null?void 0:n.model_list)==null?void 0:qe.map(G=>l.jsx(iu,{icon:Z3,iconClass:"text-emerald-400",name:`Modell · ${G.role}`,available:!0,status:G.title,actionLabel:"Upgrade",onAction:()=>Pe(G.repo,G.role)},G.role))]})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),l.jsx("div",{className:"space-y-1.5",children:tN.map(G=>{var Ie;return l.jsx(GX,{label:G.label,system:G.type==="system",ok:(Ie=F==null?void 0:F.services.find(Xt=>Xt.name.toLowerCase().includes(G.reach)))==null?void 0:Ie.ok,busy:k[G.id],onRestart:()=>K(G.id),onLogs:()=>{f(G.id),E("logs")}},G.id)})})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),l.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:Y[0]?`Letztes: ${Y[0].snapshot}`:"Noch kein Backup"}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Y.length," Snapshots · Restore per CLI (restore.sh)"]})]}),l.jsxs("button",{onClick:Yt,disabled:D,className:"flex items-center gap-1.5 text-[11px] font-semibold rounded-lg px-2.5 py-1 bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shrink-0",children:[l.jsx(t4,{className:ee("h-3.5 w-3.5",D&&"animate-pulse")})," Snapshot"]})]}),_&&l.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:_})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),l.jsxs("button",{onClick:vt,className:"flex w-full items-center gap-3 p-3 rounded-lg 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:[l.jsx(O4,{className:"h-4.5 w-4.5"}),l.jsxs("div",{children:[l.jsx("div",{children:"Host-System neu starten"}),l.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),l.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(G=>G.state==="running"||G.state==="queued").length," Aktiv"]})]}),l.jsx("div",{className:"space-y-3",children:o.length===0?l.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."}):o.map(G=>{const Ie=G.state==="running"||G.state==="queued";return l.jsxs("div",{className:ee("p-3 rounded-xl border transition-all duration-300",Ie?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Ie&&l.jsxs("span",{className:"flex h-2 w-2 relative",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),G.label]}),l.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[l.jsxs("span",{children:["ID: ",G.id]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:ee(G.state==="done"&&"text-emerald-400",G.state==="failed"&&"text-red-400",G.state==="running"&&"text-primary",G.state==="queued"&&"text-amber-400",G.state==="canceled"&&"text-muted-foreground"),children:G.state})]})]}),Ie&&l.jsx("button",{onClick:()=>Ae(G.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"})]}),G.state==="running"&&l.jsxs("div",{className:"mt-3 space-y-1",children:[l.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${G.progress??0}%`}})}),l.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[l.jsxs("span",{children:[G.progress??0,"%"]}),G.done_bytes!=null&&G.total_bytes!=null&&l.jsxs("span",{children:[$g(G.done_bytes)," / ",$g(G.total_bytes),G.rate_bps!=null&&` (${$g(G.rate_bps)}/s)`]}),G.eta_s!=null&&l.jsxs("span",{children:["ETA: ",G.eta_s,"s"]})]})]})]},G.id)})})]})]}),N==="logs"&&l.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("select",{value:c,onChange:G=>f(G.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:tN.map(G=>l.jsxs("option",{value:G.id,children:[G.label," (",G.type==="system"?"systemd-root":"user",")"]},G.id))}),l.jsxs("button",{onClick:()=>K(c),disabled:k[c],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:[l.jsx(ro,{className:ee("h-3.5 w-3.5",k[c]&&"animate-spin")}),"Restart"]})]}),l.jsx(XX,{service:c,text:h,loading:g,logStatus:b,onRefresh:()=>me(c),onOpenSettings:()=>E("settings")})]}),N==="settings"&&l.jsx(ZX,{open:e,showAlert:te})]})]}),ge&&l.jsx(JX,{detail:ge,maintenanceJob:Se,onClose:()=>ie(null),onApply:et}),se&&l.jsx(WO,{type:se.type,title:se.title,message:se.message,onConfirm:se.onConfirm,onCancel:se.onCancel})]})}function eZ(){const{data:e}=lh(3e4),{data:t}=yi(),r=((e==null?void 0:e.os)||0)+((e==null?void 0:e.engine)||0)+((e==null?void 0:e.swap)||0)+((e==null?void 0:e.models)||0),n=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}})),i=(t==null?void 0:t.models)??[],o=(t==null?void 0:t.running)??[],u=i.find(m=>m.role==="hermes"),c=i.find(m=>m.role==="coder-lite")||i.find(m=>m.role==="coder"),f=m=>m?o.includes(m):!1,h=m=>{var g;return((g=m==null?void 0:m.split("/").pop())==null?void 0:g.replace(/\.gguf$/i,""))||"—"};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.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:"Basisstation"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geht's der Box gut, gibt's Updates, was läuft gerade."})]}),l.jsx(QO,{frame:"box"}),l.jsxs("button",{onClick:n,className:ee("w-full flex items-center gap-3 rounded-2xl border p-4 text-left transition-all cursor-pointer",r>0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border/60 bg-card/45 hover:border-primary/40"),children:[r>0?l.jsx(n4,{className:"h-6 w-6 shrink-0 text-amber-400"}):l.jsx(or,{className:"h-6 w-6 shrink-0 text-emerald-400"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:ee("text-sm font-semibold",r>0?"text-amber-400":"text-foreground"),children:r>0?`${r} Update${r===1?"":"s"} verfügbar`:"Alles aktuell"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r>0?"Antippen, um zu sehen, was genau aktualisiert wird.":"Keine ausstehenden Updates."})]}),r>0&&l.jsxs("span",{className:"shrink-0 flex items-center gap-1 text-xs font-semibold text-amber-400",children:["Ansehen ",l.jsx(eh,{className:"h-4 w-4"})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:"Was gerade läuft"}),l.jsx("div",{className:"rounded-2xl border border-border/60 overflow-hidden",children:[{icon:$n,label:"Lucys Hirn",model:u==null?void 0:u.name,warm:f(u==null?void 0:u.name)},{icon:Os,label:"Coder (Vibe-Coding)",model:c==null?void 0:c.name,warm:f(c==null?void 0:c.name)}].map(m=>l.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/40 last:border-0",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full",m.warm?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),l.jsx(m.icon,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsx("span",{className:"text-sm text-foreground w-40 shrink-0",children:m.label}),l.jsx("span",{className:"text-xs text-muted-foreground flex-1 truncate font-mono",children:h(m.model)}),l.jsx("span",{className:ee("text-xs shrink-0",m.warm?"text-emerald-400":"text-muted-foreground"),children:m.model?m.warm?"warm":"bereit":"nicht gesetzt"})]},m.label))})]}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[l.jsx(HO,{}),l.jsx(KO,{})]}),l.jsx(GO,{})]})}function zg({icon:e,title:t,sub:r,onClick:n}){return l.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-left transition-all hover:border-primary/40 cursor-pointer",children:[l.jsx(e,{className:"h-6 w-6 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm text-foreground",children:t}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r})]}),l.jsx(eh,{className:"h-5 w-5 text-muted-foreground shrink-0"})]})}function tZ(){const[e,t]=y.useState(null);return e?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[l.jsx(EN,{className:"h-4 w-4"})," Maschinenraum"]}),e==="modelle"?l.jsx(YO,{}):l.jsx(JO,{})]}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.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:"Maschinenraum"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Nur nötig, wenn du wirklich was ändern willst."})]}),l.jsx(N5,{})]}),l.jsx(zg,{icon:$n,title:"Modelle",sub:"Hirne, Coder, Immer-bereit-Set, Bibliothek",onClick:()=>t("modelle")}),l.jsx(zg,{icon:IN,title:"Wartung und Logs",sub:"Updates, Backup, Dienste, Logs, Zugangsdaten",onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}))}),l.jsx(zg,{icon:pn,title:"Hermes und Verdrahtung",sub:"Agent, Gehirn-Modell, PC-Verbindung",onClick:()=>t("hermes")})]})}const rZ=[{id:"start",label:"Start",icon:Jf},{id:"vibe",label:"Vibe-Coding",icon:Os},{id:"konstitution",label:"Konstitution",icon:X3},{id:"maschinenraum",label:"Maschinenraum",icon:Uu}];function nZ(){const[e,t]=y.useState("start"),[r,n]=y.useState(!1),[i,o]=y.useState("maintenance"),{data:u}=jy();y.useEffect(()=>{const f=h=>{var m;o(((m=h.detail)==null?void 0:m.tab)||"maintenance"),n(!0)};return window.addEventListener("open-system-drawer",f),()=>window.removeEventListener("open-system-drawer",f)},[]);const c=u&&u.engine_reachable&&(u.brain?u.brain.ready:!0);return l.jsxs("div",{className:"flex h-full relative",children:[l.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:l.jsx("div",{className:"absolute inset-0 opacity-30 animate-aurora bg-gradient-to-tr from-teal-500/15 via-indigo-500/10 to-purple-500/15 blur-[130px]"})}),l.jsx(e_,{open:r,onClose:()=>n(!1),defaultTab:i}),l.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-border/40",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20"}),l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-[10px] text-muted-foreground",children:"3 · Prototyp"})]})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4",children:rZ.map(f=>l.jsxs("button",{onClick:()=>t(f.id),className:ee("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-all cursor-pointer",e===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[l.jsx(f.icon,{className:"h-4.5 w-4.5 shrink-0"})," ",f.label]},f.id))}),l.jsxs("div",{className:"px-3 py-3 border-t border-border/40 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",c?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c?"Box läuft":"prüfen"]}),l.jsxs("a",{href:"#dashboard",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(EN,{className:"h-3.5 w-3.5"})," zurück zu MC2"]})]})]}),l.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto p-6 scrollbar-thin",children:[e==="start"&&l.jsx(eZ,{}),e==="vibe"&&l.jsx(XO,{}),e==="konstitution"&&l.jsx(ZO,{}),e==="maschinenraum"&&l.jsx(tZ,{})]})]})}function iZ(){var j,k,S,N,E;WD();const[e,t]=y.useState(()=>{const A=window.location.hash.slice(1);return ou.some(P=>P.id===A)?A:"dashboard"}),r=y.useCallback(A=>{window.location.hash.slice(1)===A?t(A):window.location.hash=A},[]),[n,i]=y.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,u]=y.useState(!1),[c,f]=y.useState("maintenance"),[h,m]=y.useState(()=>window.location.hash==="#mc3"),{data:g}=jy(),{data:v}=xo(2e4);y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const A=P=>{var O;f(((O=P.detail)==null?void 0:O.tab)||"maintenance"),u(!0)};return window.addEventListener("open-system-drawer",A),()=>window.removeEventListener("open-system-drawer",A)},[]),y.useEffect(()=>{const A=P=>{var O;const _=(O=P.detail)==null?void 0:O.view;_&&r(_)};return window.addEventListener("mc-navigate",A),()=>window.removeEventListener("mc-navigate",A)},[r]),y.useEffect(()=>{const A=()=>{m(window.location.hash==="#mc3");const P=window.location.hash.slice(1);ou.some(_=>_.id===P)&&t(P)};return window.addEventListener("hashchange",A),()=>window.removeEventListener("hashchange",A)},[]);const b=ou.find(A=>A.id===e);return h?l.jsx(nZ,{}):l.jsxs("div",{className:"flex h-full relative",children:[l.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[l.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]"}),l.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),l.jsx(YT,{onNavigate:r}),l.jsx(e_,{open:o,onClose:()=>u(!1),defaultTab:c}),l.jsxs("aside",{className:ee("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:[l.jsxs("div",{className:ee("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[l.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),l.jsx("button",{onClick:()=>{i(A=>{const P=!A;return localStorage.setItem("mc_sidebar_collapsed",P.toString()),P})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?l.jsx(eh,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(r4,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:ou.map(A=>l.jsxs("a",{href:`#${A.id}`,"aria-current":e===A.id?"page":void 0,className:ee("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",e===A.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?A.label:void 0,"aria-label":n?A.label:void 0,children:[l.jsx(A.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&l.jsx("span",{className:"truncate",children:A.label})]},A.id))}),l.jsx("div",{className:ee("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?l.jsx("div",{className:"flex justify-center",children:l.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",g?g.engine_reachable?g.brain&&!g.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:g?g.engine_reachable?g.brain&&!g.brain.ready?`Hirn offline (${g.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):l.jsxs("div",{className:"space-y-2 text-left",children:[g?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full animate-pulse",g.engine_reachable?"bg-emerald-500":"bg-amber-500")}),l.jsxs("span",{className:"truncate",children:["Engine ",g.engine_reachable?"online":"offline"]})]}),g.brain&&!g.brain.ready&&l.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${g.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),l.jsxs("span",{className:"truncate",children:["Hirn offline",g.brain.model?` (${g.brain.model})`:""]})]})]}):l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",l.jsx("span",{className:"truncate",children:"Backend offline"})]}),(v==null?void 0:v.versions)&&l.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[l.jsxs("div",{className:"truncate",title:v.versions.mc2?`${v.versions.mc2.branch}-${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""} (${v.versions.mc2.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"MC2:"})," ",v.versions.mc2?`${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:((j=v.versions.engine)==null?void 0:j.type)==="git"?`${v.versions.engine.branch}-${v.versions.engine.hash}${v.versions.engine.dirty?"*":""} (${v.versions.engine.date})`:((k=v.versions.engine)==null?void 0:k.version_text)||"unbekannt",children:[l.jsx("strong",{children:"Engine:"})," ",((S=v.versions.engine)==null?void 0:S.type)==="git"?`${v.versions.engine.hash}${v.versions.engine.dirty?"*":""}`:((E=(N=v.versions.engine)==null?void 0:N.version_text)==null?void 0:E.split(" ").pop())||"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_ui?`${v.versions.hermes_ui.branch}-${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""} (${v.versions.hermes_ui.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes UI:"})," ",v.versions.hermes_ui?`${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_agent?`${v.versions.hermes_agent.branch}-${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""} (${v.versions.hermes_agent.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes Agent:"})," ",v.versions.hermes_agent?`${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.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:[l.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(N5,{}),l.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"}),l.jsxs("button",{onClick:()=>{const A=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(A)},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:[l.jsx(s4,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:"Suchen"}),l.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),l.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&l.jsx(yX,{}),e==="models"&&l.jsx(IX,{}),e==="connect"&&l.jsx(XO,{}),e==="memory"&&l.jsx(ZO,{}),e==="agent"&&l.jsx(JO,{}),e==="terminal"&&l.jsx(UX,{}),e==="guide"&&l.jsx(WX,{}),!["dashboard","models","connect","memory","agent","terminal","guide"].includes(e)&&l.jsx(KX,{title:b.label,hint:b.hint})]})]})]})}class aZ extends dy.Component{constructor(){super(...arguments);qo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:l.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[l.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),l.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),l.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const oZ=new T3({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});l3.createRoot(document.getElementById("root")).render(l.jsx(dy.StrictMode,{children:l.jsx(aZ,{children:l.jsx(D3,{client:oZ,children:l.jsx(iZ,{})})})}));export{ro as R,us as S,nv as T,D4 as a,cy as g,l as j,y as r}; +...`}),l.jsxs("p",{children:["Suchen & installieren über die ",l.jsx("strong",{children:"skills.sh"}),"-Registry: ",l.jsx(ze,{children:"npx skills find"})," /",l.jsx(ze,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),l.jsxs(Or,{id:"memory",icon:a4,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["LLMs sind ",l.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",l.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:["extrahiert Fakten ",l.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),l.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),l.jsxs("li",{children:[l.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",l.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),l.jsxs(La,{children:["Dein Gedächtnis (Tab ",l.jsx("strong",{children:"Gedächtnis"}),") ist ",l.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",l.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",l.jsx(ze,{children:"Identität"})," · ",l.jsx(ze,{children:"Wissen"})," · ",l.jsx(ze,{children:"Regeln"})," · ",l.jsx(ze,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",l.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",l.jsx("br",{}),l.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),l.jsxs(Or,{id:"agents",icon:pn,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",l.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),l.jsxs("p",{children:[l.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",l.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),l.jsxs(La,{children:[l.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",l.jsx(ze,{children:"fast"}),"). Reden tust du mit ihm im",l.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",l.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",l.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",l.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),l.jsxs(Or,{id:"ide",icon:Os,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[l.jsxs("p",{children:["Jede ",l.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Cline"})," & ",l.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Continue"}),", ",l.jsx("strong",{children:"aider"})," (CLI), ",l.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),l.jsxs(La,{children:["Tipp den Kram nicht ab: der ",l.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",l.jsx(ze,{children:"…:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", Key beliebig."]})]}),l.jsx(Or,{id:"tricks",icon:y4,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:l.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([r,n])=>l.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[l.jsx(ha,{className:"h-3 w-3 text-amber-400"})," ",r]}),l.jsx("p",{className:"text-[11px]",children:n})]},r))})}),l.jsx(Or,{id:"wartung",icon:Ks,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(u4,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(Uu,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",l.jsx(ze,{children:"restore.sh"})," (Doku in ",l.jsx(ze,{children:"docs/BACKUP.md"}),")."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",l.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",l.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),l.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),l.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(Jg,{className:"h-5 w-5 text-primary"}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),l.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(Zd,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),l.jsx(bt,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),l.jsx(bt,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),l.jsx(bt,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),l.jsx(bt,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),l.jsx(bt,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(Jd,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),l.jsx(bt,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),l.jsx(bt,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),l.jsx(bt,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),l.jsx(bt,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(pn,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),l.jsx(bt,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),l.jsx(bt,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),l.jsx(bt,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),l.jsx(bt,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(Zg,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(bt,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),l.jsx(bt,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),l.jsx(bt,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),l.jsx(bt,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),l.jsx(bt,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),l.jsx(Or,{id:"troubleshooting",icon:v4,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:l.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",l.jsx(ze,{children:":9001"}),")? Backend-Status in der ",l.jsx("strong",{children:"Zentrale"})," prüfen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",l.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",l.jsx(ze,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",l.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",l.jsx(ze,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),l.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juni 2026 — lebendes Dokument, wächst mit dem Stack."})]})}function FX({title:e,hint:t}){return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl font-semibold",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),l.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:[l.jsx(i4,{className:"h-8 w-8 text-muted-foreground"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const J2=[{id:"mission-control-2",label:"Mission Control",type:"user",reach:"gateway (integr"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user",reach:"hermes-gateway"},{id:"mem0-service",label:"Mem0 (Gedächtnis)",type:"user",reach:"mem0"},{id:"voice-service",label:"Voice (Sprache)",type:"user",reach:"voice"},{id:"hermes-terminal",label:"Hermes Terminal",type:"user",reach:"hermes-terminal"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function iu({icon:e,iconClass:t,name:r,status:n,available:a,busy:o,actionLabel:u,onAction:c}){return l.jsxs("div",{className:ee("flex items-center gap-3 rounded-lg border px-3 py-2",a?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[l.jsx(e,{className:ee("h-4 w-4 shrink-0",t)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:r}),l.jsx("div",{className:ee("text-[10px] truncate",a?"text-amber-400/90":"text-muted-foreground"),children:n})]}),l.jsx("button",{onClick:c,disabled:!a||o,className:ee("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",a?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":u})]})}function BX({label:e,ok:t,system:r,busy:n,onRestart:a,onLogs:o}){return l.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[l.jsx("span",{className:ee("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),l.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&l.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),l.jsx("button",{onClick:a,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:l.jsx(ro,{className:ee("h-3.5 w-3.5",n&&"animate-spin")})}),l.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:l.jsx(o4,{className:"h-3.5 w-3.5"})})]})}function Rg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}const UX=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,HX=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function WX(e){return UX.test(e)?"error":HX.test(e)?"warn":"info"}const KX={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function GX({service:e,text:t,loading:r,logStatus:n,onRefresh:a,onOpenSettings:o}){const[u,c]=y.useState(!1),[f,h]=y.useState(""),m=y.useRef(null),g=y.useMemo(()=>t?t.split(` +`).map(S=>({t:S,level:WX(S)})):[],[t]),v=y.useMemo(()=>g.filter(S=>S.level!=="info").length,[g]),b=f.trim().toLowerCase(),j=g.filter(S=>(!u||S.level!=="info")&&(!b||S.t.toLowerCase().includes(b))),k=n==="password_required"||n==="incorrect_password";return l.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:[l.jsxs("div",{className:"flex h-10 items-center justify-between gap-2 px-3 border-b border-border/40 bg-black/30 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[l.jsx(IN,{className:"h-3 w-3 text-primary"}),l.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsxs("div",{className:"relative",children:[l.jsx(py,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{value:f,onChange:S=>h(S.target.value),placeholder:"filtern…",className:"h-7 w-24 sm:w-36 rounded-md border border-border/50 bg-background/40 pl-6 pr-2 text-[10px] text-foreground outline-none focus:border-primary/50"})]}),l.jsxs("button",{onClick:()=>c(S=>!S),title:"Nur Fehler und Warnungen zeigen",className:ee("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",u?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[l.jsx(gn,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),l.jsx("button",{onClick:a,disabled:r,title:"Neu laden",className:"flex h-7 w-7 items-center justify-center rounded-md border border-border/50 bg-background/20 text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",children:l.jsx(ro,{className:ee("h-3 w-3",r&&"animate-spin")})})]})]}),l.jsx("div",{ref:m,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:k?l.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[l.jsx(gn,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),l.jsx("div",{className:"text-xs font-semibold text-amber-300",children:n==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),l.jsxs("p",{className:"max-w-xs text-[10px] leading-normal text-muted-foreground",children:["Für das Auslesen der systemd-Logs von ",e," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),l.jsx("button",{onClick:o,className:"mt-2 rounded-md bg-primary px-3 py-1.5 text-[10px] font-semibold text-primary-foreground transition-colors hover:bg-primary/95",children:"Sudo-Passwort eintragen"})]}):r&&!t?l.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):g.length===0?l.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):j.length===0?l.jsx("span",{className:"text-muted-foreground",children:u?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):j.map((S,N)=>l.jsx("div",{className:ee("whitespace-pre-wrap",KX[S.level]),children:S.t||" "},N))})]})}function VX({open:e,showAlert:t}){const[r,n]=y.useState(""),[a,o]=y.useState(""),[u,c]=y.useState(!1),[f,h]=y.useState(!1);return y.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),l.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."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(Ks,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:u?"text":"password",value:r,onChange:m=>n(m.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,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"}),l.jsx("button",{type:"button",onClick:()=>c(!u),"aria-label":u?"Passwort verbergen":"Passwort anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:u?l.jsx(dw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(vu,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.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."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(m4,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:f?"text":"password",value:a,onChange:m=>o(m.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,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"}),l.jsx("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:f?l.jsx(dw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(vu,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.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."})]}),l.jsxs("div",{className:"flex gap-3 pt-2",children:[l.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",a),t("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"}),l.jsx("button",{onClick:()=>{n(""),o(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),t("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"})]})]})}function qX({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var f,h;const a=e.data,o={os:{icon:Ks,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:th,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:_N,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:pn,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],u=o.icon,c=a?e.kind==="os"?(a.count??0)===0:e.kind==="hermes"?(a.behind??0)===0:a.installed_build!=null&&a.latest_build!=null&&a.latest_build<=a.installed_build:!0;return l.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[l.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),l.jsxs("div",{className:"relative w-full max-w-lg max-h-[80vh] flex flex-col rounded-2xl border border-border/60 bg-card shadow-2xl font-sans text-foreground",children:[l.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(u,{className:ee("h-4.5 w-4.5",o.cls)}),l.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),l.jsx("button",{onClick:r,className:"flex h-7 w-7 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?l.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[l.jsx(ro,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):a!=null&&a.error?l.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:a.error}):l.jsxs(l.Fragment,{children:[(a==null?void 0:a.action_needed)!=null&&l.jsxs("div",{className:ee("flex items-start gap-2 rounded-lg border p-3",a.action_needed?"border-amber-500/40 bg-amber-500/10":"border-emerald-500/40 bg-emerald-500/10"),children:[a.action_needed?l.jsx(gn,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):l.jsx(CN,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:ee("text-xs font-semibold",a.action_needed?"text-amber-300":"text-emerald-300"),children:["Musst du etwas tun? ",a.action_needed?"Ja":"Nein — die Box regelt das (Fangnetz)"]}),a.action_needed&&a.action_text&&l.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:a.action_text})]})]}),(a==null?void 0:a.summary)&&l.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),l.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:a.summary})]}),e.kind==="os"?l.jsxs(l.Fragment,{children:[((a==null?void 0:a.count)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[a.count," Paket(e) werden aktualisiert:"]}),l.jsx("div",{className:"space-y-1",children:a.packages.map(m=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(mw,{className:"h-3 w-3 text-cyan-400 shrink-0"}),m.name]}),l.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[l.jsx("span",{children:m.current}),l.jsx(Xd,{className:"h-3 w-3"}),l.jsx("span",{className:"text-emerald-400",children:m.candidate})]})]},m.name))})]}),(((f=a==null?void 0:a.held_back)==null?void 0:f.length)??0)>0&&l.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[l.jsx(PN,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),l.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Pakete gäbe es bereits, Ubuntu spielt sie aber gestaffelt aus (Phasen-Rollout) bzw. hält sie kurz zurück. Sie kommen bei einem der nächsten automatischen Läufe von selbst — das ist kein Fehler und nichts hängt fest."}),l.jsx("div",{className:"space-y-1",children:a.held_back.map(m=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/30 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(mw,{className:"h-3 w-3 text-muted-foreground shrink-0"}),m.name]}),l.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:m.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},m.name))})]})]}):e.kind==="engine"||e.kind==="swap"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[l.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(a==null?void 0:a.installed_build)??"?"]}),l.jsx(Xd,{className:"h-3.5 w-3.5 text-muted-foreground"}),l.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(a==null?void 0:a.latest_build)??"?"]})]}),((a==null?void 0:a.name)||(a==null?void 0:a.latest_tag))&&l.jsxs("div",{className:"text-muted-foreground",children:["Release: ",l.jsx("span",{className:"text-foreground",children:a==null?void 0:a.name}),a!=null&&a.latest_tag?` (${a.latest_tag})`:""]}),(a==null?void 0:a.url)&&l.jsxs("a",{href:a.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Original-Release-Notes auf GitHub ",l.jsx(Ms,{className:"h-3 w-3"})]}),(a==null?void 0:a.body)&&l.jsxs("details",{className:"group",children:[l.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),l.jsx("pre",{className:"mt-1.5 whitespace-pre-wrap rounded-lg border border-border/40 bg-background/30 p-3 text-[10px] leading-relaxed text-muted-foreground max-h-60 overflow-y-auto scrollbar-thin",children:a.body})]})]}):(((h=a==null?void 0:a.commits)==null?void 0:h.length)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[a.behind," neue Commit(s) auf ",l.jsxs("span",{className:"font-mono text-foreground",children:["origin/",a.branch]}),":"]}),l.jsx("div",{className:"space-y-1",children:a.commits.map(m=>l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsx(c4,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[11px] truncate",children:m.subject}),l.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[m.hash," · ",m.when]})]})]},m.hash))})]}),e.kind!=="os"&&!c&&l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[l.jsx(ON,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),l.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Vor dem Update sichert die Box automatisch den alten Stand. Danach prüft sie den ganzen Stack per echter Anfrage — läuft etwas nicht, rollt sie von selbst zurück",e.kind==="hermes"?" und startet den Gateway neu":"","."]})]})]})}),l.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[l.jsx("button",{onClick:r,className:"h-9 flex-1 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold text-muted-foreground hover:bg-accent transition-colors cursor-pointer",children:"Schließen"}),l.jsx("button",{onClick:n,disabled:e.loading||c||!!t,title:t?`Update läuft bereits: ${t.label}`:void 0,className:"h-9 flex-1 rounded-lg bg-primary text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-40 disabled:cursor-default",children:t?"Update läuft…":"Jetzt aktualisieren"})]})]})]})}function YO({open:e,onClose:t,defaultTab:r="maintenance"}){var qe;const[n,a]=y.useState(null),[o,u]=y.useState([]),[c,f]=y.useState("llama-swap"),[h,m]=y.useState(""),[g,v]=y.useState(!1),[b,j]=y.useState(null),[k,S]=y.useState({}),[N,E]=y.useState("maintenance"),[A,P]=y.useState(!1),[_,O]=y.useState(""),[D,B]=y.useState(!1),[F,z]=y.useState(null),[Y,U]=y.useState([]),[he,ue]=y.useState(!1),[ge,ie]=y.useState(null),[se,X]=y.useState(null);function te(G,Ie,Xt){X({type:"alert",title:G,message:Ie,onConfirm:()=>{X(null),Xt&&Xt()}})}function J(G,Ie,Xt){X({type:"confirm",title:G,message:Ie,onConfirm:()=>{X(null),Xt()},onCancel:()=>X(null)})}function I(G){return G?new Date(G*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}y.useEffect(()=>{e&&r&&E(r)},[e,r]);function M(){je("/api/maintenance/updates").then(a).catch(G=>console.error("Error loading updates",G))}function H(){je("/api/jobs").then(G=>u(G.jobs||[])).catch(G=>console.error("Error loading jobs",G))}function ne(){je("/api/system/services").then(z).catch(()=>{})}function Z(){je("/api/system/backups").then(G=>U(G.backups||[])).catch(()=>{})}function me(G){v(!0),j(null),je(`/api/maintenance/logs?service=${G}&lines=150`).then(Ie=>{Ie.ok?m(Ie.text):(m(`Fehler beim Laden der Logs: ${Ie.err||"Unbekannter Fehler"}`),(Ie.status==="incorrect_password"||Ie.status==="password_required")&&j(Ie.status))}).catch(Ie=>m(`Fehler: ${Ie.message}`)).finally(()=>v(!1))}y.useEffect(()=>{if(!e)return;M(),H(),ne(),Z();const G=setInterval(()=>{H(),M(),ne()},3e3);return()=>clearInterval(G)},[e]),y.useEffect(()=>{!e||N!=="logs"||me(c)},[e,N,c]);function pe(G){return(G==null?void 0:G.status)==="busy"?(te("Update läuft bereits",`Es läuft gerade „${G.running}". Bitte warte, bis es fertig ist.`),H(),!0):!1}async function Oe(){try{const G=await je("/api/maintenance/os-update",{method:"POST"});if(pe(G))return;H(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Starten des OS-Updates: ${G.message}`)}}async function re(){try{const G=await je("/api/maintenance/engine-update",{method:"POST"});if(pe(G))return;H(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Engine-Update: ${G.message}`)}}async function we(){try{const G=await je("/api/maintenance/swap-update",{method:"POST"});if(pe(G))return;H(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Router-Update: ${G.message}`)}}async function _e(){ue(!0);try{const G=await je("/api/maintenance/hermes-update",{method:"POST"});if(pe(G))return;H()}catch(G){te("Fehler",`Hermes-Update fehlgeschlagen: ${G.message}`)}finally{ue(!1)}}async function ae(G){ie({kind:G,loading:!0,data:null});try{const Ie=await je(`/api/maintenance/update-details?kind=${G}`);ie({kind:G,loading:!1,data:Ie})}catch(Ie){ie({kind:G,loading:!1,data:{kind:G,error:Ie.message}})}}function et(){const G=ge==null?void 0:ge.kind;ie(null),G==="os"?Oe():G==="engine"?re():G==="swap"?we():G==="hermes"&&_e()}async function Be(){P(!0);try{await je("/api/maintenance/check-updates",{method:"POST"}),H(),E("maintenance")}catch(G){te("Fehler",`Fehler bei der Update-Suche: ${G.message}`)}finally{P(!1)}}async function Pe(G,Ie){try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:G,role:Ie})}),te("Gestartet",`Modell-Upgrade für '${Ie}' (${G}) gestartet.`),H(),E("maintenance")}catch(Xt){te("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Xt.message}`)}}async function vt(){J("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await je("/api/maintenance/reboot",{method:"POST"}),te("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(G){te("Fehler",`Fehler beim Reboot: ${G.message}`)}})}async function Yt(){B(!0),O("Snapshot wird erzeugt...");try{const G=await je("/api/system/backup",{method:"POST"});O(G.ok?`Snapshot erzeugt: ${G.snapshot} (${G.files.length} Komponenten)`:"Backup fehlgeschlagen."),Z()}catch(G){O(`Fehler: ${G.message}`)}finally{B(!1)}}async function K(G){S(Ie=>({...Ie,[G]:!0}));try{const Ie=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:G})});Ie.ok?te("Dienst neu gestartet",`Dienst ${G} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&c===G&&me(G)}):te("Fehler",`Fehler beim Neustart: ${Ie.err||"Unbekannter Fehler"}`)}catch(Ie){te("Fehler",`Fehler beim Neustart: ${Ie.message}`)}finally{S(Ie=>({...Ie,[G]:!1}))}}async function Ae(G){try{await je(`/api/jobs/${G}/cancel`,{method:"POST"}),H()}catch(Ie){te("Fehler",`Fehler beim Abbrechen: ${Ie.message}`)}}const Se=o.find(G=>(G.state==="running"||G.state==="queued")&&G.group==="maintenance");return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ee("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),l.jsxs("div",{className:ee("fixed inset-y-0 right-0 w-full sm:w-[640px] 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",e?"translate-x-0":"translate-x-full"),children:[l.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx($n,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),l.jsx("button",{onClick:t,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:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[l.jsx("button",{onClick:()=>E("maintenance"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),l.jsx("button",{onClick:()=>E("logs"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),l.jsx("button",{onClick:()=>E("settings"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"space-y-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),l.jsxs("button",{onClick:Be,disabled:A||!!Se,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[l.jsx(ro,{className:ee("h-3 w-3",A&&"animate-spin")})," Nach Updates suchen"]})]}),(n==null?void 0:n.last_check)&&l.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",I(n.last_check)]}),Se&&l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-300",children:[l.jsx(ro,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),l.jsxs("span",{children:["Update läuft: ",l.jsx("span",{className:"font-semibold",children:Se.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(iu,{icon:Ks,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("os")}),l.jsx(iu,{icon:th,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("engine")}),l.jsx(iu,{icon:_N,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(n!=null&&n.swap),status:n!=null&&n.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("swap")}),(()=>{var Ie;const G=(Ie=n==null?void 0:n.components)==null?void 0:Ie.find(Xt=>Xt.key==="hermes_agent");return l.jsx(iu,{icon:pn,iconClass:"text-amber-400",name:"Hermes-Agent",available:(G==null?void 0:G.update)===!0,busy:he,status:(G==null?void 0:G.update)===!0?`Update: ${G.latest}`:(G==null?void 0:G.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>ae("hermes")})})(),(qe=n==null?void 0:n.model_list)==null?void 0:qe.map(G=>l.jsx(iu,{icon:qM,iconClass:"text-emerald-400",name:`Modell · ${G.role}`,available:!0,status:G.title,actionLabel:"Upgrade",onAction:()=>Pe(G.repo,G.role)},G.role))]})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),l.jsx("div",{className:"space-y-1.5",children:J2.map(G=>{var Ie;return l.jsx(BX,{label:G.label,system:G.type==="system",ok:(Ie=F==null?void 0:F.services.find(Xt=>Xt.name.toLowerCase().includes(G.reach)))==null?void 0:Ie.ok,busy:k[G.id],onRestart:()=>K(G.id),onLogs:()=>{f(G.id),E("logs")}},G.id)})})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),l.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:Y[0]?`Letztes: ${Y[0].snapshot}`:"Noch kein Backup"}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Y.length," Snapshots · Restore per CLI (restore.sh)"]})]}),l.jsxs("button",{onClick:Yt,disabled:D,className:"flex items-center gap-1.5 text-[11px] font-semibold rounded-lg px-2.5 py-1 bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shrink-0",children:[l.jsx(XM,{className:ee("h-3.5 w-3.5",D&&"animate-pulse")})," Snapshot"]})]}),_&&l.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:_})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),l.jsxs("button",{onClick:vt,className:"flex w-full items-center gap-3 p-3 rounded-lg 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:[l.jsx(A4,{className:"h-4.5 w-4.5"}),l.jsxs("div",{children:[l.jsx("div",{children:"Host-System neu starten"}),l.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),l.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(G=>G.state==="running"||G.state==="queued").length," Aktiv"]})]}),l.jsx("div",{className:"space-y-3",children:o.length===0?l.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."}):o.map(G=>{const Ie=G.state==="running"||G.state==="queued";return l.jsxs("div",{className:ee("p-3 rounded-xl border transition-all duration-300",Ie?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Ie&&l.jsxs("span",{className:"flex h-2 w-2 relative",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),G.label]}),l.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[l.jsxs("span",{children:["ID: ",G.id]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:ee(G.state==="done"&&"text-emerald-400",G.state==="failed"&&"text-red-400",G.state==="running"&&"text-primary",G.state==="queued"&&"text-amber-400",G.state==="canceled"&&"text-muted-foreground"),children:G.state})]})]}),Ie&&l.jsx("button",{onClick:()=>Ae(G.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"})]}),G.state==="running"&&l.jsxs("div",{className:"mt-3 space-y-1",children:[l.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${G.progress??0}%`}})}),l.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[l.jsxs("span",{children:[G.progress??0,"%"]}),G.done_bytes!=null&&G.total_bytes!=null&&l.jsxs("span",{children:[Rg(G.done_bytes)," / ",Rg(G.total_bytes),G.rate_bps!=null&&` (${Rg(G.rate_bps)}/s)`]}),G.eta_s!=null&&l.jsxs("span",{children:["ETA: ",G.eta_s,"s"]})]})]})]},G.id)})})]})]}),N==="logs"&&l.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("select",{value:c,onChange:G=>f(G.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:J2.map(G=>l.jsxs("option",{value:G.id,children:[G.label," (",G.type==="system"?"systemd-root":"user",")"]},G.id))}),l.jsxs("button",{onClick:()=>K(c),disabled:k[c],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:[l.jsx(ro,{className:ee("h-3.5 w-3.5",k[c]&&"animate-spin")}),"Restart"]})]}),l.jsx(GX,{service:c,text:h,loading:g,logStatus:b,onRefresh:()=>me(c),onOpenSettings:()=>E("settings")})]}),N==="settings"&&l.jsx(VX,{open:e,showAlert:te})]})]}),ge&&l.jsx(qX,{detail:ge,maintenanceJob:Se,onClose:()=>ie(null),onApply:et}),se&&l.jsx(BO,{type:se.type,title:se.title,message:se.message,onConfirm:se.onConfirm,onCancel:se.onCancel})]})}function QX(){const{data:e}=sh(3e4),{data:t}=yi(),r=((e==null?void 0:e.os)||0)+((e==null?void 0:e.engine)||0)+((e==null?void 0:e.swap)||0)+((e==null?void 0:e.models)||0),n=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}})),a=(t==null?void 0:t.models)??[],o=(t==null?void 0:t.running)??[],u=a.find(m=>m.role==="hermes"),c=a.find(m=>m.role==="coder-lite")||a.find(m=>m.role==="coder"),f=m=>m?o.includes(m):!1,h=m=>{var g;return((g=m==null?void 0:m.split("/").pop())==null?void 0:g.replace(/\.gguf$/i,""))||"—"};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.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:"Basisstation"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geht's der Box gut, gibt's Updates, was läuft gerade."})]}),l.jsx(KO,{frame:"box"}),l.jsxs("button",{onClick:n,className:ee("w-full flex items-center gap-3 rounded-2xl border p-4 text-left transition-all cursor-pointer",r>0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border/60 bg-card/45 hover:border-primary/40"),children:[r>0?l.jsx(JM,{className:"h-6 w-6 shrink-0 text-amber-400"}):l.jsx(or,{className:"h-6 w-6 shrink-0 text-emerald-400"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:ee("text-sm font-semibold",r>0?"text-amber-400":"text-foreground"),children:r>0?`${r} Update${r===1?"":"s"} verfügbar`:"Alles aktuell"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r>0?"Antippen, um zu sehen, was genau aktualisiert wird.":"Keine ausstehenden Updates."})]}),r>0&&l.jsxs("span",{className:"shrink-0 flex items-center gap-1 text-xs font-semibold text-amber-400",children:["Ansehen ",l.jsx(Jf,{className:"h-4 w-4"})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:"Was gerade läuft"}),l.jsx("div",{className:"rounded-2xl border border-border/60 overflow-hidden",children:[{icon:$n,label:"Lucys Hirn",model:u==null?void 0:u.name,warm:f(u==null?void 0:u.name)},{icon:Os,label:"Coder (Vibe-Coding)",model:c==null?void 0:c.name,warm:f(c==null?void 0:c.name)}].map(m=>l.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/40 last:border-0",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full",m.warm?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),l.jsx(m.icon,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsx("span",{className:"text-sm text-foreground w-40 shrink-0",children:m.label}),l.jsx("span",{className:"text-xs text-muted-foreground flex-1 truncate font-mono",children:h(m.model)}),l.jsx("span",{className:ee("text-xs shrink-0",m.warm?"text-emerald-400":"text-muted-foreground"),children:m.model?m.warm?"warm":"bereit":"nicht gesetzt"})]},m.label))})]}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[l.jsx(FO,{}),l.jsx(UO,{})]})]})}function Lg({icon:e,title:t,sub:r,onClick:n}){return l.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-left transition-all hover:border-primary/40 cursor-pointer",children:[l.jsx(e,{className:"h-6 w-6 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm text-foreground",children:t}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r})]}),l.jsx(Jf,{className:"h-5 w-5 text-muted-foreground shrink-0"})]})}function YX(){const[e,t]=y.useState(null);return e?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[l.jsx(SN,{className:"h-4 w-4"})," Maschinenraum"]}),e==="modelle"?l.jsx(GO,{}):l.jsx(QO,{})]}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.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:"Maschinenraum"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Nur nötig, wenn du wirklich was ändern willst."})]}),l.jsx(kE,{})]}),l.jsx(Lg,{icon:$n,title:"Modelle",sub:"Hirne, Coder, Immer-bereit-Set, Bibliothek",onClick:()=>t("modelle")}),l.jsx(Lg,{icon:ON,title:"Wartung und Logs",sub:"Updates, Backup, Dienste, Logs, Zugangsdaten",onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}))}),l.jsx(Lg,{icon:pn,title:"Hermes und Verdrahtung",sub:"Agent, Gehirn-Modell, PC-Verbindung",onClick:()=>t("hermes")})]})}const XX=[{id:"start",label:"Start",icon:Zf},{id:"vibe",label:"Vibe-Coding",icon:Os},{id:"konstitution",label:"Konstitution",icon:VM},{id:"maschinenraum",label:"Maschinenraum",icon:Uu}];function ZX(){const[e,t]=y.useState("start"),[r,n]=y.useState(!1),[a,o]=y.useState("maintenance"),{data:u}=wy();y.useEffect(()=>{const f=h=>{var m;o(((m=h.detail)==null?void 0:m.tab)||"maintenance"),n(!0)};return window.addEventListener("open-system-drawer",f),()=>window.removeEventListener("open-system-drawer",f)},[]);const c=u&&u.engine_reachable&&(u.brain?u.brain.ready:!0);return l.jsxs("div",{className:"flex h-full relative",children:[l.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:l.jsx("div",{className:"absolute inset-0 opacity-30 animate-aurora bg-gradient-to-tr from-teal-500/15 via-indigo-500/10 to-purple-500/15 blur-[130px]"})}),l.jsx(YO,{open:r,onClose:()=>n(!1),defaultTab:a}),l.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-border/40",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20"}),l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-[10px] text-muted-foreground",children:"3 · Prototyp"})]})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4",children:XX.map(f=>l.jsxs("button",{onClick:()=>t(f.id),className:ee("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-all cursor-pointer",e===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[l.jsx(f.icon,{className:"h-4.5 w-4.5 shrink-0"})," ",f.label]},f.id))}),l.jsxs("div",{className:"px-3 py-3 border-t border-border/40 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",c?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c?"Box läuft":"prüfen"]}),l.jsxs("a",{href:"#dashboard",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(SN,{className:"h-3.5 w-3.5"})," zurück zu MC2"]})]})]}),l.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto p-6 scrollbar-thin",children:[e==="start"&&l.jsx(QX,{}),e==="vibe"&&l.jsx(VO,{}),e==="konstitution"&&l.jsx(qO,{}),e==="maschinenraum"&&l.jsx(YX,{})]})]})}function JX(){var j,k,S,N,E;FD();const[e,t]=y.useState(()=>{const A=window.location.hash.slice(1);return ou.some(P=>P.id===A)?A:"dashboard"}),r=y.useCallback(A=>{window.location.hash.slice(1)===A?t(A):window.location.hash=A},[]),[n,a]=y.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,u]=y.useState(!1),[c,f]=y.useState("maintenance"),[h,m]=y.useState(()=>window.location.hash==="#mc3"),{data:g}=wy(),{data:v}=xo(2e4);y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const A=P=>{var O;f(((O=P.detail)==null?void 0:O.tab)||"maintenance"),u(!0)};return window.addEventListener("open-system-drawer",A),()=>window.removeEventListener("open-system-drawer",A)},[]),y.useEffect(()=>{const A=P=>{var O;const _=(O=P.detail)==null?void 0:O.view;_&&r(_)};return window.addEventListener("mc-navigate",A),()=>window.removeEventListener("mc-navigate",A)},[r]),y.useEffect(()=>{const A=()=>{m(window.location.hash==="#mc3");const P=window.location.hash.slice(1);ou.some(_=>_.id===P)&&t(P)};return window.addEventListener("hashchange",A),()=>window.removeEventListener("hashchange",A)},[]);const b=ou.find(A=>A.id===e);return h?l.jsx(ZX,{}):l.jsxs("div",{className:"flex h-full relative",children:[l.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[l.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]"}),l.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),l.jsx(VT,{onNavigate:r}),l.jsx(YO,{open:o,onClose:()=>u(!1),defaultTab:c}),l.jsxs("aside",{className:ee("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:[l.jsxs("div",{className:ee("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[l.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),l.jsx("button",{onClick:()=>{a(A=>{const P=!A;return localStorage.setItem("mc_sidebar_collapsed",P.toString()),P})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?l.jsx(Jf,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(ZM,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:ou.map(A=>l.jsxs("a",{href:`#${A.id}`,"aria-current":e===A.id?"page":void 0,className:ee("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",e===A.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?A.label:void 0,"aria-label":n?A.label:void 0,children:[l.jsx(A.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&l.jsx("span",{className:"truncate",children:A.label})]},A.id))}),l.jsx("div",{className:ee("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?l.jsx("div",{className:"flex justify-center",children:l.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",g?g.engine_reachable?g.brain&&!g.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:g?g.engine_reachable?g.brain&&!g.brain.ready?`Hirn offline (${g.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):l.jsxs("div",{className:"space-y-2 text-left",children:[g?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full animate-pulse",g.engine_reachable?"bg-emerald-500":"bg-amber-500")}),l.jsxs("span",{className:"truncate",children:["Engine ",g.engine_reachable?"online":"offline"]})]}),g.brain&&!g.brain.ready&&l.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${g.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),l.jsxs("span",{className:"truncate",children:["Hirn offline",g.brain.model?` (${g.brain.model})`:""]})]})]}):l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",l.jsx("span",{className:"truncate",children:"Backend offline"})]}),(v==null?void 0:v.versions)&&l.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[l.jsxs("div",{className:"truncate",title:v.versions.mc2?`${v.versions.mc2.branch}-${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""} (${v.versions.mc2.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"MC2:"})," ",v.versions.mc2?`${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:((j=v.versions.engine)==null?void 0:j.type)==="git"?`${v.versions.engine.branch}-${v.versions.engine.hash}${v.versions.engine.dirty?"*":""} (${v.versions.engine.date})`:((k=v.versions.engine)==null?void 0:k.version_text)||"unbekannt",children:[l.jsx("strong",{children:"Engine:"})," ",((S=v.versions.engine)==null?void 0:S.type)==="git"?`${v.versions.engine.hash}${v.versions.engine.dirty?"*":""}`:((E=(N=v.versions.engine)==null?void 0:N.version_text)==null?void 0:E.split(" ").pop())||"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_ui?`${v.versions.hermes_ui.branch}-${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""} (${v.versions.hermes_ui.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes UI:"})," ",v.versions.hermes_ui?`${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_agent?`${v.versions.hermes_agent.branch}-${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""} (${v.versions.hermes_agent.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes Agent:"})," ",v.versions.hermes_agent?`${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.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:[l.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(kE,{}),l.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"}),l.jsxs("button",{onClick:()=>{const A=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(A)},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:[l.jsx(n4,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:"Suchen"}),l.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),l.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&l.jsx(hX,{}),e==="models"&&l.jsx(CX,{}),e==="connect"&&l.jsx(VO,{}),e==="memory"&&l.jsx(qO,{}),e==="agent"&&l.jsx(QO,{}),e==="terminal"&&l.jsx(LX,{}),e==="guide"&&l.jsx(zX,{}),!["dashboard","models","connect","memory","agent","terminal","guide"].includes(e)&&l.jsx(FX,{title:b.label,hint:b.hint})]})]})]})}class eZ extends uy.Component{constructor(){super(...arguments);qo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:l.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[l.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),l.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),l.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const tZ=new OM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});iM.createRoot(document.getElementById("root")).render(l.jsx(uy.StrictMode,{children:l.jsx(eZ,{children:l.jsx(_M,{client:tZ,children:l.jsx(JX,{})})})}));export{ro as R,us as S,tv as T,M4 as a,ly as g,l as j,y as r}; diff --git a/frontend/dist/index.html b/frontend/dist/index.html index c1ea626..1f8cf32 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,8 +7,8 @@ Mission Control 2.0 - - + +
diff --git a/frontend/src/components/dashboard/VoiceLatencyCard.tsx b/frontend/src/components/dashboard/VoiceLatencyCard.tsx deleted file mode 100644 index 4ae76b2..0000000 --- a/frontend/src/components/dashboard/VoiceLatencyCard.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { Gauge } from "lucide-react" -import { useVoiceMetrics } from "@/lib/queries" -import type { VoiceStageStat } from "@/lib/api" - -// Stabile Reihenfolge + deutsche Labels, spiegelt STAGES in backend/services/voice_metrics.py. -const STAGES: { key: string; label: string; hint: string }[] = [ - { key: "stt", label: "STT", hint: "Sprache → Text" }, - { key: "vision", label: "Bildschirm-Sicht", hint: "Vision-Beschreibung" }, - { key: "chat_ttfb", label: "Chat-TTFB", hint: "Zeit bis 1. Token" }, - { key: "tts", label: "TTS", hint: "Text → Sprache" }, -] - -function fmtMs(ms?: number): string { - if (ms == null) return "—" - return ms >= 1000 ? `${(ms / 1000).toFixed(2)} s` : `${Math.round(ms)} ms` -} - -// p95 relativ zum langsamsten p95 aller Stufen → grobe Balkenlänge. -function StageRow({ stat, label, hint, maxP95 }: { stat?: VoiceStageStat; label: string; hint: string; maxP95: number }) { - const has = !!stat && stat.count > 0 - const pct = has && stat!.p95_ms && maxP95 > 0 ? Math.max(4, Math.min(100, (stat!.p95_ms! / maxP95) * 100)) : 0 - return ( -
-
-
- {label} - {hint} -
- {has ? ( - {fmtMs(stat!.p50_ms)} - ) : ( - noch keine Messungen - )} -
-
-
-
- {has && ( -
- p50 {fmtMs(stat!.p50_ms)} - p95 {fmtMs(stat!.p95_ms)} - zuletzt {fmtMs(stat!.last_ms)} - · n={stat!.count} -
- )} -
- ) -} - -export function VoiceLatencyCard() { - const { data: metrics } = useVoiceMetrics(5_000) - const maxP95 = Math.max(1, ...STAGES.map((s) => metrics?.[s.key]?.p95_ms ?? 0)) - const anyData = STAGES.some((s) => (metrics?.[s.key]?.count ?? 0) > 0) - - return ( -
-
- -

Sprach-Latenz

- - live - -
- -
- {STAGES.map((s) => ( - - ))} -
- -
- {anyData - ? "Server-seitige Dauer je Pipeline-Stufe (p50 prominent). Rollender Schnitt über die letzten Turns; Reset bei Neustart." - : "Noch keine Voice-Turns gemessen — sprich einmal über den „Sprechen“-Tab, dann erscheinen hier STT/Vision/Chat/TTS."} -
-
- ) -} diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 75b1643..ac27cad 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -225,17 +225,6 @@ export const getRoutingPolicy = () => api("/api/routing/polic export const updateRoutingPolicy = (patch: Partial) => api<{ policy: RoutingPolicy }>("/api/routing/policy", { method: "PUT", body: JSON.stringify(patch) }) -// Per-Stage-Latenz der Voice/Lucy-Pipeline (GET /api/voice/metrics, C2). -// Schlüssel = Stufe (stt|vision|chat_ttfb|tts), Wert = rollende Statistik. -export interface VoiceStageStat { - count: number - avg_ms?: number - p50_ms?: number - p95_ms?: number - last_ms?: number -} -export type VoiceMetrics = Record - export interface GitInfo { hash: string date: string diff --git a/frontend/src/lib/queries.ts b/frontend/src/lib/queries.ts index b68e6e4..67416c8 100644 --- a/frontend/src/lib/queries.ts +++ b/frontend/src/lib/queries.ts @@ -23,7 +23,6 @@ import { type SystemStatus, type TokenStats, type UpdatesResp, - type VoiceMetrics, } from "./api" // Zentrale Query-Keys (eine Quelle der Wahrheit für invalidate). @@ -35,7 +34,6 @@ export const qk = { groups: ["groups"] as const, routing: ["routing"] as const, routingPolicy: ["routing-policy"] as const, - voiceMetrics: ["voice-metrics"] as const, jobs: ["jobs"] as const, tokenStats: ["token-stats"] as const, agentStatus: ["agent-status"] as const, @@ -74,9 +72,6 @@ export const useGroups = (refetchInterval = 8_000) => export const useRouting = (refetchInterval = 4_000) => useQuery({ queryKey: qk.routing, queryFn: () => api("/api/routing"), refetchInterval }) -export const useVoiceMetrics = (refetchInterval = 5_000) => - useQuery({ queryKey: qk.voiceMetrics, queryFn: () => api("/api/voice/metrics"), refetchInterval }) - export const useRoutingPolicy = () => useQuery({ queryKey: qk.routingPolicy, queryFn: () => api("/api/routing/policy") }) diff --git a/frontend/src/mc3/Mc3Start.tsx b/frontend/src/mc3/Mc3Start.tsx index 9f964f8..87f6bf5 100644 --- a/frontend/src/mc3/Mc3Start.tsx +++ b/frontend/src/mc3/Mc3Start.tsx @@ -2,7 +2,6 @@ import { ArrowUpCircle, ChevronRight, Check, Cpu, Code } from "lucide-react" import { LucyHealthCard } from "@/components/dashboard/LucyHealthCard" import { SystemStatusCard } from "@/components/dashboard/SystemStatusCard" import { TokenPerformanceCard } from "@/components/dashboard/TokenPerformanceCard" -import { VoiceLatencyCard } from "@/components/dashboard/VoiceLatencyCard" import { useUpdates, useModels } from "@/lib/queries" import { cn } from "@/lib/utils" @@ -89,7 +88,6 @@ export function Mc3Start() {
- ) } diff --git a/frontend/src/views/DashboardView.tsx b/frontend/src/views/DashboardView.tsx index ff3c9db..51a0fe2 100644 --- a/frontend/src/views/DashboardView.tsx +++ b/frontend/src/views/DashboardView.tsx @@ -4,7 +4,6 @@ import { AgentStatusCard } from "@/components/dashboard/AgentStatusCard" import { MemoryInputCard } from "@/components/dashboard/MemoryInputCard" import { TokenPerformanceCard } from "@/components/dashboard/TokenPerformanceCard" import { ServicesCard } from "@/components/dashboard/ServicesCard" -import { VoiceLatencyCard } from "@/components/dashboard/VoiceLatencyCard" import { ModelsCard } from "@/components/dashboard/ModelsCard" import { LucyHealthCard } from "@/components/dashboard/LucyHealthCard" @@ -35,10 +34,7 @@ export function DashboardView() { {/* Stack & Telemetrie */}
Stack & Telemetrie -
- - -
+
{/* Betrieb & Wissen */}