@alexberardi/jarvis-admin 0.1.43 → 0.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/assets/{index-BT65KSVt.js → index-DM5TSQCx.js} +1 -1
- package/public/index.html +1 -1
- package/server/dist/routes/install.d.ts.map +1 -1
- package/server/dist/routes/install.js +3 -2
- package/server/dist/routes/install.js.map +1 -1
- package/server/dist/services/generators/compose-generator.js +7 -6
- package/server/dist/services/generators/compose-generator.js.map +1 -1
- package/server/dist/services/upgrade/compose-upgrader.d.ts +1 -0
- package/server/dist/services/upgrade/compose-upgrader.d.ts.map +1 -1
- package/server/dist/services/upgrade/compose-upgrader.js +3 -0
- package/server/dist/services/upgrade/compose-upgrader.js.map +1 -1
- package/server/dist/services/upgrade/state-reconstructor.d.ts.map +1 -1
- package/server/dist/services/upgrade/state-reconstructor.js +1 -0
- package/server/dist/services/upgrade/state-reconstructor.js.map +1 -1
- package/server/dist/types/wizard.d.ts +1 -0
- package/server/dist/types/wizard.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -15,4 +15,4 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
|
|
|
15
15
|
`):" "+fg(m[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return d}const Tx={getAdapter:XS,adapters:wd};function Uu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ns(null,n)}function mg(n){return Uu(n),n.headers=Vt.from(n.headers),n.data=Du.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Tx.getAdapter(n.adapter||Ss.adapter,n)(n).then(function(i){return Uu(n),i.data=Du.call(n,n.transformResponse,i),i.headers=Vt.from(i.headers),i},function(i){return Sx(i)||(Uu(n),i&&i.response&&(i.response.data=Du.call(n,n.transformResponse,i.response),i.response.headers=Vt.from(i.response.headers))),Promise.reject(i)})}const Rx="1.13.4",uo={};["object","boolean","number","function","string","symbol"].forEach((n,r)=>{uo[n]=function(i){return typeof i===n||"a"+(r<1?"n ":" ")+n}});const hg={};uo.transitional=function(r,s,i){function d(f,m){return"[Axios v"+Rx+"] Transitional option '"+f+"'"+m+(i?". "+i:"")}return(f,m,x)=>{if(r===!1)throw new ve(d(m," has been removed"+(s?" in "+s:"")),ve.ERR_DEPRECATED);return s&&!hg[m]&&(hg[m]=!0,console.warn(d(m," has been deprecated since v"+s+" and will be removed in the near future"))),r?r(f,m,x):!0}};uo.spelling=function(r){return(s,i)=>(console.warn(`${i} is likely a misspelling of ${r}`),!0)};function FS(n,r,s){if(typeof n!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let d=i.length;for(;d-- >0;){const f=i[d],m=r[f];if(m){const x=n[f],v=x===void 0||m(x,f,n);if(v!==!0)throw new ve("option "+f+" must be "+v,ve.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new ve("Unknown option "+f,ve.ERR_BAD_OPTION)}}const $i={assertOptions:FS,validators:uo},Aa=$i.validators;let sl=class{constructor(r){this.defaults=r||{},this.interceptors={request:new ag,response:new ag}}async request(r,s){try{return await this._request(r,s)}catch(i){if(i instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const f=d.stack?d.stack.replace(/^.+\n/,""):"";try{i.stack?f&&!String(i.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
16
16
|
`+f):i.stack=f}catch{}}throw i}}_request(r,s){typeof r=="string"?(s=s||{},s.url=r):s=r||{},s=cl(this.defaults,s);const{transitional:i,paramsSerializer:d,headers:f}=s;i!==void 0&&$i.assertOptions(i,{silentJSONParsing:Aa.transitional(Aa.boolean),forcedJSONParsing:Aa.transitional(Aa.boolean),clarifyTimeoutError:Aa.transitional(Aa.boolean)},!1),d!=null&&(q.isFunction(d)?s.paramsSerializer={serialize:d}:$i.assertOptions(d,{encode:Aa.function,serialize:Aa.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),$i.assertOptions(s,{baseUrl:Aa.spelling("baseURL"),withXsrfToken:Aa.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let m=f&&q.merge(f.common,f[s.method]);f&&q.forEach(["delete","get","head","post","put","patch","common"],N=>{delete f[N]}),s.headers=Vt.concat(m,f);const x=[];let v=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(s)===!1||(v=v&&j.synchronous,x.unshift(j.fulfilled,j.rejected))});const g=[];this.interceptors.response.forEach(function(j){g.push(j.fulfilled,j.rejected)});let y,p=0,w;if(!v){const N=[mg.bind(this),void 0];for(N.unshift(...x),N.push(...g),w=N.length,y=Promise.resolve(s);p<w;)y=y.then(N[p++],N[p++]);return y}w=x.length;let M=s;for(;p<w;){const N=x[p++],j=x[p++];try{M=N(M)}catch(R){j.call(this,R);break}}try{y=mg.call(this,M)}catch(N){return Promise.reject(N)}for(p=0,w=g.length;p<w;)y=y.then(g[p++],g[p++]);return y}getUri(r){r=cl(this.defaults,r);const s=wx(r.baseURL,r.url,r.allowAbsoluteUrls);return vx(s,r.params,r.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(r){sl.prototype[r]=function(s,i){return this.request(cl(i||{},{method:r,url:s,data:(i||{}).data}))}});q.forEach(["post","put","patch"],function(r){function s(i){return function(f,m,x){return this.request(cl(x||{},{method:r,headers:i?{"Content-Type":"multipart/form-data"}:{},url:f,data:m}))}}sl.prototype[r]=s(),sl.prototype[r+"Form"]=s(!0)});let KS=class Cx{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(f){s=f});const i=this;this.promise.then(d=>{if(!i._listeners)return;let f=i._listeners.length;for(;f-- >0;)i._listeners[f](d);i._listeners=null}),this.promise.then=d=>{let f;const m=new Promise(x=>{i.subscribe(x),f=x}).then(d);return m.cancel=function(){i.unsubscribe(f)},m},r(function(f,m,x){i.reason||(i.reason=new Ns(f,m,x),s(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const s=this._listeners.indexOf(r);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const r=new AbortController,s=i=>{r.abort(i)};return this.subscribe(s),r.signal.unsubscribe=()=>this.unsubscribe(s),r.signal}static source(){let r;return{token:new Cx(function(d){r=d}),cancel:r}}};function ZS(n){return function(s){return n.apply(null,s)}}function JS(n){return q.isObject(n)&&n.isAxiosError===!0}const ad={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ad).forEach(([n,r])=>{ad[r]=n});function _x(n){const r=new sl(n),s=ix(sl.prototype.request,r);return q.extend(s,sl.prototype,r,{allOwnKeys:!0}),q.extend(s,r,null,{allOwnKeys:!0}),s.create=function(d){return _x(cl(n,d))},s}const nt=_x(Ss);nt.Axios=sl;nt.CanceledError=Ns;nt.CancelToken=KS;nt.isCancel=Sx;nt.VERSION=Rx;nt.toFormData=co;nt.AxiosError=ve;nt.Cancel=nt.CanceledError;nt.all=function(r){return Promise.all(r)};nt.spread=ZS;nt.isAxiosError=JS;nt.mergeConfig=cl;nt.AxiosHeaders=Vt;nt.formToJSON=n=>bx(q.isHTMLForm(n)?new FormData(n):n);nt.getAdapter=Tx.getAdapter;nt.HttpStatusCode=ad;nt.default=nt;const{Axios:KE,AxiosError:ZE,CanceledError:JE,isCancel:$E,CancelToken:PE,VERSION:IE,all:WE,Cancel:e4,isAxiosError:t4,spread:a4,toFormData:n4,AxiosHeaders:l4,HttpStatusCode:r4,formToJSON:s4,getAdapter:i4,mergeConfig:o4}=nt,Me=nt.create({baseURL:""});function tr(n){n?Me.defaults.headers.common.Authorization=`Bearer ${n}`:delete Me.defaults.headers.common.Authorization}let nd=null;function $S(n){nd=n}let Mx=null;function PS(n){Mx=n}Me.interceptors.request.use(n=>{if(!n.headers.Authorization){const r=localStorage.getItem("jarvis-admin:access_token")??localStorage.getItem("access_token");r&&(n.headers.Authorization=`Bearer ${r}`)}return n});Me.interceptors.response.use(n=>n,async n=>{const r=n.config;if(r.url?.startsWith("/api/auth/"))return Promise.reject(n);if(n.response?.status===401&&!r._retry&&nd){r._retry=!0;const s=await nd();if(s)return r.headers.Authorization=`Bearer ${s}`,Me(r);Mx?.()}return Promise.reject(n)});async function IS(){const{data:n}=await Me.get("/api/auth/setup-status");return n}async function Ax(n,r,s){const{data:i}=await Me.post("/api/auth/setup",{email:n,password:r,username:s});return i}async function WS(n,r){const{data:s}=await Me.post("/api/auth/login",{email:n,password:r});return s}async function eN(n){const{data:r}=await Me.post("/api/auth/refresh",{refresh_token:n});return r}const Ox=S.createContext(void 0),us="jarvis-admin:access_token",Wl="jarvis-admin:refresh_token",Gi="jarvis-admin:user",tN=600*1e3;function aN({children:n}){const[r,s]=S.useState(()=>{const v=localStorage.getItem(us),g=localStorage.getItem(Wl),y=localStorage.getItem(Gi);if(v&&g&&y)try{const p=JSON.parse(y);return tr(v),{user:p,accessToken:v,refreshToken:g,isAuthenticated:!0,isLoading:!1,error:null}}catch{}return{user:null,accessToken:null,refreshToken:null,isAuthenticated:!1,isLoading:!1,error:null}}),i=S.useCallback(()=>{localStorage.removeItem(us),localStorage.removeItem(Wl),localStorage.removeItem(Gi),tr(null),s({user:null,accessToken:null,refreshToken:null,isAuthenticated:!1,isLoading:!1,error:null})},[]),d=S.useCallback(async()=>{const v=localStorage.getItem(Wl);if(!v)return null;try{const g=await eN(v),y=g.access_token,p=g.refresh_token??v;return localStorage.setItem(us,y),localStorage.setItem(Wl,p),tr(y),s(w=>({...w,accessToken:y,refreshToken:p})),y}catch{return i(),null}},[i]);S.useEffect(()=>{$S(d),PS(i)},[d,i]),S.useEffect(()=>{if(!r.isAuthenticated)return;const v=setInterval(()=>{d()},tN);return()=>clearInterval(v)},[r.isAuthenticated,d]);const f=S.useCallback(async(v,g)=>{s(y=>({...y,error:null,isLoading:!0}));try{const y=await WS(v,g);if(!y.user.is_superuser){s(p=>({...p,isLoading:!1,error:"Admin access required. This account is not a superuser."}));return}localStorage.setItem(us,y.access_token),localStorage.setItem(Wl,y.refresh_token),localStorage.setItem(Gi,JSON.stringify(y.user)),tr(y.access_token),s({user:y.user,accessToken:y.access_token,refreshToken:y.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(y){const p=y?.response?.data?.detail??"Login failed";s(w=>({...w,isLoading:!1,error:p}))}},[]),m=S.useCallback(async(v,g,y)=>{s(p=>({...p,error:null,isLoading:!0}));try{const p=await Ax(v,g,y);localStorage.setItem(us,p.access_token),localStorage.setItem(Wl,p.refresh_token),localStorage.setItem(Gi,JSON.stringify(p.user)),tr(p.access_token),s({user:p.user,accessToken:p.access_token,refreshToken:p.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(p){const w=p?.response?.data?.detail??"Setup failed";s(M=>({...M,isLoading:!1,error:w}))}},[]),x=S.useMemo(()=>({state:r,login:f,setup:m,logout:i}),[r,f,m,i]);return c.jsx(Ox.Provider,{value:x,children:n})}function jd(){const n=S.useContext(Ox);if(!n)throw new Error("useAuth must be used within AuthProvider");return n}const zx=(...n)=>n.filter((r,s,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===s).join(" ").trim();const nN=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const lN=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,i)=>i?i.toUpperCase():s.toLowerCase());const pg=n=>{const r=lN(n);return r.charAt(0).toUpperCase()+r.slice(1)};var rN={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"};const sN=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const iN=S.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:d="",children:f,iconNode:m,...x},v)=>S.createElement("svg",{ref:v,...rN,width:r,height:r,stroke:n,strokeWidth:i?Number(s)*24/Number(r):s,className:zx("lucide",d),...!f&&!sN(x)&&{"aria-hidden":"true"},...x},[...m.map(([g,y])=>S.createElement(g,y)),...Array.isArray(f)?f:[f]]));const we=(n,r)=>{const s=S.forwardRef(({className:i,...d},f)=>S.createElement(iN,{ref:f,iconNode:r,className:zx(`lucide-${nN(pg(n))}`,`lucide-${n}`,i),...d}));return s.displayName=pg(n),s};const oN=[["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"}]],cN=we("box",oN);const uN=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],ld=we("brain",uN);const dN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ed=we("check",dN);const fN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Td=we("chevron-down",fN);const mN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],kx=we("chevron-right",mN);const hN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Dx=we("circle-alert",hN);const pN=[["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"}]],Ux=we("circle-arrow-up",pN);const gN=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],xN=we("circle-check-big",gN);const vN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],bt=we("circle-check",vN);const yN=[["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"}]],Pi=we("circle-x",yN);const bN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],lr=we("circle",bN);const SN=[["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"}]],Lx=we("copy",SN);const NN=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],ps=we("cpu",NN);const wN=[["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"}]],jN=we("database",wN);const EN=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],fs=we("download",EN);const TN=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],RN=we("external-link",TN);const CN=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],_N=we("file-text",CN);const MN=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Bx=we("git-merge",MN);const AN=[["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"}]],ON=we("globe",AN);const zN=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Rd=we("hard-drive",zN);const kN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],DN=we("info",kN);const UN=[["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"}]],LN=we("key",UN);const BN=[["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"}]],HN=we("layout-dashboard",BN);const qN=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ua=we("loader-circle",qN);const GN=[["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"}]],Cd=we("lock",GN);const QN=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],VN=we("log-out",QN);const YN=[["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"}]],XN=we("monitor",YN);const FN=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],KN=we("moon",FN);const ZN=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],JN=we("pencil",ZN);const $N=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],PN=we("play",$N);const IN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],WN=we("plus",IN);const ew=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],da=we("refresh-cw",ew);const tw=[["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"}]],fo=we("rotate-ccw",tw);const aw=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Hx=we("rotate-cw",aw);const nw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lw=we("search",nw);const rw=[["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"}]],_d=we("server",rw);const sw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],qx=we("settings",sw);const iw=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],ow=we("sparkles",iw);const cw=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],uw=we("sun",cw);const dw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Gx=we("trash-2",dw);const fw=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],fa=we("triangle-alert",fw);const mw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Qx=we("x",mw);const hw=[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],pw=we("zap-off",hw);const gw=[["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"}]],xw=we("zap",gw);function Vx(n){var r,s,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var d=n.length;for(r=0;r<d;r++)n[r]&&(s=Vx(n[r]))&&(i&&(i+=" "),i+=s)}else for(s in n)n[s]&&(i&&(i+=" "),i+=s);return i}function vw(){for(var n,r,s=0,i="",d=arguments.length;s<d;s++)(n=arguments[s])&&(r=Vx(n))&&(i&&(i+=" "),i+=r);return i}const yw=(n,r)=>{const s=new Array(n.length+r.length);for(let i=0;i<n.length;i++)s[i]=n[i];for(let i=0;i<r.length;i++)s[n.length+i]=r[i];return s},bw=(n,r)=>({classGroupId:n,validator:r}),Yx=(n=new Map,r=null,s)=>({nextPart:n,validators:r,classGroupId:s}),no="-",gg=[],Sw="arbitrary..",Nw=n=>{const r=jw(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return ww(m);const x=m.split(no),v=x[0]===""&&x.length>1?1:0;return Xx(x,v,r)},getConflictingClassGroupIds:(m,x)=>{if(x){const v=i[m],g=s[m];return v?g?yw(g,v):v:g||gg}return s[m]||gg}}},Xx=(n,r,s)=>{if(n.length-r===0)return s.classGroupId;const d=n[r],f=s.nextPart.get(d);if(f){const g=Xx(n,r+1,f);if(g)return g}const m=s.validators;if(m===null)return;const x=r===0?n.join(no):n.slice(r).join(no),v=m.length;for(let g=0;g<v;g++){const y=m[g];if(y.validator(x))return y.classGroupId}},ww=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),s=r.indexOf(":"),i=r.slice(0,s);return i?Sw+i:void 0})(),jw=n=>{const{theme:r,classGroups:s}=n;return Ew(s,r)},Ew=(n,r)=>{const s=Yx();for(const i in n){const d=n[i];Md(d,s,i,r)}return s},Md=(n,r,s,i)=>{const d=n.length;for(let f=0;f<d;f++){const m=n[f];Tw(m,r,s,i)}},Tw=(n,r,s,i)=>{if(typeof n=="string"){Rw(n,r,s);return}if(typeof n=="function"){Cw(n,r,s,i);return}_w(n,r,s,i)},Rw=(n,r,s)=>{const i=n===""?r:Fx(r,n);i.classGroupId=s},Cw=(n,r,s,i)=>{if(Mw(n)){Md(n(i),r,s,i);return}r.validators===null&&(r.validators=[]),r.validators.push(bw(s,n))},_w=(n,r,s,i)=>{const d=Object.entries(n),f=d.length;for(let m=0;m<f;m++){const[x,v]=d[m];Md(v,Fx(r,x),s,i)}},Fx=(n,r)=>{let s=n;const i=r.split(no),d=i.length;for(let f=0;f<d;f++){const m=i[f];let x=s.nextPart.get(m);x||(x=Yx(),s.nextPart.set(m,x)),s=x}return s},Mw=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,Aw=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),i=Object.create(null);const d=(f,m)=>{s[f]=m,r++,r>n&&(r=0,i=s,s=Object.create(null))};return{get(f){let m=s[f];if(m!==void 0)return m;if((m=i[f])!==void 0)return d(f,m),m},set(f,m){f in s?s[f]=m:d(f,m)}}},rd="!",xg=":",Ow=[],vg=(n,r,s,i,d)=>({modifiers:n,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:i,isExternal:d}),zw=n=>{const{prefix:r,experimentalParseClassName:s}=n;let i=d=>{const f=[];let m=0,x=0,v=0,g;const y=d.length;for(let j=0;j<y;j++){const R=d[j];if(m===0&&x===0){if(R===xg){f.push(d.slice(v,j)),v=j+1;continue}if(R==="/"){g=j;continue}}R==="["?m++:R==="]"?m--:R==="("?x++:R===")"&&x--}const p=f.length===0?d:d.slice(v);let w=p,M=!1;p.endsWith(rd)?(w=p.slice(0,-1),M=!0):p.startsWith(rd)&&(w=p.slice(1),M=!0);const N=g&&g>v?g-v:void 0;return vg(f,M,w,N)};if(r){const d=r+xg,f=i;i=m=>m.startsWith(d)?f(m.slice(d.length)):vg(Ow,!1,m,void 0,!0)}if(s){const d=i;i=f=>s({className:f,parseClassName:d})}return i},kw=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((s,i)=>{r.set(s,1e6+i)}),s=>{const i=[];let d=[];for(let f=0;f<s.length;f++){const m=s[f],x=m[0]==="[",v=r.has(m);x||v?(d.length>0&&(d.sort(),i.push(...d),d=[]),i.push(m)):d.push(m)}return d.length>0&&(d.sort(),i.push(...d)),i}},Dw=n=>({cache:Aw(n.cacheSize),parseClassName:zw(n),sortModifiers:kw(n),...Nw(n)}),Uw=/\s+/,Lw=(n,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:d,sortModifiers:f}=r,m=[],x=n.trim().split(Uw);let v="";for(let g=x.length-1;g>=0;g-=1){const y=x[g],{isExternal:p,modifiers:w,hasImportantModifier:M,baseClassName:N,maybePostfixModifierPosition:j}=s(y);if(p){v=y+(v.length>0?" "+v:v);continue}let R=!!j,z=i(R?N.substring(0,j):N);if(!z){if(!R){v=y+(v.length>0?" "+v:v);continue}if(z=i(N),!z){v=y+(v.length>0?" "+v:v);continue}R=!1}const _=w.length===0?"":w.length===1?w[0]:f(w).join(":"),G=M?_+rd:_,L=G+z;if(m.indexOf(L)>-1)continue;m.push(L);const J=d(z,R);for(let X=0;X<J.length;++X){const I=J[X];m.push(G+I)}v=y+(v.length>0?" "+v:v)}return v},Bw=(...n)=>{let r=0,s,i,d="";for(;r<n.length;)(s=n[r++])&&(i=Kx(s))&&(d&&(d+=" "),d+=i);return d},Kx=n=>{if(typeof n=="string")return n;let r,s="";for(let i=0;i<n.length;i++)n[i]&&(r=Kx(n[i]))&&(s&&(s+=" "),s+=r);return s},Hw=(n,...r)=>{let s,i,d,f;const m=v=>{const g=r.reduce((y,p)=>p(y),n());return s=Dw(g),i=s.cache.get,d=s.cache.set,f=x,x(v)},x=v=>{const g=i(v);if(g)return g;const y=Lw(v,s);return d(v,y),y};return f=m,(...v)=>f(Bw(...v))},qw=[],ut=n=>{const r=s=>s[n]||qw;return r.isThemeGetter=!0,r},Zx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Gw=/^\d+\/\d+$/,Qw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vw=/\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$/,Yw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,er=n=>Gw.test(n),Ce=n=>!!n&&!Number.isNaN(Number(n)),Mn=n=>!!n&&Number.isInteger(Number(n)),Lu=n=>n.endsWith("%")&&Ce(n.slice(0,-1)),Ia=n=>Qw.test(n),Kw=()=>!0,Zw=n=>Vw.test(n)&&!Yw.test(n),$x=()=>!1,Jw=n=>Xw.test(n),$w=n=>Fw.test(n),Pw=n=>!oe(n)&&!ce(n),Iw=n=>ur(n,Wx,$x),oe=n=>Zx.test(n),nl=n=>ur(n,ev,Zw),Bu=n=>ur(n,nj,Ce),yg=n=>ur(n,Px,$x),Ww=n=>ur(n,Ix,$w),Qi=n=>ur(n,tv,Jw),ce=n=>Jx.test(n),ds=n=>dr(n,ev),ej=n=>dr(n,lj),bg=n=>dr(n,Px),tj=n=>dr(n,Wx),aj=n=>dr(n,Ix),Vi=n=>dr(n,tv,!0),ur=(n,r,s)=>{const i=Zx.exec(n);return i?i[1]?r(i[1]):s(i[2]):!1},dr=(n,r,s=!1)=>{const i=Jx.exec(n);return i?i[1]?r(i[1]):s:!1},Px=n=>n==="position"||n==="percentage",Ix=n=>n==="image"||n==="url",Wx=n=>n==="length"||n==="size"||n==="bg-size",ev=n=>n==="length",nj=n=>n==="number",lj=n=>n==="family-name",tv=n=>n==="shadow",rj=()=>{const n=ut("color"),r=ut("font"),s=ut("text"),i=ut("font-weight"),d=ut("tracking"),f=ut("leading"),m=ut("breakpoint"),x=ut("container"),v=ut("spacing"),g=ut("radius"),y=ut("shadow"),p=ut("inset-shadow"),w=ut("text-shadow"),M=ut("drop-shadow"),N=ut("blur"),j=ut("perspective"),R=ut("aspect"),z=ut("ease"),_=ut("animate"),G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],J=()=>[...L(),ce,oe],X=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],W=()=>[ce,oe,v],ee=()=>[er,"full","auto",...W()],le=()=>[Mn,"none","subgrid",ce,oe],se=()=>["auto",{span:["full",Mn,ce,oe]},Mn,ce,oe],fe=()=>[Mn,"auto",ce,oe],Te=()=>["auto","min","max","fr",ce,oe],ye=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Be=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...W()],$=()=>[er,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...W()],K=()=>[n,ce,oe],xe=()=>[...L(),bg,yg,{position:[ce,oe]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",tj,Iw,{size:[ce,oe]}],Q=()=>[Lu,ds,nl],V=()=>["","none","full",g,ce,oe],P=()=>["",Ce,ds,nl],re=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Ce,Lu,bg,yg],Se=()=>["","none",N,ce,oe],B=()=>["none",Ce,ce,oe],te=()=>["none",Ce,ce,oe],Re=()=>[Ce,ce,oe],_e=()=>[er,"full",...W()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ia],breakpoint:[Ia],color:[Kw],container:[Ia],"drop-shadow":[Ia],ease:["in","out","in-out"],font:[Pw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ia],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ia],shadow:[Ia],spacing:["px",Ce],text:[Ia],"text-shadow":[Ia],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",er,oe,ce,R]}],container:["container"],columns:[{columns:[Ce,oe,ce,x]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"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"],sr:["sr-only","not-sr-only"],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:J()}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{start:ee()}],end:[{end:ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[Mn,"auto",ce,oe]}],basis:[{basis:[er,"full","auto",x,...W()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,er,"auto","initial","none",oe]}],grow:[{grow:["",Ce,ce,oe]}],shrink:[{shrink:["",Ce,ce,oe]}],order:[{order:[Mn,"first","last","none",ce,oe]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:se()}],"col-start":[{"col-start":fe()}],"col-end":[{"col-end":fe()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:se()}],"row-start":[{"row-start":fe()}],"row-end":[{"row-end":fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Te()}],"auto-rows":[{"auto-rows":Te()}],gap:[{gap:W()}],"gap-x":[{"gap-x":W()}],"gap-y":[{"gap-y":W()}],"justify-content":[{justify:[...ye(),"normal"]}],"justify-items":[{"justify-items":[...Be(),"normal"]}],"justify-self":[{"justify-self":["auto",...Be()]}],"align-content":[{content:["normal",...ye()]}],"align-items":[{items:[...Be(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Be(),{baseline:["","last"]}]}],"place-content":[{"place-content":ye()}],"place-items":[{"place-items":[...Be(),"baseline"]}],"place-self":[{"place-self":["auto",...Be()]}],p:[{p:W()}],px:[{px:W()}],py:[{py:W()}],ps:[{ps:W()}],pe:[{pe:W()}],pt:[{pt:W()}],pr:[{pr:W()}],pb:[{pb:W()}],pl:[{pl:W()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":W()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":W()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[x,"screen",...$()]}],"min-w":[{"min-w":[x,"screen","none",...$()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[m]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",s,ds,nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ce,Bu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Lu,oe]}],"font-family":[{font:[ej,oe,r]}],"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:[d,ce,oe]}],"line-clamp":[{"line-clamp":[Ce,"none",ce,Bu]}],leading:[{leading:[f,...W()]}],"list-image":[{"list-image":["none",ce,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",ce,nl]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Ce,"auto",ce,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:xe()}],"bg-repeat":[{bg:ge()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mn,ce,oe],radial:["",ce,oe],conic:[Mn,ce,oe]},aj,Ww]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,ce,oe]}],"outline-w":[{outline:["",Ce,ds,nl]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",y,Vi,Qi]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",p,Vi,Qi]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Ce,nl]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",w,Vi,Qi]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Ce,ce,oe]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[ce,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:xe()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,oe]}],filter:[{filter:["","none",ce,oe]}],blur:[{blur:Se()}],brightness:[{brightness:[Ce,ce,oe]}],contrast:[{contrast:[Ce,ce,oe]}],"drop-shadow":[{"drop-shadow":["","none",M,Vi,Qi]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Ce,ce,oe]}],"hue-rotate":[{"hue-rotate":[Ce,ce,oe]}],invert:[{invert:["",Ce,ce,oe]}],saturate:[{saturate:[Ce,ce,oe]}],sepia:[{sepia:["",Ce,ce,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,oe]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,ce,oe]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,ce,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,ce,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,ce,oe]}],"backdrop-invert":[{"backdrop-invert":["",Ce,ce,oe]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,ce,oe]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,ce,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,ce,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":W()}],"border-spacing-x":[{"border-spacing-x":W()}],"border-spacing-y":[{"border-spacing-y":W()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",ce,oe]}],ease:[{ease:["linear","initial",z,ce,oe]}],delay:[{delay:[Ce,ce,oe]}],animate:[{animate:["none",_,ce,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,ce,oe]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:B()}],"rotate-x":[{"rotate-x":B()}],"rotate-y":[{"rotate-y":B()}],"rotate-z":[{"rotate-z":B()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:Re()}],"skew-x":[{"skew-x":Re()}],"skew-y":[{"skew-y":Re()}],transform:[{transform:[ce,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ce,oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"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",ce,oe]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Ce,ds,nl,Bu]}],stroke:[{stroke:["none",...K()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},sj=Hw(rj);function ne(...n){return sj(vw(n))}async function ij(){const{data:n}=await Me.get("/api/system/info");return n}function oj(){return Oa({queryKey:["system-info"],queryFn:ij,staleTime:6e4})}function cj(n){const r=Math.floor(n/86400),s=Math.floor(n%86400/3600);if(r>0)return`${r}d ${s}h`;const i=Math.floor(n%3600/60);return s>0?`${s}h ${i}m`:`${i}m`}function uj(){const{data:n}=oj();return n?c.jsxs("div",{className:"border-t border-[var(--color-border)] px-3 py-2 text-[10px] text-[var(--color-text-muted)]",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(ps,{size:10}),c.jsxs("span",{children:[n.cpuCount," cores"]}),c.jsx("span",{className:"mx-0.5",children:"|"}),c.jsx(Rd,{size:10}),c.jsxs("span",{children:[Math.round(n.totalMemoryMb/1024),"GB"]})]}),c.jsxs("div",{className:"mt-0.5",children:[n.hostname," · up ",cj(n.uptime)," · v",n.version]})]}):null}const dj=[{label:"Dashboard",icon:HN,path:"/dashboard"},{label:"Settings",icon:qx,path:"/settings"},{label:"Services",icon:_d,path:"/services"},{label:"Models",icon:cN,path:"/models"},{label:"Nodes",icon:ps,path:"/nodes"}];function fj(){return c.jsxs("aside",{className:"flex w-56 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface)]",children:[c.jsx("div",{className:"flex h-14 items-center border-b border-[var(--color-border)] px-4",children:c.jsx("span",{className:"text-lg font-bold text-[var(--color-primary)]",children:"Jarvis"})}),c.jsx("nav",{className:"flex-1 space-y-1 p-2",children:dj.map(n=>c.jsxs(Kg,{to:n.path,className:({isActive:r})=>ne("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",r?"bg-[var(--color-primary)]/10 text-[var(--color-primary)]":"text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-[var(--color-text)]"),children:[c.jsx(n.icon,{size:18}),n.label]},n.path))}),c.jsx(uj,{})]})}function mj(){const{state:n,logout:r}=jd(),{theme:s,toggleTheme:i}=b2();return c.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-[var(--color-border)] bg-[var(--color-surface)] px-6",children:[c.jsx("h2",{className:"text-sm font-medium text-[var(--color-text-muted)]",children:"Admin Dashboard"}),c.jsxs("div",{className:"flex items-center gap-3",children:[n.user&&c.jsx("span",{className:"text-sm text-[var(--color-text-muted)]",children:n.user.email}),c.jsx("button",{onClick:i,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",title:`Switch to ${s==="dark"?"light":"dark"} mode`,children:s==="dark"?c.jsx(uw,{size:18}):c.jsx(KN,{size:18})}),c.jsx("button",{onClick:r,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-red-500",title:"Logout",children:c.jsx(VN,{size:18})})]})]})}function hj(){const{state:n}=jd();return n.isLoading?c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:c.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading..."})}):n.isAuthenticated?c.jsxs("div",{className:"flex h-screen bg-[var(--color-background)]",children:[c.jsx(fj,{}),c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsx(mj,{}),c.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:c.jsx(T0,{})})]})]}):c.jsx(Wi,{to:"/login",replace:!0})}function pj(){const{state:n,login:r,setup:s}=jd(),i=tn(),[d,f]=S.useState("loading"),[m,x]=S.useState(""),[v,g]=S.useState(""),[y,p]=S.useState(""),[w,M]=S.useState(""),[N,j]=S.useState(null);if(S.useEffect(()=>{let L=!1;async function J(){try{const{data:X}=await Me.get("/api/setup/status");if(!L&&!X.configured){i("/setup",{replace:!0});return}}catch{if(!L){i("/setup",{replace:!0});return}}try{const X=await IS();L||f(X.needs_setup?"setup":"login")}catch{L||f("login")}}return J(),()=>{L=!0}},[i]),n.isAuthenticated)return c.jsx(Wi,{to:"/settings",replace:!0});const R=L=>{L.preventDefault(),r(m,y)},z=L=>{if(L.preventDefault(),j(null),y!==w){j("Passwords do not match");return}if(y.length<8){j("Password must be at least 8 characters");return}s(m,y,v||void 0)},_=ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]"),G=N??n.error;return d==="loading"?c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:c.jsx("div",{className:"w-full max-w-sm rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:c.jsx("div",{className:"flex justify-center",children:c.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-border)] border-t-[var(--color-primary)]"})})})}):c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:c.jsx("div",{className:"w-full max-w-sm rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:d==="setup"?c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:"mb-1 text-center text-2xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),c.jsx("p",{className:"mb-6 text-center text-sm text-[var(--color-text-muted)]",children:"Set up your first administrator account to get started."}),c.jsxs("form",{onSubmit:z,className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),c.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:L=>x(L.target.value),className:_,placeholder:"admin@example.com"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"username",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Username"}),c.jsx("input",{id:"username",type:"text",required:!0,autoComplete:"username",value:v,onChange:L=>g(L.target.value),className:_,placeholder:"admin"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),c.jsx("input",{id:"password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:y,onChange:L=>p(L.target.value),className:_})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),c.jsx("input",{id:"confirm-password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:w,onChange:L=>M(L.target.value),className:_})]}),G&&c.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:G}),c.jsx("button",{type:"submit",disabled:n.isLoading,className:ne("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50","transition-opacity"),children:n.isLoading?"Creating account...":"Create Admin Account"})]})]}):c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:"mb-6 text-center text-2xl font-bold text-[var(--color-text)]",children:"Jarvis Admin"}),c.jsxs("form",{onSubmit:R,className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),c.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:L=>x(L.target.value),className:_,placeholder:"admin@example.com"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),c.jsx("input",{id:"password",type:"password",required:!0,autoComplete:"current-password",value:y,onChange:L=>p(L.target.value),className:_})]}),G&&c.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:G}),c.jsx("button",{type:"submit",disabled:n.isLoading,className:ne("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50","transition-opacity"),children:n.isLoading?"Signing in...":"Sign in"})]})]})})})}async function gj(){const{data:n}=await Me.get("/api/settings/");return n}async function xj(n,r,s){const{data:i}=await Me.put(`/api/settings/${encodeURIComponent(n)}/${r}`,{value:s});return i}function vj(){return Oa({queryKey:["settings"],queryFn:gj,staleTime:3e4})}function yj(){const n=ma();return Na({mutationFn:({serviceName:r,key:s,value:i})=>xj(r,s,i),onSuccess:()=>{n.invalidateQueries({queryKey:["settings"]})}})}function bj({setting:n,onSave:r,onCancel:s,isSaving:i}){const[d,f]=S.useState(()=>n.value_type==="json"?JSON.stringify(n.value,null,2):n.value_type==="bool"?"":String(n.value??"")),[m,x]=S.useState(()=>!!n.value),[v,g]=S.useState(null),y=!!n.options?.length,p=y&&!n.options.includes(d),[w,M]=S.useState(p),N=R=>{R.preventDefault();let z;switch(n.value_type){case"bool":z=m;break;case"int":if(z=parseInt(d,10),isNaN(z)){g("Must be a whole number");return}g(null);break;case"float":if(z=parseFloat(d),isNaN(z)){g("Must be a number");return}g(null);break;case"json":try{z=JSON.parse(d),g(null)}catch{g("Invalid JSON");return}break;default:z=d}r(z)},j=ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-2 focus:ring-[var(--color-primary)]");return c.jsxs("form",{onSubmit:N,className:"flex items-center gap-2",children:[y?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("select",{value:w?"__other__":d,onChange:R=>{R.target.value==="__other__"?(M(!0),f("")):(M(!1),f(R.target.value))},className:ne(j,"max-w-xs"),children:[n.options.map(R=>c.jsx("option",{value:String(R),children:String(R)},String(R))),c.jsx("option",{value:"__other__",children:"Other..."})]}),w&&c.jsx("input",{type:"text",value:d,onChange:R=>f(R.target.value),placeholder:"Custom value",className:ne(j,"max-w-xs"),autoFocus:!0})]}):n.value_type==="bool"?c.jsx("button",{type:"button",onClick:()=>x(R=>!R),className:ne("relative h-6 w-11 rounded-full transition-colors",m?"bg-[var(--color-primary)]":"bg-[var(--color-border)]"),children:c.jsx("span",{className:ne("absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white transition-transform",m&&"translate-x-5")})}):n.value_type==="json"?c.jsxs("div",{className:"flex-1",children:[c.jsx("textarea",{value:d,onChange:R=>{f(R.target.value),g(null)},rows:4,className:ne(j,"font-mono text-xs")}),v&&c.jsx("p",{className:"mt-1 text-xs text-red-500",children:v})]}):c.jsxs("div",{children:[c.jsx("input",{type:n.value_type==="int"||n.value_type==="float"?"number":n.is_secret?"password":"text",step:n.value_type==="float"?"any":void 0,value:d,onChange:R=>{f(R.target.value),g(null)},className:ne(j,"max-w-xs")}),v&&c.jsx("p",{className:"mt-1 text-xs text-red-500",children:v})]}),c.jsx("button",{type:"submit",disabled:i,className:"rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:i?"Saving...":"Save"}),c.jsx("button",{type:"button",onClick:s,className:"rounded-lg border border-[var(--color-border)] px-3 py-1.5 text-xs text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",children:"Cancel"})]})}function Sj(n){return n.is_secret?"********":n.value===null||n.value===void 0?"(not set)":n.value_type==="json"?JSON.stringify(n.value):String(n.value)}const Nj={string:"bg-blue-500/10 text-blue-500",int:"bg-emerald-500/10 text-emerald-500",float:"bg-emerald-500/10 text-emerald-500",bool:"bg-amber-500/10 text-amber-500",json:"bg-purple-500/10 text-purple-500"};function wj({setting:n,serviceName:r,onRestartService:s}){const[i,d]=S.useState(!1),f=yj(),m=x=>{f.mutate({serviceName:r,key:n.key,value:x},{onSuccess:v=>{d(!1),v.requires_reload?Xe.warning(`Setting updated. ${r} requires a restart to apply.`,s?{action:{label:"Restart",onClick:s}}:void 0):Xe.success("Setting updated")},onError:v=>{Xe.error(`Failed to update: ${v.message}`)}})};return c.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-lg px-3 py-2 hover:bg-[var(--color-surface-alt)]",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"text-sm font-medium text-[var(--color-text)]",children:n.key}),c.jsx("span",{className:ne("rounded px-1.5 py-0.5 text-[10px] font-medium",Nj[n.value_type]??"bg-gray-500/10 text-gray-500"),children:n.value_type}),n.from_db&&c.jsx("span",{title:"Stored in database",children:c.jsx(jN,{size:12,className:"text-[var(--color-tertiary)]"})}),n.requires_reload&&c.jsx("span",{title:"Requires service restart",children:c.jsx(fa,{size:12,className:"text-amber-500"})})]}),n.description&&c.jsx("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:n.description}),i?c.jsx("div",{className:"mt-2",children:c.jsx(bj,{setting:n,onSave:m,onCancel:()=>d(!1),isSaving:f.isPending})}):c.jsx("p",{className:"mt-1 font-mono text-xs text-[var(--color-text-muted)]",children:Sj(n)})]}),!i&&c.jsx("button",{onClick:()=>d(!0),className:"shrink-0 rounded-lg p-1.5 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-[var(--color-primary)]",title:"Edit",children:c.jsx(JN,{size:14})})]})}function jj({category:n,settings:r,serviceName:s,onRestartService:i}){const[d,f]=S.useState(!0);return c.jsxs("div",{children:[c.jsxs("button",{onClick:()=>f(m=>!m),className:"flex w-full items-center gap-2 px-3 py-1.5 text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[d?c.jsx(Td,{size:14}):c.jsx(kx,{size:14}),n,c.jsxs("span",{className:"font-normal",children:["(",r.length,")"]})]}),d&&c.jsx("div",{className:"space-y-0.5",children:r.map(m=>c.jsx(wj,{setting:m,serviceName:s,onRestartService:i},m.key))})]})}async function Ej(){const{data:n}=await Me.get("/api/containers");return n}async function Tj(n){const{data:r}=await Me.post(`/api/containers/${n}/restart`);return r}function av(){return Oa({queryKey:["containers"],queryFn:Ej,staleTime:1e4,refetchInterval:1e4})}function nv(){const n=ma();return Na({mutationFn:r=>Tj(r),onSuccess:()=>{n.invalidateQueries({queryKey:["containers"]})}})}function Rj({result:n,defaultExpanded:r=!1}){const[s,i]=S.useState(r),{data:d}=av(),f=nv(),m=S.useCallback(()=>{const v=d?.containers.find(g=>g.name.includes(n.service_name)||g.name.includes(n.service_name.replace("jarvis-","")));v?f.mutate(v.id,{onSuccess:()=>Xe.success(`${n.service_name} is restarting...`),onError:g=>Xe.error(`Restart failed: ${g.message}`)}):Xe.error(`Could not find container for ${n.service_name}`)},[d,n.service_name,f]),x=S.useMemo(()=>{const v=new Map;for(const g of n.settings){const y=v.get(g.category)??[];v.set(g.category,[...y,g])}return v},[n]);return c.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[c.jsxs("button",{onClick:()=>i(v=>!v),className:"flex w-full items-center gap-3 px-4 py-3 text-left hover:bg-[var(--color-surface-alt)]",children:[s?c.jsx(Td,{size:18,className:"text-[var(--color-text-muted)]"}):c.jsx(kx,{size:18,className:"text-[var(--color-text-muted)]"}),c.jsx("span",{className:"font-medium text-[var(--color-text)]",children:n.service_name}),n.success?c.jsx(bt,{size:16,className:"text-[var(--color-secondary)]"}):c.jsx(Pi,{size:16,className:"text-red-500"}),c.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n.success?`${n.settings.length} settings`:n.error??"Error"}),n.latency_ms!=null&&c.jsxs("span",{className:ne("ml-auto text-xs",n.latency_ms>500?"text-amber-500":"text-[var(--color-text-muted)]"),children:[Math.round(n.latency_ms),"ms"]})]}),s&&n.success&&c.jsx("div",{className:"space-y-2 border-t border-[var(--color-border)] px-2 py-3",children:[...x.entries()].map(([v,g])=>c.jsx(jj,{category:v,settings:g,serviceName:n.service_name,onRestartService:m},v))}),s&&!n.success&&c.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-3",children:c.jsx("p",{className:"text-sm text-red-500",children:n.error??"Failed to fetch settings"})})]})}function Cj(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=vj(),[m,x]=S.useState(""),v=S.useMemo(()=>{if(!n)return[];if(!m.trim())return n.services;const g=m.toLowerCase();return n.services.map(y=>({...y,settings:y.settings.filter(p=>p.key.toLowerCase().includes(g)||p.category.toLowerCase().includes(g)||(p.description?.toLowerCase().includes(g)??!1))})).filter(y=>y.settings.length>0||y.service_name.toLowerCase().includes(g))},[n,m]);return r?c.jsx("div",{className:"flex items-center justify-center py-20",children:c.jsx(da,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?c.jsxs("div",{className:"py-20 text-center",children:[c.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load settings"}),c.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),c.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):c.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Settings"}),c.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[n&&c.jsxs("span",{children:[n.successful_services,"/",n.total_services," services"]}),c.jsx("button",{onClick:()=>d(),disabled:f,className:ne("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:c.jsx(da,{size:14})})]})]}),c.jsxs("div",{className:"relative",children:[c.jsx(lw,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]"}),c.jsx("input",{type:"text",value:m,onChange:g=>x(g.target.value),placeholder:"Search settings...",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] py-2 pl-9 pr-3","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),c.jsxs("div",{className:"space-y-3",children:[v.map((g,y)=>c.jsx(Rj,{result:g,defaultExpanded:y===0},g.service_name)),v.length===0&&c.jsx("p",{className:"py-8 text-center text-sm text-[var(--color-text-muted)]",children:m?"No settings match your search":"No services found"})]})]})}async function _j(){const{data:n}=await Me.get("/api/services/registry");return n}async function Mj(n){const{data:r}=await Me.post("/api/services/register",n);return r}async function Aj(n){const{data:r}=await Me.post("/api/services/rotate-key",n);return r}async function Oj(n){const{data:r}=await Me.post("/api/services/probe",n);return r}async function zj(n){const{data:r}=await Me.post("/api/services/register",{services:[{name:n.name,host:n.host,port:n.port,scheme:n.scheme,health_path:n.health_path,description:n.description}]});return r}async function kj(n){await Me.delete(`/api/services/${encodeURIComponent(n)}`)}async function Dj(){const{data:n}=await Me.get("/api/services/suggestions");return n}function Uj(){return Oa({queryKey:["service-registry"],queryFn:_j,staleTime:3e4})}function Lj(){const n=ma();return Na({mutationFn:Mj,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function Bj(){const n=ma();return Na({mutationFn:Aj,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function Hj(){const n=ma();return Na({mutationFn:zj,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function qj(){const n=ma();return Na({mutationFn:kj,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function Gj(){return Oa({queryKey:["service-suggestions"],queryFn:Dj,staleTime:6e4})}function Sg({ok:n,label:r}){return c.jsxs("span",{className:ne("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",n?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:[n?c.jsx(Ed,{size:12}):c.jsx(Qx,{size:12}),r]})}function Qj({status:n,error:r,latency:s}){return n==="idle"?null:n==="probing"?c.jsx("span",{className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)]",children:c.jsx(ua,{size:12,className:"animate-spin"})}):n==="healthy"?c.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[c.jsx(lr,{size:8,fill:"currentColor"}),s!=null&&`${s}ms`]}):c.jsxs("span",{className:"flex items-center gap-1 text-xs text-red-500",title:r,children:[c.jsx(lr,{size:8,fill:"currentColor"}),r||"Unreachable"]})}function Vj({entry:n,checked:r,host:s,port:i,scheme:d,onToggle:f,onHostChange:m,onPortChange:x,onSchemeChange:v,onHostBlur:g,onPortBlur:y,onRotateKey:p,onDelete:w,disabled:M,rotating:N,deleting:j,healthStatus:R,healthError:z,healthLatency:_}){return c.jsxs("div",{className:ne("flex flex-wrap items-center gap-3 rounded-lg border border-[var(--color-border)] p-3","bg-[var(--color-surface)] transition-colors",r&&"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5"),children:[c.jsx("input",{type:"checkbox",checked:r,onChange:f,disabled:M,className:"h-4 w-4 rounded border-[var(--color-border)] accent-[var(--color-primary)]"}),c.jsxs("div",{className:"min-w-[180px] flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-[var(--color-text)]",children:[n.name,n.custom&&c.jsx("span",{className:"rounded-full bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-600 dark:text-blue-400",children:"custom"})]}),c.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:n.description})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Sg,{ok:n.config_registered,label:"Config"}),c.jsx(Sg,{ok:n.auth_registered,label:"Auth"}),n.custom&&w&&c.jsxs("button",{onClick:w,disabled:M||j,className:ne("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium","bg-red-500/10 text-red-600 dark:text-red-400","hover:bg-red-500/20","disabled:opacity-50"),title:"Remove custom service",children:[c.jsx(Gx,{size:12,className:j?"animate-spin":""}),"Remove"]}),n.auth_registered&&c.jsxs("button",{onClick:p,disabled:M||N,className:ne("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium","bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]","hover:bg-[var(--color-primary)]/10 hover:text-[var(--color-primary)]","disabled:opacity-50"),title:"Rotate app key",children:[c.jsx(Hx,{size:12,className:N?"animate-spin":""}),"Rotate Key"]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{type:"button",onClick:()=>{const G=["http","https","mqtt"],L=G[(G.indexOf(d)+1)%G.length];v(L)},disabled:M,className:ne("rounded border px-1.5 py-1 text-xs font-mono",d==="https"?"border-green-500/40 bg-green-500/10 text-green-600 dark:text-green-400":d==="mqtt"?"border-purple-500/40 bg-purple-500/10 text-purple-600 dark:text-purple-400":"border-[var(--color-border)] bg-[var(--color-background)] text-[var(--color-text-muted)]","disabled:opacity-50"),title:"Toggle scheme",children:d}),c.jsx("input",{type:"text",value:s,onChange:G=>m(G.target.value),onBlur:g,disabled:M,placeholder:"host",className:ne("w-36 rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2 py-1","text-xs text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]","disabled:opacity-50")}),c.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:":"}),c.jsx("input",{type:"number",value:i,onChange:G=>x(Number(G.target.value)),onBlur:y,disabled:M,className:ne("w-20 rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2 py-1","text-xs text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]","disabled:opacity-50")}),c.jsx(Qj,{status:R,error:z,latency:_})]})]})}const Ng={name:"",host:"localhost",port:"",scheme:"http",health_path:"/health",description:""};function Yj(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=Uj(),m=Lj(),x=Bj(),v=Hj(),g=qj(),{data:y}=Gj(),[p,w]=S.useState({}),[M,N]=S.useState(null),[j,R]=S.useState(null),[z,_]=S.useState(null),[G,L]=S.useState(null),[J,X]=S.useState(null),[I,W]=S.useState({}),[ee,le]=S.useState(!1),[se,fe]=S.useState(Ng),[Te,ye]=S.useState(!1),Be=S.useRef(null),O=S.useMemo(()=>new Set(n?.services.map(B=>B.name)??[]),[n]),$=S.useMemo(()=>{const te=(y?.suggestions??[]).filter(_e=>!O.has(_e.id));if(!se.name.trim())return te;const Re=se.name.toLowerCase();return te.filter(_e=>_e.id.toLowerCase().includes(Re)||_e.name.toLowerCase().includes(Re)||_e.description.toLowerCase().includes(Re))},[y,O,se.name]),K=S.useCallback(B=>{fe({name:B.id,description:B.description,host:"localhost",port:String(B.port),scheme:"http",health_path:B.healthCheck}),ye(!1)},[]);S.useEffect(()=>{const B=te=>{Be.current&&!Be.current.contains(te.target)&&ye(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const xe=S.useCallback(B=>{if(p[B])return p[B];const te=n?.services.find(Re=>Re.name===B);return te?{checked:te.config_registered,host:te.current_host??"localhost",port:te.current_port??te.default_port,scheme:te.current_scheme??"http"}:{checked:!1,host:"localhost",port:0,scheme:"http"}},[p,n]),ge=S.useCallback((B,te)=>{w(Re=>{const _e=Re[B]??{checked:!1,host:"localhost",port:0};return{...Re,[B]:{..._e,...te}}})},[]),T=S.useCallback(async(B,te,Re,_e,ha="http")=>{if(!(!te||!Re)){W(ot=>({...ot,[B]:{status:"probing"}}));try{const ot=await Oj({host:te,port:Re,health_path:_e,scheme:ha});W(zn=>({...zn,[B]:{status:ot.healthy?"healthy":"unhealthy",error:ot.error??void 0,latency:ot.latency_ms??void 0}}))}catch{W(ot=>({...ot,[B]:{status:"unhealthy",error:"Request failed"}}))}}},[]),Q=S.useCallback(()=>{if(!n)return;const B=n.services.filter(te=>xe(te.name).checked).map(te=>{const Re=xe(te.name);return{name:te.name,host:Re.host,port:Re.port,scheme:Re.scheme}});if(B.length===0){Xe.error("No services selected");return}N(null),R(null),m.mutate({services:B},{onSuccess:te=>{N(te.results);const Re=te.results.filter(ha=>ha.config_ok&&ha.auth_ok).length,_e=te.results.length;Re===_e?Xe.success(`All ${_e} services registered`):Xe.warning(`${Re}/${_e} services registered successfully`)},onError:te=>{Xe.error(`Registration failed: ${te.message}`)}})},[n,xe,m]),V=S.useCallback(B=>{_(B),R(null),x.mutate({service_name:B},{onSuccess:te=>{R(te),_(null),Xe.success(`Key rotated for ${B}`)},onError:te=>{_(null),Xe.error(`Key rotation failed: ${te.message}`)}})},[x]),P=S.useCallback(B=>{L(B),g.mutate(B,{onSuccess:()=>{L(null),Xe.success(`Removed ${B}`)},onError:te=>{L(null),Xe.error(`Failed to remove: ${te.message}`)}})},[g]),re=S.useCallback(()=>{const B=parseInt(se.port,10);if(!se.name.trim()){Xe.error("Service name is required");return}if(!B||B<1||B>65535){Xe.error("Port must be between 1 and 65535");return}v.mutate({name:se.name.trim(),host:se.host.trim()||"localhost",port:B,scheme:se.scheme,health_path:se.health_path.trim()||"/health",description:se.description.trim()},{onSuccess:te=>{const Re=te.results[0];Re?.config_ok?(Xe.success(`Added ${se.name.trim()}`),fe(Ng),le(!1)):Xe.error(`Failed to add: ${Re?.error??"Unknown error"}`)},onError:te=>{Xe.error(`Failed to add service: ${te.message}`)}})},[se,v]),me=S.useCallback(B=>{navigator.clipboard.writeText(B).then(()=>{X(B),setTimeout(()=>X(null),2e3)})},[]),de=n?.services.filter(B=>xe(B.name).checked).length??0,Se=M?.some(B=>B.env_written)||j?.env_written===!0;return r?c.jsx("div",{className:"flex items-center justify-center py-20",children:c.jsx(da,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?c.jsxs("div",{className:"py-20 text-center",children:[c.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load service registry"}),c.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),c.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):c.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Services"}),c.jsx("span",{className:"rounded-full bg-[var(--color-surface-alt)] px-2.5 py-0.5 text-xs font-medium text-[var(--color-text-muted)]",children:n?.services.length??0})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{onClick:()=>le(B=>!B),className:ne("flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium",ee?"bg-[var(--color-surface-alt)] text-[var(--color-text)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:[ee?c.jsx(Qx,{size:14}):c.jsx(WN,{size:14}),ee?"Cancel":"Add Service"]}),c.jsx("button",{onClick:()=>d(),disabled:f,className:ne("rounded-lg p-1.5 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:c.jsx(da,{size:14})})]})]}),ee&&c.jsxs("div",{className:"rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[c.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Add Service"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{ref:Be,className:"relative",children:[c.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Service"}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:"text",value:se.name,onChange:B=>{fe(te=>({...te,name:B.target.value})),ye(!0)},onFocus:()=>ye(!0),placeholder:"Select or type a service name...",className:ne("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5 pr-8","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")}),c.jsx("button",{type:"button",onClick:()=>ye(B=>!B),className:"absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:c.jsx(Td,{size:14})})]}),Te&&$.length>0&&c.jsx("div",{className:"absolute z-10 mt-1 max-h-48 w-full overflow-y-auto rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] shadow-lg",children:$.map(B=>c.jsxs("button",{type:"button",onClick:()=>K(B),className:"flex w-full flex-col px-3 py-2 text-left hover:bg-[var(--color-surface-alt)]",children:[c.jsxs("span",{className:"text-sm font-medium text-[var(--color-text)]",children:[B.name,c.jsxs("span",{className:"ml-2 font-normal text-[var(--color-text-muted)]",children:[":",B.port]})]}),c.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:B.description})]},B.id))})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Description"}),c.jsx("input",{type:"text",value:se.description,onChange:B=>fe(te=>({...te,description:B.target.value})),placeholder:"e.g. Camera streaming via WebRTC",className:ne("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Host"}),c.jsx("input",{type:"text",value:se.host,onChange:B=>fe(te=>({...te,host:B.target.value})),placeholder:"localhost",className:ne("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")})]}),c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Port"}),c.jsx("input",{type:"number",value:se.port,onChange:B=>fe(te=>({...te,port:B.target.value})),placeholder:"e.g. 1984",className:ne("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")})]}),c.jsxs("div",{className:"w-20",children:[c.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Scheme"}),c.jsxs("select",{value:se.scheme,onChange:B=>fe(te=>({...te,scheme:B.target.value})),className:ne("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]"),children:[c.jsx("option",{value:"http",children:"http"}),c.jsx("option",{value:"https",children:"https"}),c.jsx("option",{value:"mqtt",children:"mqtt"})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Health Path"}),c.jsx("input",{type:"text",value:se.health_path,onChange:B=>fe(te=>({...te,health_path:B.target.value})),placeholder:"/health",className:ne("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")})]})]}),c.jsx("div",{className:"mt-3 flex justify-end",children:c.jsx("button",{onClick:re,disabled:v.isPending||!se.name.trim()||!se.port,className:ne("rounded-lg bg-[var(--color-primary)] px-4 py-1.5 text-sm font-medium text-white","hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50"),children:v.isPending?"Adding...":"Add Service"})})]}),c.jsx("div",{className:"space-y-2",children:n?.services.map(B=>{const te=xe(B.name),Re=I[B.name]??{status:"idle"};return c.jsx(Vj,{entry:B,checked:te.checked,host:te.host,port:te.port,scheme:te.scheme,onToggle:()=>{const _e=!te.checked;ge(B.name,{...te,checked:_e}),_e?T(B.name,te.host,te.port,B.health_path,te.scheme):W(ha=>({...ha,[B.name]:{status:"idle"}}))},onHostChange:_e=>ge(B.name,{...te,host:_e}),onPortChange:_e=>ge(B.name,{...te,port:_e}),onSchemeChange:_e=>ge(B.name,{...te,scheme:_e}),onHostBlur:()=>{te.checked&&T(B.name,te.host,te.port,B.health_path,te.scheme)},onPortBlur:()=>{te.checked&&T(B.name,te.host,te.port,B.health_path,te.scheme)},onRotateKey:()=>V(B.name),onDelete:()=>P(B.name),disabled:m.isPending,rotating:z===B.name,deleting:G===B.name,healthStatus:Re.status,healthError:Re.error,healthLatency:Re.latency},B.name)})}),c.jsx("button",{onClick:Q,disabled:m.isPending||de===0,className:ne("rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white","hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50"),children:m.isPending?"Registering...":`Register Selected (${de})`}),j&&c.jsx(Xj,{serviceName:j.service_name,appKey:j.app_key,envWritten:j.env_written,copiedKey:J,onCopy:me,label:"Rotated Key"}),M&&c.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Registration Results"}),M.map(B=>c.jsxs("div",{className:ne("flex flex-wrap items-center gap-3 rounded-lg border p-3 text-sm",B.config_ok&&B.auth_ok?"border-green-500/20 bg-green-500/5":"border-yellow-500/20 bg-yellow-500/5"),children:[c.jsx("span",{className:"min-w-[180px] font-medium text-[var(--color-text)]",children:B.name}),c.jsxs("span",{className:ne("text-xs",B.config_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Config: ",B.config_ok?"OK":"Failed"]}),c.jsxs("span",{className:ne("text-xs",B.auth_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Auth: ",B.auth_ok?B.auth_created?"Created":"Exists":"Failed"]}),B.env_written!==null&&c.jsxs("span",{className:ne("text-xs",B.env_written?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",B.env_written?"Written":"Failed"]}),B.error&&c.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-600 dark:text-yellow-400",children:[c.jsx(fa,{size:12}),B.error]}),B.auth_created&&B.app_key&&c.jsxs("div",{className:"mt-1 w-full",children:[c.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[c.jsx(fa,{size:12}),"App key (shown once only):"]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"flex-1 overflow-x-auto rounded bg-[var(--color-background)] px-2 py-1 font-mono text-xs text-[var(--color-text)]",children:B.app_key}),c.jsx("button",{onClick:()=>me(B.app_key),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:J===B.app_key?c.jsx(Ed,{size:14,className:"text-green-500"}):c.jsx(Lx,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]},B.name))]}),Se&&c.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-blue-500/20 bg-blue-500/5 p-3",children:[c.jsx(DN,{size:16,className:"mt-0.5 shrink-0 text-blue-500"}),c.jsx("p",{className:"text-sm text-[var(--color-text)]",children:"Services whose .env files were updated need to be restarted to pick up the new credentials. Restart each affected service's container or process."})]})]})}function Xj({serviceName:n,appKey:r,envWritten:s,copiedKey:i,onCopy:d,label:f}){return c.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsxs("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:[f,": ",n]}),c.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-500/5 p-3",children:[s!==null&&c.jsxs("span",{className:ne("mb-2 inline-block text-xs",s?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",s?"Written":"Failed"]}),c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[c.jsx(fa,{size:12}),"New app key (shown once only):"]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"flex-1 overflow-x-auto rounded bg-[var(--color-background)] px-2 py-1 font-mono text-xs text-[var(--color-text)]",children:r}),c.jsx("button",{onClick:()=>d(r),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:i===r?c.jsx(Ed,{size:14,className:"text-green-500"}):c.jsx(Lx,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]})]})}async function Fj(){const{data:n}=await Me.get("/api/llm-setup/status");return n}async function Kj(n){const{data:r}=await Me.post("/api/llm-setup/configure",{settings:n});return r}async function Zj(n,r,s){const{data:i}=await Me.post("/api/llm-setup/download",{repo:n,filename:r,token:s});return i}function Jj(){return Oa({queryKey:["llm-status"],queryFn:Fj,staleTime:3e4,retry:1})}function lv(){const n=ma();return Na({mutationFn:r=>Kj(r),onSuccess:()=>{n.invalidateQueries({queryKey:["llm-status"]}),n.invalidateQueries({queryKey:["containers"]})}})}function $j(){return Na({mutationFn:({repo:n,filename:r,token:s})=>Zj(n,r,s)})}async function Ad(){const{data:n}=await Me.get("/api/install/status");return n}async function Pj(n){const r=n?.length?{services:n.join(",")}:{},{data:s}=await Me.get("/api/install/preflight",{params:r});return s}async function Ij(){const{data:n}=await Me.get("/api/install/hardware");return n}async function wg(n){const{data:r}=await Me.post("/api/install/generate",n);return r}async function rv(){const{data:n}=await Me.get("/api/install/registry");return n}async function Wj(){const{data:n}=await Me.get("/api/install/defaults");return n}const eE={running:"bg-emerald-500",exited:"bg-red-500",restarting:"bg-amber-500",paused:"bg-amber-500",created:"bg-gray-400",dead:"bg-red-700"};function tE(n){return n.match(/^Up (.+)$/)?.[1]??null}function jg({container:n,onRestart:r,isRestarting:s}){const i=tE(n.status),d=n.ports.find(f=>f.public)?.public;return c.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[c.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[c.jsx("div",{className:ne("h-2.5 w-2.5 rounded-full",eE[n.state]??"bg-gray-400")}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"truncate text-sm font-medium text-[var(--color-text)]",children:n.displayName??n.name}),n.description&&c.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:n.description})]}),c.jsx("span",{className:ne("rounded-full px-2 py-0.5 text-xs font-medium",n.state==="running"?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-red-500/10 text-red-600 dark:text-red-400"),children:n.state})]}),c.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-2",children:c.jsxs("div",{className:"flex items-center justify-between text-xs text-[var(--color-text-muted)]",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[i&&c.jsxs("span",{children:["Up ",i]}),d&&c.jsxs("span",{children:[":",d]})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[d&&c.jsx("a",{href:`http://localhost:${d}/health`,target:"_blank",rel:"noopener noreferrer",className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Open health endpoint",children:c.jsx(RN,{size:13})}),c.jsx("button",{onClick:()=>r(n.id),disabled:s,className:ne("rounded p-1 hover:bg-[var(--color-surface-alt)]",s&&"animate-spin"),title:"Restart",children:c.jsx(Hx,{size:13})})]})]})})]})}async function aE(){const{data:n}=await Me.get("/api/update/check");return n}function sv(){return Oa({queryKey:["update-check"],queryFn:aE,staleTime:300*1e3,retry:1,refetchOnWindowFocus:!1})}const Eg="jarvis-update-dismissed-version";function Tg(){const n=tn(),{data:r}=sv(),[s,i]=S.useState(()=>r?.latestVersion?localStorage.getItem(Eg)===r.latestVersion:!1);return!r?.updateAvailable||s?null:c.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Ux,{size:20,className:"text-green-500"}),c.jsxs("div",{children:[c.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Jarvis v",r.latestVersion," available"]}),c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["You have v",r.currentVersion]})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[r.releaseUrl&&c.jsx("a",{href:r.releaseUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Release notes"}),c.jsx("button",{onClick:()=>{localStorage.setItem(Eg,r.latestVersion),i(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),c.jsx("button",{onClick:()=>n("/update"),className:"rounded-lg bg-green-600 px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Update"})]})]})}const Hu="jarvis-admin:llm-setup-dismissed";function nE(){const n=tn(),[r,s]=S.useState(!1),{data:i,isLoading:d,isError:f,error:m,refetch:x,isFetching:v}=av(),g=nv(),y=Jj(),[p,w]=S.useState(()=>!!localStorage.getItem(Hu));S.useEffect(()=>{Ad().then(_=>{_.deployMode==="compose-export"&&s(!0)}).catch(()=>{})},[]);const M=!!y.data&&!y.data.configured&&!p,N=_=>{g.mutate(_,{onSuccess:()=>Xe.success("Container restart initiated"),onError:G=>Xe.error(`Restart failed: ${G.message}`)})};if(r)return c.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[c.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),c.jsx(Tg,{}),M&&c.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(ld,{size:20,className:"text-[var(--color-primary)]"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{onClick:()=>{localStorage.setItem(Hu,"true"),w(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),c.jsx("button",{onClick:()=>n("/llm-setup"),className:"rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Set up LLM"})]})]}),c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-8 text-center",children:[c.jsx(_d,{size:32,className:"mx-auto mb-3 text-[var(--color-text-muted)]"}),c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Running in Docker Compose mode"}),c.jsx("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:"Container management is handled by your Docker environment (TrueNAS, Portainer, etc.). Use your platform's tools to view container status, logs, and restarts."})]})]});if(d)return c.jsx("div",{className:"flex items-center justify-center py-20",children:c.jsx(da,{className:"animate-spin text-[var(--color-primary)]",size:24})});if(f)return c.jsxs("div",{className:"py-20 text-center",children:[c.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load containers"}),c.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:m?.message??"Unknown error"}),c.jsx("button",{onClick:()=>x(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]});const j=i?.containers??[],R=j.filter(_=>_.state==="running"),z=j.filter(_=>_.state!=="running");return c.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),c.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[c.jsxs("span",{children:[R.length,"/",j.length," running"]}),c.jsx("button",{onClick:()=>x(),disabled:v,className:ne("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",v&&"animate-spin"),title:"Refresh",children:c.jsx(da,{size:14})})]})]}),c.jsx(Tg,{}),M&&c.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(ld,{size:20,className:"text-[var(--color-primary)]"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{onClick:()=>{localStorage.setItem(Hu,"true"),w(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),c.jsx("button",{onClick:()=>n("/llm-setup"),className:"rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Set up LLM"})]})]}),c.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Bx,{size:20,className:"text-[var(--color-text-muted)]"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Sync compose to latest registry"}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Regenerate docker-compose.yml and apply changes — adds new background workers and services without recreating unchanged containers"})]})]}),c.jsx("button",{onClick:()=>n("/reconcile"),className:"rounded-lg border border-[var(--color-border)] px-3 py-1.5 text-xs text-[var(--color-text)] hover:bg-[var(--color-surface-alt)]",children:"Sync now"})]}),j.length===0&&c.jsx("div",{className:"py-12 text-center",children:c.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:i?.error?i.error:"No Jarvis containers found. Is Docker running?"})}),R.length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Running"}),c.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:R.map(_=>c.jsx(jg,{container:_,onRestart:N,isRestarting:g.isPending&&g.variables===_.id},_.id))})]}),z.length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Stopped"}),c.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:z.map(_=>c.jsx(jg,{container:_,onRestart:N,isRestarting:g.isPending&&g.variables===_.id},_.id))})]})]})}async function lE(){const{data:n}=await Me.get("/api/nodes");return n}async function rE(n){const{data:r}=await Me.get(`/api/nodes/${n}/nodes`);return r}async function sE(n){const{data:r}=await Me.post(`/api/nodes/${n}/train-adapter`);return r}function iE(){return Oa({queryKey:["households"],queryFn:lE,staleTime:3e4})}function oE(n){return Oa({queryKey:["household-nodes",n],queryFn:()=>rE(n),enabled:!!n,staleTime:3e4})}function cE(){const n=ma();return Na({mutationFn:sE,onSuccess:()=>{n.invalidateQueries({queryKey:["household-nodes"]})}})}function uE({node:n,onTrain:r,isTraining:s}){return c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ps,{size:16,className:"text-[var(--color-text-muted)]"}),c.jsx("span",{className:"font-medium text-[var(--color-text)]",children:n.name})]}),c.jsxs("span",{className:ne("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",n.is_active?"bg-green-500/10 text-green-500":"bg-red-500/10 text-red-500"),children:[n.is_active?c.jsx(xw,{size:10}):c.jsx(pw,{size:10}),n.is_active?"Active":"Inactive"]})]}),c.jsxs("div",{className:"mt-3 space-y-1 text-xs text-[var(--color-text-muted)]",children:[c.jsxs("p",{children:[c.jsx("span",{className:"font-medium",children:"ID:"})," ",n.node_id]}),n.services.length>0&&c.jsxs("p",{children:[c.jsx("span",{className:"font-medium",children:"Services:"})," ",n.services.join(", ")]})]}),c.jsx("div",{className:"mt-4",children:c.jsx("button",{onClick:()=>r(n.node_id),disabled:s||!n.is_active,className:ne("rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",s||!n.is_active?"cursor-not-allowed bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:s?c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx(da,{size:12,className:"animate-spin"}),"Training..."]}):"Train Adapter"})})]})}function dE({householdId:n,householdName:r}){const{data:s,isLoading:i,isError:d}=oE(n),f=cE(),m=x=>{f.mutate(x,{onSuccess:v=>Xe.success(`Training triggered for ${x} (request: ${v.request_id.slice(0,8)}...)`),onError:v=>Xe.error(`Training failed: ${v.message}`)})};return c.jsxs("div",{className:"space-y-2",children:[c.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:r}),i&&c.jsx("div",{className:"flex items-center justify-center py-8",children:c.jsx(da,{className:"animate-spin text-[var(--color-primary)]",size:18})}),d&&c.jsx("p",{className:"py-4 text-center text-sm text-red-500",children:"Failed to load nodes"}),s&&s.length===0&&c.jsx("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:"No nodes registered in this household"}),s&&s.length>0&&c.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:s.map(x=>c.jsx(uE,{node:x,onTrain:m,isTraining:f.isPending&&f.variables===x.node_id},x.node_id))})]})}function fE(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=iE();return r?c.jsx("div",{className:"flex items-center justify-center py-20",children:c.jsx(da,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?c.jsxs("div",{className:"py-20 text-center",children:[c.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load households"}),c.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),c.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):c.jsxs("div",{className:"mx-auto max-w-4xl space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Nodes"}),c.jsx("button",{onClick:()=>d(),disabled:f,className:ne("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:c.jsx(da,{size:14,className:"text-[var(--color-text-muted)]"})})]}),(!n||n.length===0)&&c.jsx("div",{className:"py-12 text-center",children:c.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No households found. Register a household in jarvis-auth first."})}),n?.map(m=>c.jsx(dE,{householdId:m.id,householdName:m.name},m.id))]})}async function mE(){const{data:n}=await Me.get("/api/models/installed");return n.models}async function hE(n){const{data:r}=await Me.post("/api/models/download",n);return r}async function pE(n){await Me.delete(`/api/models/${encodeURIComponent(n)}`)}function gE(){return Oa({queryKey:["models","installed"],queryFn:mE,staleTime:1e4})}function iv(){const n=ma();return Na({mutationFn:r=>hE(r),onSuccess:()=>{n.invalidateQueries({queryKey:["models","installed"]})}})}function xE(){const n=ma();return Na({mutationFn:r=>pE(r),onSuccess:()=>{n.invalidateQueries({queryKey:["models","installed"]})}})}const ar=[{id:"qwen3-4b",displayName:"Qwen 3 4B",hfRepoVllm:"Qwen/Qwen3-4B-AWQ",hfRepoGguf:"Qwen/Qwen3-4B-GGUF",ggufFilename:"Qwen3-4B-Q4_K_M.gguf",chatFormat:"qwen3",contextWindow:40960,sizeVllm:"2.5GB",sizeGguf:"2.5GB",vramMb:4096,gated:!1,quantization:"awq",promptProvider:"Qwen25MediumUntrained"},{id:"qwen3-8b",displayName:"Qwen 3 8B",hfRepoVllm:"Qwen/Qwen3-8B-AWQ",hfRepoGguf:"Qwen/Qwen3-8B-GGUF",ggufFilename:"Qwen3-8B-Q4_K_M.gguf",chatFormat:"qwen3",contextWindow:40960,sizeVllm:"5.7GB",sizeGguf:"5GB",vramMb:7168,gated:!1,quantization:"awq",promptProvider:"Qwen25MediumUntrained"},{id:"qwen3-14b",displayName:"Qwen 3 14B",hfRepoVllm:"Qwen/Qwen3-14B-AWQ",hfRepoGguf:"Qwen/Qwen3-14B-GGUF",ggufFilename:"Qwen3-14B-Q4_K_M.gguf",chatFormat:"qwen3",contextWindow:40960,sizeVllm:"9.4GB",sizeGguf:"9GB",vramMb:12288,gated:!1,quantization:"awq",promptProvider:"Qwen3LargeUntrained"},{id:"qwen25-7b",displayName:"Qwen 2.5 7B Instruct",hfRepoVllm:"Qwen/Qwen2.5-7B-Instruct-AWQ",hfRepoGguf:"Qwen/Qwen2.5-7B-Instruct-GGUF",ggufFilename:"qwen2.5-7b-instruct-q4_k_m.gguf",chatFormat:"chatml",contextWindow:32768,sizeVllm:"4.7GB",sizeGguf:"4.7GB",vramMb:6144,gated:!1,quantization:"awq",promptProvider:"Qwen25MediumUntrained"},{id:"llama-3.1-8b",displayName:"Llama 3.1 8B Instruct",hfRepoVllm:"hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4",hfRepoGguf:"lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF",ggufFilename:"Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf",chatFormat:"llama3",contextWindow:131072,sizeVllm:"5.4GB",sizeGguf:"5GB",vramMb:7168,gated:!1,quantization:"awq",promptProvider:"Llama31MediumUntrained"},{id:"hermes-3-8b",displayName:"Hermes 3 Llama 3.1 8B",hfRepoVllm:"solidrust/Hermes-3-Llama-3.1-8B-AWQ",hfRepoGguf:"NousResearch/Hermes-3-Llama-3.1-8B-GGUF",ggufFilename:"Hermes-3-Llama-3.1-8B.Q4_K_M.gguf",chatFormat:"chatml",contextWindow:131072,sizeVllm:"5.4GB",sizeGguf:"4.9GB",vramMb:7168,gated:!1,quantization:"awq",promptProvider:"HermesMediumUntrained"}];function vE(){const[n,r]=S.useState(""),[s,i]=S.useState(""),[d,f]=S.useState(""),[m,x]=S.useState(null),{data:v,isLoading:g}=gE(),y=iv(),p=xE();function w(j,R){const z=`${j}/${R??""}`;x(z),y.mutate({repo:j,filename:R||void 0,token:n||void 0},{onSuccess:_=>{Xe.success(_.message),x(null)},onError:_=>{Xe.error(_ instanceof Error?_.message:"Download failed"),x(null)}})}function M(j){confirm(`Delete ${j}?`)&&p.mutate(j,{onSuccess:()=>Xe.success(`Deleted ${j}`),onError:()=>Xe.error("Failed to delete")})}function N(){s&&w(s,d)}return c.jsxs("div",{className:"mx-auto max-w-4xl space-y-8 p-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Models"}),c.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Manage LLM models on the inference server"})]}),c.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx(LN,{size:16,className:"text-[var(--color-text-muted)]"}),c.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Token"}),c.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(optional, for gated models)"})]}),c.jsx("input",{type:"password",value:n,onChange:j=>r(j.target.value),placeholder:"hf_...",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),c.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(Rd,{size:16,className:"text-[var(--color-text-muted)]"}),c.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Installed Models"})]}),g?c.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Loading..."}):v?.length?c.jsx("div",{className:"space-y-2",children:v.map(j=>c.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-3 py-2",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:j.name}),c.jsx("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:j.sizeFormatted})]}),c.jsx("button",{onClick:()=>M(j.name),disabled:p.isPending,className:"rounded p-1 text-[var(--color-text-muted)] hover:bg-red-500/10 hover:text-red-500",children:c.jsx(Gx,{size:14})})]},j.name))}):c.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No models installed yet"})]}),c.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(ow,{size:16,className:"text-[var(--color-text-muted)]"}),c.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Suggested Models"})]}),c.jsx("div",{className:"space-y-3",children:ar.map(j=>{const R=v?.some(z=>z.name===j.ggufFilename||z.name.includes(j.ggufFilename));return c.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-4 py-3",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:j.displayName}),c.jsxs("span",{className:"rounded bg-[var(--color-surface-alt)] px-1.5 py-0.5 text-xs text-[var(--color-text-muted)]",children:["~",j.sizeGguf]}),R&&c.jsx("span",{className:"rounded bg-green-500/10 px-1.5 py-0.5 text-xs text-green-500",children:"installed"})]}),c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[j.hfRepoGguf," / ",j.ggufFilename]}),c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Prompt provider: ",c.jsx("code",{className:"text-[var(--color-primary)]",children:j.promptProvider})]})]}),c.jsxs("button",{onClick:()=>w(j.hfRepoGguf,j.ggufFilename),disabled:m!==null,className:ne("ml-4 flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",R?"border border-[var(--color-border)] text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:[c.jsx(fs,{size:14}),m===`${j.hfRepoGguf}/${j.ggufFilename}`?"Downloading...":R?"Re-download":"Download"]})]},j.id)})})]}),c.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(fs,{size:16,className:"text-[var(--color-text-muted)]"}),c.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Download from HuggingFace"})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Repository (e.g. Qwen/Qwen3-14B-GGUF)"}),c.jsx("input",{value:s,onChange:j=>i(j.target.value),placeholder:"owner/repo-name",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Filename (optional — downloads specific file instead of full repo)"}),c.jsx("input",{value:d,onChange:j=>f(j.target.value),placeholder:"model-name.gguf",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),c.jsxs("button",{onClick:N,disabled:!s||m!==null,className:"flex items-center gap-2 rounded-md bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white transition-colors hover:opacity-90 disabled:opacity-50",children:[c.jsx(fs,{size:14}),m===`${s}/${d}`?"Downloading...":"Download"]})]})]})]})}const qu={preflight:"Checking prerequisites",download:"Downloading update",binary:"Updating binary",restarting:"Restarting admin server",compose:"Updating configuration",pull:"Pulling images",restart:"Restarting services",verify:"Verifying health",done:"Complete"};function yE(){const n=tn(),{data:r,isLoading:s}=sv(),[i,d]=S.useState("idle"),[f,m]=S.useState([]),[x,v]=S.useState(null),g=S.useRef(null),y=S.useCallback(M=>{m(N=>[...N,M])},[]);S.useEffect(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},[f]);async function p(){d("preflight"),m([]),v(null);try{const M=localStorage.getItem("jarvis-admin:access_token")??localStorage.getItem("access_token"),N=await fetch("/api/update/apply",{method:"POST",headers:{Authorization:`Bearer ${M}`}});if(!N.ok||!N.body){const _=await N.text();throw new Error(_||`HTTP ${N.status}`)}const j=N.body.getReader(),R=new TextDecoder;let z="";for(;;){const{done:_,value:G}=await j.read();if(_)break;z+=R.decode(G,{stream:!0});const L=z.split(`
|
|
17
17
|
`);z=L.pop()??"";for(const J of L)if(J.startsWith("data: "))try{const X=JSON.parse(J.slice(6));if(X.phase&&d(X.phase),X.message&&y({text:X.message,phase:X.phase}),X.stream&&X.text&&y({text:X.text.trim()}),X.restart){d("restarting"),y({text:"Admin server restarting with new version..."}),await bE(r?.latestVersion??""),d("done"),y({text:"Upgrade complete!"});return}if(X.done&&X.code!==0)throw new Error(X.error??"Upgrade failed");X.done&&X.code===0&&d("done")}catch(X){if(X instanceof SyntaxError)continue;throw X}}}catch(M){const N=M instanceof Error?M.message:String(M);v(N),d("error"),y({text:`Error: ${N}`})}}if(s)return c.jsx("div",{className:"flex min-h-[50vh] items-center justify-center",children:c.jsx(ua,{size:24,className:"animate-spin text-[var(--color-primary)]"})});const w=Object.keys(qu).filter(M=>{const N=Object.keys(qu),j=N.indexOf(i);return N.indexOf(M)<j});return c.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Update Jarvis"}),r?.updateAvailable?c.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["v",r.currentVersion," → v",r.latestVersion]}):c.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["You're running the latest version (v",r?.currentVersion??"?",")"]})]}),i!=="idle"&&c.jsx("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:Object.entries(qu).map(([M,N])=>{const j=M===i,R=w.includes(M),z=M===i&&i==="error";return c.jsxs("div",{className:"flex items-center gap-2",children:[R?c.jsx(bt,{size:16,className:"text-green-500"}):z?c.jsx(fa,{size:16,className:"text-red-500"}):j?c.jsx(ua,{size:16,className:"animate-spin text-[var(--color-primary)]"}):c.jsx("div",{className:"h-4 w-4 rounded-full border border-[var(--color-border)]"}),c.jsx("span",{className:ne("text-sm",j?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]",R&&"text-green-500"),children:N})]},M)})}),f.length>0&&c.jsx("div",{ref:g,className:"max-h-64 overflow-y-auto rounded-lg border border-[var(--color-border)] bg-[#0d1117] p-3 font-mono text-xs text-gray-300",children:f.map((M,N)=>c.jsx("div",{children:M.text},N))}),x&&c.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[c.jsx(fa,{size:14,className:"text-red-500"}),c.jsx("span",{className:"text-sm text-red-500",children:x})]}),c.jsxs("div",{className:"flex gap-3",children:[i==="idle"&&r?.updateAvailable&&c.jsxs("button",{onClick:p,className:"flex items-center gap-2 rounded-lg bg-green-600 px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[c.jsx(Ux,{size:16}),"Update to v",r.latestVersion]}),i==="done"&&c.jsxs("button",{onClick:()=>n("/dashboard"),className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[c.jsx(bt,{size:16}),"Go to Dashboard"]}),i==="error"&&c.jsxs("button",{onClick:p,className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[c.jsx(da,{size:16}),"Retry"]})]})]})}async function bE(n,r=6e4){const s=Date.now()+r;for(;Date.now()<s;){await new Promise(i=>setTimeout(i,2e3));try{const i=await fetch("/health");if(i.ok){const d=await i.json();if(d.version&&d.version!=="0.0.0-dev")return}}catch{}}throw new Error("Admin server did not restart within 60 seconds")}const Gu={regenerate:"Regenerating compose from registry",apply:"Applying changes (docker compose up)",done:"Complete"};function SE(){const n=tn(),r=localStorage.getItem("jarvis-admin:access_token")??localStorage.getItem("access_token"),[s,i]=S.useState("loading_options"),[d,f]=S.useState([]),[m,x]=S.useState(null),v=S.useRef(null),[g,y]=S.useState([]),[p,w]=S.useState(!1),[M,N]=S.useState("https://relay.jarvisautomation.io"),[j,R]=S.useState("/whisper-models/ggml-base.en.bin"),z=S.useCallback(J=>{f(X=>[...X,J])},[]);S.useEffect(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight)},[d]),S.useEffect(()=>{async function J(){try{const X=await fetch("/api/install/reconcile/options",{headers:{Authorization:`Bearer ${r}`}});if(!X.ok)throw new Error(`HTTP ${X.status}`);const I=await X.json();y(I.services),w(I.relayEnabled),N(I.relayUrl||"https://relay.jarvisautomation.io"),R(I.whisperModelPath||"/whisper-models/ggml-base.en.bin"),i("options")}catch(X){x(X instanceof Error?X.message:"Failed to load options"),i("error")}}J()},[r]);function _(J){y(X=>X.map(I=>I.id===J?{...I,enabled:!I.enabled}:I))}async function G(){i("regenerate"),f([]),x(null);const J=g.filter(X=>X.enabled).map(X=>X.id);try{const X=await fetch("/api/install/reconcile",{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({enabledModules:J,relayEnabled:p,relayUrl:M,whisperModelPath:j})});if(!X.ok||!X.body){const le=await X.text();throw new Error(le||`HTTP ${X.status}`)}const I=X.body.getReader(),W=new TextDecoder;let ee="";for(;;){const{done:le,value:se}=await I.read();if(le)break;ee+=W.decode(se,{stream:!0});const fe=ee.split(`
|
|
18
|
-
`);ee=fe.pop()??"";for(const Te of fe)if(Te.startsWith("data: "))try{const ye=JSON.parse(Te.slice(6));if(ye.phase&&i(ye.phase),ye.message&&z({text:ye.message,phase:ye.phase}),ye.stream&&ye.text&&z({text:ye.text.trim()}),ye.done&&ye.code!==0)throw new Error(ye.message??"Reconcile failed")}catch(ye){if(ye instanceof SyntaxError)continue;throw ye}}}catch(X){const I=X instanceof Error?X.message:String(X);x(I),i("error"),z({text:`Error: ${I}`})}}const L=Object.keys(Gu).filter(J=>{const X=Object.keys(Gu),I=X.indexOf(s);return X.indexOf(J)<I||s==="done"&&J==="done"});return c.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Sync Compose"}),c.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:["Regenerate ",c.jsx("code",{className:"rounded bg-[var(--color-surface)] px-1.5 py-0.5 text-xs",children:"docker-compose.yml"})," from the latest service registry and apply changes to the running stack."]})]}),s==="loading_options"&&c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx(ua,{size:32,className:"animate-spin text-[var(--color-primary)]"})}),s==="options"&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Services"}),c.jsx("div",{className:"space-y-2",children:g.map(J=>c.jsxs("button",{onClick:()=>_(J.id),className:"flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left hover:bg-[var(--color-bg-secondary)] transition-colors",children:[J.enabled?c.jsx(bt,{size:18,className:"shrink-0 text-[var(--color-primary)]"}):c.jsx(lr,{size:18,className:"shrink-0 text-[var(--color-text-muted)]"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-sm font-medium text-[var(--color-text)]",children:J.name}),c.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:J.description})]})]},J.id))})]}),c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Integrations"}),c.jsxs("button",{onClick:()=>w(!p),className:"flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left hover:bg-[var(--color-bg-secondary)] transition-colors",children:[p?c.jsx(bt,{size:18,className:"shrink-0 text-[var(--color-primary)]"}):c.jsx(lr,{size:18,className:"shrink-0 text-[var(--color-text-muted)]"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-sm font-medium text-[var(--color-text)]",children:"Jarvis Relay"}),c.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:"Routes OAuth callbacks through a cloud relay for external providers (Google, Spotify, etc.)"})]})]}),p&&c.jsxs("div",{className:"mt-2 px-3",children:[c.jsx("label",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Relay URL"}),c.jsx("input",{type:"url",value:M,onChange:J=>N(J.target.value),placeholder:"https://relay.jarvisautomation.io",className:"mt-1 w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-1.5 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]})]}),g.some(J=>J.id==="jarvis-whisper-api"&&J.enabled)&&c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Whisper"}),c.jsxs("div",{className:"px-3",children:[c.jsx("label",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Model path"}),c.jsx("input",{type:"text",value:j,onChange:J=>R(J.target.value),placeholder:"/whisper-models/ggml-base.en.bin",className:"mt-1 w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-1.5 text-sm font-mono text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"}),c.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["Path inside the container. Place model files in ",c.jsx("code",{className:"rounded bg-[var(--color-bg)] px-1",children:"./whisper-models/"})," next to your compose file."]})]})]})]}),s!=="loading_options"&&s!=="options"&&c.jsx("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:Object.entries(Gu).map(([J,X])=>{const I=J===s,W=L.includes(J),ee=J===s&&s==="error";return c.jsxs("div",{className:"flex items-center gap-2",children:[W?c.jsx(bt,{size:16,className:"text-green-500"}):ee?c.jsx(fa,{size:16,className:"text-red-500"}):I?c.jsx(ua,{size:16,className:"animate-spin text-[var(--color-primary)]"}):c.jsx("div",{className:"h-4 w-4 rounded-full border border-[var(--color-border)]"}),c.jsx("span",{className:ne("text-sm",I?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]",W&&"text-green-500"),children:X})]},J)})}),d.length>0&&c.jsx("div",{ref:v,className:"max-h-64 overflow-y-auto rounded-lg border border-[var(--color-border)] bg-[#0d1117] p-3 font-mono text-xs text-gray-300",children:d.map((J,X)=>c.jsx("div",{children:J.text},X))}),m&&c.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[c.jsx(fa,{size:14,className:"text-red-500"}),c.jsx("span",{className:"text-sm text-red-500",children:m})]}),c.jsxs("div",{className:"flex gap-3",children:[s==="options"&&c.jsxs("button",{onClick:G,className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[c.jsx(Bx,{size:16}),"Sync now"]}),(s==="options"||s==="regenerate"||s==="apply"||s==="done")&&c.jsxs("button",{onClick:()=>n("/dashboard"),disabled:s==="regenerate"||s==="apply",className:"flex items-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-alt)] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",children:[c.jsx(bt,{size:16}),"Back to dashboard"]}),s==="error"&&c.jsxs("button",{onClick:G,className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[c.jsx(da,{size:16}),"Retry"]})]})]})}function NE(){return c.jsxs("div",{className:"flex min-h-[60vh] flex-col items-center justify-center",children:[c.jsx("h1",{className:"mb-2 text-4xl font-bold text-[var(--color-text)]",children:"404"}),c.jsx("p",{className:"mb-4 text-[var(--color-text-muted)]",children:"Page not found"}),c.jsx(hd,{to:"/settings",className:"text-[var(--color-primary)] underline hover:opacity-80",children:"Go to Settings"})]})}const wE=7,jE={currentStep:0,totalSteps:wE,enabledModules:[],portOverrides:{},infraPortOverrides:{},secrets:{},dbUser:"jarvis",whisperModel:"base.en",llmInterface:"Qwen25MediumUntrained",deploymentMode:"local",deploymentTarget:"standard",remoteLlmUrl:"",remoteWhisperUrl:"",platform:"linux",hardware:null,relayEnabled:!1,installRunning:!1,installComplete:!1};function EE(n,r,s){return Math.max(r,Math.min(s,n))}function TE(n,r){switch(r.type){case"SET_STEP":return{...n,currentStep:EE(r.step,0,n.totalSteps-1)};case"NEXT_STEP":return{...n,currentStep:Math.min(n.currentStep+1,n.totalSteps-1)};case"PREV_STEP":return{...n,currentStep:Math.max(n.currentStep-1,0)};case"SET_ENABLED_MODULES":return{...n,enabledModules:r.modules};case"TOGGLE_MODULE":{if(r.enabled){const s=n.enabledModules.includes(r.serviceId)?n.enabledModules:[...n.enabledModules,r.serviceId];return{...n,enabledModules:s}}return{...n,enabledModules:n.enabledModules.filter(s=>s!==r.serviceId)}}case"SET_PORT_OVERRIDE":return{...n,portOverrides:{...n.portOverrides,[r.serviceId]:r.port}};case"SET_INFRA_PORT_OVERRIDE":return{...n,infraPortOverrides:{...n.infraPortOverrides,[r.infraId]:r.port}};case"SET_SECRET":return{...n,secrets:{...n.secrets,[r.name]:r.value}};case"SET_SECRETS":return{...n,secrets:r.secrets};case"SET_DB_USER":return{...n,dbUser:r.user};case"SET_WHISPER_MODEL":return{...n,whisperModel:r.model};case"SET_LLM_INTERFACE":return{...n,llmInterface:r.interfaceId};case"SET_DEPLOYMENT_MODE":return{...n,deploymentMode:r.mode};case"SET_DEPLOYMENT_TARGET":return{...n,deploymentTarget:r.target};case"SET_REMOTE_LLM_URL":return{...n,remoteLlmUrl:r.url};case"SET_REMOTE_WHISPER_URL":return{...n,remoteWhisperUrl:r.url};case"SET_PLATFORM":return{...n,platform:r.platform};case"SET_HARDWARE":return{...n,hardware:r.hardware,platform:r.hardware.platform};case"SET_RELAY_ENABLED":return{...n,relayEnabled:r.enabled};case"SET_INSTALL_RUNNING":return{...n,installRunning:r.running};case"SET_INSTALL_COMPLETE":return{...n,installRunning:!1,installComplete:!0};default:return n}}const ov=S.createContext(null);function RE({children:n}){const[r,s]=S.useReducer(TE,jE);return c.jsx(ov.Provider,{value:{state:r,dispatch:s},children:n})}function ul(){const n=S.useContext(ov);if(!n)throw new Error("useWizard must be used within a WizardProvider");return n}function CE(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(null),[d,f]=S.useState(!0),[m,x]=S.useState(!1);function v(){f(!0),x(!1),Ad().then(y=>{i(y);const p=y.reason==="docker_not_found";x(p),r(p?{type:"SET_INSTALL_RUNNING",running:!0}:{type:"SET_INSTALL_RUNNING",running:!1})}).catch(()=>{i({configured:!1,reason:"error"}),x(!0),r({type:"SET_INSTALL_RUNNING",running:!0})}).finally(()=>f(!1))}S.useEffect(()=>{v()},[]);const g=s&&s.reason!=="docker_not_found";return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Let's get your personal voice assistant up and running. This wizard will guide you through selecting services, configuring hardware, and starting everything up."})]}),c.jsx("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:c.jsxs("div",{className:"flex items-center gap-3",children:[d?c.jsx(ua,{size:20,className:"animate-spin text-[var(--color-primary)]"}):g?c.jsx(bt,{size:20,className:"text-green-500"}):c.jsx(Dx,{size:20,className:"text-red-500"}),c.jsxs("div",{className:"flex-1",children:[c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:d?"Checking Docker...":g?"Docker is running":"Docker not found"}),!d&&!g&&c.jsxs("div",{className:"mt-1 space-y-1",children:[c.jsx("p",{className:"text-xs text-red-400",children:"Docker is required to run Jarvis services."}),c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Install"," ",c.jsx("a",{href:"https://www.docker.com/products/docker-desktop/",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-primary)] underline hover:no-underline",children:"Docker Desktop"})," ","for your platform, start it, then click Retry."]})]})]}),m&&!d&&c.jsxs("button",{type:"button",onClick:v,className:"flex items-center gap-1 rounded-md border border-[var(--color-border)] px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[c.jsx(fo,{size:12}),"Retry"]})]})}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-2 block text-sm font-medium text-[var(--color-text)]",children:"Deployment Mode"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"local"}),className:ne("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="local"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[c.jsx(XN,{size:24,className:"text-[var(--color-primary)]"}),c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Local"}),c.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"Everything on this machine"})]}),c.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"}),className:ne("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="remote-llm"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[c.jsx(_d,{size:24,className:"text-[var(--color-primary)]"}),c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM"}),c.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"LLM on separate GPU machine"})]})]})]})]})}const Yi=[{label:"None / CPU only",gpu:null,gpuType:"none",vramMb:null,backends:["gguf"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4090 (24 GB)",gpu:"NVIDIA RTX 4090",gpuType:"nvidia",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4080 (16 GB)",gpu:"NVIDIA RTX 4080",gpuType:"nvidia",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4070 Ti (12 GB)",gpu:"NVIDIA RTX 4070 Ti",gpuType:"nvidia",vramMb:12288,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3090 (24 GB)",gpu:"NVIDIA RTX 3090",gpuType:"nvidia",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3080 (10 GB)",gpu:"NVIDIA RTX 3080",gpuType:"nvidia",vramMb:10240,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3070 (8 GB)",gpu:"NVIDIA RTX 3070",gpuType:"nvidia",vramMb:8192,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA A100 (80 GB)",gpu:"NVIDIA A100",gpuType:"nvidia",vramMb:81920,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA A100 (40 GB)",gpu:"NVIDIA A100",gpuType:"nvidia",vramMb:40960,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA Tesla T4 (16 GB)",gpu:"NVIDIA Tesla T4",gpuType:"nvidia",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"AMD RX 9070 XT — Vulkan (16 GB)",gpu:"AMD RX 9070 XT",gpuType:"amd",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 9070 — Vulkan (12 GB)",gpu:"AMD RX 9070",gpuType:"amd",vramMb:12288,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XTX — Vulkan (24 GB)",gpu:"AMD RX 7900 XTX",gpuType:"amd",vramMb:24576,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XT — Vulkan (20 GB)",gpu:"AMD RX 7900 XT",gpuType:"amd",vramMb:20480,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7800 XT — Vulkan (16 GB)",gpu:"AMD RX 7800 XT",gpuType:"amd",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7600 — Vulkan (8 GB)",gpu:"AMD RX 7600",gpuType:"amd",vramMb:8192,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 9070 XT — ROCm (16 GB)",gpu:"AMD RX 9070 XT",gpuType:"amd-rocm",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 9070 — ROCm (12 GB)",gpu:"AMD RX 9070",gpuType:"amd-rocm",vramMb:12288,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XTX — ROCm (24 GB)",gpu:"AMD RX 7900 XTX",gpuType:"amd-rocm",vramMb:24576,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XT — ROCm (20 GB)",gpu:"AMD RX 7900 XT",gpuType:"amd-rocm",vramMb:20480,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7800 XT — ROCm (16 GB)",gpu:"AMD RX 7800 XT",gpuType:"amd-rocm",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"Apple M4 Max (128 GB unified)",gpu:"Apple M4 Max",gpuType:"apple",vramMb:131072,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Max (64 GB unified)",gpu:"Apple M4 Max",gpuType:"apple",vramMb:65536,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (48 GB unified)",gpu:"Apple M4 Pro",gpuType:"apple",vramMb:49152,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (24 GB unified)",gpu:"Apple M4 Pro",gpuType:"apple",vramMb:24576,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Max (32 GB unified)",gpu:"Apple M2 Max",gpuType:"apple",vramMb:32768,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Pro (16 GB unified)",gpu:"Apple M2 Pro",gpuType:"apple",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (16 GB unified)",gpu:"Apple M1",gpuType:"apple",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (8 GB unified)",gpu:"Apple M1",gpuType:"apple",vramMb:8192,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Other (enter VRAM manually)",gpu:"Other",gpuType:"none",vramMb:null,backends:["gguf"],defaultBackend:"gguf"}];function _E(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(!n.hardware),[d,f]=S.useState(!1),[m,x]=S.useState(0),[v,g]=S.useState("");S.useEffect(()=>{n.hardware||Ij().then(w=>{r({type:"SET_HARDWARE",hardware:w}),w.recommendedBackend==="remote"&&n.deploymentMode==="local"&&r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"})}).catch(()=>{}).finally(()=>i(!1))},[]);function y(w,M){const N=Yi[w];if(!n.hardware)return;const j=N.gpu==="Other"?(parseInt(M??v,10)||0)*1024:N.vramMb,R={...n.hardware,gpuName:N.gpu,gpuVramMb:j||null,gpuType:N.gpuType,recommendedBackends:[...N.backends],recommendedBackend:N.defaultBackend};r({type:"SET_HARDWARE",hardware:R})}const p=n.hardware;return s?c.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[c.jsx(ua,{size:32,className:"animate-spin text-[var(--color-primary)]"}),c.jsx("p",{className:"mt-3 text-sm text-[var(--color-text-muted)]",children:"Detecting hardware..."})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Hardware Detection"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"We detected the following hardware. This determines which LLM backend to use."})]}),p&&c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[c.jsx(ps,{size:16}),c.jsx("span",{className:"text-xs font-medium uppercase",children:"Platform"})]}),c.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.platform==="darwin"?"macOS":"Linux"," (",p.arch,")"]})]}),c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[c.jsx(Rd,{size:16}),c.jsx("span",{className:"text-xs font-medium uppercase",children:"Memory"})]}),c.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.totalMemoryGb," GB RAM"]})]}),c.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[c.jsx(ps,{size:16}),c.jsx("span",{className:"text-xs font-medium uppercase",children:"GPU"})]}),c.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:p.gpuName??"No GPU detected"}),p.gpuVramMb!=null&&p.gpuVramMb>0&&c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[Math.round(p.gpuVramMb/1024)," GB VRAM"]})]}),c.jsx("button",{type:"button",onClick:()=>f(!d),className:"text-xs font-medium text-[var(--color-primary)] hover:underline",children:d?"Cancel":"Override"})]}),d&&c.jsxs("div",{className:"mt-3 space-y-3 border-t border-[var(--color-border)] pt-3",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"gpu-select",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Select GPU"}),c.jsx("select",{id:"gpu-select",value:m,onChange:w=>{const M=parseInt(w.target.value,10);x(M),Yi[M].gpu!=="Other"&&(y(M),f(!1))},className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]"),children:Yi.map((w,M)=>c.jsx("option",{value:M,children:w.label},`${w.label}-${M}`))})]}),Yi[m].gpu==="Other"&&c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("label",{htmlFor:"custom-vram",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"VRAM (GB)"}),c.jsx("input",{id:"custom-vram",type:"number",min:1,max:512,value:v,onChange:w=>g(w.target.value),placeholder:"e.g. 24",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),c.jsx("button",{type:"button",disabled:!v||parseInt(v,10)<=0,onClick:()=>{y(m,v),f(!1)},className:ne("rounded-lg px-4 py-2 text-sm font-medium","bg-[var(--color-primary)] text-white","disabled:cursor-not-allowed disabled:opacity-50"),children:"Apply"})]})]})]}),c.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[c.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Recommended: ",c.jsx("span",{className:"text-[var(--color-primary)]",children:p.recommendedBackend.toUpperCase()})]}),p.recommendedBackends.length>1&&c.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["Available backends: ",p.recommendedBackends.join(", ")]})]})]}),n.deploymentMode==="remote-llm"&&c.jsxs("div",{className:"space-y-3",children:[c.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote Service URLs"}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"remote-llm",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"LLM Proxy URL"}),c.jsx("input",{id:"remote-llm",type:"url",value:n.remoteLlmUrl,onChange:w=>r({type:"SET_REMOTE_LLM_URL",url:w.target.value}),placeholder:"http://192.168.1.100:7704",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"remote-whisper",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Whisper URL (optional)"}),c.jsx("input",{id:"remote-whisper",type:"url",value:n.remoteWhisperUrl,onChange:w=>r({type:"SET_REMOTE_WHISPER_URL",url:w.target.value}),placeholder:"http://192.168.1.100:7706",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]})]})]})}function ME(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(null),[d,f]=S.useState(!0);if(S.useEffect(()=>{Promise.all([rv(),Wj()]).then(([g,y])=>{i(g),n.enabledModules.length===0&&r({type:"SET_ENABLED_MODULES",modules:y.enabledModules})}).catch(()=>{}).finally(()=>f(!1))},[]),d||!s)return c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx(ua,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const{core:m,recommended:x,optional:v}=AE(s.services);return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Select Services"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Core services are always included. Toggle recommended and optional services."})]}),c.jsx(Qu,{title:"Core",subtitle:"Always included",services:m,enabled:m.map(g=>g.id),locked:!0}),c.jsx(Qu,{title:"Recommended",subtitle:"Enabled by default",services:x,enabled:n.enabledModules,onToggle:(g,y)=>r({type:"TOGGLE_MODULE",serviceId:g,enabled:y}),platform:n.platform}),v.length>0&&c.jsx(Qu,{title:"Optional",subtitle:"Off by default",services:v,enabled:n.enabledModules,onToggle:(g,y)=>r({type:"TOGGLE_MODULE",serviceId:g,enabled:y})}),c.jsxs("div",{children:[c.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[c.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:"Integrations"}),c.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"Cloud services"})]}),c.jsxs("button",{type:"button",onClick:()=>r({type:"SET_RELAY_ENABLED",enabled:!n.relayEnabled}),className:ne("flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",n.relayEnabled?"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5":"border-[var(--color-border)] hover:border-[var(--color-primary)]/30"),children:[n.relayEnabled?c.jsx(bt,{size:16,className:"shrink-0 text-[var(--color-primary)]"}):c.jsx(lr,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Jarvis Relay"}),c.jsx(ON,{size:12,className:"text-[var(--color-text-muted)]"})]}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Routes OAuth callbacks through a cloud relay for external providers (Google, Spotify, etc.)"})]})]})]})]})}function AE(n){return{core:n.filter(r=>r.category==="core"),recommended:n.filter(r=>r.category==="recommended"),optional:n.filter(r=>r.category==="optional")}}function Qu({title:n,subtitle:r,services:s,enabled:i,locked:d,onToggle:f,platform:m}){return c.jsxs("div",{children:[c.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[c.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:n}),c.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:r})]}),c.jsx("div",{className:"space-y-1",children:s.map(x=>{const v=i.includes(x.id),g=x.nativeOnly&&m==="darwin";return c.jsxs("button",{type:"button",disabled:d,onClick:()=>f?.(x.id,!v),className:ne("flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",v?"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5":"border-[var(--color-border)] hover:border-[var(--color-primary)]/30",d&&"cursor-default"),children:[d?c.jsx(Cd,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}):v?c.jsx(bt,{size:16,className:"shrink-0 text-[var(--color-primary)]"}):c.jsx(lr,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:x.name}),c.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",x.port]}),g&&c.jsx("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-500",children:"Native"})]}),c.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:x.description})]})]},x.id)})})]})}function OE(){const{state:n}=ul(),[r,s]=S.useState(null);if(S.useEffect(()=>{rv().then(s).catch(()=>{})},[]),!r)return c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx(ua,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const i=r.services.filter(p=>p.category==="core"),d=r.services.filter(p=>p.category!=="core"&&n.enabledModules.includes(p.id)),f=[...i,...d],m=new Map;for(const p of f){const w=n.portOverrides[p.id]??p.port,M=m.get(w)??[];m.set(w,[...M,p.name])}const x=[...m.entries()].filter(([,p])=>p.length>1),v=f.filter(p=>p.database).length,g=f.filter(p=>p.nativeOnly&&n.platform==="darwin"),y=f.filter(p=>!(p.nativeOnly&&n.platform==="darwin"));return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Review Configuration"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Review your selections before installing."})]}),c.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[c.jsx(Vu,{label:"Docker Services",value:y.length}),c.jsx(Vu,{label:"Native Services",value:g.length}),c.jsx(Vu,{label:"Databases",value:v})]}),c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsx("p",{className:"text-xs font-medium uppercase text-[var(--color-text-muted)]",children:"Deployment Mode"}),c.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:n.deploymentMode==="local"?"Local (all services on this machine)":"Remote LLM"}),n.deploymentMode==="remote-llm"&&n.remoteLlmUrl&&c.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["LLM: ",n.remoteLlmUrl]})]}),c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[c.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:c.jsxs("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:["Services (",f.length,")"]})}),c.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:f.map(p=>c.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(bt,{size:14,className:"text-green-500"}),c.jsx("span",{className:"text-sm text-[var(--color-text)]",children:p.name})]}),c.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",n.portOverrides[p.id]??p.port]})]},p.id))})]}),n.relayEnabled&&c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsx("p",{className:"text-xs font-medium uppercase text-[var(--color-text-muted)]",children:"Jarvis Relay"}),c.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:"Enabled"}),c.jsx("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:"https://relay.jarvisautomation.io"})]}),x.length>0&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(fa,{size:16,className:"text-amber-500"}),c.jsx("span",{className:"text-sm font-medium text-amber-500",children:"Port Conflicts"})]}),x.map(([p,w])=>c.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["Port ",p,": ",w.join(", ")]},p))]})]})}function Vu({label:n,value:r}){return c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-3 text-center",children:[c.jsx("p",{className:"text-2xl font-bold text-[var(--color-primary)]",children:r}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})}function Rg(){const[n,r]=S.useState({lines:[],running:!1,done:!1,exitCode:null,error:null,redirect:null}),s=S.useRef(null),i=S.useCallback((f,m)=>(s.current?.close(),r({lines:[],running:!0,done:!1,exitCode:null,error:null,redirect:null}),new Promise((x,v)=>{const g=new EventSource(f);s.current=g,g.onmessage=y=>{try{const p=JSON.parse(y.data);if(m&&m(p),"done"in p){if(r(w=>({...w,running:!1,done:!0,exitCode:p.code,redirect:p.redirect??null})),g.close(),p.code===0)x(p.code);else{const w=p.error?String(p.error):`Process exited with code ${p.code}`;v(new Error(w))}return}if("stream"in p&&"text"in p){const w={stream:p.stream,text:p.text,timestamp:Date.now()};r(M=>({...M,lines:[...M.lines,w]}))}}catch{}},g.onerror=()=>{const y=s.current===null;r(p=>({...p,running:!1,error:p.done?null:"Connection lost"})),g.close(),y||v(new Error("Connection lost"))}})),[]),d=S.useCallback(()=>{s.current?.close(),s.current=null,r(f=>({...f,running:!1}))},[]);return{...n,run:i,stop:d}}function Cg({lines:n,running:r,title:s,className:i}){const d=S.useRef(null),f=S.useRef(!0);S.useEffect(()=>{const x=d.current;!x||!f.current||(x.scrollTop=x.scrollHeight)},[n]);function m(){const x=d.current;if(!x)return;const v=x.scrollHeight-x.scrollTop-x.clientHeight;f.current=v<50}return c.jsxs("div",{className:ne("flex flex-col rounded-lg border border-[var(--color-border)] overflow-hidden",i),children:[s&&c.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2",children:[c.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:s}),r&&c.jsx("span",{className:"h-2 w-2 animate-pulse rounded-full bg-green-500"})]}),c.jsxs("div",{ref:d,onScroll:m,className:"h-64 overflow-y-auto bg-[#0d1117] p-3 font-mono text-xs leading-5",children:[n.length===0&&!r&&c.jsx("span",{className:"text-gray-500",children:"Waiting for output..."}),n.map((x,v)=>c.jsx("div",{className:ne("whitespace-pre-wrap break-all",x.stream==="stderr"?"text-yellow-400":"text-gray-300"),children:x.text},v)),r&&c.jsx("span",{className:"inline-block h-4 w-1.5 animate-pulse bg-gray-400"})]})]})}function zE(){const{state:n,dispatch:r}=ul(),s=Rg(),i=Rg(),[d,f]=S.useState("idle"),[m,x]=S.useState(null),[v,g]=S.useState(null),[y,p]=S.useState({}),[w,M]=S.useState({}),[N,j]=S.useState(null),[R,z]=S.useState(null);S.useEffect(()=>{const ee=i.redirect;if(d!=="done"||!ee)return;z(5);const le=setInterval(()=>{z(se=>se===null||se<=1?(clearInterval(le),window.location.href=ee,0):se-1)},1e3);return()=>clearInterval(le)},[d,i.redirect]);const _=S.useCallback(async()=>{f("preflight"),g(null),x(null);try{const ee=await Pj(n.enabledModules);return g(ee),ee.canProceed?!0:(x("Pre-flight checks failed. Fix the issues above and retry."),f("error"),j("preflight"),!1)}catch(ee){return x(`Pre-flight check failed: ${ee instanceof Error?ee.message:String(ee)}`),f("error"),j("preflight"),!1}},[n.enabledModules]);async function G(){x(null),p({}),j(null),r({type:"SET_INSTALL_RUNNING",running:!0});try{if(!await _()){r({type:"SET_INSTALL_RUNNING",running:!1});return}f("generating"),await wg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",le=>{if(le.phase==="health"&&typeof le.service=="string"&&p(se=>({...se,[le.service]:{healthy:le.healthy,error:le.error}})),le.serviceHealth&&typeof le.serviceHealth=="object"){const se=le.serviceHealth;p(fe=>({...fe,...se}))}}),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(ee){x(ee instanceof Error?ee.message:String(ee)),f("error"),j(d),r({type:"SET_INSTALL_RUNNING",running:!1})}}async function L(){if(N==="preflight"){if(x(null),r({type:"SET_INSTALL_RUNNING",running:!0}),!await _()){r({type:"SET_INSTALL_RUNNING",running:!1});return}try{f("generating"),await wg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",le=>{if(le.phase==="health"&&typeof le.service=="string"&&p(se=>({...se,[le.service]:{healthy:le.healthy,error:le.error}})),le.serviceHealth&&typeof le.serviceHealth=="object"){const se=le.serviceHealth;p(fe=>({...fe,...se}))}}),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(le){x(le instanceof Error?le.message:String(le)),f("error"),r({type:"SET_INSTALL_RUNNING",running:!1})}}else G()}async function J(ee){try{const le=await fetch(`/api/containers/${ee}/logs`);if(le.ok){const se=await le.text();M(fe=>({...fe,[ee]:se}))}else M(se=>({...se,[ee]:`Failed to fetch logs: HTTP ${le.status}`}))}catch(le){M(se=>({...se,[ee]:`Failed to fetch logs: ${le instanceof Error?le.message:String(le)}`}))}}const X=[{key:"preflight",label:"Pre-flight checks"},{key:"generating",label:"Generate configuration"},{key:"pulling",label:"Pull Docker images"},{key:"starting",label:"Start services"}],W=X.map(ee=>ee.key).indexOf(d);return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Install"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:d==="idle"?"Ready to install. This will pull Docker images and start all services.":d==="done"?i.redirect?`Installation complete! Redirecting to your admin dashboard in ${R??"..."}s...`:"Installation complete! All services are running.":d==="error"?"Installation encountered an error.":"Installing..."})]}),v&&c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[c.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:c.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Pre-flight Checks"})}),c.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:v.checks.map(ee=>c.jsx("div",{className:"flex items-center justify-between px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2",children:[ee.status==="pass"?c.jsx(bt,{size:14,className:"text-green-500"}):ee.status==="warn"?c.jsx(fa,{size:14,className:"text-amber-500"}):c.jsx(Pi,{size:14,className:"text-red-500"}),c.jsxs("div",{children:[c.jsx("span",{className:"text-sm text-[var(--color-text)]",children:ee.name}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:ee.message}),ee.details&&ee.status!=="pass"&&c.jsx("p",{className:"text-xs text-[var(--color-text-muted)] opacity-60",children:ee.details})]})]})},ee.name))})]}),c.jsx("div",{className:"space-y-2",children:X.map((ee,le)=>{const se=ee.key===d,fe=W>le||d==="done",Te=d==="error"&&ee.key===N;return c.jsxs("div",{className:"flex items-center gap-3",children:[fe?c.jsx(bt,{size:18,className:"text-green-500"}):Te?c.jsx(Pi,{size:18,className:"text-red-500"}):se?c.jsx(ua,{size:18,className:"animate-spin text-[var(--color-primary)]"}):c.jsx("div",{className:"h-[18px] w-[18px] rounded-full border-2 border-[var(--color-border)]"}),c.jsx("span",{className:ne("text-sm",fe?"text-green-500":se?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:ee.label})]},ee.key)})}),(d==="starting"||d==="done"||d==="error")&&Object.keys(y).length>0&&c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[c.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:c.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Service Status"})}),c.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:Object.entries(y).map(([ee,le])=>c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[c.jsx("span",{className:"text-sm text-[var(--color-text)]",children:ee}),c.jsxs("div",{className:"flex items-center gap-2",children:[!le.healthy&&c.jsxs("button",{type:"button",onClick:()=>J(ee),className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[c.jsx(_N,{size:12}),"Logs"]}),le.healthy?c.jsx(bt,{size:14,className:"text-green-500"}):c.jsx(Pi,{size:14,className:"text-red-500"})]})]}),le.error&&c.jsx("p",{className:"px-3 pb-2 text-xs text-red-400",children:le.error}),w[ee]&&c.jsx("div",{className:"mx-3 mb-2 max-h-32 overflow-auto rounded bg-[var(--color-background)] p-2 text-xs font-mono text-[var(--color-text-muted)]",children:c.jsx("pre",{className:"whitespace-pre-wrap",children:w[ee]})})]},ee))})]}),(s.lines.length>0||s.running)&&c.jsx(Cg,{lines:s.lines,running:s.running,title:"docker compose pull"}),(i.lines.length>0||i.running)&&c.jsx(Cg,{lines:i.lines,running:i.running,title:"docker compose up -d"}),m&&c.jsx("div",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:m}),(d==="idle"||d==="error")&&c.jsxs("button",{type:"button",onClick:d==="error"?L:G,className:ne("flex w-full items-center justify-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-3 font-medium text-white","hover:opacity-90 transition-opacity"),children:[d==="error"?c.jsx(fo,{size:18}):c.jsx(PN,{size:18}),d==="error"?"Retry Installation":"Start Installation"]})]})}function kE(){const{state:n,dispatch:r}=ul(),s=lv(),i=iv(),[d,f]=S.useState("select"),[m,x]=S.useState(null),[v,g]=S.useState("GGUF"),[y,p]=S.useState(""),[w,M]=S.useState(null);if(n.deploymentMode==="remote-llm")return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Your LLM is configured to use a remote server."})]}),c.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[c.jsx(bt,{size:20,className:"text-green-500"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM configured"}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n.remoteLlmUrl})]})]})]});if(n.platform==="darwin")return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"On macOS, the LLM proxy runs natively to access Metal/MLX. Configure it from the dashboard after setup, or run it directly from the jarvis-llm-proxy-api directory."})]}),c.jsx("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4 text-sm text-amber-500",children:"macOS native LLM proxy is not yet available as a pip package. Model download through this wizard requires the LLM proxy running in Docker."})]});const N=L=>{x(L),M(null),L.gated&&!y.trim()?f("token"):R(L,y.trim())},j=()=>{if(!y.trim()){M("HuggingFace token is required for gated models");return}m&&R(m,y)},R=async(L,J)=>{f("downloading"),M(null);const X=v==="GGUF"?L.hfRepoGguf:L.hfRepoVllm,I=v==="GGUF"?L.ggufFilename:void 0;try{await i.mutateAsync({repo:X,filename:I,token:J||void 0}),await z(L)}catch(W){M(`Download failed: ${W.message}`),f("select")}},z=async L=>{f("configuring");const X={"model.main.name":v==="GGUF"?`.models/${L.ggufFilename}`:`.models/${L.hfRepoVllm.split("/").pop()}`,"model.main.backend":v,"model.main.chat_format":L.chatFormat,"model.main.context_window":L.contextWindow,"llm.interface":L.promptProvider};v==="GGUF"&&(X["inference.gguf.n_gpu_layers"]=-1),v==="VLLM"&&L.quantization&&(X["inference.vllm.quantization"]=L.quantization);try{await s.mutateAsync(X),r({type:"SET_LLM_INTERFACE",interfaceId:L.promptProvider}),f("done")}catch(I){M(`Configuration failed: ${I.message}`),f("select")}},_=n.hardware?.gpuVramMb,G=_?ar.filter(L=>L.vramMb<=_):ar;return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:d==="done"?"Model configured. The LLM proxy is restarting with the new model.":"Select and download a language model for Jarvis."})]}),w&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-500",children:[c.jsx(fa,{size:16,className:"mt-0.5 shrink-0"}),w]}),m&&c.jsxs("button",{type:"button",onClick:()=>R(m,y),className:ne("flex w-full items-center justify-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors"),children:[c.jsx(fo,{size:14}),"Retry Download"]})]}),d==="select"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Backend"}),c.jsx("div",{className:"flex gap-2",children:["GGUF","VLLM"].map(L=>c.jsx("button",{type:"button",onClick:()=>g(L),className:ne("rounded-md px-3 py-1 text-xs font-medium transition-colors",v===L?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:L==="VLLM"?"vLLM":L},L))})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"hf-token",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"HuggingFace Token (optional — speeds up downloads, required for gated models)"}),c.jsx("input",{id:"hf-token",type:"password",value:y,onChange:L=>p(L.target.value),placeholder:"hf_...",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),c.jsxs("div",{className:"space-y-2",children:[G.map(L=>c.jsxs("button",{type:"button",onClick:()=>N(L),className:ne("flex w-full items-center justify-between rounded-lg border border-[var(--color-border)] p-3 text-left transition-colors","hover:border-[var(--color-primary)] hover:bg-[var(--color-surface-alt)]"),children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:L.displayName}),L.gated&&c.jsxs("span",{className:"flex items-center gap-0.5 rounded bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-600 dark:text-yellow-400",children:[c.jsx(Cd,{size:10}),"Gated"]})]}),c.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[L.promptProvider," · ",L.contextWindow.toLocaleString()," ctx"]})]}),c.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["~",v==="GGUF"?L.sizeGguf:L.sizeVllm]})]},L.id)),G.length===0&&c.jsxs("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:["No models fit your available VRAM (",_?Math.round(_/1024)+" GB":"unknown","). Consider using Remote LLM mode."]}),_&&G.length<ar.length&&c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Showing ",G.length," of ",ar.length," models that fit your ",Math.round(_/1024)," GB VRAM."]})]})]}),d==="token"&&m&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[c.jsx("strong",{children:m.displayName})," is a gated model. Accept the license on HuggingFace and paste your access token below."]}),c.jsx("input",{type:"password",value:y,onChange:L=>p(L.target.value),placeholder:"hf_...",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("button",{type:"button",onClick:()=>{f("select"),M(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),c.jsx("button",{type:"button",onClick:j,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Download"})]})]}),d==="downloading"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(fs,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),c.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Downloading ",m?.displayName,"..."]}),c.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["~",v==="GGUF"?m?.sizeGguf:m?.sizeVllm," · This may take several minutes"]})]}),d==="configuring"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(ua,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Configuring model and prompt provider..."})]}),d==="done"&&m&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[c.jsx(bt,{size:20,className:"text-green-500"}),c.jsxs("div",{children:[c.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:[m.displayName," configured"]}),c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Backend: ",v," · Prompt provider: ",m.promptProvider]})]})]}),c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["The LLM proxy is restarting with the new model. It may take a minute to load. Command Center will automatically use the ",c.jsx("strong",{children:m.promptProvider})," prompt provider for optimized command parsing."]})]})]})}function DE(){const[n,r]=S.useState(""),[s,i]=S.useState(""),[d,f]=S.useState(""),[m,x]=S.useState(""),[v,g]=S.useState(!1),[y,p]=S.useState(!1),[w,M]=S.useState(null),N=s===d,j=n&&s&&d&&m&&N&&!v;async function R(){if(j){g(!0),M(null);try{const _=await Ax(n,s,m);tr(_.access_token),localStorage.setItem("access_token",_.access_token),localStorage.setItem("refresh_token",_.refresh_token),p(!0)}catch(_){const G=_?.response?.data?.error??(_ instanceof Error?_.message:"Failed to create account");M(G)}finally{g(!1)}}}if(y)return c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{children:c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Account Created"})}),c.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[c.jsx(bt,{size:20,className:"text-green-500"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Superuser account created"}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})]}),c.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:`You're logged in. Click "Next" to configure your LLM model.`})]});const z=ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]");return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Create Account"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Create your superuser account. This will be the admin for your Jarvis instance."})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"display-name",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Display Name"}),c.jsx("input",{id:"display-name",type:"text",value:m,onChange:_=>x(_.target.value),className:z,placeholder:"Alex"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),c.jsx("input",{id:"email",type:"email",value:n,onChange:_=>r(_.target.value),className:z,placeholder:"admin@example.com"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),c.jsx("input",{id:"password",type:"password",value:s,onChange:_=>i(_.target.value),className:z,placeholder:"Choose a strong password"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),c.jsx("input",{id:"confirm-password",type:"password",value:d,onChange:_=>f(_.target.value),className:ne(z,d&&!N&&"ring-2 ring-red-500"),placeholder:"Confirm password"}),d&&!N&&c.jsx("p",{className:"mt-1 text-xs text-red-500",children:"Passwords don't match"})]})]}),w&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[c.jsx(Dx,{size:14,className:"text-red-500 shrink-0"}),c.jsx("span",{className:"text-sm text-red-500",children:w})]}),c.jsxs("button",{type:"button",onClick:R,disabled:!j,className:ne("flex w-full items-center justify-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors","disabled:opacity-50"),children:[c.jsx(fo,{size:14}),"Retry"]})]}),!w&&c.jsx("button",{type:"button",onClick:R,disabled:!j,className:ne("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50 transition-opacity"),children:v?"Creating...":"Create Superuser Account"})]})}const Xi=[{label:"Welcome",component:CE},{label:"Hardware",component:_E},{label:"Services",component:ME},{label:"Review",component:OE},{label:"Install",component:zE},{label:"Account",component:DE},{label:"LLM",component:kE}],UE=5;function LE({skipToAccount:n}){const{state:r,dispatch:s}=ul();S.useEffect(()=>{n&&s({type:"SET_STEP",step:UE})},[n,s]);const i=tn(),d=Xi[r.currentStep].component,f=r.currentStep===0,m=r.currentStep===Xi.length-1,g=r.currentStep===4&&!r.installComplete,y=r.installRunning||g;function p(){m?i("/login"):s({type:"NEXT_STEP"})}function w(){s({type:"PREV_STEP"})}return c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)] p-4",children:c.jsxs("div",{className:"w-full max-w-2xl",children:[c.jsx("div",{className:"mb-6 flex items-center justify-center gap-1",children:Xi.map((M,N)=>c.jsxs("button",{type:"button",onClick:()=>!y&&s({type:"SET_STEP",step:N}),disabled:y,className:ne("flex items-center gap-1",y&&"cursor-not-allowed"),children:[c.jsx("div",{className:ne("flex h-7 w-7 items-center justify-center rounded-full text-xs font-medium transition-colors",N===r.currentStep?"bg-[var(--color-primary)] text-white":N<r.currentStep?"bg-[var(--color-primary)]/20 text-[var(--color-primary)]":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:N+1}),c.jsx("span",{className:ne("hidden text-xs sm:inline",N===r.currentStep?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:M.label}),N<Xi.length-1&&c.jsx("div",{className:ne("mx-1 h-px w-4 sm:w-6",N<r.currentStep?"bg-[var(--color-primary)]/30":"bg-[var(--color-border)]")})]},M.label))}),c.jsx("div",{className:"rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-6 shadow-lg",children:c.jsx(d,{})}),c.jsxs("div",{className:"mt-4 flex justify-between",children:[c.jsx("button",{type:"button",onClick:w,disabled:f||y,className:ne("rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors","disabled:invisible"),children:"Back"}),c.jsx("button",{type:"button",onClick:p,disabled:y,className:ne("rounded-lg bg-[var(--color-primary)] px-6 py-2 text-sm font-medium text-white","hover:opacity-90 transition-opacity","disabled:opacity-50 disabled:cursor-not-allowed"),children:m?"Finish":"Next"})]})]})})}function BE({skipToAccount:n}){return c.jsx(RE,{children:c.jsx(LE,{skipToAccount:n})})}function HE(){const n=tn(),r=lv(),s=$j(),[i,d]=S.useState("select"),[f,m]=S.useState(null),[x,v]=S.useState("GGUF"),[g,y]=S.useState(""),[p,w]=S.useState(null),M=_=>{m(_),_.gated?d("token"):j(_,"")},N=()=>{if(!g.trim()){w("HuggingFace token is required for gated models");return}w(null),f&&j(f,g)},j=async(_,G)=>{d("download"),w(null);const L=x==="GGUF"?_.hfRepoGguf:_.hfRepoVllm,J=x==="GGUF"?_.ggufFilename:void 0;try{await s.mutateAsync({repo:L,filename:J,token:G||void 0}),R(_)}catch(X){w(`Download failed: ${X.message}`),d("select")}},R=async _=>{d("configure"),w(null);const L={"model.main.name":x==="GGUF"?`.models/${_.ggufFilename}`:`.models/${_.hfRepoVllm.split("/").pop()}`,"model.main.backend":x,"model.main.chat_format":_.chatFormat,"model.main.context_window":_.contextWindow};x==="GGUF"&&(L["inference.gguf.n_gpu_layers"]=-1),x==="VLLM"&&_.quantization&&(L["inference.vllm.quantization"]=_.quantization);try{await r.mutateAsync(L),d("done"),Xe.success("LLM configured successfully")}catch(J){w(`Configuration failed: ${J.message}`),d("select")}},z=()=>{n("/dashboard")};return c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-bg)] p-4",children:c.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:[c.jsxs("div",{className:"mb-8 text-center",children:[c.jsx(ld,{className:"mx-auto mb-3 text-[var(--color-primary)]",size:40}),c.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Configure a local language model for Jarvis"})]}),c.jsx("div",{className:"mb-8 flex items-center justify-center gap-2",children:["select","download","configure","done"].map((_,G)=>{const L=i==="token"?"select":i,J=["select","download","configure","done"];return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:ne("h-2 w-2 rounded-full",L===_?"bg-[var(--color-primary)]":J.indexOf(L)>G?"bg-green-500":"bg-[var(--color-border)]")}),G<3&&c.jsx("div",{className:"h-px w-8 bg-[var(--color-border)]"})]},_)})}),p&&c.jsxs("div",{className:"mb-6 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-500",children:[c.jsx(fa,{size:16,className:"mt-0.5 shrink-0"}),p]}),i==="select"&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[c.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Select a model"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:()=>v("GGUF"),className:ne("rounded-md px-3 py-1 text-xs font-medium transition-colors",x==="GGUF"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"GGUF"}),c.jsx("button",{onClick:()=>v("VLLM"),className:ne("rounded-md px-3 py-1 text-xs font-medium transition-colors",x==="VLLM"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"vLLM"})]})]}),c.jsx("div",{className:"grid gap-3",children:ar.map(_=>c.jsxs("button",{onClick:()=>M(_),className:ne("flex items-center justify-between rounded-lg border border-[var(--color-border)] p-4 text-left transition-colors","hover:border-[var(--color-primary)] hover:bg-[var(--color-surface-alt)]"),children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium text-[var(--color-text)]",children:_.displayName}),_.gated&&c.jsxs("span",{className:"flex items-center gap-1 rounded bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-600 dark:text-yellow-400",children:[c.jsx(Cd,{size:10}),"Gated"]})]}),c.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[_.quantization?`${_.quantization.toUpperCase()} 4-bit`:_.chatFormat," · ",_.contextWindow.toLocaleString()," ctx"]})]}),c.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:["~",x==="GGUF"?_.sizeGguf:_.sizeVllm]})]},_.id))}),c.jsx("div",{className:"flex justify-end pt-2",children:c.jsx("button",{onClick:z,className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Skip for now"})})]}),i==="token"&&f&&c.jsxs("div",{className:"space-y-4",children:[c.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Access Required"}),c.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[c.jsx("strong",{children:f.displayName})," is a gated model. You need to:"]}),c.jsxs("ol",{className:"list-inside list-decimal space-y-1 text-sm text-[var(--color-text-muted)]",children:[c.jsx("li",{children:"Visit the model page on huggingface.co and accept the license agreement"}),c.jsx("li",{children:"Create an access token at huggingface.co/settings/tokens"}),c.jsx("li",{children:"Paste your token below"})]}),c.jsx("input",{type:"password",value:g,onChange:_=>y(_.target.value),placeholder:"hf_...",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("button",{onClick:()=>{d("select"),w(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),c.jsx("button",{onClick:N,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Continue"})]})]}),i==="download"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(fs,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),c.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Downloading model..."}),c.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," ","(~",x==="GGUF"?f?.sizeGguf:f?.sizeVllm,")"]}),c.jsx("p",{className:"mt-4 text-xs text-[var(--color-text-muted)]",children:"This may take several minutes depending on your connection"})]}),i==="configure"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(qx,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),c.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Configuring..."}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Writing settings and restarting LLM proxy"})]}),i==="done"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(xN,{className:"mb-4 text-green-500",size:40}),c.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"LLM Ready"}),c.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," configured on ",x]}),c.jsx("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:"The model service is restarting. It may take a minute to load the model."}),c.jsx("button",{onClick:()=>n("/dashboard"),className:"mt-6 rounded-lg bg-[var(--color-primary)] px-6 py-2 text-sm text-white hover:opacity-90",children:"Go to Dashboard"})]}),(s.isPending||r.isPending)&&i!=="download"&&i!=="configure"&&c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:c.jsx(ua,{className:"animate-spin text-white",size:32})})]})})}const qE=new O1;function GE(){const[n,r]=S.useState(!0),[s,i]=S.useState(!1),[d,f]=S.useState(!1);return S.useEffect(()=>{Ad().then(m=>{m.state==="deployed-needs-account"?(f(!0),i(!0)):i(!m.configured)}).catch(()=>{i(!1)}).finally(()=>r(!1))},[]),n?c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:c.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-primary)] border-t-transparent"})}):c.jsxs(C0,{children:[c.jsx(qt,{path:"/setup",element:c.jsx(BE,{skipToAccount:d})}),c.jsx(qt,{path:"/login",element:c.jsx(pj,{})}),c.jsx(qt,{path:"/llm-setup",element:c.jsx(HE,{})}),c.jsxs(qt,{element:c.jsx(hj,{}),children:[c.jsx(qt,{path:"/dashboard",element:c.jsx(nE,{})}),c.jsx(qt,{path:"/settings",element:c.jsx(Cj,{})}),c.jsx(qt,{path:"/services",element:c.jsx(Yj,{})}),c.jsx(qt,{path:"/models",element:c.jsx(vE,{})}),c.jsx(qt,{path:"/update",element:c.jsx(yE,{})}),c.jsx(qt,{path:"/reconcile",element:c.jsx(SE,{})}),c.jsx(qt,{path:"/nodes",element:c.jsx(fE,{})}),c.jsx(qt,{path:"/",element:s?c.jsx(Wi,{to:"/setup",replace:!0}):c.jsx(Wi,{to:"/dashboard",replace:!0})}),c.jsx(qt,{path:"*",element:c.jsx(NE,{})})]})]})}function QE(){return c.jsx(y2,{children:c.jsx(z1,{client:qE,children:c.jsxs(aN,{children:[c.jsx(I0,{children:c.jsx(GE,{})}),c.jsx(x2,{position:"bottom-right",richColors:!0})]})})})}Cb.createRoot(document.getElementById("root")).render(c.jsx(S.StrictMode,{children:c.jsx(QE,{})}));
|
|
18
|
+
`);ee=fe.pop()??"";for(const Te of fe)if(Te.startsWith("data: "))try{const ye=JSON.parse(Te.slice(6));if(ye.phase&&i(ye.phase),ye.message&&z({text:ye.message,phase:ye.phase}),ye.stream&&ye.text&&z({text:ye.text.trim()}),ye.done&&ye.code!==0)throw new Error(ye.message??"Reconcile failed")}catch(ye){if(ye instanceof SyntaxError)continue;throw ye}}}catch(X){const I=X instanceof Error?X.message:String(X);x(I),i("error"),z({text:`Error: ${I}`})}}const L=Object.keys(Gu).filter(J=>{const X=Object.keys(Gu),I=X.indexOf(s);return X.indexOf(J)<I||s==="done"&&J==="done"});return c.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Sync Compose"}),c.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:["Regenerate ",c.jsx("code",{className:"rounded bg-[var(--color-surface)] px-1.5 py-0.5 text-xs",children:"docker-compose.yml"})," from the latest service registry and apply changes to the running stack."]})]}),s==="loading_options"&&c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx(ua,{size:32,className:"animate-spin text-[var(--color-primary)]"})}),s==="options"&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Services"}),c.jsx("div",{className:"space-y-2",children:g.map(J=>c.jsxs("button",{onClick:()=>_(J.id),className:"flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left hover:bg-[var(--color-bg-secondary)] transition-colors",children:[J.enabled?c.jsx(bt,{size:18,className:"shrink-0 text-[var(--color-primary)]"}):c.jsx(lr,{size:18,className:"shrink-0 text-[var(--color-text-muted)]"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-sm font-medium text-[var(--color-text)]",children:J.name}),c.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:J.description})]})]},J.id))})]}),c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Integrations"}),c.jsxs("button",{onClick:()=>w(!p),className:"flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left hover:bg-[var(--color-bg-secondary)] transition-colors",children:[p?c.jsx(bt,{size:18,className:"shrink-0 text-[var(--color-primary)]"}):c.jsx(lr,{size:18,className:"shrink-0 text-[var(--color-text-muted)]"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-sm font-medium text-[var(--color-text)]",children:"Jarvis Relay"}),c.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:"Routes OAuth callbacks through a cloud relay for external providers (Google, Spotify, etc.)"})]})]}),p&&c.jsxs("div",{className:"mt-2 px-3",children:[c.jsx("label",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Relay URL"}),c.jsx("input",{type:"url",value:M,onChange:J=>N(J.target.value),placeholder:"https://relay.jarvisautomation.io",className:"mt-1 w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-1.5 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]})]}),g.some(J=>J.id==="jarvis-whisper-api"&&J.enabled)&&c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[c.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Whisper"}),c.jsxs("div",{className:"px-3",children:[c.jsx("label",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Model path"}),c.jsx("input",{type:"text",value:j,onChange:J=>R(J.target.value),placeholder:"/whisper-models/ggml-base.en.bin",className:"mt-1 w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-1.5 text-sm font-mono text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"}),c.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["Path inside the container. Place model files in ",c.jsx("code",{className:"rounded bg-[var(--color-bg)] px-1",children:"./whisper-models/"})," next to your compose file."]})]})]})]}),s!=="loading_options"&&s!=="options"&&c.jsx("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:Object.entries(Gu).map(([J,X])=>{const I=J===s,W=L.includes(J),ee=J===s&&s==="error";return c.jsxs("div",{className:"flex items-center gap-2",children:[W?c.jsx(bt,{size:16,className:"text-green-500"}):ee?c.jsx(fa,{size:16,className:"text-red-500"}):I?c.jsx(ua,{size:16,className:"animate-spin text-[var(--color-primary)]"}):c.jsx("div",{className:"h-4 w-4 rounded-full border border-[var(--color-border)]"}),c.jsx("span",{className:ne("text-sm",I?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]",W&&"text-green-500"),children:X})]},J)})}),d.length>0&&c.jsx("div",{ref:v,className:"max-h-64 overflow-y-auto rounded-lg border border-[var(--color-border)] bg-[#0d1117] p-3 font-mono text-xs text-gray-300",children:d.map((J,X)=>c.jsx("div",{children:J.text},X))}),m&&c.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[c.jsx(fa,{size:14,className:"text-red-500"}),c.jsx("span",{className:"text-sm text-red-500",children:m})]}),c.jsxs("div",{className:"flex gap-3",children:[s==="options"&&c.jsxs("button",{onClick:G,className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[c.jsx(Bx,{size:16}),"Sync now"]}),(s==="options"||s==="regenerate"||s==="apply"||s==="done")&&c.jsxs("button",{onClick:()=>n("/dashboard"),disabled:s==="regenerate"||s==="apply",className:"flex items-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-alt)] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",children:[c.jsx(bt,{size:16}),"Back to dashboard"]}),s==="error"&&c.jsxs("button",{onClick:G,className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[c.jsx(da,{size:16}),"Retry"]})]})]})}function NE(){return c.jsxs("div",{className:"flex min-h-[60vh] flex-col items-center justify-center",children:[c.jsx("h1",{className:"mb-2 text-4xl font-bold text-[var(--color-text)]",children:"404"}),c.jsx("p",{className:"mb-4 text-[var(--color-text-muted)]",children:"Page not found"}),c.jsx(hd,{to:"/settings",className:"text-[var(--color-primary)] underline hover:opacity-80",children:"Go to Settings"})]})}const wE=7,jE={currentStep:0,totalSteps:wE,enabledModules:[],portOverrides:{},infraPortOverrides:{},secrets:{},dbUser:"jarvis",whisperModel:"base.en",whisperModelPath:"/whisper-models/ggml-base.en.bin",llmInterface:"Qwen25MediumUntrained",deploymentMode:"local",deploymentTarget:"standard",remoteLlmUrl:"",remoteWhisperUrl:"",platform:"linux",hardware:null,relayEnabled:!1,installRunning:!1,installComplete:!1};function EE(n,r,s){return Math.max(r,Math.min(s,n))}function TE(n,r){switch(r.type){case"SET_STEP":return{...n,currentStep:EE(r.step,0,n.totalSteps-1)};case"NEXT_STEP":return{...n,currentStep:Math.min(n.currentStep+1,n.totalSteps-1)};case"PREV_STEP":return{...n,currentStep:Math.max(n.currentStep-1,0)};case"SET_ENABLED_MODULES":return{...n,enabledModules:r.modules};case"TOGGLE_MODULE":{if(r.enabled){const s=n.enabledModules.includes(r.serviceId)?n.enabledModules:[...n.enabledModules,r.serviceId];return{...n,enabledModules:s}}return{...n,enabledModules:n.enabledModules.filter(s=>s!==r.serviceId)}}case"SET_PORT_OVERRIDE":return{...n,portOverrides:{...n.portOverrides,[r.serviceId]:r.port}};case"SET_INFRA_PORT_OVERRIDE":return{...n,infraPortOverrides:{...n.infraPortOverrides,[r.infraId]:r.port}};case"SET_SECRET":return{...n,secrets:{...n.secrets,[r.name]:r.value}};case"SET_SECRETS":return{...n,secrets:r.secrets};case"SET_DB_USER":return{...n,dbUser:r.user};case"SET_WHISPER_MODEL":return{...n,whisperModel:r.model};case"SET_LLM_INTERFACE":return{...n,llmInterface:r.interfaceId};case"SET_DEPLOYMENT_MODE":return{...n,deploymentMode:r.mode};case"SET_DEPLOYMENT_TARGET":return{...n,deploymentTarget:r.target};case"SET_REMOTE_LLM_URL":return{...n,remoteLlmUrl:r.url};case"SET_REMOTE_WHISPER_URL":return{...n,remoteWhisperUrl:r.url};case"SET_PLATFORM":return{...n,platform:r.platform};case"SET_HARDWARE":return{...n,hardware:r.hardware,platform:r.hardware.platform};case"SET_RELAY_ENABLED":return{...n,relayEnabled:r.enabled};case"SET_INSTALL_RUNNING":return{...n,installRunning:r.running};case"SET_INSTALL_COMPLETE":return{...n,installRunning:!1,installComplete:!0};default:return n}}const ov=S.createContext(null);function RE({children:n}){const[r,s]=S.useReducer(TE,jE);return c.jsx(ov.Provider,{value:{state:r,dispatch:s},children:n})}function ul(){const n=S.useContext(ov);if(!n)throw new Error("useWizard must be used within a WizardProvider");return n}function CE(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(null),[d,f]=S.useState(!0),[m,x]=S.useState(!1);function v(){f(!0),x(!1),Ad().then(y=>{i(y);const p=y.reason==="docker_not_found";x(p),r(p?{type:"SET_INSTALL_RUNNING",running:!0}:{type:"SET_INSTALL_RUNNING",running:!1})}).catch(()=>{i({configured:!1,reason:"error"}),x(!0),r({type:"SET_INSTALL_RUNNING",running:!0})}).finally(()=>f(!1))}S.useEffect(()=>{v()},[]);const g=s&&s.reason!=="docker_not_found";return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Let's get your personal voice assistant up and running. This wizard will guide you through selecting services, configuring hardware, and starting everything up."})]}),c.jsx("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:c.jsxs("div",{className:"flex items-center gap-3",children:[d?c.jsx(ua,{size:20,className:"animate-spin text-[var(--color-primary)]"}):g?c.jsx(bt,{size:20,className:"text-green-500"}):c.jsx(Dx,{size:20,className:"text-red-500"}),c.jsxs("div",{className:"flex-1",children:[c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:d?"Checking Docker...":g?"Docker is running":"Docker not found"}),!d&&!g&&c.jsxs("div",{className:"mt-1 space-y-1",children:[c.jsx("p",{className:"text-xs text-red-400",children:"Docker is required to run Jarvis services."}),c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Install"," ",c.jsx("a",{href:"https://www.docker.com/products/docker-desktop/",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-primary)] underline hover:no-underline",children:"Docker Desktop"})," ","for your platform, start it, then click Retry."]})]})]}),m&&!d&&c.jsxs("button",{type:"button",onClick:v,className:"flex items-center gap-1 rounded-md border border-[var(--color-border)] px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[c.jsx(fo,{size:12}),"Retry"]})]})}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-2 block text-sm font-medium text-[var(--color-text)]",children:"Deployment Mode"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"local"}),className:ne("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="local"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[c.jsx(XN,{size:24,className:"text-[var(--color-primary)]"}),c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Local"}),c.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"Everything on this machine"})]}),c.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"}),className:ne("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="remote-llm"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[c.jsx(_d,{size:24,className:"text-[var(--color-primary)]"}),c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM"}),c.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"LLM on separate GPU machine"})]})]})]})]})}const Yi=[{label:"None / CPU only",gpu:null,gpuType:"none",vramMb:null,backends:["gguf"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4090 (24 GB)",gpu:"NVIDIA RTX 4090",gpuType:"nvidia",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4080 (16 GB)",gpu:"NVIDIA RTX 4080",gpuType:"nvidia",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4070 Ti (12 GB)",gpu:"NVIDIA RTX 4070 Ti",gpuType:"nvidia",vramMb:12288,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3090 (24 GB)",gpu:"NVIDIA RTX 3090",gpuType:"nvidia",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3080 (10 GB)",gpu:"NVIDIA RTX 3080",gpuType:"nvidia",vramMb:10240,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3070 (8 GB)",gpu:"NVIDIA RTX 3070",gpuType:"nvidia",vramMb:8192,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA A100 (80 GB)",gpu:"NVIDIA A100",gpuType:"nvidia",vramMb:81920,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA A100 (40 GB)",gpu:"NVIDIA A100",gpuType:"nvidia",vramMb:40960,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA Tesla T4 (16 GB)",gpu:"NVIDIA Tesla T4",gpuType:"nvidia",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"AMD RX 9070 XT — Vulkan (16 GB)",gpu:"AMD RX 9070 XT",gpuType:"amd",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 9070 — Vulkan (12 GB)",gpu:"AMD RX 9070",gpuType:"amd",vramMb:12288,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XTX — Vulkan (24 GB)",gpu:"AMD RX 7900 XTX",gpuType:"amd",vramMb:24576,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XT — Vulkan (20 GB)",gpu:"AMD RX 7900 XT",gpuType:"amd",vramMb:20480,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7800 XT — Vulkan (16 GB)",gpu:"AMD RX 7800 XT",gpuType:"amd",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7600 — Vulkan (8 GB)",gpu:"AMD RX 7600",gpuType:"amd",vramMb:8192,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 9070 XT — ROCm (16 GB)",gpu:"AMD RX 9070 XT",gpuType:"amd-rocm",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 9070 — ROCm (12 GB)",gpu:"AMD RX 9070",gpuType:"amd-rocm",vramMb:12288,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XTX — ROCm (24 GB)",gpu:"AMD RX 7900 XTX",gpuType:"amd-rocm",vramMb:24576,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XT — ROCm (20 GB)",gpu:"AMD RX 7900 XT",gpuType:"amd-rocm",vramMb:20480,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7800 XT — ROCm (16 GB)",gpu:"AMD RX 7800 XT",gpuType:"amd-rocm",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"Apple M4 Max (128 GB unified)",gpu:"Apple M4 Max",gpuType:"apple",vramMb:131072,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Max (64 GB unified)",gpu:"Apple M4 Max",gpuType:"apple",vramMb:65536,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (48 GB unified)",gpu:"Apple M4 Pro",gpuType:"apple",vramMb:49152,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (24 GB unified)",gpu:"Apple M4 Pro",gpuType:"apple",vramMb:24576,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Max (32 GB unified)",gpu:"Apple M2 Max",gpuType:"apple",vramMb:32768,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Pro (16 GB unified)",gpu:"Apple M2 Pro",gpuType:"apple",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (16 GB unified)",gpu:"Apple M1",gpuType:"apple",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (8 GB unified)",gpu:"Apple M1",gpuType:"apple",vramMb:8192,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Other (enter VRAM manually)",gpu:"Other",gpuType:"none",vramMb:null,backends:["gguf"],defaultBackend:"gguf"}];function _E(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(!n.hardware),[d,f]=S.useState(!1),[m,x]=S.useState(0),[v,g]=S.useState("");S.useEffect(()=>{n.hardware||Ij().then(w=>{r({type:"SET_HARDWARE",hardware:w}),w.recommendedBackend==="remote"&&n.deploymentMode==="local"&&r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"})}).catch(()=>{}).finally(()=>i(!1))},[]);function y(w,M){const N=Yi[w];if(!n.hardware)return;const j=N.gpu==="Other"?(parseInt(M??v,10)||0)*1024:N.vramMb,R={...n.hardware,gpuName:N.gpu,gpuVramMb:j||null,gpuType:N.gpuType,recommendedBackends:[...N.backends],recommendedBackend:N.defaultBackend};r({type:"SET_HARDWARE",hardware:R})}const p=n.hardware;return s?c.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[c.jsx(ua,{size:32,className:"animate-spin text-[var(--color-primary)]"}),c.jsx("p",{className:"mt-3 text-sm text-[var(--color-text-muted)]",children:"Detecting hardware..."})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Hardware Detection"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"We detected the following hardware. This determines which LLM backend to use."})]}),p&&c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[c.jsx(ps,{size:16}),c.jsx("span",{className:"text-xs font-medium uppercase",children:"Platform"})]}),c.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.platform==="darwin"?"macOS":"Linux"," (",p.arch,")"]})]}),c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[c.jsx(Rd,{size:16}),c.jsx("span",{className:"text-xs font-medium uppercase",children:"Memory"})]}),c.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.totalMemoryGb," GB RAM"]})]}),c.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[c.jsx(ps,{size:16}),c.jsx("span",{className:"text-xs font-medium uppercase",children:"GPU"})]}),c.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:p.gpuName??"No GPU detected"}),p.gpuVramMb!=null&&p.gpuVramMb>0&&c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[Math.round(p.gpuVramMb/1024)," GB VRAM"]})]}),c.jsx("button",{type:"button",onClick:()=>f(!d),className:"text-xs font-medium text-[var(--color-primary)] hover:underline",children:d?"Cancel":"Override"})]}),d&&c.jsxs("div",{className:"mt-3 space-y-3 border-t border-[var(--color-border)] pt-3",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"gpu-select",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Select GPU"}),c.jsx("select",{id:"gpu-select",value:m,onChange:w=>{const M=parseInt(w.target.value,10);x(M),Yi[M].gpu!=="Other"&&(y(M),f(!1))},className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]"),children:Yi.map((w,M)=>c.jsx("option",{value:M,children:w.label},`${w.label}-${M}`))})]}),Yi[m].gpu==="Other"&&c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("label",{htmlFor:"custom-vram",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"VRAM (GB)"}),c.jsx("input",{id:"custom-vram",type:"number",min:1,max:512,value:v,onChange:w=>g(w.target.value),placeholder:"e.g. 24",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),c.jsx("button",{type:"button",disabled:!v||parseInt(v,10)<=0,onClick:()=>{y(m,v),f(!1)},className:ne("rounded-lg px-4 py-2 text-sm font-medium","bg-[var(--color-primary)] text-white","disabled:cursor-not-allowed disabled:opacity-50"),children:"Apply"})]})]})]}),c.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[c.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Recommended: ",c.jsx("span",{className:"text-[var(--color-primary)]",children:p.recommendedBackend.toUpperCase()})]}),p.recommendedBackends.length>1&&c.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["Available backends: ",p.recommendedBackends.join(", ")]})]})]}),n.deploymentMode==="remote-llm"&&c.jsxs("div",{className:"space-y-3",children:[c.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote Service URLs"}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"remote-llm",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"LLM Proxy URL"}),c.jsx("input",{id:"remote-llm",type:"url",value:n.remoteLlmUrl,onChange:w=>r({type:"SET_REMOTE_LLM_URL",url:w.target.value}),placeholder:"http://192.168.1.100:7704",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"remote-whisper",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Whisper URL (optional)"}),c.jsx("input",{id:"remote-whisper",type:"url",value:n.remoteWhisperUrl,onChange:w=>r({type:"SET_REMOTE_WHISPER_URL",url:w.target.value}),placeholder:"http://192.168.1.100:7706",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]})]})]})}function ME(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(null),[d,f]=S.useState(!0);if(S.useEffect(()=>{Promise.all([rv(),Wj()]).then(([g,y])=>{i(g),n.enabledModules.length===0&&r({type:"SET_ENABLED_MODULES",modules:y.enabledModules})}).catch(()=>{}).finally(()=>f(!1))},[]),d||!s)return c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx(ua,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const{core:m,recommended:x,optional:v}=AE(s.services);return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Select Services"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Core services are always included. Toggle recommended and optional services."})]}),c.jsx(Qu,{title:"Core",subtitle:"Always included",services:m,enabled:m.map(g=>g.id),locked:!0}),c.jsx(Qu,{title:"Recommended",subtitle:"Enabled by default",services:x,enabled:n.enabledModules,onToggle:(g,y)=>r({type:"TOGGLE_MODULE",serviceId:g,enabled:y}),platform:n.platform}),v.length>0&&c.jsx(Qu,{title:"Optional",subtitle:"Off by default",services:v,enabled:n.enabledModules,onToggle:(g,y)=>r({type:"TOGGLE_MODULE",serviceId:g,enabled:y})}),c.jsxs("div",{children:[c.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[c.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:"Integrations"}),c.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"Cloud services"})]}),c.jsxs("button",{type:"button",onClick:()=>r({type:"SET_RELAY_ENABLED",enabled:!n.relayEnabled}),className:ne("flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",n.relayEnabled?"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5":"border-[var(--color-border)] hover:border-[var(--color-primary)]/30"),children:[n.relayEnabled?c.jsx(bt,{size:16,className:"shrink-0 text-[var(--color-primary)]"}):c.jsx(lr,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Jarvis Relay"}),c.jsx(ON,{size:12,className:"text-[var(--color-text-muted)]"})]}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Routes OAuth callbacks through a cloud relay for external providers (Google, Spotify, etc.)"})]})]})]})]})}function AE(n){return{core:n.filter(r=>r.category==="core"),recommended:n.filter(r=>r.category==="recommended"),optional:n.filter(r=>r.category==="optional")}}function Qu({title:n,subtitle:r,services:s,enabled:i,locked:d,onToggle:f,platform:m}){return c.jsxs("div",{children:[c.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[c.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:n}),c.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:r})]}),c.jsx("div",{className:"space-y-1",children:s.map(x=>{const v=i.includes(x.id),g=x.nativeOnly&&m==="darwin";return c.jsxs("button",{type:"button",disabled:d,onClick:()=>f?.(x.id,!v),className:ne("flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",v?"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5":"border-[var(--color-border)] hover:border-[var(--color-primary)]/30",d&&"cursor-default"),children:[d?c.jsx(Cd,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}):v?c.jsx(bt,{size:16,className:"shrink-0 text-[var(--color-primary)]"}):c.jsx(lr,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:x.name}),c.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",x.port]}),g&&c.jsx("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-500",children:"Native"})]}),c.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:x.description})]})]},x.id)})})]})}function OE(){const{state:n}=ul(),[r,s]=S.useState(null);if(S.useEffect(()=>{rv().then(s).catch(()=>{})},[]),!r)return c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx(ua,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const i=r.services.filter(p=>p.category==="core"),d=r.services.filter(p=>p.category!=="core"&&n.enabledModules.includes(p.id)),f=[...i,...d],m=new Map;for(const p of f){const w=n.portOverrides[p.id]??p.port,M=m.get(w)??[];m.set(w,[...M,p.name])}const x=[...m.entries()].filter(([,p])=>p.length>1),v=f.filter(p=>p.database).length,g=f.filter(p=>p.nativeOnly&&n.platform==="darwin"),y=f.filter(p=>!(p.nativeOnly&&n.platform==="darwin"));return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Review Configuration"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Review your selections before installing."})]}),c.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[c.jsx(Vu,{label:"Docker Services",value:y.length}),c.jsx(Vu,{label:"Native Services",value:g.length}),c.jsx(Vu,{label:"Databases",value:v})]}),c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsx("p",{className:"text-xs font-medium uppercase text-[var(--color-text-muted)]",children:"Deployment Mode"}),c.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:n.deploymentMode==="local"?"Local (all services on this machine)":"Remote LLM"}),n.deploymentMode==="remote-llm"&&n.remoteLlmUrl&&c.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["LLM: ",n.remoteLlmUrl]})]}),c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[c.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:c.jsxs("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:["Services (",f.length,")"]})}),c.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:f.map(p=>c.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(bt,{size:14,className:"text-green-500"}),c.jsx("span",{className:"text-sm text-[var(--color-text)]",children:p.name})]}),c.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",n.portOverrides[p.id]??p.port]})]},p.id))})]}),n.relayEnabled&&c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[c.jsx("p",{className:"text-xs font-medium uppercase text-[var(--color-text-muted)]",children:"Jarvis Relay"}),c.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:"Enabled"}),c.jsx("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:"https://relay.jarvisautomation.io"})]}),x.length>0&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(fa,{size:16,className:"text-amber-500"}),c.jsx("span",{className:"text-sm font-medium text-amber-500",children:"Port Conflicts"})]}),x.map(([p,w])=>c.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["Port ",p,": ",w.join(", ")]},p))]})]})}function Vu({label:n,value:r}){return c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-3 text-center",children:[c.jsx("p",{className:"text-2xl font-bold text-[var(--color-primary)]",children:r}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})}function Rg(){const[n,r]=S.useState({lines:[],running:!1,done:!1,exitCode:null,error:null,redirect:null}),s=S.useRef(null),i=S.useCallback((f,m)=>(s.current?.close(),r({lines:[],running:!0,done:!1,exitCode:null,error:null,redirect:null}),new Promise((x,v)=>{const g=new EventSource(f);s.current=g,g.onmessage=y=>{try{const p=JSON.parse(y.data);if(m&&m(p),"done"in p){if(r(w=>({...w,running:!1,done:!0,exitCode:p.code,redirect:p.redirect??null})),g.close(),p.code===0)x(p.code);else{const w=p.error?String(p.error):`Process exited with code ${p.code}`;v(new Error(w))}return}if("stream"in p&&"text"in p){const w={stream:p.stream,text:p.text,timestamp:Date.now()};r(M=>({...M,lines:[...M.lines,w]}))}}catch{}},g.onerror=()=>{const y=s.current===null;r(p=>({...p,running:!1,error:p.done?null:"Connection lost"})),g.close(),y||v(new Error("Connection lost"))}})),[]),d=S.useCallback(()=>{s.current?.close(),s.current=null,r(f=>({...f,running:!1}))},[]);return{...n,run:i,stop:d}}function Cg({lines:n,running:r,title:s,className:i}){const d=S.useRef(null),f=S.useRef(!0);S.useEffect(()=>{const x=d.current;!x||!f.current||(x.scrollTop=x.scrollHeight)},[n]);function m(){const x=d.current;if(!x)return;const v=x.scrollHeight-x.scrollTop-x.clientHeight;f.current=v<50}return c.jsxs("div",{className:ne("flex flex-col rounded-lg border border-[var(--color-border)] overflow-hidden",i),children:[s&&c.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2",children:[c.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:s}),r&&c.jsx("span",{className:"h-2 w-2 animate-pulse rounded-full bg-green-500"})]}),c.jsxs("div",{ref:d,onScroll:m,className:"h-64 overflow-y-auto bg-[#0d1117] p-3 font-mono text-xs leading-5",children:[n.length===0&&!r&&c.jsx("span",{className:"text-gray-500",children:"Waiting for output..."}),n.map((x,v)=>c.jsx("div",{className:ne("whitespace-pre-wrap break-all",x.stream==="stderr"?"text-yellow-400":"text-gray-300"),children:x.text},v)),r&&c.jsx("span",{className:"inline-block h-4 w-1.5 animate-pulse bg-gray-400"})]})]})}function zE(){const{state:n,dispatch:r}=ul(),s=Rg(),i=Rg(),[d,f]=S.useState("idle"),[m,x]=S.useState(null),[v,g]=S.useState(null),[y,p]=S.useState({}),[w,M]=S.useState({}),[N,j]=S.useState(null),[R,z]=S.useState(null);S.useEffect(()=>{const ee=i.redirect;if(d!=="done"||!ee)return;z(5);const le=setInterval(()=>{z(se=>se===null||se<=1?(clearInterval(le),window.location.href=ee,0):se-1)},1e3);return()=>clearInterval(le)},[d,i.redirect]);const _=S.useCallback(async()=>{f("preflight"),g(null),x(null);try{const ee=await Pj(n.enabledModules);return g(ee),ee.canProceed?!0:(x("Pre-flight checks failed. Fix the issues above and retry."),f("error"),j("preflight"),!1)}catch(ee){return x(`Pre-flight check failed: ${ee instanceof Error?ee.message:String(ee)}`),f("error"),j("preflight"),!1}},[n.enabledModules]);async function G(){x(null),p({}),j(null),r({type:"SET_INSTALL_RUNNING",running:!0});try{if(!await _()){r({type:"SET_INSTALL_RUNNING",running:!1});return}f("generating"),await wg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",le=>{if(le.phase==="health"&&typeof le.service=="string"&&p(se=>({...se,[le.service]:{healthy:le.healthy,error:le.error}})),le.serviceHealth&&typeof le.serviceHealth=="object"){const se=le.serviceHealth;p(fe=>({...fe,...se}))}}),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(ee){x(ee instanceof Error?ee.message:String(ee)),f("error"),j(d),r({type:"SET_INSTALL_RUNNING",running:!1})}}async function L(){if(N==="preflight"){if(x(null),r({type:"SET_INSTALL_RUNNING",running:!0}),!await _()){r({type:"SET_INSTALL_RUNNING",running:!1});return}try{f("generating"),await wg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",le=>{if(le.phase==="health"&&typeof le.service=="string"&&p(se=>({...se,[le.service]:{healthy:le.healthy,error:le.error}})),le.serviceHealth&&typeof le.serviceHealth=="object"){const se=le.serviceHealth;p(fe=>({...fe,...se}))}}),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(le){x(le instanceof Error?le.message:String(le)),f("error"),r({type:"SET_INSTALL_RUNNING",running:!1})}}else G()}async function J(ee){try{const le=await fetch(`/api/containers/${ee}/logs`);if(le.ok){const se=await le.text();M(fe=>({...fe,[ee]:se}))}else M(se=>({...se,[ee]:`Failed to fetch logs: HTTP ${le.status}`}))}catch(le){M(se=>({...se,[ee]:`Failed to fetch logs: ${le instanceof Error?le.message:String(le)}`}))}}const X=[{key:"preflight",label:"Pre-flight checks"},{key:"generating",label:"Generate configuration"},{key:"pulling",label:"Pull Docker images"},{key:"starting",label:"Start services"}],W=X.map(ee=>ee.key).indexOf(d);return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Install"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:d==="idle"?"Ready to install. This will pull Docker images and start all services.":d==="done"?i.redirect?`Installation complete! Redirecting to your admin dashboard in ${R??"..."}s...`:"Installation complete! All services are running.":d==="error"?"Installation encountered an error.":"Installing..."})]}),v&&c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[c.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:c.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Pre-flight Checks"})}),c.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:v.checks.map(ee=>c.jsx("div",{className:"flex items-center justify-between px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2",children:[ee.status==="pass"?c.jsx(bt,{size:14,className:"text-green-500"}):ee.status==="warn"?c.jsx(fa,{size:14,className:"text-amber-500"}):c.jsx(Pi,{size:14,className:"text-red-500"}),c.jsxs("div",{children:[c.jsx("span",{className:"text-sm text-[var(--color-text)]",children:ee.name}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:ee.message}),ee.details&&ee.status!=="pass"&&c.jsx("p",{className:"text-xs text-[var(--color-text-muted)] opacity-60",children:ee.details})]})]})},ee.name))})]}),c.jsx("div",{className:"space-y-2",children:X.map((ee,le)=>{const se=ee.key===d,fe=W>le||d==="done",Te=d==="error"&&ee.key===N;return c.jsxs("div",{className:"flex items-center gap-3",children:[fe?c.jsx(bt,{size:18,className:"text-green-500"}):Te?c.jsx(Pi,{size:18,className:"text-red-500"}):se?c.jsx(ua,{size:18,className:"animate-spin text-[var(--color-primary)]"}):c.jsx("div",{className:"h-[18px] w-[18px] rounded-full border-2 border-[var(--color-border)]"}),c.jsx("span",{className:ne("text-sm",fe?"text-green-500":se?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:ee.label})]},ee.key)})}),(d==="starting"||d==="done"||d==="error")&&Object.keys(y).length>0&&c.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[c.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:c.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Service Status"})}),c.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:Object.entries(y).map(([ee,le])=>c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[c.jsx("span",{className:"text-sm text-[var(--color-text)]",children:ee}),c.jsxs("div",{className:"flex items-center gap-2",children:[!le.healthy&&c.jsxs("button",{type:"button",onClick:()=>J(ee),className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[c.jsx(_N,{size:12}),"Logs"]}),le.healthy?c.jsx(bt,{size:14,className:"text-green-500"}):c.jsx(Pi,{size:14,className:"text-red-500"})]})]}),le.error&&c.jsx("p",{className:"px-3 pb-2 text-xs text-red-400",children:le.error}),w[ee]&&c.jsx("div",{className:"mx-3 mb-2 max-h-32 overflow-auto rounded bg-[var(--color-background)] p-2 text-xs font-mono text-[var(--color-text-muted)]",children:c.jsx("pre",{className:"whitespace-pre-wrap",children:w[ee]})})]},ee))})]}),(s.lines.length>0||s.running)&&c.jsx(Cg,{lines:s.lines,running:s.running,title:"docker compose pull"}),(i.lines.length>0||i.running)&&c.jsx(Cg,{lines:i.lines,running:i.running,title:"docker compose up -d"}),m&&c.jsx("div",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:m}),(d==="idle"||d==="error")&&c.jsxs("button",{type:"button",onClick:d==="error"?L:G,className:ne("flex w-full items-center justify-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-3 font-medium text-white","hover:opacity-90 transition-opacity"),children:[d==="error"?c.jsx(fo,{size:18}):c.jsx(PN,{size:18}),d==="error"?"Retry Installation":"Start Installation"]})]})}function kE(){const{state:n,dispatch:r}=ul(),s=lv(),i=iv(),[d,f]=S.useState("select"),[m,x]=S.useState(null),[v,g]=S.useState("GGUF"),[y,p]=S.useState(""),[w,M]=S.useState(null);if(n.deploymentMode==="remote-llm")return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Your LLM is configured to use a remote server."})]}),c.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[c.jsx(bt,{size:20,className:"text-green-500"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM configured"}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n.remoteLlmUrl})]})]})]});if(n.platform==="darwin")return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"On macOS, the LLM proxy runs natively to access Metal/MLX. Configure it from the dashboard after setup, or run it directly from the jarvis-llm-proxy-api directory."})]}),c.jsx("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4 text-sm text-amber-500",children:"macOS native LLM proxy is not yet available as a pip package. Model download through this wizard requires the LLM proxy running in Docker."})]});const N=L=>{x(L),M(null),L.gated&&!y.trim()?f("token"):R(L,y.trim())},j=()=>{if(!y.trim()){M("HuggingFace token is required for gated models");return}m&&R(m,y)},R=async(L,J)=>{f("downloading"),M(null);const X=v==="GGUF"?L.hfRepoGguf:L.hfRepoVllm,I=v==="GGUF"?L.ggufFilename:void 0;try{await i.mutateAsync({repo:X,filename:I,token:J||void 0}),await z(L)}catch(W){M(`Download failed: ${W.message}`),f("select")}},z=async L=>{f("configuring");const X={"model.main.name":v==="GGUF"?`.models/${L.ggufFilename}`:`.models/${L.hfRepoVllm.split("/").pop()}`,"model.main.backend":v,"model.main.chat_format":L.chatFormat,"model.main.context_window":L.contextWindow,"llm.interface":L.promptProvider};v==="GGUF"&&(X["inference.gguf.n_gpu_layers"]=-1),v==="VLLM"&&L.quantization&&(X["inference.vllm.quantization"]=L.quantization);try{await s.mutateAsync(X),r({type:"SET_LLM_INTERFACE",interfaceId:L.promptProvider}),f("done")}catch(I){M(`Configuration failed: ${I.message}`),f("select")}},_=n.hardware?.gpuVramMb,G=_?ar.filter(L=>L.vramMb<=_):ar;return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:d==="done"?"Model configured. The LLM proxy is restarting with the new model.":"Select and download a language model for Jarvis."})]}),w&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-500",children:[c.jsx(fa,{size:16,className:"mt-0.5 shrink-0"}),w]}),m&&c.jsxs("button",{type:"button",onClick:()=>R(m,y),className:ne("flex w-full items-center justify-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors"),children:[c.jsx(fo,{size:14}),"Retry Download"]})]}),d==="select"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Backend"}),c.jsx("div",{className:"flex gap-2",children:["GGUF","VLLM"].map(L=>c.jsx("button",{type:"button",onClick:()=>g(L),className:ne("rounded-md px-3 py-1 text-xs font-medium transition-colors",v===L?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:L==="VLLM"?"vLLM":L},L))})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"hf-token",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"HuggingFace Token (optional — speeds up downloads, required for gated models)"}),c.jsx("input",{id:"hf-token",type:"password",value:y,onChange:L=>p(L.target.value),placeholder:"hf_...",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),c.jsxs("div",{className:"space-y-2",children:[G.map(L=>c.jsxs("button",{type:"button",onClick:()=>N(L),className:ne("flex w-full items-center justify-between rounded-lg border border-[var(--color-border)] p-3 text-left transition-colors","hover:border-[var(--color-primary)] hover:bg-[var(--color-surface-alt)]"),children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:L.displayName}),L.gated&&c.jsxs("span",{className:"flex items-center gap-0.5 rounded bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-600 dark:text-yellow-400",children:[c.jsx(Cd,{size:10}),"Gated"]})]}),c.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[L.promptProvider," · ",L.contextWindow.toLocaleString()," ctx"]})]}),c.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["~",v==="GGUF"?L.sizeGguf:L.sizeVllm]})]},L.id)),G.length===0&&c.jsxs("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:["No models fit your available VRAM (",_?Math.round(_/1024)+" GB":"unknown","). Consider using Remote LLM mode."]}),_&&G.length<ar.length&&c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Showing ",G.length," of ",ar.length," models that fit your ",Math.round(_/1024)," GB VRAM."]})]})]}),d==="token"&&m&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[c.jsx("strong",{children:m.displayName})," is a gated model. Accept the license on HuggingFace and paste your access token below."]}),c.jsx("input",{type:"password",value:y,onChange:L=>p(L.target.value),placeholder:"hf_...",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("button",{type:"button",onClick:()=>{f("select"),M(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),c.jsx("button",{type:"button",onClick:j,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Download"})]})]}),d==="downloading"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(fs,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),c.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Downloading ",m?.displayName,"..."]}),c.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["~",v==="GGUF"?m?.sizeGguf:m?.sizeVllm," · This may take several minutes"]})]}),d==="configuring"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(ua,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Configuring model and prompt provider..."})]}),d==="done"&&m&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[c.jsx(bt,{size:20,className:"text-green-500"}),c.jsxs("div",{children:[c.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:[m.displayName," configured"]}),c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Backend: ",v," · Prompt provider: ",m.promptProvider]})]})]}),c.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["The LLM proxy is restarting with the new model. It may take a minute to load. Command Center will automatically use the ",c.jsx("strong",{children:m.promptProvider})," prompt provider for optimized command parsing."]})]})]})}function DE(){const[n,r]=S.useState(""),[s,i]=S.useState(""),[d,f]=S.useState(""),[m,x]=S.useState(""),[v,g]=S.useState(!1),[y,p]=S.useState(!1),[w,M]=S.useState(null),N=s===d,j=n&&s&&d&&m&&N&&!v;async function R(){if(j){g(!0),M(null);try{const _=await Ax(n,s,m);tr(_.access_token),localStorage.setItem("access_token",_.access_token),localStorage.setItem("refresh_token",_.refresh_token),p(!0)}catch(_){const G=_?.response?.data?.error??(_ instanceof Error?_.message:"Failed to create account");M(G)}finally{g(!1)}}}if(y)return c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{children:c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Account Created"})}),c.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[c.jsx(bt,{size:20,className:"text-green-500"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Superuser account created"}),c.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})]}),c.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:`You're logged in. Click "Next" to configure your LLM model.`})]});const z=ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]");return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Create Account"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Create your superuser account. This will be the admin for your Jarvis instance."})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"display-name",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Display Name"}),c.jsx("input",{id:"display-name",type:"text",value:m,onChange:_=>x(_.target.value),className:z,placeholder:"Alex"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),c.jsx("input",{id:"email",type:"email",value:n,onChange:_=>r(_.target.value),className:z,placeholder:"admin@example.com"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),c.jsx("input",{id:"password",type:"password",value:s,onChange:_=>i(_.target.value),className:z,placeholder:"Choose a strong password"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),c.jsx("input",{id:"confirm-password",type:"password",value:d,onChange:_=>f(_.target.value),className:ne(z,d&&!N&&"ring-2 ring-red-500"),placeholder:"Confirm password"}),d&&!N&&c.jsx("p",{className:"mt-1 text-xs text-red-500",children:"Passwords don't match"})]})]}),w&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[c.jsx(Dx,{size:14,className:"text-red-500 shrink-0"}),c.jsx("span",{className:"text-sm text-red-500",children:w})]}),c.jsxs("button",{type:"button",onClick:R,disabled:!j,className:ne("flex w-full items-center justify-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors","disabled:opacity-50"),children:[c.jsx(fo,{size:14}),"Retry"]})]}),!w&&c.jsx("button",{type:"button",onClick:R,disabled:!j,className:ne("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50 transition-opacity"),children:v?"Creating...":"Create Superuser Account"})]})}const Xi=[{label:"Welcome",component:CE},{label:"Hardware",component:_E},{label:"Services",component:ME},{label:"Review",component:OE},{label:"Install",component:zE},{label:"Account",component:DE},{label:"LLM",component:kE}],UE=5;function LE({skipToAccount:n}){const{state:r,dispatch:s}=ul();S.useEffect(()=>{n&&s({type:"SET_STEP",step:UE})},[n,s]);const i=tn(),d=Xi[r.currentStep].component,f=r.currentStep===0,m=r.currentStep===Xi.length-1,g=r.currentStep===4&&!r.installComplete,y=r.installRunning||g;function p(){m?i("/login"):s({type:"NEXT_STEP"})}function w(){s({type:"PREV_STEP"})}return c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)] p-4",children:c.jsxs("div",{className:"w-full max-w-2xl",children:[c.jsx("div",{className:"mb-6 flex items-center justify-center gap-1",children:Xi.map((M,N)=>c.jsxs("button",{type:"button",onClick:()=>!y&&s({type:"SET_STEP",step:N}),disabled:y,className:ne("flex items-center gap-1",y&&"cursor-not-allowed"),children:[c.jsx("div",{className:ne("flex h-7 w-7 items-center justify-center rounded-full text-xs font-medium transition-colors",N===r.currentStep?"bg-[var(--color-primary)] text-white":N<r.currentStep?"bg-[var(--color-primary)]/20 text-[var(--color-primary)]":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:N+1}),c.jsx("span",{className:ne("hidden text-xs sm:inline",N===r.currentStep?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:M.label}),N<Xi.length-1&&c.jsx("div",{className:ne("mx-1 h-px w-4 sm:w-6",N<r.currentStep?"bg-[var(--color-primary)]/30":"bg-[var(--color-border)]")})]},M.label))}),c.jsx("div",{className:"rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-6 shadow-lg",children:c.jsx(d,{})}),c.jsxs("div",{className:"mt-4 flex justify-between",children:[c.jsx("button",{type:"button",onClick:w,disabled:f||y,className:ne("rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors","disabled:invisible"),children:"Back"}),c.jsx("button",{type:"button",onClick:p,disabled:y,className:ne("rounded-lg bg-[var(--color-primary)] px-6 py-2 text-sm font-medium text-white","hover:opacity-90 transition-opacity","disabled:opacity-50 disabled:cursor-not-allowed"),children:m?"Finish":"Next"})]})]})})}function BE({skipToAccount:n}){return c.jsx(RE,{children:c.jsx(LE,{skipToAccount:n})})}function HE(){const n=tn(),r=lv(),s=$j(),[i,d]=S.useState("select"),[f,m]=S.useState(null),[x,v]=S.useState("GGUF"),[g,y]=S.useState(""),[p,w]=S.useState(null),M=_=>{m(_),_.gated?d("token"):j(_,"")},N=()=>{if(!g.trim()){w("HuggingFace token is required for gated models");return}w(null),f&&j(f,g)},j=async(_,G)=>{d("download"),w(null);const L=x==="GGUF"?_.hfRepoGguf:_.hfRepoVllm,J=x==="GGUF"?_.ggufFilename:void 0;try{await s.mutateAsync({repo:L,filename:J,token:G||void 0}),R(_)}catch(X){w(`Download failed: ${X.message}`),d("select")}},R=async _=>{d("configure"),w(null);const L={"model.main.name":x==="GGUF"?`.models/${_.ggufFilename}`:`.models/${_.hfRepoVllm.split("/").pop()}`,"model.main.backend":x,"model.main.chat_format":_.chatFormat,"model.main.context_window":_.contextWindow};x==="GGUF"&&(L["inference.gguf.n_gpu_layers"]=-1),x==="VLLM"&&_.quantization&&(L["inference.vllm.quantization"]=_.quantization);try{await r.mutateAsync(L),d("done"),Xe.success("LLM configured successfully")}catch(J){w(`Configuration failed: ${J.message}`),d("select")}},z=()=>{n("/dashboard")};return c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-bg)] p-4",children:c.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:[c.jsxs("div",{className:"mb-8 text-center",children:[c.jsx(ld,{className:"mx-auto mb-3 text-[var(--color-primary)]",size:40}),c.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Configure a local language model for Jarvis"})]}),c.jsx("div",{className:"mb-8 flex items-center justify-center gap-2",children:["select","download","configure","done"].map((_,G)=>{const L=i==="token"?"select":i,J=["select","download","configure","done"];return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:ne("h-2 w-2 rounded-full",L===_?"bg-[var(--color-primary)]":J.indexOf(L)>G?"bg-green-500":"bg-[var(--color-border)]")}),G<3&&c.jsx("div",{className:"h-px w-8 bg-[var(--color-border)]"})]},_)})}),p&&c.jsxs("div",{className:"mb-6 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-500",children:[c.jsx(fa,{size:16,className:"mt-0.5 shrink-0"}),p]}),i==="select"&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[c.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Select a model"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:()=>v("GGUF"),className:ne("rounded-md px-3 py-1 text-xs font-medium transition-colors",x==="GGUF"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"GGUF"}),c.jsx("button",{onClick:()=>v("VLLM"),className:ne("rounded-md px-3 py-1 text-xs font-medium transition-colors",x==="VLLM"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"vLLM"})]})]}),c.jsx("div",{className:"grid gap-3",children:ar.map(_=>c.jsxs("button",{onClick:()=>M(_),className:ne("flex items-center justify-between rounded-lg border border-[var(--color-border)] p-4 text-left transition-colors","hover:border-[var(--color-primary)] hover:bg-[var(--color-surface-alt)]"),children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-medium text-[var(--color-text)]",children:_.displayName}),_.gated&&c.jsxs("span",{className:"flex items-center gap-1 rounded bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-600 dark:text-yellow-400",children:[c.jsx(Cd,{size:10}),"Gated"]})]}),c.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[_.quantization?`${_.quantization.toUpperCase()} 4-bit`:_.chatFormat," · ",_.contextWindow.toLocaleString()," ctx"]})]}),c.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:["~",x==="GGUF"?_.sizeGguf:_.sizeVllm]})]},_.id))}),c.jsx("div",{className:"flex justify-end pt-2",children:c.jsx("button",{onClick:z,className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Skip for now"})})]}),i==="token"&&f&&c.jsxs("div",{className:"space-y-4",children:[c.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Access Required"}),c.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[c.jsx("strong",{children:f.displayName})," is a gated model. You need to:"]}),c.jsxs("ol",{className:"list-inside list-decimal space-y-1 text-sm text-[var(--color-text-muted)]",children:[c.jsx("li",{children:"Visit the model page on huggingface.co and accept the license agreement"}),c.jsx("li",{children:"Create an access token at huggingface.co/settings/tokens"}),c.jsx("li",{children:"Paste your token below"})]}),c.jsx("input",{type:"password",value:g,onChange:_=>y(_.target.value),placeholder:"hf_...",className:ne("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("button",{onClick:()=>{d("select"),w(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),c.jsx("button",{onClick:N,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Continue"})]})]}),i==="download"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(fs,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),c.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Downloading model..."}),c.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," ","(~",x==="GGUF"?f?.sizeGguf:f?.sizeVllm,")"]}),c.jsx("p",{className:"mt-4 text-xs text-[var(--color-text-muted)]",children:"This may take several minutes depending on your connection"})]}),i==="configure"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(qx,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),c.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Configuring..."}),c.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Writing settings and restarting LLM proxy"})]}),i==="done"&&c.jsxs("div",{className:"flex flex-col items-center py-8",children:[c.jsx(xN,{className:"mb-4 text-green-500",size:40}),c.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"LLM Ready"}),c.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," configured on ",x]}),c.jsx("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:"The model service is restarting. It may take a minute to load the model."}),c.jsx("button",{onClick:()=>n("/dashboard"),className:"mt-6 rounded-lg bg-[var(--color-primary)] px-6 py-2 text-sm text-white hover:opacity-90",children:"Go to Dashboard"})]}),(s.isPending||r.isPending)&&i!=="download"&&i!=="configure"&&c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:c.jsx(ua,{className:"animate-spin text-white",size:32})})]})})}const qE=new O1;function GE(){const[n,r]=S.useState(!0),[s,i]=S.useState(!1),[d,f]=S.useState(!1);return S.useEffect(()=>{Ad().then(m=>{m.state==="deployed-needs-account"?(f(!0),i(!0)):i(!m.configured)}).catch(()=>{i(!1)}).finally(()=>r(!1))},[]),n?c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:c.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-primary)] border-t-transparent"})}):c.jsxs(C0,{children:[c.jsx(qt,{path:"/setup",element:c.jsx(BE,{skipToAccount:d})}),c.jsx(qt,{path:"/login",element:c.jsx(pj,{})}),c.jsx(qt,{path:"/llm-setup",element:c.jsx(HE,{})}),c.jsxs(qt,{element:c.jsx(hj,{}),children:[c.jsx(qt,{path:"/dashboard",element:c.jsx(nE,{})}),c.jsx(qt,{path:"/settings",element:c.jsx(Cj,{})}),c.jsx(qt,{path:"/services",element:c.jsx(Yj,{})}),c.jsx(qt,{path:"/models",element:c.jsx(vE,{})}),c.jsx(qt,{path:"/update",element:c.jsx(yE,{})}),c.jsx(qt,{path:"/reconcile",element:c.jsx(SE,{})}),c.jsx(qt,{path:"/nodes",element:c.jsx(fE,{})}),c.jsx(qt,{path:"/",element:s?c.jsx(Wi,{to:"/setup",replace:!0}):c.jsx(Wi,{to:"/dashboard",replace:!0})}),c.jsx(qt,{path:"*",element:c.jsx(NE,{})})]})]})}function QE(){return c.jsx(y2,{children:c.jsx(z1,{client:qE,children:c.jsxs(aN,{children:[c.jsx(I0,{children:c.jsx(GE,{})}),c.jsx(x2,{position:"bottom-right",richColors:!0})]})})})}Cb.createRoot(document.getElementById("root")).render(c.jsx(S.StrictMode,{children:c.jsx(QE,{})}));
|
package/public/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
7
7
|
<title>Jarvis Admin</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DM5TSQCx.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Dq4JyxZM.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/routes/install.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA+B9C,wBAAsB,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/routes/install.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA+B9C,wBAAsB,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA63BvE"}
|
|
@@ -746,6 +746,7 @@ export async function installRoutes(app) {
|
|
|
746
746
|
services: options,
|
|
747
747
|
relayEnabled: state.relayEnabled,
|
|
748
748
|
relayUrl: state.relayUrl || 'https://relay.jarvisautomation.io',
|
|
749
|
+
whisperModelPath: state.whisperModelPath || '/whisper-models/ggml-base.en.bin',
|
|
749
750
|
});
|
|
750
751
|
});
|
|
751
752
|
/**
|
|
@@ -783,8 +784,8 @@ export async function installRoutes(app) {
|
|
|
783
784
|
const { getComposeServices, getComposeWorkerIds } = await import('../services/generators/compose-generator.js');
|
|
784
785
|
// Apply user overrides from the options screen (if provided)
|
|
785
786
|
const body = request.body;
|
|
786
|
-
const overrides = body?.enabledModules || body?.relayEnabled !== undefined
|
|
787
|
-
? { enabledModules: body?.enabledModules, relayEnabled: body?.relayEnabled, relayUrl: body?.relayUrl }
|
|
787
|
+
const overrides = body?.enabledModules || body?.relayEnabled !== undefined || body?.whisperModelPath
|
|
788
|
+
? { enabledModules: body?.enabledModules, relayEnabled: body?.relayEnabled, relayUrl: body?.relayUrl, whisperModelPath: body?.whisperModelPath }
|
|
788
789
|
: undefined;
|
|
789
790
|
emit({ phase: 'regenerate', message: 'Regenerating compose from latest registry...' });
|
|
790
791
|
await upgradeCompose(app, overrides);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/routes/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,SAAS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ACH,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,EAAE,CAAA;QACjC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAA0B,EAAE,EAAE;YAClD,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBAC9B,OAAO,CAAC,IAAI,CAAC,CAAA;YACf,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,CAAA;YAChB,CAAC;QACH,CAAC,CAAC,CAAA;QACF,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE;YAC5B,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QACF,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;IAClC,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -274,11 +274,12 @@ function generateServiceBlock(service, state, registry) {
|
|
|
274
274
|
lines.push(` ${env.name}: ${env.default}`);
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
// Whisper model override
|
|
277
|
+
// Whisper model path override
|
|
278
278
|
const isWhisper = service.id === 'jarvis-whisper-api';
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
const whisperPath = state.whisperModelPath || `/whisper-models/ggml-${state.whisperModel}.bin`;
|
|
280
|
+
const defaultWhisperPath = '/whisper-models/ggml-base.en.bin';
|
|
281
|
+
if (isWhisper && whisperPath !== defaultWhisperPath) {
|
|
282
|
+
lines.push(` WHISPER_MODEL: ${whisperPath}`);
|
|
282
283
|
}
|
|
283
284
|
// LLM interface seed for command-center
|
|
284
285
|
if (service.id === 'jarvis-command-center' && state.llmInterface) {
|
|
@@ -353,8 +354,8 @@ function generateServiceBlock(service, state, registry) {
|
|
|
353
354
|
}
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
|
-
//
|
|
357
|
-
if (service.id === 'jarvis-command-center') {
|
|
357
|
+
// Services with Alembic migrations: run before starting the server
|
|
358
|
+
if (service.id === 'jarvis-command-center' || service.id === 'jarvis-whisper-api') {
|
|
358
359
|
lines.push(` command: ["sh", "-c", "python -m alembic upgrade head && exec uvicorn app.main:app --host 0.0.0.0 --port ${containerPort}"]`);
|
|
359
360
|
}
|
|
360
361
|
// LLM proxy: no CMD in Dockerfile — run migrations, start model service + API
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-generator.js","sourceRoot":"","sources":["../../../src/services/generators/compose-generator.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAkB,EAClB,QAAyB;IAEzB,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CACpC,CAAA;IACD,MAAM,eAAe,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACjE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CACpC,CAAA;IACD,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,kBAAkB,EAAE,GAAG,eAAe,CAAC,CAAA;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAAkB,EAClB,QAAyB;IA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AI,GAAa,EAAE,CAAA;IACzB,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAA;IAC5D,CAAC;IACD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAA;QAC7B,CAAC;IACH,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAC1B,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IAC9B,KAAK,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAA;IAEzD,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;IAC3B,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;IAC5B,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAA;IAEzC,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
1
|
+
{"version":3,"file":"compose-generator.js","sourceRoot":"","sources":["../../../src/services/generators/compose-generator.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAkB,EAClB,QAAyB;IAEzB,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvE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AA6B,CAAC,CAAA;IAEzC,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -14,6 +14,7 @@ export interface UpgradeOverrides {
|
|
|
14
14
|
enabledModules?: string[];
|
|
15
15
|
relayEnabled?: boolean;
|
|
16
16
|
relayUrl?: string;
|
|
17
|
+
whisperModelPath?: string;
|
|
17
18
|
}
|
|
18
19
|
export declare function upgradeCompose(_app: FastifyInstance, overrides?: UpgradeOverrides): Promise<void>;
|
|
19
20
|
//# sourceMappingURL=compose-upgrader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-upgrader.d.ts","sourceRoot":"","sources":["../../../src/services/upgrade/compose-upgrader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA2B9C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAC/B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"compose-upgrader.d.ts","sourceRoot":"","sources":["../../../src/services/upgrade/compose-upgrader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA2B9C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAC/B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,wBAAsB,cAAc,CAClC,IAAI,EAAE,eAAe,EACrB,SAAS,CAAC,EAAE,gBAAgB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA2Df"}
|
|
@@ -53,6 +53,9 @@ export async function upgradeCompose(_app, overrides) {
|
|
|
53
53
|
if (overrides?.relayUrl) {
|
|
54
54
|
state.relayUrl = overrides.relayUrl;
|
|
55
55
|
}
|
|
56
|
+
if (overrides?.whisperModelPath) {
|
|
57
|
+
state.whisperModelPath = overrides.whisperModelPath;
|
|
58
|
+
}
|
|
56
59
|
// When admin runs in docker, fetch the absolute host path of the compose
|
|
57
60
|
// dir we were mounted at. env-generator uses it to write MODELS_DIR so
|
|
58
61
|
// bind mounts in the regenerated compose resolve on the host (otherwise
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-upgrader.js","sourceRoot":"","sources":["../../../src/services/upgrade/compose-upgrader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,YAAY,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAEjF,SAAS,WAAW,CAAC,WAAmB;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;IACzC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,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Q,EAAE,eAAe,GACxB,WAAW,
|
|
1
|
+
{"version":3,"file":"state-reconstructor.d.ts","sourceRoot":"","sources":["../../../src/services/upgrade/state-reconstructor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAKtE;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,QAAQ,EAAE,eAAe,GACxB,WAAW,CAmFb"}
|
|
@@ -77,6 +77,7 @@ export function reconstructWizardState(existingEnv, registry) {
|
|
|
77
77
|
remoteLlmUrl: existingEnv.JARVIS_LLM_PROXY_URL ?? '',
|
|
78
78
|
remoteWhisperUrl: existingEnv.JARVIS_WHISPER_URL ?? '',
|
|
79
79
|
whisperModel: 'base.en',
|
|
80
|
+
whisperModelPath: existingEnv.WHISPER_MODEL ?? '/whisper-models/ggml-base.en.bin',
|
|
80
81
|
llmInterface: existingEnv.LLM_INTERFACE_SEED ?? '',
|
|
81
82
|
deploymentTarget: 'standard',
|
|
82
83
|
relayEnabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-reconstructor.js","sourceRoot":"","sources":["../../../src/services/upgrade/state-reconstructor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErD;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACpC,WAAmC,EACnC,QAAyB;IAEzB,8DAA8D;IAC9D,MAAM,cAAc,GAAa,EAAE,CAAA;IACnC,KAAK,MAAM,GAAG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