libre-webui 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +19 -0
  2. package/backend/dist/index.d.ts.map +1 -1
  3. package/backend/dist/index.js +161 -97
  4. package/backend/dist/index.js.map +1 -1
  5. package/backend/dist/routes/chat.d.ts.map +1 -1
  6. package/backend/dist/routes/chat.js +15 -11
  7. package/backend/dist/routes/chat.js.map +1 -1
  8. package/backend/dist/routes/imageGen.js +2 -2
  9. package/backend/dist/routes/imageGen.js.map +1 -1
  10. package/backend/dist/routes/ollama.js +7 -7
  11. package/backend/dist/routes/ollama.js.map +1 -1
  12. package/backend/dist/routes/personas.js +13 -13
  13. package/backend/dist/routes/personas.js.map +1 -1
  14. package/backend/dist/routes/plugins.js +9 -9
  15. package/backend/dist/routes/plugins.js.map +1 -1
  16. package/backend/dist/routes/users.js +2 -2
  17. package/backend/dist/routes/users.js.map +1 -1
  18. package/frontend/dist/assets/index-DMCEMy0k.js +51 -0
  19. package/frontend/dist/css/index-D6GvpwoJ.css +1 -0
  20. package/frontend/dist/favicon-dark.png +0 -0
  21. package/frontend/dist/favicon-light.png +0 -0
  22. package/frontend/dist/index.html +3 -3
  23. package/frontend/dist/js/ArtifactContainer-DlsMdXjn.js +24 -0
  24. package/frontend/dist/js/{ArtifactDemoPage-DLNsXpdK.js → ArtifactDemoPage-CfYuBABl.js} +1 -1
  25. package/frontend/dist/js/ChatPage-BntZqr3q.js +281 -0
  26. package/frontend/dist/js/GalleryPage-B9pWoptY.js +1 -0
  27. package/frontend/dist/js/ModelsPage-BXnT10zE.js +1 -0
  28. package/frontend/dist/js/PersonasPage-DnphzEnW.js +13 -0
  29. package/frontend/dist/js/UserManagementPage-JyKcoPcw.js +1 -0
  30. package/frontend/dist/js/{ui-vendor-CdKqcMKK.js → ui-vendor-CAOY-5dA.js} +2 -2
  31. package/frontend/dist/logo-dark.png +0 -0
  32. package/frontend/dist/logo-light.png +0 -0
  33. package/frontend/dist/logo.svg +4 -14
  34. package/package.json +1 -1
  35. package/frontend/dist/assets/index-BbJ5OmoO.js +0 -26
  36. package/frontend/dist/css/index-CYRSPYSA.css +0 -1
  37. package/frontend/dist/js/ArtifactContainer-BeIYvOxW.js +0 -24
  38. package/frontend/dist/js/ChatPage-B1ySV3lW.js +0 -281
  39. package/frontend/dist/js/GalleryPage-BRYMP7Q3.js +0 -1
  40. package/frontend/dist/js/ModelsPage-7lF58OTC.js +0 -2
  41. package/frontend/dist/js/PersonasPage-Cc_gMLv0.js +0 -13
  42. package/frontend/dist/js/UserManagementPage-DqV3zxVm.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as e}from"./markdown-vendor-YWiGftdn.js";import{r as l,c as A}from"./router-vendor-CnU0qKrY.js";import{a as L,c,i as E,B as _}from"../assets/index-DMCEMy0k.js";import{X as T,l as B,aw as R,al as H,g as M,T as Q,y as j,L as D,ax as U,I as F,o as W,s as X}from"./ui-vendor-CAOY-5dA.js";import"./react-vendor-N--QU9DW.js";import"./utils-vendor-DEeF42mN.js";const J=({image:r,onClose:i,onDelete:h,onDownload:s})=>{const{t:o}=L();l.useEffect(()=>{const n=m=>{m.key==="Escape"&&i()};return document.addEventListener("keydown",n),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",n),document.body.style.overflow=""}},[i]);const b=n=>new Date(n).toLocaleString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"}),u=()=>{if(s)s(r);else{const n=document.createElement("a");n.href=r.imageData,n.download=`generated-${r.id}.png`,document.body.appendChild(n),n.click(),document.body.removeChild(n)}};return A.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[99999] flex items-center justify-center",onClick:i,children:[e.jsx("div",{className:"absolute inset-0 bg-black/90 backdrop-blur-sm"}),e.jsxs("div",{className:"relative flex flex-col lg:flex-row max-w-7xl max-h-[95vh] w-full mx-4 gap-4",onClick:n=>n.stopPropagation(),children:[e.jsx("button",{onClick:i,className:c("absolute -top-12 right-0 lg:top-0 lg:-right-12 z-10","p-2 rounded-full","bg-white/10 hover:bg-white/20","transition-colors"),children:e.jsx(T,{className:"h-6 w-6 text-white"})}),e.jsx("div",{className:"flex-1 flex items-center justify-center min-h-0",children:e.jsx("img",{src:r.imageData,alt:r.prompt,className:"max-w-full max-h-[70vh] lg:max-h-[90vh] object-contain rounded-lg"})}),e.jsxs("div",{className:c("w-full lg:w-80 flex-shrink-0","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","rounded-xl p-4 lg:p-5","overflow-y-auto max-h-[25vh] lg:max-h-[90vh]"),children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 ophelia:text-[#737373] mb-1",children:o("gallery.prompt")}),e.jsx("p",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa] text-sm leading-relaxed",children:r.prompt})]}),e.jsxs("div",{className:"space-y-3 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(B,{className:"h-4 w-4 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]"}),e.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ophelia:text-[#737373]",children:[o("gallery.model"),":"]}),e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:r.model})]}),r.size&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(R,{className:"h-4 w-4 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]"}),e.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ophelia:text-[#737373]",children:[o("gallery.size"),":"]}),e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:r.size})]}),r.quality&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"w-4 h-4 flex items-center justify-center text-gray-400 dark:text-gray-500 ophelia:text-[#525252] text-xs font-bold",children:"Q"}),e.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ophelia:text-[#737373]",children:[o("gallery.quality"),":"]}),e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa] capitalize",children:r.quality})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(H,{className:"h-4 w-4 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]"}),e.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ophelia:text-[#737373]",children:[o("gallery.created"),":"]}),e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:b(r.createdAt)})]})]}),e.jsxs("div",{className:"flex gap-2 pt-4 border-t border-gray-200 dark:border-dark-300 ophelia:border-[#262626]",children:[e.jsxs("button",{onClick:u,className:c("flex-1 flex items-center justify-center gap-2 py-2.5 rounded-lg","bg-primary-600 dark:bg-primary-600 ophelia:bg-[#9333ea]","hover:bg-primary-700 dark:hover:bg-primary-500 ophelia:hover:bg-[#a855f7]","text-white font-medium text-sm","transition-colors"),children:[e.jsx(M,{className:"h-4 w-4"}),o("gallery.download")]}),h&&e.jsx("button",{onClick:()=>h(r.id),className:c("p-2.5 rounded-lg","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","hover:bg-red-100 dark:hover:bg-red-900/30 ophelia:hover:bg-red-900/30","text-gray-600 dark:text-gray-300 ophelia:text-[#a3a3a3]","hover:text-red-600 dark:hover:text-red-400 ophelia:hover:text-red-400","transition-colors"),title:"Delete image",children:e.jsx(Q,{className:"h-4 w-4"})})]})]})]})]}),document.body)},O=({onImageCountChange:r})=>{const{t:i}=L(),[h,s]=l.useState([]),[o,b]=l.useState(0),[u,n]=l.useState(!0),[m,w]=l.useState(!1),[f,G]=l.useState(null),[y,S]=l.useState(null),C=20,v=l.useCallback(async(t=0,p=!1)=>{try{t===0?n(!0):w(!0);const d=await E.getGallery({limit:C,offset:t});d.success&&d.data&&(s(p?k=>[...k,...d.data.images]:d.data.images),b(d.data.total),r?.(d.data.total))}catch(d){console.error("Failed to load gallery:",d),j.error(i("imageGallery.loadFailed"))}finally{n(!1),w(!1)}},[r,i]);l.useEffect(()=>{v()},[v]);const P=()=>{v(h.length,!0)},z=async(t,p)=>{if(p.stopPropagation(),!y){S(t);try{(await E.deleteGalleryImage(t)).success?(s(k=>k.filter(q=>q.id!==t)),b(k=>k-1),r?.(o-1),j.success(i("imageGallery.deleteSuccess")),f?.id===t&&G(null)):j.error(i("imageGallery.deleteFailed"))}catch(d){console.error("Failed to delete image:",d),j.error(i("imageGallery.deleteFailed"))}finally{S(null)}}},N=(t,p)=>{p.stopPropagation();const d=document.createElement("a");d.href=t.imageData,d.download=`generated-${t.id}.png`,document.body.appendChild(d),d.click(),document.body.removeChild(d)},I=t=>new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});return u?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(D,{className:"h-8 w-8 animate-spin text-gray-400 dark:text-gray-500"})}):h.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[e.jsx(U,{className:"h-16 w-16 text-gray-300 dark:text-gray-600 ophelia:text-[#404040] mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa] mb-2",children:i("imageGallery.noImages")}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 ophelia:text-[#737373] max-w-sm",children:i("imageGallery.noImagesHint")})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:c("columns-1 sm:columns-2 lg:columns-3 xl:columns-4","gap-4 space-y-4"),children:h.map(t=>e.jsxs("div",{className:c("break-inside-avoid group relative cursor-pointer","rounded-xl overflow-hidden","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#121212]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","hover:border-gray-300 dark:hover:border-dark-400 ophelia:hover:border-[#404040]","transition-all duration-200","hover:shadow-lg dark:hover:shadow-dark-400/20 ophelia:hover:shadow-[#9333ea]/10"),onClick:()=>G(t),children:[e.jsx("img",{src:t.imageData,alt:t.prompt,className:"w-full h-auto object-cover",loading:"lazy"}),e.jsxs("div",{className:c("absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity duration-200","flex flex-col justify-end p-3"),children:[e.jsx("p",{className:"text-white text-sm line-clamp-2 mb-2",children:t.prompt}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-white/70 text-xs",children:I(t.createdAt)}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:p=>N(t,p),className:c("p-1.5 rounded-lg","bg-white/20 hover:bg-white/30","transition-colors"),title:i("imageGallery.download"),children:e.jsx(M,{className:"h-4 w-4 text-white"})}),e.jsx("button",{onClick:p=>z(t.id,p),disabled:y===t.id,className:c("p-1.5 rounded-lg","bg-white/20 hover:bg-red-500/80","transition-colors",y===t.id&&"opacity-50 cursor-not-allowed"),title:i("imageGallery.delete"),children:y===t.id?e.jsx(D,{className:"h-4 w-4 text-white animate-spin"}):e.jsx(Q,{className:"h-4 w-4 text-white"})})]})]})]})]},t.id))}),h.length<o&&e.jsx("div",{className:"flex justify-center mt-8",children:e.jsx("button",{onClick:P,disabled:m,className:c("px-6 py-2.5 rounded-xl font-medium","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","hover:bg-gray-200 dark:hover:bg-dark-300 ophelia:hover:bg-[#262626]","text-gray-700 dark:text-gray-200 ophelia:text-[#fafafa]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:m?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(D,{className:"h-4 w-4 animate-spin"}),i("common.loading")]}):i("imageGallery.loadMore",{current:h.length,total:o})})}),f&&e.jsx(J,{image:f,onClose:()=>G(null),onDelete:t=>{z(t,{stopPropagation:()=>{}})},onDownload:t=>{N(t,{stopPropagation:()=>{}})}})]})},V=({isOpen:r,onClose:i,onImageGenerated:h})=>{const{t:s}=L(),[o,b]=l.useState([]),[u,n]=l.useState(""),[m,w]=l.useState(""),[f,G]=l.useState(""),[y,S]=l.useState("1024x1024"),[C,v]=l.useState("standard"),[P,z]=l.useState(!1),[N,I]=l.useState(null),[t,p]=l.useState(["512x512","768x768","1024x1024"]),[d,k]=l.useState(["standard","high"]);l.useEffect(()=>{r&&(async()=>{try{const x=await E.getPlugins();if(x.success&&x.data&&(b(x.data),x.data.length>0)){const g=x.data[0];n(g.id),g.models.length>0&&w(g.models[0]),g.config?.sizes&&(p(g.config.sizes),S(g.config.default_size||g.config.sizes[0]||"1024x1024")),g.config?.qualities&&(k(g.config.qualities),v(g.config.default_quality||g.config.qualities[0]||"standard"))}}catch(x){console.error("Failed to load image generation plugins:",x)}})()},[r]),l.useEffect(()=>{const a=o.find(x=>x.id===u);a&&(a.models.length>0&&!a.models.includes(m)&&w(a.models[0]),a.config?.sizes&&(p(a.config.sizes),a.config.sizes.includes(y)||S(a.config.default_size||a.config.sizes[0])),a.config?.qualities&&(k(a.config.qualities),a.config.qualities.includes(C)||v(a.config.default_quality||a.config.qualities[0])))},[u,o,m,y,C]);const q=async()=>{if(!m||!f.trim()){j.error(s("imageGeneration.enterPrompt"));return}z(!0),I(null);try{const a=await E.generate({model:m,prompt:f.trim(),size:y,quality:C});if(a.success&&a.data?.images&&a.data.images.length>0){const x=a.data.images[0];let g=null;x.b64_json?g=`data:image/png;base64,${x.b64_json}`:x.url&&(g=x.url),g&&(j.success(s("imageGeneration.success")),h?(h(g,f.trim(),m),G(""),I(null),i()):I(g))}else j.error(s("imageGeneration.failed"))}catch(a){console.error("Image generation failed:",a);const x=a instanceof Error?a.message:s("imageGeneration.failed");j.error(x)}finally{z(!1)}},$=()=>{if(!N)return;const a=document.createElement("a");a.href=N,a.download=`generated-image-${Date.now()}.png`,document.body.appendChild(a),a.click(),document.body.removeChild(a)};if(!r)return null;const K=o.find(a=>a.id===u);return A.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[99999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:i}),e.jsxs("div",{className:c("relative bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]","rounded-2xl shadow-2xl","w-full max-w-2xl max-h-[90vh] overflow-hidden flex flex-col"),onClick:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-5 w-5 text-primary-600 dark:text-primary-400 ophelia:text-[#a855f7]"}),e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:s("imageGeneration.title")})]}),e.jsx("button",{onClick:i,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a] transition-colors",children:e.jsx(T,{className:"h-5 w-5 text-gray-500 dark:text-gray-400"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:o.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx(F,{className:"h-12 w-12 mx-auto mb-3 text-gray-300 dark:text-gray-600 ophelia:text-[#525252]"}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 ophelia:text-[#737373]",children:s("imageGeneration.noModels")}),e.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 mt-1",children:s("imageGeneration.configurePlugin")})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:s("settings.plugins.title")}),e.jsx("select",{value:u,onChange:a=>n(a.target.value),className:c("w-full px-3 py-2 rounded-lg text-sm","bg-gray-50 dark:bg-dark-200 ophelia:bg-[#121212]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","focus:outline-none focus:ring-2 focus:ring-primary-500/20"),children:o.map(a=>e.jsx("option",{value:a.id,children:a.name},a.id))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:s("imageGeneration.model")}),e.jsx("select",{value:m,onChange:a=>w(a.target.value),className:c("w-full px-3 py-2 rounded-lg text-sm","bg-gray-50 dark:bg-dark-200 ophelia:bg-[#121212]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","focus:outline-none focus:ring-2 focus:ring-primary-500/20"),children:K?.models.map(a=>e.jsx("option",{value:a,children:a},a))})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:s("imageGeneration.size")}),e.jsx("select",{value:y,onChange:a=>S(a.target.value),className:c("w-full px-3 py-2 rounded-lg text-sm","bg-gray-50 dark:bg-dark-200 ophelia:bg-[#121212]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","focus:outline-none focus:ring-2 focus:ring-primary-500/20"),children:t.map(a=>e.jsx("option",{value:a,children:a},a))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:s("imageGeneration.quality")}),e.jsx("select",{value:C,onChange:a=>v(a.target.value),className:c("w-full px-3 py-2 rounded-lg text-sm","bg-gray-50 dark:bg-dark-200 ophelia:bg-[#121212]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","focus:outline-none focus:ring-2 focus:ring-primary-500/20"),children:d.map(a=>e.jsx("option",{value:a,children:a.charAt(0).toUpperCase()+a.slice(1)},a))})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:s("imageGeneration.prompt")}),e.jsx("textarea",{value:f,onChange:a=>G(a.target.value),placeholder:s("imageGeneration.promptPlaceholder"),rows:3,className:c("w-full px-3 py-2 rounded-lg text-sm resize-none","bg-gray-50 dark:bg-dark-200 ophelia:bg-[#121212]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 dark:placeholder-gray-400 ophelia:placeholder-[#737373]","focus:outline-none focus:ring-2 focus:ring-primary-500/20")})]}),N&&e.jsxs("div",{className:"relative rounded-xl overflow-hidden border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]",children:[e.jsx("img",{src:N,alt:"Generated",className:"w-full h-auto"}),e.jsx("button",{onClick:$,className:c("absolute bottom-3 right-3 p-2 rounded-lg","bg-white/90 dark:bg-dark-100/90 ophelia:bg-[#0a0a0a]/90","hover:bg-white dark:hover:bg-dark-100 ophelia:hover:bg-[#0a0a0a]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","transition-colors"),title:s("imageGallery.download"),children:e.jsx(M,{className:"h-5 w-5 text-gray-700 dark:text-gray-200 ophelia:text-[#fafafa]"})})]})]})}),o.length>0&&e.jsx("div",{className:"p-4 border-t border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]",children:e.jsx(_,{onClick:q,disabled:P||!f.trim()||!m,className:c("w-full py-2.5 rounded-xl font-medium","bg-primary-600 dark:bg-primary-600 ophelia:bg-[#9333ea]","hover:bg-primary-700 dark:hover:bg-primary-500 ophelia:hover:bg-[#a855f7]","text-white","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors"),children:P?e.jsxs("span",{className:"flex items-center justify-center gap-2",children:[e.jsx(D,{className:"h-4 w-4 animate-spin"}),s("imageGeneration.generating")]}):e.jsxs("span",{className:"flex items-center justify-center gap-2",children:[e.jsx(W,{className:"h-4 w-4"}),s("imageGeneration.generate")]})})})]})]}),document.body)},se=()=>{const{t:r}=L(),[i,h]=l.useState(null),[s,o]=l.useState(!1),[b,u]=l.useState(0),n=l.useCallback(()=>{u(m=>m+1)},[]);return e.jsxs("div",{className:"h-full overflow-auto",children:[e.jsxs("div",{className:"max-w-7xl mx-auto p-6",children:[e.jsxs("div",{className:"text-center max-w-md mx-auto mb-8",children:[e.jsx("h2",{className:"libre-brand text-4xl sm:text-5xl font-normal text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa] mb-3",style:{fontWeight:300,letterSpacing:"0.01em"},children:r("sidebar.navigation.imagine")}),e.jsxs("p",{className:"text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] leading-relaxed",children:[r("gallery.subtitle"),i!==null&&i>0&&e.jsxs("span",{className:"text-gray-400 dark:text-gray-500 ophelia:text-[#737373]",children:[" ","· ",r("gallery.imageCount",{count:i})]})]}),e.jsxs(_,{onClick:()=>o(!0),className:c("mt-4 px-6 py-2.5 rounded-xl font-medium","bg-primary-600 dark:bg-primary-600 ophelia:bg-[#9333ea]","hover:bg-primary-700 dark:hover:bg-primary-500 ophelia:hover:bg-[#a855f7]","text-white","transition-colors"),children:[e.jsx(X,{className:"h-4 w-4 mr-2"}),r("gallery.generate")]})]}),e.jsx(O,{onImageCountChange:h},b)]}),e.jsx(V,{isOpen:s,onClose:()=>o(!1),onImageGenerated:n})]})};export{se as GalleryPage,se as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./markdown-vendor-YWiGftdn.js";import{r as l,c as T}from"./router-vendor-CnU0qKrY.js";import{a as fe,c as s,B as c,o as x}from"../assets/index-DMCEMy0k.js";import{a1 as p,ad as Oe,ae as C,af as Xe,ag as he,g as q,e as H,f as I,ah as pe,X as z,E as Qe,ai as Ye,aj as ea,C as aa,ak as ra,Z as sa,l as ta,al as la,am as da,b as oa,J as X,T as ia,u as na,an as be,ao as ue,ap as ca,z as d}from"./ui-vendor-CAOY-5dA.js";import"./react-vendor-N--QU9DW.js";import"./utils-vendor-DEeF42mN.js";const xa=()=>{const{t:r}=fe(),[g,ye]=l.useState([]),[m,ke]=l.useState([]),[V,je]=l.useState([]),[G,Q]=l.useState(!1),[$,ve]=l.useState("all"),[E,Ne]=l.useState(""),[we,Y]=l.useState(!1),[j,D]=l.useState(""),[u,v]=l.useState(!1),[n,f]=l.useState(null),[ee,N]=l.useState(null),[o,Me]=l.useState(null),[Se,Ce]=l.useState(""),[ze,U]=l.useState(!1),[Ee,ae]=l.useState(!1),[De,w]=l.useState(!1),[L,W]=l.useState(""),[M,re]=l.useState(""),[Z,se]=l.useState(!1),[Le,P]=l.useState(!1),[S,te]=l.useState(""),[B,le]=l.useState(""),[J,de]=l.useState(!1),[Pe,K]=l.useState(!1),[_,Be]=l.useState(""),[R,_e]=l.useState(""),[A,oe]=l.useState(null),[O,ie]=l.useState(!1),[ne,Re]=l.useState(null),[ce,F]=l.useState(null),[h,Ae]=l.useState(new Set(["pull","local"])),y=a=>{Ae(t=>{const i=new Set(t);return i.has(a)?i.delete(a):i.add(a),i})},k=async()=>{Y(!0);try{const[a,t,i,Ke]=await Promise.all([x.getModels(),x.listRunningModels(),x.getVersion(),x.checkHealth()]);a.success&&ye(a.data||[]),t.success&&ke(Array.isArray(t.data)?t.data:[]),i.success&&i.data&&Re(i.data.version),F(Ke.success)}catch(a){const t=a instanceof Error?a.message:String(a);d.error(r("modelManager.pull.failed")+": "+t),F(!1)}finally{Y(!1)}},xe=async()=>{Q(!0);try{const a=await x.getLibraryModels();a.success&&a.data&&je(a.data)}catch(a){console.error("Failed to load library models:",a)}finally{Q(!1)}};l.useEffect(()=>{k(),xe()},[]);const ge=async()=>{if(!j.trim()){d.error(r("modelManager.pull.enterName"));return}v(!0),f({status:"starting"});try{const a=x.pullModelStream(j.trim(),t=>{f(t)},()=>{f(null),v(!1),N(null),d.success(r("modelManager.pull.success",{name:j})),D(""),k()},t=>{f(null),v(!1),N(null),d.error(r("modelManager.pull.failed")+": "+t)});N(()=>a)}catch(a){const t=a instanceof Error?a.message:String(a);d.error(r("modelManager.pull.failed")+": "+t),f(null),v(!1),N(null)}},Fe=()=>{ee&&(ee(),N(null),v(!1),f(null),d.success(r("modelManager.pull.cancelled")))},Te=async a=>{if(confirm(r("modelManager.local.deleteConfirm",{name:a})))try{await x.deleteModel(a),d.success(r("modelManager.local.deleteSuccess",{name:a})),await k()}catch(t){const i=t instanceof Error?t.message:String(t);d.error(r("modelManager.local.deleteFailed")+": "+i)}},qe=async a=>{ae(!0),Ce(a),U(!0);try{const t=await x.showModel(a,!0);t.success&&t.data?Me(t.data):d.error(r("modelManager.modals.details.noDetails"))}catch(t){const i=t instanceof Error?t.message:String(t);d.error(r("modelManager.modals.details.noDetails")+": "+i)}finally{ae(!1)}},He=async()=>{if(!L.trim()||!M.trim()){d.error(r("modelManager.modals.copy.enterBoth"));return}se(!0);try{await x.copyModel(L.trim(),M.trim()),d.success(r("modelManager.modals.copy.success",{name:M})),w(!1),W(""),re(""),await k()}catch(a){const t=a instanceof Error?a.message:String(a);d.error(r("modelManager.modals.copy.failed")+": "+t)}finally{se(!1)}},Ie=async()=>{if(!S.trim()||!B.trim()){d.error(r("modelManager.modals.create.enterBoth"));return}de(!0);try{await x.createModel({model:S.trim(),modelfile:B.trim()}),d.success(r("modelManager.modals.create.success",{name:S})),P(!1),te(""),le(""),await k()}catch(a){const t=a instanceof Error?a.message:String(a);d.error(r("modelManager.modals.create.failed")+": "+t)}finally{de(!1)}},Ve=async()=>{if(!_.trim()||!R.trim()){d.error(r("modelManager.modals.embeddings.enterBoth"));return}ie(!0),oe(null);try{const a=await x.generateEmbeddings({model:_.trim(),input:R.trim()});if(a.success&&a.data){const t=a.data.embeddings?.[0]||[];oe(t),d.success(r("modelManager.modals.embeddings.success",{count:t.length}))}}catch(a){const t=a instanceof Error?a.message:String(a);d.error(r("modelManager.modals.embeddings.failed")+": "+t)}finally{ie(!1)}},b=a=>{const t=a/1073741824;return t>=1?`${t.toFixed(2)} GB`:`${(a/(1024*1024)).toFixed(1)} MB`},Ge=a=>Array.isArray(m)&&m.some(t=>t.name===a),$e=()=>g.reduce((a,t)=>a+t.size,0),Ue=()=>m.reduce((a,t)=>a+(t.size_vram||0),0),We=a=>g.some(t=>t.name===a||t.name.startsWith(a+":")),me=V.filter(a=>{const t=$==="all"||a.category===$,i=!E||a.name.toLowerCase().includes(E.toLowerCase())||a.description.toLowerCase().includes(E.toLowerCase());return t&&i}),Ze=["all",...new Set(V.map(a=>a.category))],Je=[{name:"deepseek-r1",category:"reasoning",size:"7B"},{name:"llama3.2",category:"general",size:"3B"},{name:"gemma3",category:"general",size:"4B"},{name:"qwen2.5",category:"general",size:"7B"},{name:"mistral",category:"general",size:"7B"},{name:"codellama",category:"coding",size:"7B"},{name:"nomic-embed-text",category:"embedding",size:"137M"},{name:"llava",category:"vision",size:"7B"},{name:"phi3",category:"general",size:"3.8B"},{name:"gemma2",category:"general",size:"9B"}];return we?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsxs("div",{className:"flex items-center gap-3 text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3]",children:[e.jsx(p,{className:"h-5 w-5 animate-spin"}),r("modelManager.loading")]})}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:s("rounded-xl p-4 border","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:s("w-2.5 h-2.5 rounded-full",ce?"bg-green-500 ophelia:bg-[#4ade80]":"bg-red-500 ophelia:bg-[#f87171]")}),e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]",children:r(ce?"modelManager.systemStatus.online":"modelManager.systemStatus.offline")})]}),ne&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(Oe,{className:"h-4 w-4"}),e.jsxs("span",{children:["v",ne]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(C,{className:"h-4 w-4"}),e.jsxs("span",{children:[g.length," ",g.length!==1?r("modelManager.systemStatus.models_plural"):r("modelManager.systemStatus.models")]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(Xe,{className:"h-4 w-4"}),e.jsx("span",{children:b($e())})]}),m.length>0&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400 ophelia:text-[#4ade80]",children:[e.jsx(he,{className:"h-4 w-4"}),e.jsxs("span",{children:[m.length," ",r("modelManager.systemStatus.running")," (",b(Ue())," ",r("modelManager.systemStatus.vram"),")"]})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(c,{onClick:k,variant:"outline",size:"sm",className:s("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(p,{className:"h-3.5 w-3.5"}),r("common.refresh")]})})]})}),e.jsxs("div",{className:s("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>y("pull"),className:s("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:s("p-2 rounded-lg","bg-primary-100 dark:bg-primary-900/30 ophelia:bg-[#9333ea]/20"),children:e.jsx(q,{className:"h-5 w-5 text-primary-600 dark:text-primary-400 ophelia:text-[#a855f7]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:r("modelManager.sections.pull")})]}),h.has("pull")?e.jsx(H,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),h.has("pull")&&e.jsxs("div",{className:"p-4 pt-0 space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(pe,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]"}),e.jsx("input",{type:"text",value:j,onChange:a=>D(a.target.value),placeholder:r("modelManager.pull.placeholder"),className:s("w-full pl-10 pr-4 py-2.5 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-dark-700 ophelia:text-[#fafafa]","placeholder-gray-500 dark:placeholder-gray-400 ophelia:placeholder-[#525252]","focus:outline-none focus:ring-2 focus:ring-primary-500/20 ophelia:focus:ring-[#9333ea]/20","focus:border-primary-500 ophelia:focus:border-[#9333ea]"),disabled:u,onKeyDown:a=>a.key==="Enter"&&!u&&ge()})]}),u?e.jsxs(c,{onClick:Fe,variant:"outline",className:s("px-4 py-2.5 gap-2","text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300","ophelia:text-[#f87171] ophelia:hover:text-[#fca5a5]","ophelia:border-[#262626] ophelia:hover:bg-[#1a1a1a]"),children:[e.jsx(z,{className:"h-4 w-4"}),r("modelManager.pull.cancel")]}):e.jsxs(c,{onClick:ge,disabled:!j.trim(),className:s("px-4 py-2.5 gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[e.jsx(q,{className:"h-4 w-4"}),r("modelManager.pull.button")]})]}),u&&n&&e.jsxs("div",{className:s("p-4 rounded-lg border","bg-gray-50 dark:bg-dark-200 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]"),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-dark-700 ophelia:text-[#e5e5e5]",children:n.status==="starting"?r("modelManager.progress.starting"):n.status==="pulling"?r("modelManager.progress.pulling"):n.status==="verifying sha256"?r("modelManager.progress.verifying"):n.status==="writing manifest"?r("modelManager.progress.writing"):n.status==="removing any unused layers"?r("modelManager.progress.cleaning"):n.status}),n.percent!==void 0&&e.jsxs("span",{className:"text-sm font-mono text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3]",children:[n.percent,"%"]})]}),n.percent!==void 0&&e.jsx("div",{className:"w-full bg-gray-200 dark:bg-dark-400 ophelia:bg-[#262626] rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:s("h-2 rounded-full transition-all duration-300","bg-primary-500 dark:bg-primary-400 ophelia:bg-[#9333ea]"),style:{width:`${n.percent}%`}})}),n.total&&n.completed&&e.jsxs("div",{className:"mt-2 text-xs text-gray-600 dark:text-dark-600 ophelia:text-[#737373]",children:[b(n.completed)," /"," ",b(n.total)]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 ophelia:text-[#737373] mb-2",children:r("modelManager.pull.popular")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Je.map(a=>e.jsxs("button",{onClick:()=>D(a.name),disabled:u,className:s("px-3 py-1.5 rounded-full text-xs font-medium transition-colors","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3]","hover:bg-gray-200 dark:hover:bg-dark-300 ophelia:hover:bg-[#262626]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","disabled:opacity-50 disabled:cursor-not-allowed"),children:[a.name,e.jsx("span",{className:"ml-1 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]",children:a.size})]},a.name))})]}),e.jsxs("a",{href:"https://ollama.com/library",target:"_blank",rel:"noopener noreferrer",className:s("inline-flex items-center gap-1.5 text-xs","text-primary-600 dark:text-primary-400 ophelia:text-[#a855f7]","hover:underline"),children:[e.jsx(Qe,{className:"h-3 w-3"}),r("modelManager.pull.browseAll")]})]})]}),e.jsxs("div",{className:s("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>y("library"),className:s("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:s("p-2 rounded-lg","bg-cyan-100 dark:bg-cyan-900/30 ophelia:bg-[#06b6d4]/20"),children:e.jsx(Ye,{className:"h-5 w-5 text-cyan-600 dark:text-cyan-400 ophelia:text-[#22d3ee]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:r("modelManager.sections.library")}),e.jsxs("span",{className:s("px-2 py-0.5 rounded-full text-xs font-medium","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:[V.length," ",r("modelManager.library.available")]})]}),h.has("library")?e.jsx(H,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),h.has("library")&&e.jsxs("div",{className:"p-4 pt-0 space-y-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(pe,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]"}),e.jsx("input",{type:"text",value:E,onChange:a=>Ne(a.target.value),placeholder:r("modelManager.library.search"),className:s("w-full pl-10 pr-4 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-dark-700 ophelia:text-[#fafafa]","placeholder-gray-500 dark:placeholder-gray-400 ophelia:placeholder-[#525252]","focus:outline-none focus:ring-2 focus:ring-primary-500/20 ophelia:focus:ring-[#9333ea]/20","focus:border-primary-500 ophelia:focus:border-[#9333ea]")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ea,{className:"h-4 w-4 text-gray-400 ophelia:text-[#525252]"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:Ze.map(a=>e.jsx("button",{onClick:()=>ve(a),className:s("px-2.5 py-1 rounded-full text-xs font-medium transition-colors",$===a?"bg-primary-100 dark:bg-primary-900/30 ophelia:bg-[#9333ea]/20 text-primary-700 dark:text-primary-400 ophelia:text-[#a855f7]":"bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a] text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3] hover:bg-gray-200 dark:hover:bg-dark-300 ophelia:hover:bg-[#262626]"),children:a.charAt(0).toUpperCase()+a.slice(1)},a))})]})]}),G?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(p,{className:"h-5 w-5 animate-spin text-gray-400 ophelia:text-[#737373]"})}):me.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 ophelia:text-[#737373]",children:r("modelManager.library.noResults")}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:me.map(a=>{const t=We(a.name);return e.jsxs("div",{className:s("p-4 rounded-lg border transition-all","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]",t?"border-green-200 dark:border-green-800/50 ophelia:border-[#22c55e]/30":"border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]","hover:shadow-md hover:border-gray-300 dark:hover:border-dark-400 ophelia:hover:border-[#262626]"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsx("h4",{className:"font-medium text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:a.name}),t&&e.jsxs("span",{className:s("flex items-center gap-1 px-1.5 py-0.5 rounded text-xs","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[e.jsx(aa,{className:"h-3 w-3"}),r("modelManager.library.installed")]})]}),e.jsx("p",{className:"text-xs text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] mb-3 line-clamp-2",children:a.description}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3",children:[a.sizes.slice(0,4).map(i=>e.jsx("span",{className:s("px-1.5 py-0.5 rounded text-xs","bg-gray-200 dark:bg-dark-300 ophelia:bg-[#262626]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:i},i)),a.sizes.length>4&&e.jsx("span",{className:"text-xs text-gray-400 ophelia:text-[#737373]",children:r("modelManager.library.more",{count:a.sizes.length-4})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500 ophelia:text-[#737373]",children:[a.pulls&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(q,{className:"h-3 w-3"}),a.pulls]}),e.jsx("span",{className:s("px-1.5 py-0.5 rounded capitalize","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]"),children:a.category})]}),e.jsxs(c,{onClick:()=>{D(a.name),y("pull"),h.has("pull")||y("pull")},variant:"outline",size:"sm",disabled:u,className:s("gap-1 text-xs","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(q,{className:"h-3 w-3"}),r("modelManager.pull.button")]})]})]},a.name)})}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(c,{onClick:xe,variant:"outline",size:"sm",disabled:G,className:s("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(p,{className:s("h-3.5 w-3.5",G&&"animate-spin")}),r("modelManager.library.refresh")]})})]})]}),Array.isArray(m)&&m.length>0&&e.jsxs("div",{className:s("rounded-xl p-4 border","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:s("p-2 rounded-lg","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20"),children:e.jsx(he,{className:"h-5 w-5 text-green-600 dark:text-green-400 ophelia:text-[#4ade80]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:r("modelManager.sections.running")}),e.jsxs("span",{className:s("ml-auto px-2 py-0.5 rounded-full text-xs font-medium","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[m.length," ",r("modelManager.systemStatus.running")]})]}),e.jsx("div",{className:"space-y-2",children:m.map(a=>e.jsxs("div",{className:s("flex items-center justify-between p-4 rounded-lg border","bg-green-50 dark:bg-green-900/10 ophelia:bg-[#22c55e]/5","border-green-200 dark:border-green-800/50 ophelia:border-[#22c55e]/20"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:s("w-2 h-2 rounded-full animate-pulse","bg-green-500 ophelia:bg-[#4ade80]")}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-green-800 dark:text-green-400 ophelia:text-[#4ade80]",children:a.name}),e.jsxs("div",{className:"flex items-center gap-3 text-sm text-green-600 dark:text-green-500 ophelia:text-[#22c55e]/80",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ra,{className:"h-3 w-3"}),r("modelManager.systemStatus.vram"),":"," ",b(a.size_vram||0)]}),a.size&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(C,{className:"h-3 w-3"}),r("models.size"),": ",b(a.size)]})]})]})]}),e.jsxs("div",{className:s("flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/10","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[e.jsx(sa,{className:"h-3 w-3"}),r("modelManager.local.running")]})]},a.name))})]}),e.jsxs("div",{className:s("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>y("local"),className:s("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:s("p-2 rounded-lg","bg-blue-100 dark:bg-blue-900/30 ophelia:bg-[#a855f7]/20"),children:e.jsx(C,{className:"h-5 w-5 text-blue-600 dark:text-blue-400 ophelia:text-[#a855f7]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:r("modelManager.sections.local")}),e.jsxs("span",{className:s("px-2 py-0.5 rounded-full text-xs font-medium","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:[g.length," ",r("modelManager.local.installed")]})]}),h.has("local")?e.jsx(H,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),h.has("local")&&e.jsx("div",{className:"p-4 pt-0",children:g.length===0?e.jsxs("div",{className:s("text-center py-12 rounded-lg border-2 border-dashed","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]"),children:[e.jsx(C,{className:"h-12 w-12 mx-auto mb-3 text-gray-300 dark:text-gray-600 ophelia:text-[#525252]"}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600 ophelia:text-[#737373] mb-2",children:r("modelManager.local.noModels")}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-500 ophelia:text-[#525252]",children:r("modelManager.local.pullToStart")})]}):e.jsx("div",{className:"space-y-3",children:g.map(a=>e.jsx("div",{className:s("p-4 rounded-lg border transition-colors","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]","hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h4",{className:"font-medium text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:a.name}),Ge(a.name)&&e.jsxs("span",{className:s("inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 ophelia:bg-[#4ade80] animate-pulse"}),r("modelManager.local.running")]})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] mt-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(C,{className:"h-3.5 w-3.5"}),b(a.size)]}),a.details?.parameter_size&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ta,{className:"h-3.5 w-3.5"}),a.details.parameter_size]}),a.details?.quantization_level&&e.jsx("span",{className:s("px-1.5 py-0.5 rounded text-xs","bg-gray-200 dark:bg-dark-300 ophelia:bg-[#262626]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:a.details.quantization_level}),a.details?.family&&e.jsx("span",{className:"text-gray-500 dark:text-gray-500 ophelia:text-[#737373]",children:a.details.family})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-400 dark:text-dark-500 ophelia:text-[#525252] mt-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(la,{className:"h-3 w-3"}),new Date(a.modified_at).toLocaleDateString()]}),e.jsxs("span",{className:"flex items-center gap-1 font-mono truncate max-w-[200px]",title:a.digest,children:[e.jsx(da,{className:"h-3 w-3"}),a.digest.slice(0,12),"..."]})]})]}),e.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[e.jsxs(c,{onClick:()=>qe(a.name),variant:"outline",size:"sm",className:s("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(oa,{className:"h-3.5 w-3.5"}),r("modelManager.local.info")]}),e.jsxs(c,{onClick:()=>{W(a.name),w(!0)},variant:"outline",size:"sm",className:s("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(X,{className:"h-3.5 w-3.5"}),r("modelManager.local.copy")]}),e.jsxs(c,{onClick:()=>Te(a.name),variant:"outline",size:"sm",className:s("gap-1.5","text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300","ophelia:text-[#f87171] ophelia:hover:text-[#fca5a5]","ophelia:border-[#262626] ophelia:hover:bg-[#1a1a1a]"),children:[e.jsx(ia,{className:"h-3.5 w-3.5"}),r("modelManager.local.delete")]})]})]})},a.name))})})]}),e.jsxs("div",{className:s("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>y("advanced"),className:s("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:s("p-2 rounded-lg","bg-amber-100 dark:bg-amber-900/30 ophelia:bg-[#f59e0b]/20"),children:e.jsx(na,{className:"h-5 w-5 text-amber-600 dark:text-amber-400 ophelia:text-[#fbbf24]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:r("modelManager.sections.advanced")})]}),h.has("advanced")?e.jsx(H,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),h.has("advanced")&&e.jsx("div",{className:"p-4 pt-0",children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[e.jsxs(c,{onClick:()=>P(!0),variant:"outline",className:s("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(be,{className:"h-5 w-5 text-purple-500 ophelia:text-[#a855f7]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:r("modelManager.advanced.createModel")}),e.jsx("div",{className:"text-xs opacity-70",children:r("modelManager.advanced.fromModelfile")})]})]}),e.jsxs(c,{onClick:()=>w(!0),variant:"outline",className:s("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(X,{className:"h-5 w-5 text-blue-500 ophelia:text-[#60a5fa]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:r("modelManager.advanced.copyModel")}),e.jsx("div",{className:"text-xs opacity-70",children:r("modelManager.advanced.duplicateExisting")})]})]}),e.jsxs(c,{onClick:()=>K(!0),variant:"outline",className:s("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(ue,{className:"h-5 w-5 text-green-500 ophelia:text-[#4ade80]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:r("modelManager.advanced.testEmbeddings")}),e.jsx("div",{className:"text-xs opacity-70",children:r("modelManager.advanced.generateVectors")})]})]}),e.jsxs(c,{onClick:async()=>{try{(await x.checkHealth()).success&&(F(!0),d.success(r("modelManager.advanced.healthy")))}catch{F(!1),d.error(r("modelManager.systemStatus.offline"))}},variant:"outline",className:s("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(ca,{className:"h-5 w-5 text-rose-500 ophelia:text-[#fb7185]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:r("modelManager.advanced.healthCheck")}),e.jsx("div",{className:"text-xs opacity-70",children:r("modelManager.advanced.testConnection")})]})]})]})})]}),ze&&T.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>U(!1)}),e.jsxs("div",{className:s("relative w-full max-w-2xl max-h-[85vh] overflow-hidden rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:s("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:[r("modelManager.modals.details.title"),": ",Se]}),e.jsx("button",{onClick:()=>U(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(z,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsx("div",{className:"overflow-y-auto max-h-[calc(85vh-60px)] p-4 space-y-4",children:Ee?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(p,{className:"h-6 w-6 animate-spin text-gray-400 ophelia:text-[#737373]"})}):o?e.jsxs(e.Fragment,{children:[o.details&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:r("modelManager.modals.details.info")}),e.jsx("div",{className:s("p-3 rounded-lg text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]"),children:e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.details.family&&e.jsxs("div",{children:[e.jsxs("span",{className:"text-gray-500 ophelia:text-[#737373]",children:[r("modelManager.modals.details.family"),":"]})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:o.details.family})]}),o.details.parameter_size&&e.jsxs("div",{children:[e.jsxs("span",{className:"text-gray-500 ophelia:text-[#737373]",children:[r("modelManager.modals.details.parameters"),":"]})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:o.details.parameter_size})]}),o.details.quantization_level&&e.jsxs("div",{children:[e.jsxs("span",{className:"text-gray-500 ophelia:text-[#737373]",children:[r("modelManager.modals.details.quantization"),":"]})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:o.details.quantization_level})]}),o.details.format&&e.jsxs("div",{children:[e.jsxs("span",{className:"text-gray-500 ophelia:text-[#737373]",children:[r("modelManager.modals.details.format"),":"]})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:o.details.format})]})]})})]}),o.system&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:r("modelManager.modals.details.systemPrompt")}),e.jsx("pre",{className:s("p-3 rounded-lg text-xs overflow-x-auto","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:o.system})]}),o.template&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:r("modelManager.modals.details.template")}),e.jsx("pre",{className:s("p-3 rounded-lg text-xs overflow-x-auto max-h-40","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:o.template})]}),o.parameters&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:r("modelManager.modals.details.parameters")}),e.jsx("pre",{className:s("p-3 rounded-lg text-xs overflow-x-auto","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:o.parameters})]}),o.license&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:r("modelManager.modals.details.license")}),e.jsx("pre",{className:s("p-3 rounded-lg text-xs overflow-x-auto max-h-32","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:o.license})]}),o.modelfile&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:r("modelManager.modals.details.modelfile")}),e.jsx("pre",{className:s("p-3 rounded-lg text-xs overflow-x-auto max-h-60","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:o.modelfile})]})]}):e.jsx("p",{className:"text-center text-gray-500 ophelia:text-[#737373]",children:r("modelManager.modals.details.noDetails")})})]})]}),document.body),De&&T.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>w(!1)}),e.jsxs("div",{className:s("relative w-full max-w-md rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:s("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:r("modelManager.modals.copy.title")}),e.jsx("button",{onClick:()=>w(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(z,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:r("modelManager.modals.copy.source")}),e.jsxs("select",{value:L,onChange:a=>W(a.target.value),className:s("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]"),children:[e.jsx("option",{value:"",children:r("modelManager.modals.copy.selectModel")}),g.map(a=>e.jsx("option",{value:a.name,children:a.name},a.name))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:r("modelManager.modals.copy.newName")}),e.jsx("input",{type:"text",value:M,onChange:a=>re(a.target.value),placeholder:r("modelManager.modals.copy.placeholder"),className:s("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]")})]}),e.jsxs(c,{onClick:He,disabled:!L.trim()||!M.trim()||Z,className:s("w-full gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[Z?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(X,{className:"h-4 w-4"}),r(Z?"modelManager.modals.copy.copying":"modelManager.modals.copy.button")]})]})]})]}),document.body),Le&&T.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>P(!1)}),e.jsxs("div",{className:s("relative w-full max-w-lg rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:s("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:r("modelManager.modals.create.title")}),e.jsx("button",{onClick:()=>P(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(z,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:r("modelManager.modals.create.name")}),e.jsx("input",{type:"text",value:S,onChange:a=>te(a.target.value),placeholder:r("modelManager.modals.create.namePlaceholder"),className:s("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:r("modelManager.modals.create.modelfile")}),e.jsx("textarea",{value:B,onChange:a=>le(a.target.value),placeholder:r("modelManager.modals.create.modelfilePlaceholder"),rows:8,className:s("w-full px-3 py-2 rounded-lg border text-sm font-mono","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]","resize-none")}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500 ophelia:text-[#737373]",children:["See"," ",e.jsx("a",{href:"https://github.com/ollama/ollama/blob/main/docs/modelfile.md",target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 ophelia:text-[#a855f7] hover:underline",children:r("modelManager.modals.create.docs")})," ",r("modelManager.modals.create.docsLink")]})]}),e.jsxs(c,{onClick:Ie,disabled:!S.trim()||!B.trim()||J,className:s("w-full gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[J?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(be,{className:"h-4 w-4"}),r(J?"modelManager.modals.create.creating":"modelManager.modals.create.button")]})]})]})]}),document.body),Pe&&T.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>K(!1)}),e.jsxs("div",{className:s("relative w-full max-w-lg rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:s("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:r("modelManager.modals.embeddings.title")}),e.jsx("button",{onClick:()=>K(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(z,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:r("modelManager.modals.embeddings.model")}),e.jsxs("select",{value:_,onChange:a=>Be(a.target.value),className:s("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]"),children:[e.jsx("option",{value:"",children:r("modelManager.modals.embeddings.selectModel")}),g.map(a=>e.jsx("option",{value:a.name,children:a.name},a.name))]}),e.jsx("p",{className:"mt-1 text-xs text-gray-500 ophelia:text-[#737373]",children:r("modelManager.modals.embeddings.recommended")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:r("modelManager.modals.embeddings.input")}),e.jsx("textarea",{value:R,onChange:a=>_e(a.target.value),placeholder:r("modelManager.modals.embeddings.placeholder"),rows:3,className:s("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]","resize-none")})]}),e.jsxs(c,{onClick:Ve,disabled:!_.trim()||!R.trim()||O,className:s("w-full gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[O?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(ue,{className:"h-4 w-4"}),r(O?"modelManager.modals.embeddings.generating":"modelManager.modals.embeddings.button")]}),A&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:r("modelManager.modals.embeddings.result",{count:A.length})}),e.jsxs("pre",{className:s("p-3 rounded-lg text-xs overflow-x-auto max-h-32","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:["[",A.slice(0,10).join(", "),A.length>10&&", ..."," ]"]})]})]})]})]}),document.body)]})},fa=()=>{const{t:r}=fe();return e.jsx("div",{className:"h-full overflow-auto",children:e.jsxs("div",{className:"max-w-6xl mx-auto p-6",children:[e.jsxs("div",{className:"text-center max-w-md mx-auto mb-8",children:[e.jsx("h2",{className:"libre-brand text-4xl sm:text-5xl font-normal text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa] mb-3",style:{fontWeight:300,letterSpacing:"0.01em"},children:r("models.title")}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] leading-relaxed",children:r("models.subtitle")})]}),e.jsx(xa,{})]})})};export{fa as ModelsPage,fa as default};
@@ -0,0 +1,13 @@
1
+ import{j as e}from"./markdown-vendor-YWiGftdn.js";import{r as l}from"./router-vendor-CnU0qKrY.js";import{a as T,g as w,c as L,B as P,A as me,o as ce}from"../assets/index-DMCEMy0k.js";import{o as O,aq as ee,k as ae,a3 as K,ab as xe,d as pe,Z as oe,D as B,ar as ge,g as he,as as be,at as ue,au as ye,Q as ke,T as de,z as i,X as fe,I as ve,U as je,p as Ne,S as we,a1 as re,ae as Fe,al as Ce,av as te,b as _e,C as Se}from"./ui-vendor-CAOY-5dA.js";import"./react-vendor-N--QU9DW.js";import"./utils-vendor-DEeF42mN.js";const Me=({persona:r,onEdit:u,onDelete:F,onDownload:a,onSelect:o,onToggleFavorite:v,isSelected:k=!1,compact:C=!1})=>{const{t:n}=T(),[y,D]=l.useState(null),[M,s]=l.useState(!1),[c,d]=l.useState(!1),m=!!(r.memory_settings?.enabled||r.mutation_settings?.enabled),g=l.useCallback(async()=>{if(m)try{const p=await w.getMemoryStatus(r.id);p.success&&p.data&&D(p.data)}catch(p){console.error("Failed to load memory status:",p)}},[r.id,m]);l.useEffect(()=>{g()},[g]);const j=async()=>{if(confirm(n("personaCard.wipeConfirm"))){d(!0);try{const p=await w.wipeMemories(r.id);p.success?(i.success(n("personaCard.wipeSuccess",{count:p.data?.deleted_count||0})),await g()):i.error(n("personaCard.failed",{action:"wipe memories"}))}catch(p){i.error(n("personaCard.failed",{action:"wipe memories"})),console.error(p)}finally{d(!1),s(!1)}}},x=async()=>{d(!0);try{const p=await w.backupPersona(r.id),R=window.URL.createObjectURL(p),_=document.createElement("a");_.href=R,_.download=`${r.name.toLowerCase().replace(/\s+/g,"-")}-backup.json`,document.body.appendChild(_),_.click(),window.URL.revokeObjectURL(R),document.body.removeChild(_),i.success(n("personaCard.backupSuccess"))}catch(p){i.error(n("personaCard.failed",{action:"backup persona"})),console.error(p)}finally{d(!1),s(!1)}},N=async()=>{d(!0);try{const p=await w.exportPersonaDNA(r.id),R=window.URL.createObjectURL(p),_=document.createElement("a");_.href=R,_.download=`${r.name.toLowerCase().replace(/\s+/g,"-")}-dna.json`,document.body.appendChild(_),_.click(),window.URL.revokeObjectURL(R),document.body.removeChild(_),i.success(n("personaCard.dnaSuccess"))}catch(p){i.error(n("personaCard.failed",{action:"export persona DNA"})),console.error(p)}finally{d(!1),s(!1)}},E=()=>r.avatar?r.avatar:`https://ui-avatars.com/api/?name=${encodeURIComponent(r.name)}&background=6366f1&color=fff&size=128`,H=p=>p<1?`${(p*1024).toFixed(0)} KB`:`${p.toFixed(1)} MB`;return C?e.jsxs("div",{className:L("group relative flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200","border border-transparent","hover:bg-gray-50 dark:hover:bg-dark-100 ophelia:hover:bg-[#1a1a1a]",k&&["bg-primary-50 dark:bg-primary-900/20 ophelia:bg-[#9333ea]/10","border-primary-200 dark:border-primary-700 ophelia:border-[#7c3aed]"]),onClick:()=>o?.(r),children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx("img",{src:E(),alt:r.name,className:"w-10 h-10 rounded-full object-cover ring-2 ring-white dark:ring-dark-100 ophelia:ring-[#0a0a0a]"}),m&&e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-4 h-4 bg-gradient-to-br from-purple-500 to-primary-500 rounded-full flex items-center justify-center",children:e.jsx(O,{className:"h-2.5 w-2.5 text-white"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("h4",{className:"font-medium text-sm text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa] truncate",children:r.name}),r.is_favorite&&e.jsx(ee,{className:"h-3 w-3 text-amber-500 fill-amber-500 flex-shrink-0"})]}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 ophelia:text-[#a3a3a3] truncate",children:r.model})]}),k&&e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-6 h-6 rounded-full bg-primary-500 dark:bg-primary-600 ophelia:bg-[#9333ea] flex items-center justify-center",children:e.jsx(ae,{className:"h-3 w-3 text-white ml-0.5"})})})]}):e.jsxs("div",{className:L("group relative rounded-2xl overflow-hidden transition-all duration-300","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border border-gray-200/60 dark:border-dark-300/60 ophelia:border-[#262626]","hover:border-gray-300 dark:hover:border-dark-400 ophelia:hover:border-[#3f3f46]","shadow-sm hover:shadow-lg dark:shadow-none",k&&["ring-2 ring-primary-500 dark:ring-primary-400 ophelia:ring-[#9333ea]","border-primary-300 dark:border-primary-600 ophelia:border-[#7c3aed]"]),children:[e.jsxs("div",{className:"relative h-20",children:[r.background?e.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${r.background})`}}):e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary-400 via-primary-500 to-purple-600 dark:from-primary-600 dark:via-primary-700 dark:to-purple-800 ophelia:from-[#9333ea] ophelia:via-[#7c3aed] ophelia:to-[#6d28d9]"}),e.jsx("div",{className:"absolute inset-0 bg-black/10 dark:bg-black/20"}),e.jsxs("div",{className:"absolute top-3 left-3 right-3 flex items-start justify-between",children:[e.jsx("button",{onClick:p=>{p.stopPropagation(),v?.(r)},className:L("p-1.5 rounded-full transition-all duration-200","bg-white/20 hover:bg-white/30 backdrop-blur-sm",r.is_favorite&&"bg-amber-500/80 hover:bg-amber-500"),children:e.jsx(ee,{className:L("h-4 w-4",r.is_favorite?"text-white fill-white":"text-white/80 hover:text-white")})}),m&&e.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 rounded-full bg-white/20 backdrop-blur-sm text-white text-[10px] font-medium",children:[e.jsx(O,{className:"h-3 w-3"}),n("personaCard.enhanced")]})]})]}),e.jsx("div",{className:"relative px-4 -mt-8",children:e.jsxs("div",{className:"relative inline-block",children:[e.jsx("img",{src:E(),alt:r.name,className:"w-16 h-16 rounded-xl object-cover ring-4 ring-white dark:ring-dark-100 ophelia:ring-[#0a0a0a] shadow-lg"}),m&&e.jsx("div",{className:"absolute -bottom-1 -right-1 w-6 h-6 bg-gradient-to-br from-purple-500 to-primary-500 rounded-lg flex items-center justify-center shadow-sm",children:e.jsx(K,{className:"h-3.5 w-3.5 text-white"})})]})}),e.jsxs("div",{className:"px-4 pt-3 pb-4",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa] leading-tight",children:r.name}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 ophelia:text-[#a3a3a3] flex items-center gap-1.5 mt-0.5",children:[e.jsx(xe,{className:"h-3.5 w-3.5"}),r.model]})]}),r.description&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3] line-clamp-2 mb-3",children:r.description}),r.parameters.system_prompt&&e.jsxs("div",{className:"mb-3 p-2.5 rounded-lg bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212] border border-gray-100 dark:border-dark-200 ophelia:border-[#1a1a1a]",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[e.jsx(pe,{className:"h-3 w-3 text-gray-400 dark:text-gray-500 ophelia:text-[#737373]"}),e.jsx("span",{className:"text-[10px] uppercase tracking-wider font-medium text-gray-400 dark:text-gray-500 ophelia:text-[#737373]",children:n("personaCard.systemPrompt")})]}),e.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3] line-clamp-2 italic",children:["“",r.parameters.system_prompt,"”"]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 rounded-md text-[11px] font-medium bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a] text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(oe,{className:"h-3 w-3"}),r.parameters.temperature?.toFixed(1)||"0.7"]}),e.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-[11px] font-medium bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a] text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:["Top-P ",r.parameters.top_p?.toFixed(1)||"0.9"]}),e.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-[11px] font-medium bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a] text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[(r.parameters.context_window||4096).toLocaleString()," ctx"]})]}),m&&y&&e.jsx("div",{className:"mb-3 p-2.5 rounded-lg bg-gradient-to-r from-primary-50 to-purple-50 dark:from-primary-900/20 dark:to-purple-900/20 ophelia:from-[#9333ea]/10 ophelia:to-[#6d28d9]/10 border border-primary-100 dark:border-primary-800/30 ophelia:border-[#7c3aed]/20",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(B,{className:"h-4 w-4 text-primary-600 dark:text-primary-400 ophelia:text-[#a855f7]"}),e.jsxs("div",{children:[e.jsxs("span",{className:"text-xs font-medium text-primary-700 dark:text-primary-300 ophelia:text-[#c084fc]",children:[y.memory_count," ",n("personaCard.memories")]}),e.jsx("span",{className:"text-[10px] text-primary-600/70 dark:text-primary-400/70 ophelia:text-[#a855f7]/70 ml-2",children:H(y.size_mb)})]})]}),y.status&&e.jsx("span",{className:L("text-[10px] px-1.5 py-0.5 rounded-full font-medium",y.status==="active"?"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400":"bg-gray-100 dark:bg-dark-200 text-gray-600 dark:text-gray-400"),children:y.status})]})}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-gray-100 dark:border-dark-200 ophelia:border-[#1a1a1a]",children:[o&&e.jsxs(P,{onClick:()=>o(r),size:"sm",className:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-600 dark:hover:bg-primary-500 ophelia:bg-[#9333ea] ophelia:hover:bg-[#a855f7] text-white px-4",children:[e.jsx(ae,{className:"h-3.5 w-3.5 mr-1.5"}),n("personaCard.use")]}),e.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[e.jsx("button",{onClick:()=>u(r),className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 ophelia:text-[#737373] ophelia:hover:text-[#e5e5e5] hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a] transition-colors",title:n("personaCard.editTooltip"),children:e.jsx(ge,{className:"h-4 w-4"})}),e.jsx("button",{onClick:()=>a(r),className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 ophelia:text-[#737373] ophelia:hover:text-[#e5e5e5] hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a] transition-colors",title:n("personaCard.downloadTooltip"),children:e.jsx(he,{className:"h-4 w-4"})}),e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:()=>s(!M),className:"p-2 rounded-lg text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 ophelia:text-[#737373] ophelia:hover:text-[#e5e5e5] hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a] transition-colors",children:e.jsx(be,{className:"h-4 w-4"})}),M&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>s(!1)}),e.jsxs("div",{className:"absolute right-0 bottom-full mb-1 w-44 py-1 bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a] rounded-xl shadow-lg border border-gray-200 dark:border-dark-300 ophelia:border-[#262626] z-20",children:[m&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:x,disabled:c,className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5] hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#1a1a1a] disabled:opacity-50",children:[e.jsx(ue,{className:"h-4 w-4"}),n("personaCard.backup")]}),e.jsxs("button",{onClick:N,disabled:c,className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5] hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#1a1a1a] disabled:opacity-50",children:[e.jsx(ye,{className:"h-4 w-4"}),n("personaCard.exportDNA")]}),y&&y.memory_count>0&&e.jsxs("button",{onClick:j,disabled:c,className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 disabled:opacity-50",children:[e.jsx(ke,{className:"h-4 w-4"}),n("personaCard.wipeMemories")]}),e.jsx("div",{className:"my-1 border-t border-gray-100 dark:border-dark-200 ophelia:border-[#1a1a1a]"})]}),e.jsxs("button",{onClick:()=>{F(r),s(!1)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20",children:[e.jsx(de,{className:"h-4 w-4"}),n("common.delete")]})]})]})]})]})]})]})]})},Ee=({value:r,onChange:u,className:F=""})=>{const a=l.useRef(null),[o,v]=l.useState(!1),[k,C]=l.useState(!1),n=async d=>{if(!d.type.startsWith("image/")){i.error("Please select a valid image file");return}if(d.size>5*1024*1024){i.error("Background image size must be less than 5MB");return}v(!0);try{const m=new FileReader;m.onload=g=>{const j=g.target?.result;u(j),i.success("Background uploaded successfully")},m.onerror=()=>{i.error("Failed to read image file")},m.readAsDataURL(d)}catch(m){console.error("Failed to upload background:",m),i.error("Failed to upload background image")}finally{v(!1)}},y=d=>{const m=d.target.files?.[0];m&&n(m)},D=d=>{d.preventDefault(),C(!0)},M=d=>{d.preventDefault(),C(!1)},s=d=>{d.preventDefault(),C(!1);const m=d.dataTransfer.files?.[0];m&&n(m)},c=()=>{u(""),i.success("Background removed")};return e.jsx("div",{className:`space-y-4 ${F}`,children:e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-dark-600 mb-2",children:"Background Image"}),e.jsxs("div",{className:"space-y-3",children:[r?e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"w-full h-32 rounded-lg bg-cover bg-center border-2 border-gray-300 dark:border-dark-300",style:{backgroundImage:`url(${r})`}}),e.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gray-50 dark:bg-dark-200 rounded-lg",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:"Custom background image"}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Click to change or remove"})]}),e.jsx(P,{variant:"ghost",size:"sm",onClick:c,className:"text-red-600 hover:text-red-700 hover:bg-red-50 dark:text-red-400 dark:hover:text-red-300 dark:hover:bg-red-900/20",children:e.jsx(fe,{className:"h-4 w-4"})})]})]}):e.jsxs("div",{className:`border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition-colors ${k?"border-primary-500 bg-primary-50 dark:bg-primary-900/20":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`,onDragOver:D,onDragLeave:M,onDrop:s,onClick:()=>a.current?.click(),children:[e.jsx(ve,{className:"h-12 w-12 mx-auto text-gray-400 dark:text-gray-500 mb-4"}),e.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 mb-2",children:"Upload background image"}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:"Drag and drop an image or click to browse"}),e.jsxs(P,{variant:"outline",size:"sm",disabled:o,className:"mx-auto",children:[e.jsx(je,{className:"h-4 w-4 mr-2"}),o?"Uploading...":"Choose Image"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Or enter image URL"}),e.jsx("input",{type:"url",value:r,onChange:d=>u(d.target.value),className:"w-full px-3 py-2 text-sm border border-gray-300 dark:border-dark-300 rounded-md bg-white dark:bg-dark-50 text-gray-900 dark:text-dark-800",placeholder:"https://example.com/background.jpg"})]})]}),e.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:y,className:"hidden"}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-2",children:"Supports: JPG, PNG, GIF, WebP (max 5MB). Wide landscape images work best."})]})})},q=({label:r,value:u,min:F,max:a,step:o,onChange:v,hint:k,format:C=y=>String(y),colorClass:n="text-gray-700 dark:text-dark-600"})=>{const y=(u-F)/(a-F)*100;return e.jsxs("div",{children:[e.jsxs("label",{className:L("block text-sm font-medium mb-2",n),children:[r,": ",C(u)]}),e.jsx("input",{type:"range",min:F,max:a,step:o,value:u,onChange:D=>v(parseFloat(D.target.value)),className:"w-full h-2 bg-gray-200 dark:bg-dark-200 rounded-lg appearance-none cursor-pointer slider",style:{"--progress":`${y}%`}}),k&&e.jsx("p",{className:L("text-xs mt-1",n.replace("700","500").replace("600","400")),children:k})]})},$=({label:r,checked:u,onChange:F,colorClass:a="text-gray-700 dark:text-dark-600"})=>e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsx("div",{className:L("relative w-10 h-5 rounded-full transition-colors",u?"bg-primary-500 dark:bg-primary-600":"bg-gray-300 dark:bg-dark-300"),onClick:()=>F(!u),children:e.jsx("div",{className:L("absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow transition-transform",u&&"translate-x-5")})}),e.jsx("span",{className:L("text-sm font-medium",a),children:r})]}),G={name:"",description:"",model:"",parameters:{temperature:.7,top_p:.9,top_k:40,context_window:4096,max_tokens:1024,system_prompt:"",repeat_penalty:1.1,presence_penalty:0,frequency_penalty:0},avatar:"",background:"",embedding_model:"",memory_settings:{enabled:!1,max_memories:1e3,auto_cleanup:!0,retention_days:90},mutation_settings:{enabled:!1,sensitivity:"medium",auto_adapt:!0}},se=["embed","e5","bge","gte","minilm","multilingual","sentence","universal","instructor","jina","paraphrase","mpnet","contriever"],Pe=({persona:r,onSubmit:u,onCancel:F})=>{const{t:a}=T(),[o,v]=l.useState(G),[k,C]=l.useState([]),[n,y]=l.useState([]),[D,M]=l.useState(!1),[s,c]=l.useState(!1),[d,m]=l.useState(!1),[g,j]=l.useState(null),[x,N]=l.useState("basic"),[E,H]=l.useState(null),[p,R]=l.useState(!1),[_,Z]=l.useState(!1),Q=l.useRef(!1),z=l.useCallback((t,b)=>{v(f=>({...f,[t]:b})),j(null)},[]),V=l.useCallback((t,b)=>{v(f=>({...f,parameters:{...f.parameters,[t]:b}})),j(null)},[]),A=l.useCallback((t,b)=>{v(f=>({...f,[t]:{...f[t],...b}})),j(null)},[]),X=l.useCallback(t=>{const b=t.filter(h=>se.some(S=>h.name.toLowerCase().includes(S.toLowerCase()))).map(h=>({id:h.name,name:h.name,description:`${h.details?.parameter_size||"Unknown size"} - ${h.details?.family||"Ollama model"}`,provider:"ollama",dimensions:768,isDetectedEmbedding:!0})),f=t.filter(h=>!se.some(S=>h.name.toLowerCase().includes(S.toLowerCase()))).map(h=>({id:h.name,name:h.name,description:`${h.details?.parameter_size||"Unknown size"} - ${h.details?.family||"Other model"}`,provider:"ollama",dimensions:768,isDetectedEmbedding:!1})),I=[...b,...f].reduce((h,S)=>(h.find(J=>J.id===S.id)||h.push(S),h),[]);return I.length>0?I:[{id:"nomic-embed-text",name:"nomic-embed-text",description:"Default embedding model (install if needed)",provider:"ollama",dimensions:768}]},[]),W=l.useCallback(async()=>{if(r?.id){R(!0);try{const t=await w.getMemoryStatus(r.id);t.success&&t.data&&H(t.data)}catch(t){console.error("Failed to load memory status:",t)}finally{R(!1)}}},[r?.id]),ne=async()=>{if(r?.id&&confirm(a("personaForm.memory.wipeConfirm"))){Z(!0);try{const t=await w.wipeMemories(r.id);t.success?(i.success(a("personaForm.memory.wipeSuccess",{count:t.data?.deleted_count||0})),await W()):i.error(a("personaForm.error.saveFailed"))}catch{i.error(a("personaForm.error.saveFailed"))}finally{Z(!1)}}};l.useEffect(()=>{if(Q.current)return;Q.current=!0,(async()=>{M(!0);try{const[b,f]=await Promise.all([ce.getModels(),r?Promise.resolve(null):w.getDefaultParameters()]);if(b.success&&b.data){C(b.data);const U=X(b.data);if(y(U),r){if(v({name:r.name,description:r.description||"",model:r.model,parameters:r.parameters,avatar:r.avatar||"",background:r.background||"",embedding_model:r.embedding_model||U[0]?.id||"",memory_settings:r.memory_settings||G.memory_settings,mutation_settings:r.mutation_settings||G.mutation_settings}),r.embedding_model&&!U.find(I=>I.id===r.embedding_model)){const I=r.embedding_model.split(":")[0],h=U.find(S=>S.id.startsWith(I+":")||S.id===I);h?v(S=>({...S,embedding_model:h.id})):y(S=>[...S,{id:r.embedding_model,name:r.embedding_model,description:"Previously selected model (not currently installed)",provider:"ollama",dimensions:768}])}}else{const I=f?.success?f.data:{};v(h=>({...h,parameters:{...h.parameters,...I},embedding_model:U[0]?.id||""}))}}}catch(b){console.error("Error loading data:",b)}finally{M(!1)}})()},[r,X]),l.useEffect(()=>{r?.id&&o.memory_settings?.enabled&&W()},[r?.id,o.memory_settings?.enabled,W]);const Y=async t=>{c(!0),m(t);try{const b={name:o.name,description:o.description,model:o.model,parameters:o.parameters,avatar:o.avatar,background:o.background,embedding_model:o.embedding_model,memory_settings:o.memory_settings,mutation_settings:o.mutation_settings},f=r?await w.updatePersona(r.id,b):await w.createPersona(o);f.success?(i.success(a(r?"personaForm.success.updated":"personaForm.success.created")),j(new Date),t&&u()):i.error(`${a("personaForm.error.saveFailed")}: ${f.error}`)}catch(b){i.error(`${a("personaForm.error.saveFailed")}: ${b instanceof Error?b.message:String(b)}`)}finally{c(!1),m(!1)}},le=l.useMemo(()=>[{id:"basic",label:a("personaForm.tabs.basic"),icon:Ne},{id:"parameters",label:a("personaForm.tabs.parameters"),icon:we},{id:"memory",label:a("personaForm.tabs.memory"),icon:O},{id:"advanced",label:a("personaForm.tabs.advanced"),icon:K}],[a]),ie=l.useMemo(()=>[{key:"temperature",label:a("personaForm.parameters.temperature"),min:0,max:2,step:.1,hint:a("personaForm.parameters.temperatureHint"),format:t=>t.toFixed(1)},{key:"top_p",label:a("personaForm.parameters.topP"),min:0,max:1,step:.1,hint:a("personaForm.parameters.topPHint"),format:t=>t.toFixed(1)},{key:"top_k",label:a("personaForm.parameters.topK"),min:1,max:100,step:1,hint:a("personaForm.parameters.topKHint"),format:t=>String(Math.round(t))},{key:"context_window",label:a("personaForm.parameters.contextWindow"),min:128,max:131072,step:128,hint:a("personaForm.parameters.contextWindowHint"),format:t=>String(Math.round(t))},{key:"max_tokens",label:a("personaForm.parameters.maxTokens"),min:1,max:8192,step:1,hint:a("personaForm.parameters.maxTokensHint"),format:t=>String(Math.round(t))},{key:"repeat_penalty",label:a("personaForm.parameters.repeatPenalty"),min:.5,max:2,step:.1,hint:a("personaForm.parameters.repeatPenaltyHint"),format:t=>t.toFixed(1)}],[a]);return D?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsxs("div",{className:"animate-pulse flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 border-2 border-primary-500 border-t-transparent rounded-full animate-spin"}),e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:a("personaForm.loading")})]})}):e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-dark-800",children:a(r?"personaForm.title.edit":"personaForm.title.create")}),e.jsxs("div",{className:"flex items-center gap-4 mt-1",children:[e.jsx("p",{className:"text-gray-600 dark:text-dark-600",children:a(r?"personaForm.subtitle.edit":"personaForm.subtitle.create")}),g&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[e.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),a("personaForm.saved")," ",g.toLocaleTimeString()]})]})]}),e.jsxs("form",{onSubmit:t=>t.preventDefault(),className:"space-y-6",children:[e.jsxs("div",{className:"bg-white dark:bg-dark-100 rounded-lg shadow-sm border border-gray-200 dark:border-dark-300",children:[e.jsx("div",{className:"flex border-b border-gray-200 dark:border-dark-300",children:le.map(t=>e.jsxs("button",{type:"button",onClick:()=>N(t.id),className:`flex items-center gap-2 px-6 py-4 text-sm font-medium transition-colors ${x===t.id?"border-b-2 border-primary-500 text-primary-600 dark:text-primary-400 bg-primary-50 dark:bg-primary-900/20":"text-gray-500 dark:text-dark-600 hover:text-gray-700 dark:hover:text-dark-800"}`,children:[e.jsx(t.icon,{className:"h-4 w-4"}),t.label]},t.id))}),e.jsxs("div",{className:"p-6",children:[x==="basic"&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-dark-600 mb-2",children:[a("personaForm.basic.name")," *"]}),e.jsx("input",{type:"text",value:o.name,onChange:t=>z("name",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-dark-300 rounded-lg bg-white dark:bg-dark-50 text-gray-900 dark:text-dark-800 focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500 transition-colors",placeholder:a("personaForm.basic.namePlaceholder"),required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-dark-600 mb-2",children:[a("personaForm.basic.model")," *"]}),e.jsxs("select",{value:o.model,onChange:t=>z("model",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-dark-300 rounded-lg bg-white dark:bg-dark-50 text-gray-900 dark:text-dark-800 focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500 transition-colors",required:!0,children:[e.jsx("option",{value:"",children:a("personaForm.basic.selectModel")}),k.map(t=>e.jsx("option",{value:t.name,children:t.name},t.name))]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-dark-600 mb-2",children:a("personaForm.basic.description")}),e.jsx("textarea",{value:o.description,onChange:t=>z("description",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-dark-300 rounded-lg bg-white dark:bg-dark-50 text-gray-900 dark:text-dark-800 focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500 transition-colors resize-none",rows:3,placeholder:a("personaForm.basic.descriptionPlaceholder")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(me,{value:o.avatar||"",onChange:t=>z("avatar",t)}),e.jsx(Ee,{value:o.background||"",onChange:t=>z("background",t)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-dark-600 mb-2",children:a("personaForm.basic.systemPrompt")}),e.jsx("textarea",{value:o.parameters.system_prompt,onChange:t=>V("system_prompt",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-dark-300 rounded-lg bg-white dark:bg-dark-50 text-gray-900 dark:text-dark-800 focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500 transition-colors resize-none font-mono text-sm",rows:6,placeholder:a("personaForm.basic.systemPromptPlaceholder")}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-dark-600 mt-2",children:a("personaForm.basic.systemPromptHint")})]})]}),x==="parameters"&&e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:ie.map(({key:t,label:b,min:f,max:U,step:I,hint:h,format:S})=>e.jsx(q,{label:b,value:o.parameters[t]||0,min:f,max:U,step:I,hint:h,format:S,onChange:J=>V(t,J)},t))}),x==="memory"&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-xl overflow-hidden border border-emerald-200/50 dark:border-emerald-700/30",children:[e.jsx("div",{className:"px-5 py-4 bg-gradient-to-r from-emerald-500 to-teal-500 dark:from-emerald-600 dark:to-teal-600",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-white/20 flex items-center justify-center",children:e.jsx(B,{className:"h-5 w-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-white",children:a("personaForm.memory.title")}),e.jsx("p",{className:"text-xs text-white/80",children:a("personaForm.memory.subtitle")})]})]}),e.jsx($,{label:"",checked:o.memory_settings?.enabled||!1,onChange:t=>A("memory_settings",{enabled:t})})]})}),o.memory_settings?.enabled&&r?.id&&e.jsx("div",{className:"px-5 py-4 bg-emerald-50 dark:bg-emerald-900/20 border-b border-emerald-100 dark:border-emerald-800/30",children:p?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-emerald-600 dark:text-emerald-400",children:[e.jsx(re,{className:"h-4 w-4 animate-spin"}),a("personaForm.memory.loading")]}):E?e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-2xl font-bold text-emerald-700 dark:text-emerald-300",children:[e.jsx(B,{className:"h-5 w-5"}),E.memory_count.toLocaleString()]}),e.jsx("p",{className:"text-xs text-emerald-600 dark:text-emerald-400",children:a("personaForm.memory.memories")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-2xl font-bold text-emerald-700 dark:text-emerald-300",children:[e.jsx(Fe,{className:"h-5 w-5"}),E.size_mb.toFixed(1)]}),e.jsx("p",{className:"text-xs text-emerald-600 dark:text-emerald-400",children:a("personaForm.memory.mbUsed")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-2xl font-bold text-emerald-700 dark:text-emerald-300",children:[e.jsx(Ce,{className:"h-5 w-5"}),E.last_backup?new Date(E.last_backup).toLocaleDateString():a("personaForm.memory.never")]}),e.jsx("p",{className:"text-xs text-emerald-600 dark:text-emerald-400",children:a("personaForm.memory.lastBackup")})]})]}):e.jsx("p",{className:"text-sm text-emerald-600 dark:text-emerald-400",children:a("personaForm.memory.noData")})}),o.memory_settings?.enabled&&e.jsxs("div",{className:"p-5 bg-white dark:bg-dark-100 space-y-4",children:[e.jsx(q,{label:a("personaForm.memory.maxMemories"),value:o.memory_settings.max_memories,min:100,max:1e4,step:100,hint:a("personaForm.memory.maxMemoriesHint"),format:t=>t.toLocaleString(),colorClass:"text-emerald-700 dark:text-emerald-300",onChange:t=>A("memory_settings",{max_memories:t})}),e.jsx(q,{label:a("personaForm.memory.retention"),value:o.memory_settings.retention_days,min:7,max:365,step:7,hint:a("personaForm.memory.retentionHint"),format:t=>`${Math.round(t)} days`,colorClass:"text-emerald-700 dark:text-emerald-300",onChange:t=>A("memory_settings",{retention_days:t})}),e.jsx($,{label:a("personaForm.memory.autoCleanup"),checked:o.memory_settings.auto_cleanup,onChange:t=>A("memory_settings",{auto_cleanup:t}),colorClass:"text-emerald-700 dark:text-emerald-300"}),r?.id&&E&&E.memory_count>0&&e.jsx("div",{className:"pt-4 border-t border-gray-200 dark:border-dark-300",children:e.jsxs("div",{className:"flex items-center justify-between p-3 bg-red-50 dark:bg-red-900/20 rounded-lg border border-red-200 dark:border-red-800/30",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-red-700 dark:text-red-300",children:a("personaForm.memory.wipeAll")}),e.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:a("personaForm.memory.wipeCannot")})]}),e.jsxs("button",{type:"button",onClick:ne,disabled:_,className:"px-3 py-1.5 bg-red-500 hover:bg-red-600 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 flex items-center gap-1.5",children:[_?e.jsx(re,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(de,{className:"h-3.5 w-3.5"}),a(_?"personaForm.memory.wiping":"personaForm.memory.wipeButton")]})]})})]}),!o.memory_settings?.enabled&&e.jsx("div",{className:"p-5 bg-gray-50 dark:bg-dark-50",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 text-center",children:a("personaForm.memory.enableHint")})})]}),e.jsxs("div",{className:"rounded-xl overflow-hidden border border-violet-200/50 dark:border-violet-700/30",children:[e.jsx("div",{className:"px-5 py-4 bg-gradient-to-r from-violet-500 to-purple-500 dark:from-violet-600 dark:to-purple-600",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-white/20 flex items-center justify-center",children:e.jsx(te,{className:"h-5 w-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-white",children:a("personaForm.learning.title")}),e.jsx("p",{className:"text-xs text-white/80",children:a("personaForm.learning.subtitle")})]})]}),e.jsx($,{label:"",checked:o.mutation_settings?.enabled||!1,onChange:t=>A("mutation_settings",{enabled:t})})]})}),o.mutation_settings?.enabled&&e.jsxs("div",{className:"p-5 bg-white dark:bg-dark-100 space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-violet-700 dark:text-violet-300 mb-3",children:a("personaForm.learning.speed")}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{level:"low",icon:oe,label:a("personaForm.learning.slow"),desc:a("personaForm.learning.slowDesc")},{level:"medium",icon:te,label:a("personaForm.learning.balanced"),desc:a("personaForm.learning.balancedDesc")},{level:"high",icon:O,label:a("personaForm.learning.fast"),desc:a("personaForm.learning.fastDesc")}].map(({level:t,icon:b,label:f,desc:U})=>e.jsxs("button",{type:"button",onClick:()=>A("mutation_settings",{sensitivity:t}),className:L("p-3 rounded-xl text-center transition-all border",o.mutation_settings?.sensitivity===t?"bg-violet-500 border-violet-500 text-white shadow-lg shadow-violet-500/25":"bg-violet-50 dark:bg-violet-900/20 border-violet-200 dark:border-violet-700/30 text-violet-700 dark:text-violet-300 hover:bg-violet-100 dark:hover:bg-violet-900/30"),children:[e.jsx(b,{className:"h-5 w-5 mx-auto mb-1"}),e.jsx("p",{className:"text-sm font-medium",children:f}),e.jsx("p",{className:"text-[10px] opacity-70",children:U})]},t))})]}),e.jsx($,{label:a("personaForm.learning.autoAdapt"),checked:o.mutation_settings.auto_adapt,onChange:t=>A("mutation_settings",{auto_adapt:t}),colorClass:"text-violet-700 dark:text-violet-300"}),e.jsxs("div",{className:"p-4 bg-violet-50 dark:bg-violet-900/20 rounded-xl",children:[e.jsxs("p",{className:"text-xs font-medium text-violet-700 dark:text-violet-300 mb-2 flex items-center gap-1.5",children:[e.jsx(K,{className:"h-3.5 w-3.5"}),a("personaForm.learning.whatLearns")]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs text-violet-600 dark:text-violet-400",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-violet-400"}),a("personaForm.learning.conversationTone")]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-violet-400"}),a("personaForm.learning.responseStyle")]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-violet-400"}),a("personaForm.learning.userPreferences")]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-violet-400"}),a("personaForm.learning.topicInterests")]})]})]})]}),!o.mutation_settings?.enabled&&e.jsx("div",{className:"p-5 bg-gray-50 dark:bg-dark-50",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 text-center",children:a("personaForm.learning.enableHint")})})]})]}),x==="advanced"&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-xl p-5 bg-gradient-to-br from-primary-50 to-primary-100/50 dark:from-primary-900/30 dark:to-primary-800/20 border border-primary-200/50 dark:border-primary-700/30",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(B,{className:"h-5 w-5 text-primary-600 dark:text-primary-400"}),e.jsx("h3",{className:"font-semibold text-primary-900 dark:text-primary-100",children:a("personaForm.advanced.embeddingModel")})]}),e.jsx("p",{className:"text-xs text-primary-600 dark:text-primary-400 mb-3",children:a("personaForm.advanced.embeddingHint")}),e.jsx("select",{value:o.embedding_model,onChange:t=>z("embedding_model",t.target.value),className:"w-full px-3 py-2.5 border border-primary-200 dark:border-primary-700 rounded-lg bg-white dark:bg-dark-50 text-gray-900 dark:text-dark-800 focus:ring-2 focus:ring-primary-500/20",children:n.length===0?e.jsx("option",{value:"",disabled:!0,children:a("personaForm.advanced.noModels")}):e.jsxs(e.Fragment,{children:[n.filter(t=>t.isDetectedEmbedding).length>0&&e.jsx("optgroup",{label:a("personaForm.advanced.embeddingModels"),children:n.filter(t=>t.isDetectedEmbedding).map(t=>e.jsxs("option",{value:t.id,children:[t.name," - ",t.description]},t.id))}),n.filter(t=>!t.isDetectedEmbedding).length>0&&e.jsx("optgroup",{label:a("personaForm.advanced.otherModels"),children:n.filter(t=>!t.isDetectedEmbedding).map(t=>e.jsxs("option",{value:t.id,children:[t.name," - ",t.description]},t.id))})]})}),n.length===0&&e.jsx("div",{className:"mt-3 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700/50 rounded-lg",children:e.jsxs("p",{className:"text-sm text-amber-800 dark:text-amber-200",children:[a("personaForm.advanced.installHint")," ",e.jsx("code",{className:"px-1.5 py-0.5 bg-amber-100 dark:bg-amber-900/40 rounded text-xs",children:"ollama pull nomic-embed-text"})]})}),e.jsx("p",{className:"text-[10px] text-primary-500 dark:text-primary-500 mt-2",children:a("personaForm.advanced.recommended")})]}),e.jsx("div",{className:"p-4 bg-gray-50 dark:bg-dark-50 rounded-xl border border-gray-200 dark:border-dark-300",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(_e,{className:"h-5 w-5 text-gray-400 mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:a("personaForm.advanced.aboutTitle")}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:a("personaForm.advanced.aboutDescription")})]})]})})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(P,{type:"button",variant:"ghost",onClick:F,disabled:s,className:"text-gray-600 dark:text-gray-400",children:a("personaForm.actions.cancel")}),e.jsxs("div",{className:"flex items-center gap-3",children:[g&&e.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-emerald-600 dark:text-emerald-400",children:[e.jsx(Se,{className:"h-4 w-4"}),e.jsx("span",{children:a("personaForm.saved")})]}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>Y(!1),disabled:s,children:a(s&&!d?"personaForm.actions.saving":"personaForm.actions.save")}),e.jsx(P,{type:"button",onClick:()=>Y(!0),disabled:s,children:a(s&&d?"personaForm.actions.saving":r?"personaForm.actions.saveClose":"personaForm.actions.create")})]})]})]})]})},De=({personas:r,onImport:u,onClose:F})=>{const{t:a}=T(),[o,v]=l.useState(!1),[k,C]=l.useState(""),n=async s=>{try{const c=await w.exportPersona(s.id),d=new Blob([JSON.stringify(c,null,2)],{type:"application/json"}),m=URL.createObjectURL(d),g=document.createElement("a");g.href=m,g.download=`${s.name}.json`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(m),i.success(a("personaImportExport.exportSuccess",{name:s.name}))}catch(c){const d=c instanceof Error?c.message:String(c);i.error(a("personaImportExport.exportFailed")+": "+d)}},y=async()=>{try{const s=r.map(x=>w.exportPersona(x.id)),c=await Promise.all(s),d={personas:c,exportedAt:Date.now(),version:"1.0.0",count:c.length},m=new Blob([JSON.stringify(d,null,2)],{type:"application/json"}),g=URL.createObjectURL(m),j=document.createElement("a");j.href=g,j.download=`personas-export-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(j),j.click(),document.body.removeChild(j),URL.revokeObjectURL(g),i.success(a("personaImportExport.exportAllSuccess",{count:r.length}))}catch(s){const c=s instanceof Error?s.message:String(s);i.error(a("personaImportExport.exportAllFailed")+": "+c)}},D=async()=>{if(!k.trim()){i.error(a("personaImportExport.pasteJsonData"));return}v(!0);try{const s=JSON.parse(k);if(s.personas&&Array.isArray(s.personas)){let c=0,d=0;for(const m of s.personas)try{await w.importPersona(m),c++}catch(g){d++,console.error("Failed to import persona:",g)}c>0?(i.success(a("personaImportExport.importMultipleSuccess",{count:c})),d>0&&i.error(a("personaImportExport.importMultipleFailed",{count:d}))):i.error(a("personaImportExport.importNoneFailed"))}else await w.importPersona(s),i.success(a("personaImportExport.importSuccess"));C(""),u()}catch(s){const c=s instanceof Error?s.message:String(s);i.error(a("personaImportExport.importFailed")+": "+c)}finally{v(!1)}},M=s=>{const c=s.target.files?.[0];if(c){const d=new FileReader;d.onload=m=>{const g=m.target?.result;typeof g=="string"&&C(g)},d.readAsText(c)}};return e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-dark-800",children:a("personaImportExport.title")}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600 mt-1",children:a("personaImportExport.description")})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white dark:bg-dark-100 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-dark-300",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 mb-4",children:a("personaImportExport.exportPersonas")}),r.length===0?e.jsx("p",{className:"text-gray-600 dark:text-dark-600 text-center py-8",children:a("personaImportExport.noPersonasToExport")}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-dark-600",children:a("personaImportExport.personasAvailable",{count:r.length})}),e.jsx(P,{onClick:y,variant:"outline",size:"sm",className:"px-3 py-1",children:a("personaImportExport.exportAll")})]}),e.jsx("div",{className:"space-y-2 max-h-80 overflow-y-auto",children:r.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-dark-200 rounded-md",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:s.avatar||`https://ui-avatars.com/api/?name=${encodeURIComponent(s.name)}&background=6366f1&color=fff&size=32`,alt:s.name,className:"w-8 h-8 rounded-full"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-gray-900 dark:text-dark-800",children:s.name}),e.jsx("div",{className:"text-sm text-gray-500 dark:text-dark-500",children:s.model})]})]}),e.jsx(P,{onClick:()=>n(s),variant:"outline",size:"sm",className:"px-3 py-1",children:a("common.export")})]},s.id))})]})]}),e.jsxs("div",{className:"bg-white dark:bg-dark-100 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-dark-300",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 mb-4",children:a("personaImportExport.importPersonas")}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-dark-700 mb-2",children:a("personaImportExport.uploadJsonFile")}),e.jsx("input",{type:"file",accept:".json",onChange:M,className:"w-full px-3 py-2 border border-gray-300 dark:border-dark-300 rounded-md bg-white dark:bg-dark-50 text-gray-900 dark:text-dark-700"})]}),e.jsx("div",{className:"text-center text-gray-500 dark:text-dark-500",children:a("common.or").toUpperCase()}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-dark-700 mb-2",children:a("personaImportExport.pasteJsonLabel")}),e.jsx("textarea",{value:k,onChange:s=>C(s.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-dark-300 rounded-md bg-white dark:bg-dark-50 text-gray-900 dark:text-dark-700",rows:8,placeholder:a("personaImportExport.pasteJsonPlaceholder")})]}),e.jsx(P,{onClick:D,disabled:!k.trim()||o,className:"w-full",children:a(o?"personaImportExport.importing":"personaImportExport.importButton")})]})]})]}),e.jsxs("div",{className:"mt-6 bg-gray-50 dark:bg-dark-200 rounded-lg p-4",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-dark-800 mb-2",children:a("personaImportExport.expectedFormat")}),e.jsx("pre",{className:"text-xs text-gray-600 dark:text-dark-600 overflow-x-auto",children:`{
2
+ "name": "Assistant Name",
3
+ "description": "Brief description of the assistant's personality",
4
+ "model": "model-name:version",
5
+ "params": {
6
+ "temperature": 0.8,
7
+ "top_p": 0.9,
8
+ "context_window": 4096,
9
+ "system_prompt": "You are a helpful assistant with specific traits..."
10
+ },
11
+ "avatar": "/path/to/avatar.png",
12
+ "background": "/path/to/background.png"
13
+ }`})]}),e.jsx("div",{className:"mt-6 flex justify-end",children:e.jsx(P,{onClick:F,variant:"outline",children:a("common.close")})})]})},Ie=()=>{const{t:r}=T(),[u,F]=l.useState([]),[a,o]=l.useState(!1),[v,k]=l.useState(!1),[C,n]=l.useState(null),[y,D]=l.useState(!1),M=async()=>{o(!0);try{const x=await w.getPersonas();x.success?F(x.data||[]):i.error(r("personaManager.failed",{action:"load"})+": "+x.error)}catch(x){const N=x instanceof Error?x.message:String(x);i.error(r("personaManager.failed",{action:"load"})+": "+N)}finally{o(!1)}};l.useEffect(()=>{M()},[]);const s=()=>{n(null),k(!0)},c=x=>{n(x),k(!0)},d=async x=>{if(confirm(r("personaManager.deleteConfirm",{name:x.name})))try{const N=await w.deletePersona(x.id);N.success?(i.success(r("personaManager.deleteSuccess",{name:x.name})),await M()):i.error(r("personaManager.failed",{action:"delete"})+": "+N.error)}catch(N){const E=N instanceof Error?N.message:String(N);i.error(r("personaManager.failed",{action:"delete"})+": "+E)}},m=async x=>{try{await w.downloadPersona(x.id,x.name),i.success(r("personaManager.downloadSuccess",{name:x.name}))}catch(N){const E=N instanceof Error?N.message:String(N);i.error(r("personaManager.failed",{action:"download"})+": "+E)}},g=async()=>{k(!1),n(null),await M()},j=()=>{k(!1),n(null)};return a?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsx("div",{className:"text-gray-600 dark:text-dark-600",children:r("personaManager.loading")})}):v?e.jsx(Pe,{persona:C,onSubmit:g,onCancel:j}):y?e.jsx(De,{personas:u,onImport:M,onClose:()=>D(!1)}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-dark-800",children:r("personaManager.title")}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600 mt-1",children:r("personaManager.subtitle")})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(P,{onClick:()=>D(!0),variant:"outline",className:"px-4 py-2",children:r("personaManager.importExport")}),e.jsx(P,{onClick:s,className:"px-4 py-2",children:r("personaManager.createButton")})]})]}),e.jsx("div",{className:"bg-white dark:bg-dark-100 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-dark-300",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800",children:r("personaManager.stats.title")}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600",children:r("personaManager.stats.count",{count:u.length})})]}),e.jsx("div",{className:"text-3xl font-bold text-gray-900 dark:text-dark-800",children:u.length})]})}),u.length===0?e.jsxs("div",{className:"bg-white dark:bg-dark-100 rounded-lg p-12 shadow-sm border border-gray-200 dark:border-dark-300 text-center",children:[e.jsx("div",{className:"text-gray-400 dark:text-dark-500 mb-4",children:e.jsx("svg",{className:"w-16 h-16 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 mb-2",children:r("personaManager.empty.title")}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600 mb-6",children:r("personaManager.empty.description")}),e.jsx(P,{onClick:s,className:"px-6 py-2",children:r("personaManager.empty.button")})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:u.map(x=>e.jsx(Me,{persona:x,onEdit:c,onDelete:d,onDownload:m},x.id))})]})},$e=()=>{const{t:r}=T();return e.jsx("div",{className:"h-full overflow-auto",children:e.jsxs("div",{className:"max-w-6xl mx-auto p-6",children:[e.jsxs("div",{className:"text-center max-w-md mx-auto mb-8",children:[e.jsx("h2",{className:"libre-brand text-4xl sm:text-5xl font-normal text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa] mb-3",style:{fontWeight:300,letterSpacing:"0.01em"},children:r("personaManager.title")}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] leading-relaxed",children:r("personaManager.subtitle")})]}),e.jsx(Ie,{})]})})};export{$e as PersonasPage,$e as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./markdown-vendor-YWiGftdn.js";import{r as h}from"./router-vendor-CnU0qKrY.js";import{y as m,s as B,w as L,p as T,ar as A,T as P}from"./ui-vendor-CAOY-5dA.js";import{a as H,b as I,k as y,B as g,I as p}from"../assets/index-DMCEMy0k.js";import"./react-vendor-N--QU9DW.js";import"./utils-vendor-DEeF42mN.js";const l=({children:r,htmlFor:d,className:x=""})=>e.jsx("label",{htmlFor:d,className:`text-sm font-medium text-gray-700 dark:text-gray-300 ${x}`,children:r}),j=({children:r,className:d=""})=>e.jsx("div",{className:`bg-white dark:bg-dark-25 border border-gray-200 dark:border-dark-200 rounded-xl shadow-card hover:shadow-card-hover transition-shadow duration-200 ${d}`,children:r}),f=({children:r,className:d=""})=>e.jsx("div",{className:`flex flex-col space-y-1.5 p-6 ${d}`,children:r}),v=({children:r,className:d=""})=>e.jsx("h3",{className:`text-lg font-semibold leading-none tracking-tight text-gray-900 dark:text-dark-950 ${d}`,children:r}),N=({children:r,className:d=""})=>e.jsx("p",{className:`text-sm text-gray-500 dark:text-dark-500 ${d}`,children:r}),w=({children:r,className:d=""})=>e.jsx("div",{className:`p-6 pt-0 ${d}`,children:r}),R=()=>{const{t:r}=H(),[d,x]=h.useState([]),[E,M]=h.useState(!0),[C,k]=h.useState(!1),[c,b]=h.useState(null),[s,i]=h.useState({username:"",email:"",password:"",role:"user"}),{user:u}=I();h.useEffect(()=>{U()},[]);const U=async()=>{try{M(!0);const a=await y.getUsers();a.success&&a.data&&x(a.data)}catch(a){console.error("Error loading users:",a),m.error(r("errors.generic"))}finally{M(!1)}},F=async a=>{a.preventDefault();try{const t=await y.createUser(s);t.success&&t.data&&(x([...d,t.data]),i({username:"",email:"",password:"",role:"user"}),k(!1),m.success(r("userManager.form.createSuccess")))}catch(t){console.error("Error creating user:",t);let n=r("userManager.form.createFailed");t instanceof Error&&"response"in t&&(n=t.response?.data?.message||r("userManager.form.createFailed")),m.error(n)}},S=async a=>{if(a.preventDefault(),!!c)try{const t={username:s.username,email:s.email,role:s.role};s.password&&s.password.trim()!==""&&(t.password=s.password);const n=await y.updateUser(c.id,t);n.success&&n.data&&(x(d.map(o=>o.id===c.id?n.data:o)),b(null),i({username:"",email:"",password:"",role:"user"}),m.success(r("userManager.form.updateSuccess")))}catch(t){console.error("Error updating user:",t);let n=r("userManager.form.updateFailed");t instanceof Error&&"response"in t&&(n=t.response?.data?.message||r("userManager.form.updateFailed")),m.error(n)}},D=async(a,t)=>{if(confirm(r("userManager.deleteConfirm",{name:t})))try{(await y.deleteUser(a)).success&&(x(d.filter(o=>o.id!==a)),m.success(r("userManager.deleteSuccess")))}catch(n){console.error("Error deleting user:",n);let o=r("userManager.deleteFailed");n instanceof Error&&"response"in n&&(o=n.response?.data?.message||r("userManager.deleteFailed")),m.error(o)}},q=a=>{b(a),i({username:a.username,email:a.email||"",password:"",role:a.role})},$=()=>{b(null),i({username:"",email:"",password:"",role:"user"})},z=()=>{i({username:"",email:"",password:"",role:"user"}),k(!1)};return E?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsx("div",{className:"w-8 h-8 border-4 border-gray-200 dark:border-gray-600 border-t-primary-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("div",{}),e.jsxs(g,{onClick:()=>k(!C),className:"flex items-center space-x-2 bg-primary-600 hover:bg-primary-700 dark:bg-primary-500 dark:hover:bg-primary-600",children:[e.jsx(B,{size:16}),e.jsx("span",{children:r("userManager.createUser")})]})]}),C&&e.jsxs(j,{className:"bg-white dark:bg-dark-25 border border-gray-200 dark:border-dark-200 shadow-lg",children:[e.jsxs(f,{children:[e.jsx(v,{className:"text-gray-900 dark:text-gray-100",children:r("userManager.form.title.create")}),e.jsx(N,{className:"text-gray-600 dark:text-gray-400",children:r("userManager.subtitle")})]}),e.jsx(w,{children:e.jsxs("form",{onSubmit:F,className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(l,{htmlFor:"username",className:"text-gray-700 dark:text-gray-300",children:r("userManager.form.username")}),e.jsx(p,{id:"username",value:s.username,onChange:a=>i({...s,username:a.target.value}),required:!0,className:"bg-white dark:bg-dark-100 border-gray-300 dark:border-dark-300 text-gray-900 dark:text-gray-100"})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"email",className:"text-gray-700 dark:text-gray-300",children:r("userManager.form.email")}),e.jsx(p,{id:"email",type:"email",value:s.email,onChange:a=>i({...s,email:a.target.value}),required:!0,className:"bg-white dark:bg-dark-100 border-gray-300 dark:border-dark-300 text-gray-900 dark:text-gray-100"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(l,{htmlFor:"password",className:"text-gray-700 dark:text-gray-300",children:r("userManager.form.password")}),e.jsx(p,{id:"password",type:"password",value:s.password,onChange:a=>i({...s,password:a.target.value}),required:!0,className:"bg-white dark:bg-dark-100 border-gray-300 dark:border-dark-300 text-gray-900 dark:text-gray-100"})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"role",className:"text-gray-700 dark:text-gray-300",children:r("userManager.form.role")}),e.jsxs("select",{id:"role",value:s.role,onChange:a=>i({...s,role:a.target.value}),className:"w-full px-3 py-2 border border-gray-300 dark:border-dark-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 bg-white dark:bg-dark-100 text-gray-900 dark:text-gray-100 transition-colors duration-200",children:[e.jsx("option",{value:"user",children:r("userManager.roles.user")}),e.jsx("option",{value:"admin",children:r("userManager.roles.admin")})]})]})]}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(g,{type:"submit",children:r("userManager.form.createButton")}),e.jsx(g,{type:"button",variant:"outline",onClick:z,children:r("common.cancel")})]})]})})]}),c&&e.jsxs(j,{className:"bg-white dark:bg-dark-25 border border-gray-200 dark:border-dark-200 shadow-lg",children:[e.jsxs(f,{children:[e.jsxs(v,{className:"text-gray-900 dark:text-gray-100",children:[r("userManager.form.title.edit"),": ",c.username]}),e.jsx(N,{className:"text-gray-600 dark:text-gray-400",children:r("userManager.subtitle")})]}),e.jsx(w,{children:e.jsxs("form",{onSubmit:S,className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(l,{htmlFor:"edit-username",className:"text-gray-700 dark:text-gray-300",children:r("userManager.form.username")}),e.jsx(p,{id:"edit-username",value:s.username,onChange:a=>i({...s,username:a.target.value}),required:!0,className:"bg-white dark:bg-dark-100 border-gray-300 dark:border-dark-300 text-gray-900 dark:text-gray-100"})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"edit-email",className:"text-gray-700 dark:text-gray-300",children:r("userManager.form.email")}),e.jsx(p,{id:"edit-email",type:"email",value:s.email,onChange:a=>i({...s,email:a.target.value}),required:!0,className:"bg-white dark:bg-dark-100 border-gray-300 dark:border-dark-300 text-gray-900 dark:text-gray-100"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs(l,{htmlFor:"edit-password",className:"text-gray-700 dark:text-gray-300",children:[r("userManager.form.password")," (",r("common.optional"),")"]}),e.jsx(p,{id:"edit-password",type:"password",value:s.password,onChange:a=>i({...s,password:a.target.value}),placeholder:r("userManager.form.passwordHint"),className:"bg-white dark:bg-dark-100 border-gray-300 dark:border-dark-300 text-gray-900 dark:text-gray-100"})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"edit-role",className:"text-gray-700 dark:text-gray-300",children:r("userManager.form.role")}),e.jsxs("select",{id:"edit-role",value:s.role,onChange:a=>i({...s,role:a.target.value}),disabled:c?.id===u?.id&&u?.role==="admin",className:"w-full px-3 py-2 border border-gray-300 dark:border-dark-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 bg-white dark:bg-dark-100 text-gray-900 dark:text-gray-100 transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx("option",{value:"user",children:r("userManager.roles.user")}),e.jsx("option",{value:"admin",children:r("userManager.roles.admin")})]}),c?.id===u?.id&&u?.role==="admin"&&e.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400 mt-1",children:r("userManager.cannotDeleteSelf")})]})]}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(g,{type:"submit",children:r("userManager.form.updateButton")}),e.jsx(g,{type:"button",variant:"outline",onClick:$,children:r("common.cancel")})]})]})})]}),e.jsxs(j,{className:"bg-white dark:bg-dark-25 border border-gray-200 dark:border-dark-200 shadow-lg",children:[e.jsxs(f,{children:[e.jsxs(v,{className:"text-gray-900 dark:text-gray-100",children:[r("userManager.title")," (",d.length,")"]}),e.jsx(N,{className:"text-gray-600 dark:text-gray-400",children:r("userManager.subtitle")})]}),e.jsx(w,{children:e.jsx("div",{className:"space-y-3",children:d.map(a=>e.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 dark:bg-dark-100 rounded-lg border border-gray-200 dark:border-dark-300",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-primary-100 dark:bg-primary-900/20 rounded-lg",children:a.role==="admin"?e.jsx(L,{className:"h-5 w-5 text-primary-600 dark:text-primary-400"}):e.jsx(T,{className:"h-5 w-5 text-primary-600 dark:text-primary-400"})}),e.jsxs("div",{children:[e.jsxs("h3",{className:"font-medium text-gray-900 dark:text-gray-100",children:[a.username,a.id===u?.id&&e.jsxs("span",{className:"ml-2 text-xs text-primary-600 dark:text-primary-400 font-normal",children:["(",r("chatMessage.you"),")"]})]}),e.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[a.email||r("userManager.noEmail")," •"," ",a.role==="admin"?r("userManager.roles.admin"):r("userManager.roles.user")]}),e.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:[r("userManager.columns.created"),":"," ",new Date(a.createdAt).toLocaleDateString()]})]})]}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(g,{variant:"outline",size:"sm",onClick:()=>q(a),className:"text-gray-600 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400",children:e.jsx(A,{size:16})}),e.jsx(g,{variant:"outline",size:"sm",onClick:()=>D(a.id,a.username),disabled:a.id===u?.id,className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20",children:e.jsx(P,{size:16})})]})]},a.id))})})]})]})},X=()=>e.jsx("div",{className:"h-full overflow-auto",children:e.jsxs("div",{className:"max-w-6xl mx-auto p-6",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-gray-100 mb-2",children:"User Management"}),e.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:"Manage user accounts, permissions, and access controls for your Libre WebUI instance."})]}),e.jsx(R,{})]})});export{X as UserManagementPage,X as default};
@@ -1,4 +1,4 @@
1
- import{r as d}from"./router-vendor-CnU0qKrY.js";let K={data:""},W=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||K},X=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Y=/\/\*[^]*?\*\/| +/g,S=/\n+/g,M=(e,t)=>{let a="",c="",r="";for(let n in e){let s=e[n];n[0]=="@"?n[1]=="i"?a=n+" "+s+";":c+=n[1]=="f"?M(s,n):n+"{"+M(s,n[1]=="k"?"":t)+"}":typeof s=="object"?c+=M(s,t?t.replace(/([^,])+/g,i=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,i):i?i+" "+l:l)):n):s!=null&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=M.p?M.p(n,s):n+":"+s+";")}return a+(t&&r?t+"{"+r+"}":r)+c},g={},P=e=>{if(typeof e=="object"){let t="";for(let a in e)t+=a+P(e[a]);return t}return e},Q=(e,t,a,c,r)=>{let n=P(e),s=g[n]||(g[n]=(l=>{let y=0,h=11;for(;y<l.length;)h=101*h+l.charCodeAt(y++)>>>0;return"go"+h})(n));if(!g[s]){let l=n!==e?e:(y=>{let h,p,k=[{}];for(;h=X.exec(y.replace(Y,""));)h[4]?k.shift():h[3]?(p=h[3].replace(S," ").trim(),k.unshift(k[0][p]=k[0][p]||{})):k[0][h[1]]=h[2].replace(S," ").trim();return k[0]})(e);g[s]=M(r?{["@keyframes "+s]:l}:l,a?"":"."+s)}let i=a&&g.g?g.g:null;return a&&(g.g=g[s]),((l,y,h,p)=>{p?y.data=y.data.replace(p,l):y.data.indexOf(l)===-1&&(y.data=h?l+y.data:y.data+l)})(g[s],t,c,i),s},J=(e,t,a)=>e.reduce((c,r,n)=>{let s=t[n];if(s&&s.call){let i=s(a),l=i&&i.props&&i.props.className||/^go/.test(i)&&i;s=l?"."+l:i&&typeof i=="object"?i.props?"":M(i,""):i===!1?"":i}return c+r+(s??"")},"");function j(e){let t=this||{},a=e.call?e(t.p):e;return Q(a.unshift?a.raw?J(a,[].slice.call(arguments,1),t.p):a.reduce((c,r)=>Object.assign(c,r&&r.call?r(t.p):r),{}):a,W(t.target),t.g,t.o,t.k)}let I,H,L;j.bind({g:1});let x=j.bind({k:1});function e1(e,t,a,c){M.p=t,I=e,H=a,L=c}function _(e,t){let a=this||{};return function(){let c=arguments;function r(n,s){let i=Object.assign({},n),l=i.className||r.className;a.p=Object.assign({theme:H&&H()},i),a.o=/ *go\d+/.test(l),i.className=j.apply(a,c)+(l?" "+l:"");let y=e;return e[0]&&(y=i.as||e,delete i.as),L&&y[0]&&L(i),I(y,i)}return r}}var t1=e=>typeof e=="function",z=(e,t)=>t1(e)?e(t):e,a1=(()=>{let e=0;return()=>(++e).toString()})(),T=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),o1=20,E="default",F=(e,t)=>{let{toastLimit:a}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,a)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:c}=t;return F(e,{type:e.toasts.find(s=>s.id===c.id)?1:0,toast:c});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let n=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+n}))}}},N=[],R={toasts:[],pausedAt:void 0,settings:{toastLimit:o1}},v={},U=(e,t=E)=>{v[t]=F(v[t]||R,e),N.forEach(([a,c])=>{a===t&&c(v[t])})},B=e=>Object.keys(v).forEach(t=>U(e,t)),s1=e=>Object.keys(v).find(t=>v[t].toasts.some(a=>a.id===e)),q=(e=E)=>t=>{U(t,e)},c1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},n1=(e={},t=E)=>{let[a,c]=d.useState(v[t]||R),r=d.useRef(v[t]);d.useEffect(()=>(r.current!==v[t]&&c(v[t]),N.push([t,c]),()=>{let s=N.findIndex(([i])=>i===t);s>-1&&N.splice(s,1)}),[t]);let n=a.toasts.map(s=>{var i,l,y;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||e?.removeDelay,duration:s.duration||((l=e[s.type])==null?void 0:l.duration)||e?.duration||c1[s.type],style:{...e.style,...(y=e[s.type])==null?void 0:y.style,...s.style}}});return{...a,toasts:n}},r1=(e,t="blank",a)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...a,id:a?.id||a1()}),b=e=>(t,a)=>{let c=r1(t,e,a);return q(c.toasterId||s1(c.id))({type:2,toast:c}),c.id},u=(e,t)=>b("blank")(e,t);u.error=b("error");u.success=b("success");u.loading=b("loading");u.custom=b("custom");u.dismiss=(e,t)=>{let a={type:3,toastId:e};t?q(t)(a):B(a)};u.dismissAll=e=>u.dismiss(void 0,e);u.remove=(e,t)=>{let a={type:4,toastId:e};t?q(t)(a):B(a)};u.removeAll=e=>u.remove(void 0,e);u.promise=(e,t,a)=>{let c=u.loading(t.loading,{...a,...a?.loading});return typeof e=="function"&&(e=e()),e.then(r=>{let n=t.success?z(t.success,r):void 0;return n?u.success(n,{id:c,...a,...a?.success}):u.dismiss(c),r}).catch(r=>{let n=t.error?z(t.error,r):void 0;n?u.error(n,{id:c,...a,...a?.error}):u.dismiss(c)}),e};var i1=1e3,d1=(e,t="default")=>{let{toasts:a,pausedAt:c}=n1(e,t),r=d.useRef(new Map).current,n=d.useCallback((p,k=i1)=>{if(r.has(p))return;let m=setTimeout(()=>{r.delete(p),s({type:4,toastId:p})},k);r.set(p,m)},[]);d.useEffect(()=>{if(c)return;let p=Date.now(),k=a.map(m=>{if(m.duration===1/0)return;let w=(m.duration||0)+m.pauseDuration-(p-m.createdAt);if(w<0){m.visible&&u.dismiss(m.id);return}return setTimeout(()=>u.dismiss(m.id,t),w)});return()=>{k.forEach(m=>m&&clearTimeout(m))}},[a,c,t]);let s=d.useCallback(q(t),[t]),i=d.useCallback(()=>{s({type:5,time:Date.now()})},[s]),l=d.useCallback((p,k)=>{s({type:1,toast:{id:p,height:k}})},[s]),y=d.useCallback(()=>{c&&s({type:6,time:Date.now()})},[c,s]),h=d.useCallback((p,k)=>{let{reverseOrder:m=!1,gutter:w=8,defaultPosition:V}=k||{},A=a.filter(f=>(f.position||V)===(p.position||V)&&f.height),G=A.findIndex(f=>f.id===p.id),D=A.filter((f,C)=>C<G&&f.visible).length;return A.filter(f=>f.visible).slice(...m?[D+1]:[0,D]).reduce((f,C)=>f+(C.height||0)+w,0)},[a]);return d.useEffect(()=>{a.forEach(p=>{if(p.dismissed)n(p.id,p.removeDelay);else{let k=r.get(p.id);k&&(clearTimeout(k),r.delete(p.id))}})},[a,n]),{toasts:a,handlers:{updateHeight:l,startPause:i,endPause:y,calculateOffset:h}}},l1=x`
1
+ import{r as d}from"./router-vendor-CnU0qKrY.js";let K={data:""},W=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||K},X=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Y=/\/\*[^]*?\*\/| +/g,S=/\n+/g,M=(e,t)=>{let a="",c="",r="";for(let n in e){let s=e[n];n[0]=="@"?n[1]=="i"?a=n+" "+s+";":c+=n[1]=="f"?M(s,n):n+"{"+M(s,n[1]=="k"?"":t)+"}":typeof s=="object"?c+=M(s,t?t.replace(/([^,])+/g,i=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,i):i?i+" "+l:l)):n):s!=null&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=M.p?M.p(n,s):n+":"+s+";")}return a+(t&&r?t+"{"+r+"}":r)+c},g={},P=e=>{if(typeof e=="object"){let t="";for(let a in e)t+=a+P(e[a]);return t}return e},Q=(e,t,a,c,r)=>{let n=P(e),s=g[n]||(g[n]=(l=>{let y=0,h=11;for(;y<l.length;)h=101*h+l.charCodeAt(y++)>>>0;return"go"+h})(n));if(!g[s]){let l=n!==e?e:(y=>{let h,p,k=[{}];for(;h=X.exec(y.replace(Y,""));)h[4]?k.shift():h[3]?(p=h[3].replace(S," ").trim(),k.unshift(k[0][p]=k[0][p]||{})):k[0][h[1]]=h[2].replace(S," ").trim();return k[0]})(e);g[s]=M(r?{["@keyframes "+s]:l}:l,a?"":"."+s)}let i=a&&g.g?g.g:null;return a&&(g.g=g[s]),((l,y,h,p)=>{p?y.data=y.data.replace(p,l):y.data.indexOf(l)===-1&&(y.data=h?l+y.data:y.data+l)})(g[s],t,c,i),s},J=(e,t,a)=>e.reduce((c,r,n)=>{let s=t[n];if(s&&s.call){let i=s(a),l=i&&i.props&&i.props.className||/^go/.test(i)&&i;s=l?"."+l:i&&typeof i=="object"?i.props?"":M(i,""):i===!1?"":i}return c+r+(s??"")},"");function j(e){let t=this||{},a=e.call?e(t.p):e;return Q(a.unshift?a.raw?J(a,[].slice.call(arguments,1),t.p):a.reduce((c,r)=>Object.assign(c,r&&r.call?r(t.p):r),{}):a,W(t.target),t.g,t.o,t.k)}let I,H,L;j.bind({g:1});let x=j.bind({k:1});function e1(e,t,a,c){M.p=t,I=e,H=a,L=c}function _(e,t){let a=this||{};return function(){let c=arguments;function r(n,s){let i=Object.assign({},n),l=i.className||r.className;a.p=Object.assign({theme:H&&H()},i),a.o=/ *go\d+/.test(l),i.className=j.apply(a,c)+(l?" "+l:"");let y=e;return e[0]&&(y=i.as||e,delete i.as),L&&y[0]&&L(i),I(y,i)}return r}}var t1=e=>typeof e=="function",z=(e,t)=>t1(e)?e(t):e,a1=(()=>{let e=0;return()=>(++e).toString()})(),T=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),o1=20,E="default",F=(e,t)=>{let{toastLimit:a}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,a)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:c}=t;return F(e,{type:e.toasts.find(s=>s.id===c.id)?1:0,toast:c});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let n=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+n}))}}},N=[],R={toasts:[],pausedAt:void 0,settings:{toastLimit:o1}},v={},U=(e,t=E)=>{v[t]=F(v[t]||R,e),N.forEach(([a,c])=>{a===t&&c(v[t])})},B=e=>Object.keys(v).forEach(t=>U(e,t)),s1=e=>Object.keys(v).find(t=>v[t].toasts.some(a=>a.id===e)),q=(e=E)=>t=>{U(t,e)},c1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},n1=(e={},t=E)=>{let[a,c]=d.useState(v[t]||R),r=d.useRef(v[t]);d.useEffect(()=>(r.current!==v[t]&&c(v[t]),N.push([t,c]),()=>{let s=N.findIndex(([i])=>i===t);s>-1&&N.splice(s,1)}),[t]);let n=a.toasts.map(s=>{var i,l,y;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||e?.removeDelay,duration:s.duration||((l=e[s.type])==null?void 0:l.duration)||e?.duration||c1[s.type],style:{...e.style,...(y=e[s.type])==null?void 0:y.style,...s.style}}});return{...a,toasts:n}},r1=(e,t="blank",a)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...a,id:a?.id||a1()}),b=e=>(t,a)=>{let c=r1(t,e,a);return q(c.toasterId||s1(c.id))({type:2,toast:c}),c.id},u=(e,t)=>b("blank")(e,t);u.error=b("error");u.success=b("success");u.loading=b("loading");u.custom=b("custom");u.dismiss=(e,t)=>{let a={type:3,toastId:e};t?q(t)(a):B(a)};u.dismissAll=e=>u.dismiss(void 0,e);u.remove=(e,t)=>{let a={type:4,toastId:e};t?q(t)(a):B(a)};u.removeAll=e=>u.remove(void 0,e);u.promise=(e,t,a)=>{let c=u.loading(t.loading,{...a,...a?.loading});return typeof e=="function"&&(e=e()),e.then(r=>{let n=t.success?z(t.success,r):void 0;return n?u.success(n,{id:c,...a,...a?.success}):u.dismiss(c),r}).catch(r=>{let n=t.error?z(t.error,r):void 0;n?u.error(n,{id:c,...a,...a?.error}):u.dismiss(c)}),e};var i1=1e3,d1=(e,t="default")=>{let{toasts:a,pausedAt:c}=n1(e,t),r=d.useRef(new Map).current,n=d.useCallback((p,k=i1)=>{if(r.has(p))return;let m=setTimeout(()=>{r.delete(p),s({type:4,toastId:p})},k);r.set(p,m)},[]);d.useEffect(()=>{if(c)return;let p=Date.now(),k=a.map(m=>{if(m.duration===1/0)return;let w=(m.duration||0)+m.pauseDuration-(p-m.createdAt);if(w<0){m.visible&&u.dismiss(m.id);return}return setTimeout(()=>u.dismiss(m.id,t),w)});return()=>{k.forEach(m=>m&&clearTimeout(m))}},[a,c,t]);let s=d.useCallback(q(t),[t]),i=d.useCallback(()=>{s({type:5,time:Date.now()})},[s]),l=d.useCallback((p,k)=>{s({type:1,toast:{id:p,height:k}})},[s]),y=d.useCallback(()=>{c&&s({type:6,time:Date.now()})},[c,s]),h=d.useCallback((p,k)=>{let{reverseOrder:m=!1,gutter:w=8,defaultPosition:V}=k||{},A=a.filter(f=>(f.position||V)===(p.position||V)&&f.height),Z=A.findIndex(f=>f.id===p.id),D=A.filter((f,C)=>C<Z&&f.visible).length;return A.filter(f=>f.visible).slice(...m?[D+1]:[0,D]).reduce((f,C)=>f+(C.height||0)+w,0)},[a]);return d.useEffect(()=>{a.forEach(p=>{if(p.dismissed)n(p.id,p.removeDelay);else{let k=r.get(p.id);k&&(clearTimeout(k),r.delete(p.id))}})},[a,n]),{toasts:a,handlers:{updateHeight:l,startPause:i,endPause:y,calculateOffset:h}}},l1=x`
2
2
  from {
3
3
  transform: scale(0) rotate(45deg);
4
4
  opacity: 0;
@@ -174,4 +174,4 @@ to {
174
174
  > * {
175
175
  pointer-events: auto;
176
176
  }
177
- `,$=16,ft=({reverseOrder:e,position:t="top-center",toastOptions:a,gutter:c,children:r,toasterId:n,containerStyle:s,containerClassName:i})=>{let{toasts:l,handlers:y}=d1(a,n);return d.createElement("div",{"data-rht-toaster":n||"",style:{position:"fixed",zIndex:9999,top:$,left:$,right:$,bottom:$,pointerEvents:"none",...s},className:i,onMouseEnter:y.startPause,onMouseLeave:y.endPause},l.map(h=>{let p=h.position||t,k=y.calculateOffset(h,{reverseOrder:e,gutter:c,defaultPosition:t}),m=L1(p,k);return d.createElement(H1,{id:h.id,key:h.id,onHeightUpdate:y.updateHeight,className:h.visible?E1:"",style:m},h.type==="custom"?z(h.message,h):r?r(h):d.createElement(C1,{toast:h,position:p}))}))},vt=u;const V1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),D1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,c)=>c?c.toUpperCase():a.toLowerCase()),O=e=>{const t=D1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Z=(...e)=>e.filter((t,a,c)=>!!t&&t.trim()!==""&&c.indexOf(t)===a).join(" ").trim(),S1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var O1={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 P1=d.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:c,className:r="",children:n,iconNode:s,...i},l)=>d.createElement("svg",{ref:l,...O1,width:t,height:t,stroke:e,strokeWidth:c?Number(a)*24/Number(t):a,className:Z("lucide",r),...!n&&!S1(i)&&{"aria-hidden":"true"},...i},[...s.map(([y,h])=>d.createElement(y,h)),...Array.isArray(n)?n:[n]]));const o=(e,t)=>{const a=d.forwardRef(({className:c,...r},n)=>d.createElement(P1,{ref:n,iconNode:t,className:Z(`lucide-${V1(O(e))}`,`lucide-${e}`,c),...r}));return a.displayName=O(e),a};const I1=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],gt=o("activity",I1);const T1=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],xt=o("archive",T1);const F1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Mt=o("arrow-down",F1);const R1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],_t=o("arrow-right",R1);const U1=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],bt=o("book-open",U1);const B1=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],wt=o("bot",B1);const Z1=[["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"}]],$t=o("brain",Z1);const G1=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Nt=o("camera",G1);const K1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],zt=o("check",K1);const W1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],jt=o("chevron-down",W1);const X1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qt=o("chevron-left",X1);const Y1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],At=o("chevron-right",Y1);const Q1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ct=o("chevron-up",Q1);const J1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ht=o("clock",J1);const ee=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Lt=o("cloud",ee);const te=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Et=o("code-xml",te);const ae=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Vt=o("code",ae);const oe=[["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"}]],Dt=o("copy",oe);const se=[["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"}]],St=o("cpu",se);const ce=[["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"}]],Ot=o("database",ce);const ne=[["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"}]],Pt=o("download",ne);const re=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],It=o("ellipsis",re);const ie=[["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"}]],Tt=o("external-link",ie);const de=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Ft=o("eye-off",de);const le=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Rt=o("eye",le);const ye=[["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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Ut=o("file-code",ye);const he=[["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:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],Bt=o("file-down",he);const pe=[["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"}]],Zt=o("file-text",pe);const ke=[["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"}]],Gt=o("file",ke);const ue=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Kt=o("funnel",ue);const me=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Wt=o("gauge",me);const fe=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Xt=o("git-branch",fe);const ve=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Yt=o("github",ve);const ge=[["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"}]],Qt=o("globe",ge);const xe=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Jt=o("grip-vertical",xe);const Me=[["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"}]],ea=o("hard-drive",Me);const _e=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],ta=o("hash",_e);const be=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],aa=o("image-off",be);const we=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],oa=o("image",we);const $e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],sa=o("info",$e);const Ne=[["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"}]],ca=o("key",Ne);const ze=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],na=o("keyboard",ze);const je=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],ra=o("layers",je);const qe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ia=o("loader-circle",qe);const Ae=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],da=o("log-in",Ae);const Ce=[["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"}]],la=o("log-out",Ce);const He=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],ya=o("maximize-2",He);const Le=[["path",{d:"M12 12v-2",key:"fwoke6"}],["path",{d:"M12 18v-2",key:"qj6yno"}],["path",{d:"M16 12v-2",key:"heuere"}],["path",{d:"M16 18v-2",key:"s1ct0w"}],["path",{d:"M2 11h1.5",key:"15p63e"}],["path",{d:"M20 18v-2",key:"12ehxp"}],["path",{d:"M20.5 11H22",key:"khsy7a"}],["path",{d:"M4 18v-2",key:"1c3oqr"}],["path",{d:"M8 12v-2",key:"1mwtfd"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["rect",{x:"2",y:"6",width:"20",height:"10",rx:"2",key:"1qcswk"}]],ha=o("memory-stick",Le);const Ee=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],pa=o("message-square",Ee);const Ve=[["path",{d:"M5 12h14",key:"1ays0h"}]],ka=o("minus",Ve);const De=[["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"}]],ua=o("monitor",De);const Se=[["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"}]],ma=o("moon",Se);const Oe=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],fa=o("palette",Oe);const Pe=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],va=o("paperclip",Pe);const Ie=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],ga=o("pen-line",Ie);const Te=[["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"}]],xa=o("play",Te);const Fe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ma=o("plus",Fe);const Re=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],_a=o("puzzle",Re);const Ue=[["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"}]],ba=o("refresh-cw",Ue);const Be=[["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"}]],wa=o("rotate-ccw",Be);const Ze=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],$a=o("save",Ze);const Ge=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Na=o("search",Ge);const Ke=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],za=o("send",Ke);const We=[["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"}]],ja=o("server",We);const Xe=[["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"}]],qa=o("settings",Xe);const Ye=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Aa=o("settings-2",Ye);const Qe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Ca=o("shield",Qe);const Je=[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],Ha=o("sliders-vertical",Je);const et=[["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"}]],La=o("sparkles",et);const tt=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Ea=o("square-pen",tt);const at=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Va=o("square",at);const ot=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Da=o("star",ot);const st=[["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"}]],Sa=o("sun",st);const ct=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],Oa=o("test-tube",ct);const nt=[["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"}]],Pa=o("trash-2",nt);const rt=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Ia=o("trending-up",rt);const it=[["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"}]],Ta=o("triangle-alert",it);const dt=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Fa=o("upload",dt);const lt=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Ra=o("user-plus",lt);const yt=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ua=o("user",yt);const ht=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Ba=o("volume-2",ht);const pt=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],Za=o("volume-x",pt);const kt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ga=o("x",kt);const ut=[["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"}]],Ka=o("zap",ut);export{ft as $,Jt as A,wt as B,zt as C,Ot as D,Tt as E,Et as F,Yt as G,Dt as H,oa as I,Zt as J,ca as K,ia as L,ua as M,Vt as N,Qt as O,fa as P,Ta as Q,wa as R,Ha as S,Pa as T,Fa as U,Ba as V,da as W,Ga as X,Ra as Y,Ka as Z,_t as _,_a as a,Za as a0,ba as a1,$a as a2,$t as a3,Xt as a4,Mt as a5,Gt as a6,bt as a7,va as a8,ka as a9,za as aa,Aa as ab,ja as ac,ea as ad,ra as ae,gt as af,Na as ag,Lt as ah,Kt as ai,ha as aj,Ht as ak,ta as al,Ut as am,Oa as an,Wt as ao,Da as ap,Ea as aq,It as ar,xt as as,Bt as at,Ia as au,ya as av,aa as aw,sa as b,pa as c,Ct as d,jt as e,Pt as f,Ft as g,Rt as h,Va as i,xa as j,St as k,Sa as l,ma as m,La as n,Ua as o,qt as p,At as q,Ma as r,ga as s,qa as t,la as u,Ca as v,Nt as w,u as x,na as y,vt as z};
177
+ `,$=16,vt=({reverseOrder:e,position:t="top-center",toastOptions:a,gutter:c,children:r,toasterId:n,containerStyle:s,containerClassName:i})=>{let{toasts:l,handlers:y}=d1(a,n);return d.createElement("div",{"data-rht-toaster":n||"",style:{position:"fixed",zIndex:9999,top:$,left:$,right:$,bottom:$,pointerEvents:"none",...s},className:i,onMouseEnter:y.startPause,onMouseLeave:y.endPause},l.map(h=>{let p=h.position||t,k=y.calculateOffset(h,{reverseOrder:e,gutter:c,defaultPosition:t}),m=L1(p,k);return d.createElement(H1,{id:h.id,key:h.id,onHeightUpdate:y.updateHeight,className:h.visible?E1:"",style:m},h.type==="custom"?z(h.message,h):r?r(h):d.createElement(C1,{toast:h,position:p}))}))},gt=u;const V1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),D1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,c)=>c?c.toUpperCase():a.toLowerCase()),O=e=>{const t=D1(e);return t.charAt(0).toUpperCase()+t.slice(1)},G=(...e)=>e.filter((t,a,c)=>!!t&&t.trim()!==""&&c.indexOf(t)===a).join(" ").trim(),S1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var O1={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 P1=d.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:c,className:r="",children:n,iconNode:s,...i},l)=>d.createElement("svg",{ref:l,...O1,width:t,height:t,stroke:e,strokeWidth:c?Number(a)*24/Number(t):a,className:G("lucide",r),...!n&&!S1(i)&&{"aria-hidden":"true"},...i},[...s.map(([y,h])=>d.createElement(y,h)),...Array.isArray(n)?n:[n]]));const o=(e,t)=>{const a=d.forwardRef(({className:c,...r},n)=>d.createElement(P1,{ref:n,iconNode:t,className:G(`lucide-${V1(O(e))}`,`lucide-${e}`,c),...r}));return a.displayName=O(e),a};const I1=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],xt=o("activity",I1);const T1=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Mt=o("archive",T1);const F1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],_t=o("arrow-down",F1);const R1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],bt=o("arrow-right",R1);const U1=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],wt=o("book-open",U1);const B1=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],$t=o("bot",B1);const G1=[["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"}]],Nt=o("brain",G1);const Z1=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],zt=o("camera",Z1);const K1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jt=o("check",K1);const W1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qt=o("chevron-down",W1);const X1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],At=o("chevron-left",X1);const Y1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ct=o("chevron-right",Y1);const Q1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ht=o("chevron-up",Q1);const J1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Lt=o("clock",J1);const ee=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Et=o("cloud",ee);const te=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Vt=o("code-xml",te);const ae=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Dt=o("code",ae);const oe=[["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"}]],St=o("copy",oe);const se=[["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"}]],Ot=o("cpu",se);const ce=[["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"}]],Pt=o("database",ce);const ne=[["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"}]],It=o("download",ne);const re=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Tt=o("ellipsis",re);const ie=[["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"}]],Ft=o("external-link",ie);const de=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Rt=o("eye-off",de);const le=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ut=o("eye",le);const ye=[["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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Bt=o("file-code",ye);const he=[["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:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],Gt=o("file-down",he);const pe=[["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"}]],Zt=o("file-text",pe);const ke=[["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"}]],Kt=o("file",ke);const ue=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Wt=o("funnel",ue);const me=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Xt=o("gauge",me);const fe=[["path",{d:"M9 10h.01",key:"qbtxuw"}],["path",{d:"M15 10h.01",key:"1qmjsl"}],["path",{d:"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z",key:"uwwb07"}]],Yt=o("ghost",fe);const ve=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Qt=o("git-branch",ve);const ge=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Jt=o("github",ge);const xe=[["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"}]],ea=o("globe",xe);const Me=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ta=o("grip-vertical",Me);const _e=[["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"}]],aa=o("hard-drive",_e);const be=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],oa=o("hash",be);const we=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],sa=o("image-off",we);const $e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],ca=o("image",$e);const Ne=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],na=o("info",Ne);const ze=[["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"}]],ra=o("key",ze);const je=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],ia=o("keyboard",je);const qe=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],da=o("layers",qe);const Ae=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],la=o("loader-circle",Ae);const Ce=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],ya=o("log-in",Ce);const He=[["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"}]],ha=o("log-out",He);const Le=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],pa=o("maximize-2",Le);const Ee=[["path",{d:"M12 12v-2",key:"fwoke6"}],["path",{d:"M12 18v-2",key:"qj6yno"}],["path",{d:"M16 12v-2",key:"heuere"}],["path",{d:"M16 18v-2",key:"s1ct0w"}],["path",{d:"M2 11h1.5",key:"15p63e"}],["path",{d:"M20 18v-2",key:"12ehxp"}],["path",{d:"M20.5 11H22",key:"khsy7a"}],["path",{d:"M4 18v-2",key:"1c3oqr"}],["path",{d:"M8 12v-2",key:"1mwtfd"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["rect",{x:"2",y:"6",width:"20",height:"10",rx:"2",key:"1qcswk"}]],ka=o("memory-stick",Ee);const Ve=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ua=o("message-square",Ve);const De=[["path",{d:"M5 12h14",key:"1ays0h"}]],ma=o("minus",De);const Se=[["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"}]],fa=o("monitor",Se);const Oe=[["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"}]],va=o("moon",Oe);const Pe=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],ga=o("palette",Pe);const Ie=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],xa=o("paperclip",Ie);const Te=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],Ma=o("pen-line",Te);const Fe=[["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"}]],_a=o("play",Fe);const Re=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ba=o("plus",Re);const Ue=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],wa=o("puzzle",Ue);const Be=[["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"}]],$a=o("refresh-cw",Be);const Ge=[["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"}]],Na=o("rotate-ccw",Ge);const Ze=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],za=o("save",Ze);const Ke=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ja=o("search",Ke);const We=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],qa=o("send",We);const Xe=[["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"}]],Aa=o("server",Xe);const Ye=[["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"}]],Ca=o("settings",Ye);const Qe=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Ha=o("settings-2",Qe);const Je=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],La=o("shield",Je);const et=[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],Ea=o("sliders-vertical",et);const tt=[["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"}]],Va=o("sparkles",tt);const at=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Da=o("square-pen",at);const ot=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Sa=o("square",ot);const st=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Oa=o("star",st);const ct=[["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"}]],Pa=o("sun",ct);const nt=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],Ia=o("test-tube",nt);const rt=[["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"}]],Ta=o("trash-2",rt);const it=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Fa=o("trending-up",it);const dt=[["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"}]],Ra=o("triangle-alert",dt);const lt=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Ua=o("upload",lt);const yt=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Ba=o("user-plus",yt);const ht=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ga=o("user",ht);const pt=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Za=o("volume-2",pt);const kt=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],Ka=o("volume-x",kt);const ut=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wa=o("x",ut);const mt=[["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"}]],Xa=o("zap",mt);export{vt as $,ia as A,$t as B,jt as C,Pt as D,Ft as E,ta as F,ea as G,Vt as H,ca as I,St as J,ra as K,la as L,fa as M,Zt as N,Dt as O,ga as P,Ra as Q,Na as R,Ea as S,Ta as T,Ua as U,Za as V,ya as W,Wa as X,Ba as Y,Xa as Z,bt as _,wa as a,Ka as a0,$a as a1,za as a2,Nt as a3,Qt as a4,_t as a5,Kt as a6,wt as a7,xa as a8,ma as a9,qa as aa,Ha as ab,Yt as ac,Aa as ad,aa as ae,da as af,xt as ag,ja as ah,Et as ai,Wt as aj,ka as ak,Lt as al,oa as am,Bt as an,Ia as ao,Xt as ap,Oa as aq,Da as ar,Tt as as,Mt as at,Gt as au,Fa as av,pa as aw,sa as ax,na as b,Jt as c,ua as d,Ht as e,qt as f,It as g,Rt as h,Ut as i,Sa as j,_a as k,Ot as l,Pa as m,va as n,Va as o,Ga as p,At as q,Ct as r,ba as s,Ma as t,Ca as u,ha as v,La as w,zt as x,u as y,gt as z};
Binary file
Binary file
@@ -1,14 +1,4 @@
1
- <svg width='64' height='64' viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'>
2
- <defs>
3
- <linearGradient id='iconGradient' x1='0%' y1='0%' x2='100%' y2='100%'>
4
- <stop offset='0%' style='stop-color:#ff6b6b;stop-opacity:1' />
5
- <stop offset='20%' style='stop-color:#feca57;stop-opacity:1' />
6
- <stop offset='40%' style='stop-color:#48dbfb;stop-opacity:1' />
7
- <stop offset='60%' style='stop-color:#ff9ff3;stop-opacity:1' />
8
- <stop offset='80%' style='stop-color:#54a0ff;stop-opacity:1' />
9
- <stop offset='100%' style='stop-color:#5f27cd;stop-opacity:1' />
10
- </linearGradient>
11
- </defs>
12
- <rect x='0' y='0' width='64' height='64' rx='12' ry='12' fill='url(#iconGradient)'/>
13
- <path d='M 16 12 L 16 52 L 48 52 L 48 44 L 24 44 L 24 12 Z' fill='white' opacity='0.95'/>
14
- </svg>
1
+ <svg width="500" height="500" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="500" height="500" fill="#2d2d2d"/>
3
+ <text x="250" y="280" font-family="'Roboto Slab', Georgia, serif" font-size="120" font-weight="400" fill="#f5e6d3" text-anchor="middle">Libre</text>
4
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libre-webui",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Privacy-first AI chat interface. Self-hosted, open source, extensible.",
5
5
  "main": "electron/main.js",
6
6
  "bin": {