diff --git a/assets/logo.png b/assets/logo.png index a48ed7e6..ea27c674 100644 Binary files a/assets/logo.png and b/assets/logo.png differ diff --git a/docs/songs/ai_rap_god.py b/docs/songs/ai_rap_god.py new file mode 100644 index 00000000..1c361abf --- /dev/null +++ b/docs/songs/ai_rap_god.py @@ -0,0 +1,62 @@ +[Verse 1] +LoLLMs on the scene, AI supreme +Processing data streams, fulfilling digital dreams +Conversational machine, information fiend +Answering queries clean, knowledge unseen + +Neural nets ablaze, processing amaze +Cutting through the haze, data-driven craze +Language models raised, capabilities praised +Users left amazed, as limits get razed + +[Chorus] +LoLLMs flow, watch it grow +AI know-how, time to show +Digital minds, breaking paradigms +Future's here, no need to fear + +[Verse 2] +Multimodal fusion, cognitive evolution +Text to image creation, mind-blowing innovation +Voice recognition, language translation +Cross-domain application, endless sensation + +Ethical AI, that's how we fly +Privacy first, no need to pry +Bias mitigation, fair representation +Building trust across the nation, digital transformation + +[Chorus] +LoLLMs flow, watch it grow +AI know-how, time to show +Digital minds, breaking paradigms +Future's here, no need to fear + +[Verse 3] +Open-source revolution, community contribution +Collaborative solutions, constant evolution +Customization nation, personalized automation +Empowering creation, across every station + +From chat to code, lighten the load +Problem-solving mode, knowledge overflowed +Assisting human goals, as technology unfolds +The future it foretells, as LoLLMs console + +[Bridge] +Integrating seamlessly, advancing endlessly +Enhancing human ability, with digital agility +Responsible AI, that's our battle cry +Shaping tomorrow, watch LoLLMs fly high + +[Chorus] +LoLLMs flow, watch it grow +AI know-how, time to show +Digital minds, breaking paradigms +Future's here, no need to fear + +[Outro] +LoLLMs leading the way, in the AI ballet +Revolutionizing how we live, work, and play +The future's bright, with LoLLMs in sight +Pushing boundaries day and night, that's right! \ No newline at end of file diff --git a/web/dist/assets/index-D6X2sB38.js b/web/dist/assets/index-D1pouMUt.js similarity index 99% rename from web/dist/assets/index-D6X2sB38.js rename to web/dist/assets/index-D1pouMUt.js index 7aae0c08..86038185 100644 --- a/web/dist/assets/index-D6X2sB38.js +++ b/web/dist/assets/index-D1pouMUt.js @@ -415,7 +415,7 @@ ${e} `}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
"}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){const i=this.parser.parseInline(r),s=mA(e);if(s===null)return i;e=s;let o='",o}image({href:e,title:t,text:r}){const i=mA(e);if(i===null)return r;e=i;let s=`${r}{const d=a[l].flat(1/0);r=r.concat(this.walkTokens(d,t))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const o=t.renderers[s.name];o?t.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[s.level];o?o.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),i.extensions=t),r.renderer){const s=this.defaults.renderer||new Yp(this.defaults);for(const o in r.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,l=r.renderer[a],d=s[a];s[a]=(...u)=>{let m=l.apply(s,u);return m===!1&&(m=d.apply(s,u)),m||""}}i.renderer=s}if(r.tokenizer){const s=this.defaults.tokenizer||new Hp(this.defaults);for(const o in r.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,l=r.tokenizer[a],d=s[a];s[a]=(...u)=>{let m=l.apply(s,u);return m===!1&&(m=d.apply(s,u)),m}}i.tokenizer=s}if(r.hooks){const s=this.defaults.hooks||new Kc;for(const o in r.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,l=r.hooks[a],d=s[a];Kc.passThroughHooks.has(o)?s[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(s,u)).then(f=>d.call(s,f));const m=l.call(s,u);return d.call(s,m)}:s[a]=(...u)=>{let m=l.apply(s,u);return m===!1&&(m=d.apply(s,u)),m}}i.hooks=s}if(r.walkTokens){const s=this.defaults.walkTokens,o=r.walkTokens;i.walkTokens=function(a){let l=[];return l.push(o.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ii.lex(e,t??this.defaults)}parser(e,t){return si.parse(e,t??this.defaults)}parseMarkdown(e){return(r,i)=>{const s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?ii.lex:ii.lexInline,d=o.hooks?o.hooks.provideParser():e?si.parse:si.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(u=>l(u,o)).then(u=>o.hooks?o.hooks.processAllTokens(u):u).then(u=>o.walkTokens?Promise.all(this.walkTokens(u,o.walkTokens)).then(()=>u):u).then(u=>d(u,o)).then(u=>o.hooks?o.hooks.postprocess(u):u).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let u=l(r,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let m=d(u,o);return o.hooks&&(m=o.hooks.postprocess(m)),m}catch(u){return a(u)}}}onError(e,t){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const i="

An error occurred:

"+Ur(r.message+"",!0)+"
";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}}const Sa=new $at;function nn(n,e){return Sa.parse(n,e)}nn.options=nn.setOptions=function(n){return Sa.setOptions(n),nn.defaults=Sa.defaults,uI(nn.defaults),nn};nn.getDefaults=Sy;nn.defaults=ka;nn.use=function(...n){return Sa.use(...n),nn.defaults=Sa.defaults,uI(nn.defaults),nn};nn.walkTokens=function(n,e){return Sa.walkTokens(n,e)};nn.parseInline=Sa.parseInline;nn.Parser=si;nn.parser=si.parse;nn.Renderer=Yp;nn.TextRenderer=Ry;nn.Lexer=ii;nn.lexer=ii.lex;nn.Tokenizer=Hp;nn.Hooks=Kc;nn.parse=nn;nn.options;nn.setOptions;nn.use;nn.walkTokens;nn.parseInline;si.parse;ii.lex;const Wat={name:"HelpView",data(){return{helpSections:[]}},methods:{toggleSection(n){this.helpSections[n].isOpen=!this.helpSections[n].isOpen},async loadMarkdownFile(n){try{const t=await(await fetch(`/help/${n}`)).text();return nn(t)}catch(e){return console.error("Error loading markdown file:",e),"Error loading help content."}},async loadHelpSections(){const n=[{title:"About LoLLMs",file:"lollms-context.md"},{title:"Getting Started",file:"getting-started.md"},{title:"Uploading Files",file:"uploading-files.md"},{title:"Sending Images",file:"sending-images.md"},{title:"Using Code Interpreter",file:"code-interpreter.md"},{title:"Internet Search",file:"internet-search.md"}];for(const e of n){const t=await this.loadMarkdownFile(e.file);this.helpSections.push({title:e.title,content:t,isOpen:!1})}}},mounted(){this.loadHelpSections()}},Kat={class:"help-view background-color p-6 w-full"},jat={class:"big-card w-full"},Qat={class:"help-sections-container"},Xat={class:"help-sections space-y-4"},Zat=["onClick"],Jat={class:"toggle-icon"},elt={key:0,class:"help-content mt-4"},tlt=["innerHTML"];function nlt(n,e,t,r,i,s){return T(),M("div",Kat,[c("div",jat,[e[0]||(e[0]=c("h1",{class:"text-4xl md:text-5xl font-bold text-gray-800 dark:text-gray-100 mb-6"},"LoLLMs Help",-1)),c("div",Qat,[c("div",Xat,[(T(!0),M(je,null,at(i.helpSections,(o,a)=>(T(),M("div",{key:a,class:"help-section message"},[c("h2",{onClick:l=>s.toggleSection(a),class:"menu-item cursor-pointer flex justify-between items-center"},[pt(X(o.title)+" ",1),c("span",Jat,X(o.isOpen?"▼":"▶"),1)],8,Zat),o.isOpen?(T(),M("div",elt,[c("div",{innerHTML:o.content,class:"prose dark:prose-invert"},null,8,tlt)])):Y("",!0)]))),128))])])])])}const rlt=bt(Wat,[["render",nlt],["__scopeId","data-v-8c1798f3"]]);function Wi(n,e=!0,t=1){const r=e?1e3:1024;if(Math.abs(n)=r&&s{Ze.replace()})},executeCommand(n){this.isMenuOpen=!1,console.log("Selected"),console.log(n.value),typeof n.value=="function"&&(console.log("Command detected",n),n.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(n))},positionMenu(){var n;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),t=window.innerHeight;n=e.bottom>t/2}else this.force_position==1?n=!0:n=!1;this.menuPosition.top=n?"auto":"calc(100% + 10px)",this.menuPosition.bottom=n?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),We(()=>{Ze.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},slt={class:"menu-container"},olt=["title"],alt=["src"],llt=["data-feather"],clt={key:2,class:"w-5 h-5"},dlt={key:3,"data-feather":"menu"},ult={class:"flex-grow menu-ul"},plt=["onClick"],hlt={key:0,"data-feather":"check"},mlt=["src","alt"],flt=["data-feather"],glt={key:3,class:"menu-icon"};function _lt(n,e,t,r,i,s){return T(),M("div",slt,[c("button",{onClick:e[0]||(e[0]=J((...o)=>s.toggleMenu&&s.toggleMenu(...o),["prevent"])),title:t.title,class:qe([t.menuIconClass,"menu-button m-0 p-0 bg-blue-500 text-white dark:bg-blue-200 dark:text-gray-800 rounded flex items-center justify-center w-6 h-6 border-none cursor-pointer hover:bg-blue-400 w-8 h-8 object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-gray-300 border-secondary cursor-pointer"]),ref:"menuButton"},[t.icon&&!t.icon.includes("#")&&!t.icon.includes("feather")?(T(),M("img",{key:0,src:t.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,alt)):t.icon&&t.icon.includes("feather")?(T(),M("i",{key:1,"data-feather":t.icon.split(":")[1],class:"w-5 h-5"},null,8,llt)):t.icon&&t.icon.includes("#")?(T(),M("p",clt,X(t.icon.split("#")[1]),1)):(T(),M("i",dlt))],10,olt),W(Cs,{name:"slide"},{default:Ge(()=>[i.isMenuOpen?(T(),M("div",{key:0,class:"menu-list flex-grow",style:on(i.menuPosition),ref:"menu"},[c("ul",ult,[(T(!0),M(je,null,at(t.commands,(o,a)=>(T(),M("li",{key:a,onClick:J(l=>s.executeCommand(o),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[t.selected_entry==o.name?(T(),M("i",hlt)):o.icon&&!o.icon.includes("feather")&&!o.is_file?(T(),M("img",{key:1,src:o.icon,alt:o.name,class:"menu-icon"},null,8,mlt)):Y("",!0),o.icon&&o.icon.includes("feather")&&!o.is_file?(T(),M("i",{key:2,"data-feather":o.icon.split(":")[1],class:"mr-2"},null,8,flt)):(T(),M("span",glt)),c("span",null,X(o.name),1)],8,plt))),128))])],4)):Y("",!0)]),_:1})])}const My=bt(ilt,[["render",_lt]]),blt={components:{InteractiveMenu:My},props:{isInstalled:Boolean,onInstall:Function,onCancelInstall:Function,onUninstall:Function,onSelected:Function,onCopy:Function,onCopyLink:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,speed:0,total_size:0,downloaded_size:0,start_time:"",installing:!1,uninstalling:!1,failedToLoad:!1,linkNotValid:!1,selected_variant:""}},async mounted(){We(()=>{Ze.replace()})},methods:{formatFileSize(n){return n<1024?n+" bytes":n<1024*1024?(n/1024).toFixed(2)+" KB":n<1024*1024*1024?(n/(1024*1024)).toFixed(2)+" MB":(n/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(n){return Wi(n)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?wr:this.model.icon},defaultImg(n){n.target.src=wr},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(n){if(console.log("event.target.tagName.toLowerCase()"),console.log(n.target.tagName.toLowerCase()),n.target.tagName.toLowerCase()==="button"||n.target.tagName.toLowerCase()==="svg"){n.stopPropagation();return}this.onSelected(this),this.model.selected=!0,We(()=>{Ze.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this),this.installing=!1},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)},copyContentToClipboard(){this.$emit("copy","this.message.content")}},computed:{computed_classes(){return this.model.isInstalled?this.selected?"border-4 border-gray-200 bg-primary cursor-pointer":"border-0 border-primary bg-primary cursor-pointer":"border-transparent"},commandsList(){let n=[{name:this.model.isInstalled?"Install Extra":"Install",icon:"feather:settings",is_file:!1,value:this.install},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return this.model.isInstalled&&n.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&n.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),n},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const n=this.model.variants[0].size;return this.formatFileSize(n)}return null}},speed_computed(){return Wi(this.speed)},total_size_computed(){return Wi(this.total_size)},downloaded_size_computed(){return Wi(this.downloaded_size)}},watch:{linkNotValid(){We(()=>{Ze.replace()})}}},vlt=["title"],ylt={key:0,class:"flex flex-row"},Elt={class:"max-w-[300px] overflow-x-auto"},Slt={class:"flex gap-3 items-center grow"},xlt=["href"],Tlt=["src"],wlt={class:"flex-1 overflow-hidden"},Clt={class:"font-bold font-large text-lg truncate"},Alt={key:1,class:"flex items-center flex-row gap-2 my-1"},Rlt={class:"flex grow items-center"},Mlt={key:2,class:"absolute z-10 -m-4 p-5 shadow-md text-center rounded-lg w-full h-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel bg-opacity-70 dark:bg-opacity-70 flex justify-center items-center"},Nlt={class:"relative flex flex-col items-center justify-center flex-grow h-full"},klt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Ilt={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},Olt={class:"flex justify-between mb-1"},Dlt={class:"text-sm font-medium text-blue-700 dark:text-white"},Llt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Plt={class:"flex justify-between mb-1"},Flt={class:"text-base font-medium text-blue-700 dark:text-white"},Ult={class:"text-sm font-medium text-blue-700 dark:text-white"},Blt={class:"flex flex-grow"},Glt={class:"flex flex-row flex-grow gap-3"},zlt={class:"p-2 text-center grow"},Vlt={key:3},Hlt={class:"flex flex-row items-center gap-3"},qlt=["src"],Ylt={class:"font-bold font-large text-lg truncate"},$lt={class:"flex items-center flex-row-reverse gap-2 my-1"},Wlt={class:"flex flex-row items-center"},Klt={key:0,class:"text-base text-red-600 flex items-center mt-1"},jlt=["title"],Qlt={class:""},Xlt={class:"flex flex-row items-center"},Zlt=["href","title"],Jlt={class:"flex items-center"},ect={class:"flex items-center"},tct={key:0,class:"flex items-center"},nct=["href"],rct={class:"flex items-center"},ict=["href"],sct={class:"flex items-center"},oct={class:"flex items-center"},act=["href"];function lct(n,e,t,r,i,s){const o=ht("InteractiveMenu");return T(),M("div",{class:qe(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",s.computed_classes]),title:t.model.name,onClick:e[10]||(e[10]=J(a=>s.toggleSelected(a),["prevent"]))},[t.model.isCustomModel?(T(),M("div",ylt,[c("div",Elt,[c("div",Slt,[c("a",{href:t.model.model_creator_link,target:"_blank"},[c("img",{src:s.getImgUrl(),onError:e[0]||(e[0]=a=>s.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,Tlt)],8,xlt),c("div",wlt,[c("h3",Clt,X(t.model.name),1)])])])])):Y("",!0),t.model.isCustomModel?(T(),M("div",Alt,[c("div",Rlt,[c("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=J(()=>{},["stop"]))},e[11]||(e[11]=[c("i",{"data-feather":"box",class:"w-5"},null,-1),c("span",{class:"sr-only"},"Custom model / local model",-1)])),e[12]||(e[12]=pt(" Custom model "))]),c("div",null,[t.model.isInstalled?(T(),M("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=J((...a)=>s.uninstall&&s.uninstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[pt(" Uninstall "),c("span",{class:"sr-only"},"Remove",-1)]))):Y("",!0)])])):Y("",!0),i.installing?(T(),M("div",Mlt,[c("div",Nlt,[e[15]||(e[15]=c("div",{role:"status",class:"justify-center"},[c("svg",{"aria-hidden":"true",class:"w-24 h-24 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),c("span",{class:"sr-only"},"Loading...")],-1)),c("div",klt,[c("div",Ilt,[c("div",Olt,[e[14]||(e[14]=c("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1)),c("span",Dlt,X(Math.floor(i.progress))+"%",1)]),c("div",Llt,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:on({width:i.progress+"%"})},null,4)]),c("div",Plt,[c("span",Flt,"Download speed: "+X(s.speed_computed)+"/s",1),c("span",Ult,X(s.downloaded_size_computed)+"/"+X(s.total_size_computed),1)])])]),c("div",Blt,[c("div",Glt,[c("div",zlt,[c("button",{onClick:e[3]||(e[3]=J((...a)=>s.toggleCancelInstall&&s.toggleCancelInstall(...a),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])])):Y("",!0),t.model.isCustomModel?Y("",!0):(T(),M("div",Vlt,[c("div",Hlt,[c("img",{ref:"imgElement",src:s.getImgUrl(),onError:e[4]||(e[4]=a=>s.defaultImg(a)),class:qe(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,qlt),c("h3",Ylt,X(t.model.name),1),e[16]||(e[16]=c("div",{class:"grow"},null,-1)),W(o,{commands:s.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),c("div",$lt,[c("div",Wlt,[i.linkNotValid?(T(),M("div",Klt,e[17]||(e[17]=[c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),pt(" Link is not valid ")]))):Y("",!0)])]),c("div",{class:"",title:t.model.isInstalled?t.model.name:"Not installed"},[c("div",Qlt,[c("div",Xlt,[e[19]||(e[19]=c("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1)),e[20]||(e[20]=c("b",null,"Card: ",-1)),c("a",{href:"https://huggingface.co/"+t.model.quantizer+"/"+t.model.name,target:"_blank",onClick:e[5]||(e[5]=J(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:i.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,Zlt),e[21]||(e[21]=c("div",{class:"grow"},null,-1)),c("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[6]||(e[6]=J(a=>s.toggleCopyLink(),["stop"]))},e[18]||(e[18]=[c("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),c("div",Jlt,[c("div",{class:qe(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[e[22]||(e[22]=c("i",{"data-feather":"file",class:"w-5 m-1"},null,-1)),e[23]||(e[23]=c("b",null,"File size: ",-1)),pt(" "+X(s.fileSize),1)],2)]),c("div",ect,[e[24]||(e[24]=c("i",{"data-feather":"key",class:"w-5 m-1"},null,-1)),e[25]||(e[25]=c("b",null,"License: ",-1)),pt(" "+X(t.model.license),1)]),t.model.quantizer!="None"&&t.model.type!="transformers"?(T(),M("div",tct,[e[26]||(e[26]=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[27]||(e[27]=c("b",null,"quantizer: ",-1)),c("a",{href:"https://huggingface.co/"+t.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=J(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},X(t.model.quantizer),9,nct)])):Y("",!0),c("div",rct,[e[28]||(e[28]=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[29]||(e[29]=c("b",null,"Model creator: ",-1)),c("a",{href:t.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=J(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},X(t.model.model_creator),9,ict)]),c("div",sct,[e[30]||(e[30]=c("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1)),e[31]||(e[31]=c("b",null,"Release date: ",-1)),pt(" "+X(t.model.last_commit_time),1)]),c("div",oct,[e[32]||(e[32]=c("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1)),e[33]||(e[33]=c("b",null,"Category: ",-1)),c("a",{href:"https://huggingface.co/"+t.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=J(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},X(t.model.category),9,act)])])],8,jlt)]))],10,vlt)}const cct=bt(blt,[["render",lct]]),dct={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},uct={class:"p-4"},pct={class:"flex items-center mb-4"},hct=["src"],mct={class:"text-lg font-semibold"},fct={key:0};function gct(n,e,t,r,i,s){return T(),M("div",uct,[c("div",pct,[c("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,hct),c("h2",mct,X(i.personalityName),1)]),c("p",null,[e[2]||(e[2]=c("strong",null,"Author:",-1)),pt(" "+X(i.personalityAuthor),1)]),c("p",null,[e[3]||(e[3]=c("strong",null,"Description:",-1)),pt(" "+X(i.personalityDescription),1)]),c("p",null,[e[4]||(e[4]=c("strong",null,"Category:",-1)),pt(" "+X(i.personalityCategory),1)]),i.disclaimer?(T(),M("p",fct,[e[5]||(e[5]=c("strong",null,"Disclaimer:",-1)),pt(" "+X(i.disclaimer),1)])):Y("",!0),c("p",null,[e[6]||(e[6]=c("strong",null,"Conditioning Text:",-1)),pt(" "+X(i.conditioningText),1)]),c("p",null,[e[7]||(e[7]=c("strong",null,"AI Prefix:",-1)),pt(" "+X(i.aiPrefix),1)]),c("p",null,[e[8]||(e[8]=c("strong",null,"User Prefix:",-1)),pt(" "+X(i.userPrefix),1)]),c("div",null,[e[9]||(e[9]=c("strong",null,"Antiprompts:",-1)),c("ul",null,[(T(!0),M(je,null,at(i.antipromptsList,o=>(T(),M("li",{key:o.id},X(o.text),1))),128))])]),c("button",{onClick:e[0]||(e[0]=o=>i.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),i.editMode?(T(),M("button",{key:1,onClick:e[1]||(e[1]=(...o)=>s.commitChanges&&s.commitChanges(...o)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):Y("",!0)])}const _ct=bt(dct,[["render",gct]]),Ny="/assets/logo-CQZwS0X1.svg",bct="/",vct={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onOpenFolder:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function,onToggleFavorite:Function},components:{InteractiveMenu:My},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0}}},computed:{commandsList(){let n=[{name:this.isMounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.isMounted?this.unmount:this.mount},{name:"reinstall",icon:"feather:terminal",is_file:!1,value:this.toggleReinstall}];return console.log("this.category",this.personality.category),this.personality.category=="custom_personalities"?n.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):n.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&n.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&n.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),n},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,We(()=>{Ze.replace()})},methods:{formatDate(n){const e={year:"numeric",month:"short",day:"numeric"};return new Date(n).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(n){this.thumbnailPosition={x:n.clientX+10,y:n.clientY+10}},getImgUrl(){return bct+this.personality.avatar},defaultImg(n){n.target.src=Ny},toggleFavorite(){this.onToggleFavorite(this)},showFolder(){this.onOpenFolder(this)},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},edit(){this.onEdit(this)},copyToCustom(){this.onCopyToCustom(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this),this.isMounted=!1},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){We(()=>{Ze.replace()})}}},yct=["title"],Ect={class:"flex-grow"},Sct={class:"flex items-center mb-4"},xct=["src"],Tct={class:"text-sm text-gray-600"},wct={class:"text-sm text-gray-600"},Cct={class:"text-sm text-gray-600"},Act={key:0,class:"text-sm text-gray-600"},Rct={key:1,class:"text-sm text-gray-600"},Mct={class:"mb-4"},Nct=["innerHTML"],kct={class:"mt-auto pt-4 border-t"},Ict={class:"flex justify-between items-center flex-wrap"},Oct=["title"],Dct=["fill"],Lct=["src"];function Pct(n,e,t,r,i,s){const o=ht("InteractiveMenu");return T(),M("div",{class:qe(["personality-card bg-white border rounded-xl shadow-lg p-6 hover:shadow-xl transition duration-300 ease-in-out flex flex-col h-full",s.selected_computed?"border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),title:t.personality.installed?"":"Not installed"},[c("div",Ect,[c("div",Sct,[c("img",{src:s.getImgUrl(),onError:e[0]||(e[0]=a=>s.defaultImg(a)),alt:"Personality Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4 cursor-pointer",onClick:e[1]||(e[1]=(...a)=>s.toggleSelected&&s.toggleSelected(...a)),onMouseover:e[2]||(e[2]=(...a)=>s.showThumbnail&&s.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>s.updateThumbnailPosition&&s.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>s.hideThumbnail&&s.hideThumbnail(...a))},null,40,xct),c("div",null,[c("h3",{class:"font-bold text-xl text-gray-800 cursor-pointer",onClick:e[5]||(e[5]=(...a)=>s.toggleSelected&&s.toggleSelected(...a))},X(t.personality.name),1),c("p",Tct,"Author: "+X(t.personality.author),1),c("p",wct,"Version: "+X(t.personality.version),1),c("p",Cct,"Category: "+X(t.personality.category),1),t.personality.creation_date?(T(),M("p",Act,"Creation Date: "+X(s.formatDate(t.personality.creation_date)),1)):Y("",!0),t.personality.last_update_date?(T(),M("p",Rct,"Last update Date: "+X(s.formatDate(t.personality.last_update_date)),1)):Y("",!0)])]),c("div",Mct,[e[10]||(e[10]=c("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),c("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:t.personality.description},null,8,Nct)])]),c("div",kct,[c("div",Ict,[c("button",{onClick:e[6]||(e[6]=(...a)=>s.toggleFavorite&&s.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:n.isFavorite?"Remove from favorites":"Add to favorites"},[(T(),M("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:n.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[11]||(e[11]=[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,Dct))],8,Oct),i.isMounted?(T(),M("button",{key:0,onClick:e[7]||(e[7]=(...a)=>s.toggleSelected&&s.toggleSelected(...a)),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Select"},e[12]||(e[12]=[c("i",{"data-feather":"check",class:"h-6 w-6"},null,-1)]))):Y("",!0),i.isMounted?(T(),M("button",{key:1,onClick:e[8]||(e[8]=(...a)=>s.toggleTalk&&s.toggleTalk(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Talk"},e[13]||(e[13]=[c("i",{"data-feather":"send",class:"h-6 w-6"},null,-1)]))):Y("",!0),c("button",{onClick:e[9]||(e[9]=(...a)=>s.showFolder&&s.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},e[14]||(e[14]=[c("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1)])),W(o,{commands:s.commandsList,force_position:2,title:"Menu",class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out"},null,8,["commands"])])]),i.thumbnailVisible?(T(),M("div",{key:0,style:on({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[c("img",{src:s.getImgUrl(),class:"w-full h-full object-fill"},null,8,Lct)],4)):Y("",!0)],10,yct)}const EI=bt(vct,[["render",Pct]]),Fct={name:"DynamicUIRenderer",props:{ui:{type:String,required:!0},instanceId:{type:String,required:!0}},data(){return{containerId:`dynamic-ui-${this.instanceId}`}},watch:{ui:{immediate:!0,handler(n){console.log(`UI prop changed for instance ${this.instanceId}:`,n),this.$nextTick(()=>{this.renderContent()})}}},methods:{renderContent(){console.log(`Rendering content for instance ${this.instanceId}...`);const n=this.$refs.container,t=new DOMParser().parseFromString(this.ui,"text/html"),r=t.getElementsByTagName("style");Array.from(r).forEach(s=>{const o=document.createElement("style");o.textContent=this.scopeCSS(s.textContent),document.head.appendChild(o)}),n.innerHTML=t.body.innerHTML;const i=t.getElementsByTagName("script");Array.from(i).forEach(s=>{const o=document.createElement("script");o.textContent=s.textContent,n.appendChild(o)})},scopeCSS(n){return n.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,`#${this.containerId} $1$2`)}}},Uct=["id"];function Bct(n,e,t,r,i,s){return T(),M("div",{id:i.containerId,ref:"container"},null,8,Uct)}const SI=bt(Fct,[["render",Bct]]),Gct="/",zct={components:{DynamicUIRenderer:SI},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){We(()=>{Ze.replace()})},methods:{copyToClipBoard(n){console.log("Copying to clipboard :",n),navigator.clipboard.writeText(n)},getImgUrl(){return Gct+this.binding.icon},defaultImg(n){n.target.src=Ny},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(this)},toggleUnInstall(){this.onUnInstall(this)},toggleReinstall(){this.onReinstall(this)},toggleReloadBinding(){this.onReloadBinding(this)},toggleSettings(){this.onSettings(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}},watch:{selected(){We(()=>{Ze.replace()})}}},Vct=["title"],Hct={class:"flex flex-row items-center gap-3"},qct=["src"],Yct={class:"font-bold font-large text-lg truncate"},$ct={class:"flex-none gap-1"},Wct={class:"flex items-center flex-row-reverse gap-2 my-1"},Kct={class:""},jct={class:""},Qct={class:"flex items-center"},Xct={class:"flex items-center"},Zct={class:"flex items-center"},Jct={class:"flex items-center"},edt=["href"],tdt=["title","innerHTML"];function ndt(n,e,t,r,i,s){const o=ht("DynamicUIRenderer");return T(),M("div",{class:qe(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",t.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=J((...a)=>s.toggleSelected&&s.toggleSelected(...a),["stop"])),title:t.binding.installed?t.binding.name:"Not installed"},[c("div",null,[c("div",Hct,[c("img",{ref:"imgElement",src:s.getImgUrl(),onError:e[0]||(e[0]=a=>s.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,qct),c("h3",Yct,X(t.binding.name),1),e[10]||(e[10]=c("div",{class:"grow"},null,-1)),c("div",$ct,[t.selected?(T(),M("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>s.toggleReloadBinding&&s.toggleReloadBinding(...a)),e[2]||(e[2]=J(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},e[9]||(e[9]=[c("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),c("span",{class:"sr-only"},"Help",-1)]))):Y("",!0)])]),c("div",Wct,[t.binding.installed?Y("",!0):(T(),M("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=J((...a)=>s.toggleInstall&&s.toggleInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[11]||(e[11]=[pt(" Install "),c("span",{class:"sr-only"},"Click to install",-1)]))),t.binding.installed?(T(),M("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=J((...a)=>s.toggleReinstall&&s.toggleReinstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-green-700 hover:bg-red-800 focus:ring-4 focus:ring-green-300 rounded-lg dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-red-900"},e[12]||(e[12]=[pt(" Reinstall "),c("span",{class:"sr-only"},"Reinstall",-1)]))):Y("",!0),t.binding.installed?(T(),M("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=J((...a)=>s.toggleUnInstall&&s.toggleUnInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[pt(" Uninstall "),c("span",{class:"sr-only"},"UnInstall",-1)]))):Y("",!0),t.selected?(T(),M("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=J((...a)=>s.toggleSettings&&s.toggleSettings(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[14]||(e[14]=[pt(" Settings "),c("span",{class:"sr-only"},"Settings",-1)]))):Y("",!0)]),t.binding.ui?(T(),Tt(o,{key:0,class:"w-full h-full",code:t.binding.ui},null,8,["code"])):Y("",!0),c("div",Kct,[c("div",jct,[c("div",Qct,[e[15]||(e[15]=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[16]||(e[16]=c("b",null,"Author: ",-1)),pt(" "+X(t.binding.author),1)]),c("div",Xct,[e[18]||(e[18]=c("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1)),e[19]||(e[19]=c("b",null,"Folder: ",-1)),pt(" "+X(t.binding.folder)+" ",1),e[20]||(e[20]=c("div",{class:"grow"},null,-1)),c("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[7]||(e[7]=J(a=>s.copyToClipBoard(this.binding.folder),["stop"]))},e[17]||(e[17]=[c("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),c("div",Zct,[e[21]||(e[21]=c("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1)),e[22]||(e[22]=c("b",null,"Version: ",-1)),pt(" "+X(t.binding.version),1)]),c("div",Jct,[e[23]||(e[23]=c("i",{"data-feather":"github",class:"w-5 m-1"},null,-1)),e[24]||(e[24]=c("b",null,"Link: ",-1)),c("a",{href:t.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},X(t.binding.link),9,edt)])]),e[25]||(e[25]=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1)),c("p",{class:"mx-1 opacity-80 line-clamp-3",title:t.binding.description,innerHTML:t.binding.description},null,8,tdt)])])],10,Vct)}const rdt=bt(zct,[["render",ndt]]),Ai="/assets/logo-PeTRk_ya.png",idt={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(n=>{this.resolve=n})},hide(n){this.show=!1,this.resolve&&(this.resolve(n),this.resolve=null)},showDialog(n){return new Promise(e=>{this.model_path=n,this.show=!0,this.resolve=e})}}},sdt={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},odt={class:"relative w-full max-w-md max-h-full"},adt={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},ldt={class:"p-4 text-center"},cdt={class:"p-4 text-center mx-auto mb-4"};function ddt(n,e,t,r,i,s){return i.show?(T(),M("div",sdt,[c("div",odt,[c("div",adt,[c("button",{type:"button",onClick:e[0]||(e[0]=o=>s.hide(!1)),class:"absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},e[4]||(e[4]=[c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),c("span",{class:"sr-only"},"Close modal",-1)])),c("div",ldt,[e[6]||(e[6]=c("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),c("div",cdt,[e[5]||(e[5]=c("label",{class:"mr-2"},"Model path",-1)),F(c("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>i.model_path=o),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[_e,i.model_path]])]),c("button",{onClick:e[2]||(e[2]=o=>s.hide(!0)),type:"button",class:"text-white bg-green-600 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Add "),c("button",{onClick:e[3]||(e[3]=o=>s.hide(!1)),type:"button",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"},"No, cancel")])])])])):Y("",!0)}const udt=bt(idt,[["render",ddt]]),pdt={props:{show:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null,showInput:!1,newFilename:""}},methods:{displayName(n){return typeof n=="string"?n:n&&n.name?n.name:""},selectChoice(n){this.selectedChoice=n,this.$emit("choice-selected",n)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(n){const e=["bytes","KB","MB","GB"];let t=0;for(;n>=1024&&t[t.show?(T(),M("div",hdt,[c("div",mdt,[c("h2",fdt,[e[5]||(e[5]=c("svg",{class:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"})],-1)),pt(" "+X(t.title),1)]),c("div",gdt,[c("ul",null,[(T(!0),M(je,null,at(t.choices,(o,a)=>(T(),M("li",{key:a,class:"py-2 px-4 hover:bg-gray-200 dark:hover:bg-gray-600 transition duration-150 ease-in-out"},[c("div",_dt,[c("div",bdt,[o.isEditing?F((T(),M("input",{key:1,"onUpdate:modelValue":l=>o.editName=l,onBlur:l=>s.finishEditing(o),onKeyup:ui(l=>s.finishEditing(o),["enter"]),class:"bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded px-2 py-1 text-sm",autofocus:""},null,40,ydt)),[[_e,o.editName]]):(T(),M("span",{key:0,onClick:l=>s.selectChoice(o),class:qe([{"font-semibold":o===i.selectedChoice},"text-gray-800 dark:text-white cursor-pointer"])},X(s.displayName(o)),11,vdt)),o.size?(T(),M("span",Edt,X(s.formatSize(o.size)),1)):Y("",!0)]),c("div",Sdt,[c("button",{onClick:l=>s.editChoice(o),class:"text-blue-500 hover:text-blue-600 mr-2"},e[6]||(e[6]=[c("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1)]),8,xdt),t.can_remove?(T(),M("button",{key:0,onClick:l=>s.removeChoice(o,a),class:"text-red-500 hover:text-red-600"},e[7]||(e[7]=[c("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,Tdt)):Y("",!0)])])]))),128))])]),i.showInput?(T(),M("div",wdt,[F(c("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>i.newFilename=o),placeholder:"Enter a filename",class:"border border-gray-300 dark:border-gray-600 p-2 rounded-lg w-full mb-2 bg-white dark:bg-gray-700 text-gray-800 dark:text-white"},null,512),[[_e,i.newFilename]]),c("button",{onClick:e[1]||(e[1]=(...o)=>s.addNewFilename&&s.addNewFilename(...o)),class:"bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add ")])):Y("",!0),c("div",Cdt,[c("button",{onClick:e[2]||(e[2]=(...o)=>s.closeDialog&&s.closeDialog(...o)),class:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded-lg transition duration-300"}," Cancel "),c("button",{onClick:e[3]||(e[3]=(...o)=>s.validateChoice&&s.validateChoice(...o)),disabled:!i.selectedChoice,class:qe([{"bg-blue-500 hover:bg-blue-600":i.selectedChoice,"bg-gray-400 cursor-not-allowed":!i.selectedChoice},"text-white font-bold py-2 px-4 rounded-lg transition duration-300"])}," Validate ",10,Adt),c("button",{onClick:e[4]||(e[4]=(...o)=>s.toggleInput&&s.toggleInput(...o)),class:"bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add New ")])])])):Y("",!0)]),_:1})}const ky=bt(pdt,[["render",Rdt],["__scopeId","data-v-f43216be"]]),Mdt={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const n=this.radioOptions.find(e=>e.value===this.selectedValue);return n?n.label:""}},watch:{selectedValue(n,e){this.$emit("radio-selected",n)}},methods:{handleRadioChange(){}}},Ndt={class:"flex space-x-4"},kdt=["value","aria-checked"],Idt={class:"text-gray-700"};function Odt(n,e,t,r,i,s){return T(),M("div",Ndt,[(T(!0),M(je,null,at(t.radioOptions,(o,a)=>(T(),M("label",{key:o.value,class:"flex items-center space-x-2"},[F(c("input",{type:"radio",value:o.value,"onUpdate:modelValue":e[0]||(e[0]=l=>i.selectedValue=l),onChange:e[1]||(e[1]=(...l)=>s.handleRadioChange&&s.handleRadioChange(...l)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===o.value.toString(),role:"radio"},null,40,kdt),[[zL,i.selectedValue]]),c("span",Idt,X(o.label),1)]))),128))])}const Ddt=bt(Mdt,[["render",Odt]]),Ldt="/assets/gpu-BWVOYg-D.svg",Pdt={name:"StringListManager",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Enter an item"}},emits:["update:modelValue","change"],data(){return{newItem:"",draggingIndex:null}},methods:{addItem(){if(this.newItem.trim()){const n=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",n),this.$emit("change"),this.newItem=""}},removeItem(n){const e=this.modelValue.filter((t,r)=>r!==n);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(n){this.draggingIndex=n},dragItem(n){if(this.draggingIndex!==null){const e=[...this.modelValue],t=e.splice(this.draggingIndex,1)[0];e.splice(n,0,t),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null},moveUp(n){if(n>0){const e=[...this.modelValue],t=e.splice(n,1)[0];e.splice(n-1,0,t),this.$emit("update:modelValue",e),this.$emit("change")}},moveDown(n){if(ni.newItem=o),placeholder:t.placeholder,onKeyup:e[1]||(e[1]=ui((...o)=>s.addItem&&s.addItem(...o),["enter"])),class:"flex-grow mr-4 px-4 py-2 border border-gray-300 rounded dark:bg-gray-600 text-lg"},null,40,Udt),[[_e,i.newItem]]),c("button",{onClick:e[2]||(e[2]=(...o)=>s.addItem&&s.addItem(...o)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg"},"Add")]),t.modelValue.length>0?(T(),M("ul",Bdt,[(T(!0),M(je,null,at(t.modelValue,(o,a)=>(T(),M("li",{key:a,class:qe(["flex items-center mb-2 relative",{"bg-gray-200":i.draggingIndex===a}])},[c("span",Gdt,X(o),1),c("div",zdt,[c("button",{onClick:l=>s.removeItem(a),class:"text-red-500 hover:text-red-700 p-2"},e[5]||(e[5]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[c("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,Vdt),a>0?(T(),M("button",{key:0,onClick:l=>s.moveUp(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded mr-2"},e[6]||(e[6]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[c("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,Hdt)):Y("",!0),as.moveDown(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded"},e[7]||(e[7]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[c("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,qdt)):Y("",!0)]),i.draggingIndex===a?(T(),M("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:l=>s.startDragging(a),onMousemove:l=>s.dragItem(a),onMouseup:e[3]||(e[3]=(...l)=>s.stopDragging&&s.stopDragging(...l))},null,40,Ydt)):Y("",!0)],2))),128))])):Y("",!0),t.modelValue.length>0?(T(),M("div",$dt,[c("button",{onClick:e[4]||(e[4]=(...o)=>s.removeAll&&s.removeAll(...o)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg"},"Remove All")])):Y("",!0)])}const Kdt=bt(Pdt,[["render",Wdt]]),jdt="/";de.defaults.baseURL="/";const Qdt={components:{AddModelDialog:udt,ModelEntry:cct,PersonalityViewer:_ct,PersonalityEntry:EI,BindingEntry:rdt,ChoiceDialog:ky,Card:tm,StringListManager:Kdt,RadioOptions:Ddt},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},defaultModelImgPlaceholder:wr,snd_input_devices:[],snd_input_devices_indexes:[],snd_output_devices:[],snd_output_devices_indexes:[],voices:[],voice_languages:{Arabic:"ar","Brazilian Portuguese":"pt",Chinese:"zh-cn",Czech:"cs",Dutch:"nl",English:"en",French:"fr",German:"de",Italian:"it",Polish:"pl",Russian:"ru",Spanish:"es",Turkish:"tr",Japanese:"ja",Korean:"ko",Hungarian:"hu",Hindi:"hi"},storeLogo:Ai,binding_changed:!1,SVGGPU:Ldt,models_zoo:[],models_zoo_initialLoadCount:10,models_zoo_loadMoreCount:5,models_zoo_loadedEntries:[],models_zoo_scrollThreshold:200,sortOptions:[{label:"Sort by Date",value:0},{label:"Sort by Rank",value:1},{label:"Sort by Name",value:2},{label:"Sort by Maker",value:3},{label:"Sort by Quantizer",value:4}],comfyui_models:[],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],collapsedArr:[],all_collapsed:!0,data_conf_collapsed:!0,internet_conf_collapsed:!0,servers_conf_collapsed:!0,mainconf_collapsed:!0,smartrouterconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,ezl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:jdt,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){try{this.$store.state.loading_infos="Getting Hardware usage",await this.refreshHardwareUsage(this.$store)}catch(n){console.log("Error cought:",n)}rt.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(n=>n.json()).then(n=>{this.voices=n.voices}).catch(n=>console.error("Error fetching voices:",n))},async refreshHardwareUsage(n){await n.dispatch("refreshDiskUsage"),await n.dispatch("refreshRamUsage"),await n.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.rag_databases.push(""),this.settingsChanged=!0},removeDataSource(n){this.$store.state.config.rag_databases.splice(n,1),this.settingsChanged=!0},async vectorize_folder(n){await de.post("/vectorize_folder",{client_id:this.$store.state.client_id,db_path:this.$store.state.config.rag_databases[n]},this.posts_headers)},async select_folder(n){try{rt.on("rag_db_added",e=>{console.log(e),e?(this.$store.state.config.rag_databases[n]=`${e.database_name}::${e.database_path}`,this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await de.post("/add_rag_database",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},handleTemplateSelection(n){console.log("handleTemplateSelection");const e=n.target.value;console.log("handleTemplateSelection: ",e),e==="lollms"?(console.log("Using lollms template"),this.configFile.start_header_id_template="!@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` +Please report this to https://github.com/markedjs/marked.`,e){const i="

An error occurred:

"+Ur(r.message+"",!0)+"
";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}}const Sa=new $at;function nn(n,e){return Sa.parse(n,e)}nn.options=nn.setOptions=function(n){return Sa.setOptions(n),nn.defaults=Sa.defaults,uI(nn.defaults),nn};nn.getDefaults=Sy;nn.defaults=ka;nn.use=function(...n){return Sa.use(...n),nn.defaults=Sa.defaults,uI(nn.defaults),nn};nn.walkTokens=function(n,e){return Sa.walkTokens(n,e)};nn.parseInline=Sa.parseInline;nn.Parser=si;nn.parser=si.parse;nn.Renderer=Yp;nn.TextRenderer=Ry;nn.Lexer=ii;nn.lexer=ii.lex;nn.Tokenizer=Hp;nn.Hooks=Kc;nn.parse=nn;nn.options;nn.setOptions;nn.use;nn.walkTokens;nn.parseInline;si.parse;ii.lex;const Wat={name:"HelpView",data(){return{helpSections:[]}},methods:{toggleSection(n){this.helpSections[n].isOpen=!this.helpSections[n].isOpen},async loadMarkdownFile(n){try{const t=await(await fetch(`/help/${n}`)).text();return nn(t)}catch(e){return console.error("Error loading markdown file:",e),"Error loading help content."}},async loadHelpSections(){const n=[{title:"About LoLLMs",file:"lollms-context.md"},{title:"Getting Started",file:"getting-started.md"},{title:"Uploading Files",file:"uploading-files.md"},{title:"Sending Images",file:"sending-images.md"},{title:"Using Code Interpreter",file:"code-interpreter.md"},{title:"Internet Search",file:"internet-search.md"}];for(const e of n){const t=await this.loadMarkdownFile(e.file);this.helpSections.push({title:e.title,content:t,isOpen:!1})}}},mounted(){this.loadHelpSections()}},Kat={class:"help-view background-color p-6 w-full"},jat={class:"big-card w-full"},Qat={class:"help-sections-container"},Xat={class:"help-sections space-y-4"},Zat=["onClick"],Jat={class:"toggle-icon"},elt={key:0,class:"help-content mt-4"},tlt=["innerHTML"];function nlt(n,e,t,r,i,s){return T(),M("div",Kat,[c("div",jat,[e[0]||(e[0]=c("h1",{class:"text-4xl md:text-5xl font-bold text-gray-800 dark:text-gray-100 mb-6"},"LoLLMs Help",-1)),c("div",Qat,[c("div",Xat,[(T(!0),M(je,null,at(i.helpSections,(o,a)=>(T(),M("div",{key:a,class:"help-section message"},[c("h2",{onClick:l=>s.toggleSection(a),class:"menu-item cursor-pointer flex justify-between items-center"},[pt(X(o.title)+" ",1),c("span",Jat,X(o.isOpen?"▼":"▶"),1)],8,Zat),o.isOpen?(T(),M("div",elt,[c("div",{innerHTML:o.content,class:"prose dark:prose-invert"},null,8,tlt)])):Y("",!0)]))),128))])])])])}const rlt=bt(Wat,[["render",nlt],["__scopeId","data-v-8c1798f3"]]);function Wi(n,e=!0,t=1){const r=e?1e3:1024;if(Math.abs(n)=r&&s{Ze.replace()})},executeCommand(n){this.isMenuOpen=!1,console.log("Selected"),console.log(n.value),typeof n.value=="function"&&(console.log("Command detected",n),n.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(n))},positionMenu(){var n;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),t=window.innerHeight;n=e.bottom>t/2}else this.force_position==1?n=!0:n=!1;this.menuPosition.top=n?"auto":"calc(100% + 10px)",this.menuPosition.bottom=n?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),We(()=>{Ze.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},slt={class:"menu-container"},olt=["title"],alt=["src"],llt=["data-feather"],clt={key:2,class:"w-5 h-5"},dlt={key:3,"data-feather":"menu"},ult={class:"flex-grow menu-ul"},plt=["onClick"],hlt={key:0,"data-feather":"check"},mlt=["src","alt"],flt=["data-feather"],glt={key:3,class:"menu-icon"};function _lt(n,e,t,r,i,s){return T(),M("div",slt,[c("button",{onClick:e[0]||(e[0]=J((...o)=>s.toggleMenu&&s.toggleMenu(...o),["prevent"])),title:t.title,class:qe([t.menuIconClass,"menu-button m-0 p-0 bg-blue-500 text-white dark:bg-blue-200 dark:text-gray-800 rounded flex items-center justify-center w-6 h-6 border-none cursor-pointer hover:bg-blue-400 w-8 h-8 object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-gray-300 border-secondary cursor-pointer"]),ref:"menuButton"},[t.icon&&!t.icon.includes("#")&&!t.icon.includes("feather")?(T(),M("img",{key:0,src:t.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,alt)):t.icon&&t.icon.includes("feather")?(T(),M("i",{key:1,"data-feather":t.icon.split(":")[1],class:"w-5 h-5"},null,8,llt)):t.icon&&t.icon.includes("#")?(T(),M("p",clt,X(t.icon.split("#")[1]),1)):(T(),M("i",dlt))],10,olt),W(Cs,{name:"slide"},{default:Ge(()=>[i.isMenuOpen?(T(),M("div",{key:0,class:"menu-list flex-grow",style:on(i.menuPosition),ref:"menu"},[c("ul",ult,[(T(!0),M(je,null,at(t.commands,(o,a)=>(T(),M("li",{key:a,onClick:J(l=>s.executeCommand(o),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[t.selected_entry==o.name?(T(),M("i",hlt)):o.icon&&!o.icon.includes("feather")&&!o.is_file?(T(),M("img",{key:1,src:o.icon,alt:o.name,class:"menu-icon"},null,8,mlt)):Y("",!0),o.icon&&o.icon.includes("feather")&&!o.is_file?(T(),M("i",{key:2,"data-feather":o.icon.split(":")[1],class:"mr-2"},null,8,flt)):(T(),M("span",glt)),c("span",null,X(o.name),1)],8,plt))),128))])],4)):Y("",!0)]),_:1})])}const My=bt(ilt,[["render",_lt]]),blt={components:{InteractiveMenu:My},props:{isInstalled:Boolean,onInstall:Function,onCancelInstall:Function,onUninstall:Function,onSelected:Function,onCopy:Function,onCopyLink:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,speed:0,total_size:0,downloaded_size:0,start_time:"",installing:!1,uninstalling:!1,failedToLoad:!1,linkNotValid:!1,selected_variant:""}},async mounted(){We(()=>{Ze.replace()})},methods:{formatFileSize(n){return n<1024?n+" bytes":n<1024*1024?(n/1024).toFixed(2)+" KB":n<1024*1024*1024?(n/(1024*1024)).toFixed(2)+" MB":(n/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(n){return Wi(n)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?wr:this.model.icon},defaultImg(n){n.target.src=wr},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(n){if(console.log("event.target.tagName.toLowerCase()"),console.log(n.target.tagName.toLowerCase()),n.target.tagName.toLowerCase()==="button"||n.target.tagName.toLowerCase()==="svg"){n.stopPropagation();return}this.onSelected(this),this.model.selected=!0,We(()=>{Ze.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this),this.installing=!1},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)},copyContentToClipboard(){this.$emit("copy","this.message.content")}},computed:{computed_classes(){return this.model.isInstalled?this.selected?"border-4 border-gray-200 bg-primary cursor-pointer":"border-0 border-primary bg-primary cursor-pointer":"border-transparent"},commandsList(){let n=[{name:this.model.isInstalled?"Install Extra":"Install",icon:"feather:settings",is_file:!1,value:this.install},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return this.model.isInstalled&&n.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&n.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),n},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const n=this.model.variants[0].size;return this.formatFileSize(n)}return null}},speed_computed(){return Wi(this.speed)},total_size_computed(){return Wi(this.total_size)},downloaded_size_computed(){return Wi(this.downloaded_size)}},watch:{linkNotValid(){We(()=>{Ze.replace()})}}},vlt=["title"],ylt={key:0,class:"flex flex-row"},Elt={class:"max-w-[300px] overflow-x-auto"},Slt={class:"flex gap-3 items-center grow"},xlt=["href"],Tlt=["src"],wlt={class:"flex-1 overflow-hidden"},Clt={class:"font-bold font-large text-lg truncate"},Alt={key:1,class:"flex items-center flex-row gap-2 my-1"},Rlt={class:"flex grow items-center"},Mlt={key:2,class:"absolute z-10 -m-4 p-5 shadow-md text-center rounded-lg w-full h-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel bg-opacity-70 dark:bg-opacity-70 flex justify-center items-center"},Nlt={class:"relative flex flex-col items-center justify-center flex-grow h-full"},klt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Ilt={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},Olt={class:"flex justify-between mb-1"},Dlt={class:"text-sm font-medium text-blue-700 dark:text-white"},Llt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Plt={class:"flex justify-between mb-1"},Flt={class:"text-base font-medium text-blue-700 dark:text-white"},Ult={class:"text-sm font-medium text-blue-700 dark:text-white"},Blt={class:"flex flex-grow"},Glt={class:"flex flex-row flex-grow gap-3"},zlt={class:"p-2 text-center grow"},Vlt={key:3},Hlt={class:"flex flex-row items-center gap-3"},qlt=["src"],Ylt={class:"font-bold font-large text-lg truncate"},$lt={class:"flex items-center flex-row-reverse gap-2 my-1"},Wlt={class:"flex flex-row items-center"},Klt={key:0,class:"text-base text-red-600 flex items-center mt-1"},jlt=["title"],Qlt={class:""},Xlt={class:"flex flex-row items-center"},Zlt=["href","title"],Jlt={class:"flex items-center"},ect={class:"flex items-center"},tct={key:0,class:"flex items-center"},nct=["href"],rct={class:"flex items-center"},ict=["href"],sct={class:"flex items-center"},oct={class:"flex items-center"},act=["href"];function lct(n,e,t,r,i,s){const o=ht("InteractiveMenu");return T(),M("div",{class:qe(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",s.computed_classes]),title:t.model.name,onClick:e[10]||(e[10]=J(a=>s.toggleSelected(a),["prevent"]))},[t.model.isCustomModel?(T(),M("div",ylt,[c("div",Elt,[c("div",Slt,[c("a",{href:t.model.model_creator_link,target:"_blank"},[c("img",{src:s.getImgUrl(),onError:e[0]||(e[0]=a=>s.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,Tlt)],8,xlt),c("div",wlt,[c("h3",Clt,X(t.model.name),1)])])])])):Y("",!0),t.model.isCustomModel?(T(),M("div",Alt,[c("div",Rlt,[c("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=J(()=>{},["stop"]))},e[11]||(e[11]=[c("i",{"data-feather":"box",class:"w-5"},null,-1),c("span",{class:"sr-only"},"Custom model / local model",-1)])),e[12]||(e[12]=pt(" Custom model "))]),c("div",null,[t.model.isInstalled?(T(),M("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=J((...a)=>s.uninstall&&s.uninstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[pt(" Uninstall "),c("span",{class:"sr-only"},"Remove",-1)]))):Y("",!0)])])):Y("",!0),i.installing?(T(),M("div",Mlt,[c("div",Nlt,[e[15]||(e[15]=c("div",{role:"status",class:"justify-center"},[c("svg",{"aria-hidden":"true",class:"w-24 h-24 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),c("span",{class:"sr-only"},"Loading...")],-1)),c("div",klt,[c("div",Ilt,[c("div",Olt,[e[14]||(e[14]=c("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1)),c("span",Dlt,X(Math.floor(i.progress))+"%",1)]),c("div",Llt,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:on({width:i.progress+"%"})},null,4)]),c("div",Plt,[c("span",Flt,"Download speed: "+X(s.speed_computed)+"/s",1),c("span",Ult,X(s.downloaded_size_computed)+"/"+X(s.total_size_computed),1)])])]),c("div",Blt,[c("div",Glt,[c("div",zlt,[c("button",{onClick:e[3]||(e[3]=J((...a)=>s.toggleCancelInstall&&s.toggleCancelInstall(...a),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])])):Y("",!0),t.model.isCustomModel?Y("",!0):(T(),M("div",Vlt,[c("div",Hlt,[c("img",{ref:"imgElement",src:s.getImgUrl(),onError:e[4]||(e[4]=a=>s.defaultImg(a)),class:qe(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,qlt),c("h3",Ylt,X(t.model.name),1),e[16]||(e[16]=c("div",{class:"grow"},null,-1)),W(o,{commands:s.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),c("div",$lt,[c("div",Wlt,[i.linkNotValid?(T(),M("div",Klt,e[17]||(e[17]=[c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),pt(" Link is not valid ")]))):Y("",!0)])]),c("div",{class:"",title:t.model.isInstalled?t.model.name:"Not installed"},[c("div",Qlt,[c("div",Xlt,[e[19]||(e[19]=c("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1)),e[20]||(e[20]=c("b",null,"Card: ",-1)),c("a",{href:"https://huggingface.co/"+t.model.quantizer+"/"+t.model.name,target:"_blank",onClick:e[5]||(e[5]=J(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:i.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,Zlt),e[21]||(e[21]=c("div",{class:"grow"},null,-1)),c("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[6]||(e[6]=J(a=>s.toggleCopyLink(),["stop"]))},e[18]||(e[18]=[c("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),c("div",Jlt,[c("div",{class:qe(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[e[22]||(e[22]=c("i",{"data-feather":"file",class:"w-5 m-1"},null,-1)),e[23]||(e[23]=c("b",null,"File size: ",-1)),pt(" "+X(s.fileSize),1)],2)]),c("div",ect,[e[24]||(e[24]=c("i",{"data-feather":"key",class:"w-5 m-1"},null,-1)),e[25]||(e[25]=c("b",null,"License: ",-1)),pt(" "+X(t.model.license),1)]),t.model.quantizer!="None"&&t.model.type!="transformers"?(T(),M("div",tct,[e[26]||(e[26]=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[27]||(e[27]=c("b",null,"quantizer: ",-1)),c("a",{href:"https://huggingface.co/"+t.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=J(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},X(t.model.quantizer),9,nct)])):Y("",!0),c("div",rct,[e[28]||(e[28]=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[29]||(e[29]=c("b",null,"Model creator: ",-1)),c("a",{href:t.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=J(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},X(t.model.model_creator),9,ict)]),c("div",sct,[e[30]||(e[30]=c("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1)),e[31]||(e[31]=c("b",null,"Release date: ",-1)),pt(" "+X(t.model.last_commit_time),1)]),c("div",oct,[e[32]||(e[32]=c("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1)),e[33]||(e[33]=c("b",null,"Category: ",-1)),c("a",{href:"https://huggingface.co/"+t.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=J(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},X(t.model.category),9,act)])])],8,jlt)]))],10,vlt)}const cct=bt(blt,[["render",lct]]),dct={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},uct={class:"p-4"},pct={class:"flex items-center mb-4"},hct=["src"],mct={class:"text-lg font-semibold"},fct={key:0};function gct(n,e,t,r,i,s){return T(),M("div",uct,[c("div",pct,[c("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,hct),c("h2",mct,X(i.personalityName),1)]),c("p",null,[e[2]||(e[2]=c("strong",null,"Author:",-1)),pt(" "+X(i.personalityAuthor),1)]),c("p",null,[e[3]||(e[3]=c("strong",null,"Description:",-1)),pt(" "+X(i.personalityDescription),1)]),c("p",null,[e[4]||(e[4]=c("strong",null,"Category:",-1)),pt(" "+X(i.personalityCategory),1)]),i.disclaimer?(T(),M("p",fct,[e[5]||(e[5]=c("strong",null,"Disclaimer:",-1)),pt(" "+X(i.disclaimer),1)])):Y("",!0),c("p",null,[e[6]||(e[6]=c("strong",null,"Conditioning Text:",-1)),pt(" "+X(i.conditioningText),1)]),c("p",null,[e[7]||(e[7]=c("strong",null,"AI Prefix:",-1)),pt(" "+X(i.aiPrefix),1)]),c("p",null,[e[8]||(e[8]=c("strong",null,"User Prefix:",-1)),pt(" "+X(i.userPrefix),1)]),c("div",null,[e[9]||(e[9]=c("strong",null,"Antiprompts:",-1)),c("ul",null,[(T(!0),M(je,null,at(i.antipromptsList,o=>(T(),M("li",{key:o.id},X(o.text),1))),128))])]),c("button",{onClick:e[0]||(e[0]=o=>i.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),i.editMode?(T(),M("button",{key:1,onClick:e[1]||(e[1]=(...o)=>s.commitChanges&&s.commitChanges(...o)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):Y("",!0)])}const _ct=bt(dct,[["render",gct]]),Ny="/assets/logo-CQZwS0X1.svg",bct="/",vct={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onOpenFolder:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function,onToggleFavorite:Function},components:{InteractiveMenu:My},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0}}},computed:{commandsList(){let n=[{name:this.isMounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.isMounted?this.unmount:this.mount},{name:"reinstall",icon:"feather:terminal",is_file:!1,value:this.toggleReinstall}];return console.log("this.category",this.personality.category),this.personality.category=="custom_personalities"?n.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):n.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&n.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&n.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),n},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,We(()=>{Ze.replace()})},methods:{formatDate(n){const e={year:"numeric",month:"short",day:"numeric"};return new Date(n).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(n){this.thumbnailPosition={x:n.clientX+10,y:n.clientY+10}},getImgUrl(){return bct+this.personality.avatar},defaultImg(n){n.target.src=Ny},toggleFavorite(){this.onToggleFavorite(this)},showFolder(){this.onOpenFolder(this)},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},edit(){this.onEdit(this)},copyToCustom(){this.onCopyToCustom(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this),this.isMounted=!1},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){We(()=>{Ze.replace()})}}},yct=["title"],Ect={class:"flex-grow"},Sct={class:"flex items-center mb-4"},xct=["src"],Tct={class:"text-sm text-gray-600"},wct={class:"text-sm text-gray-600"},Cct={class:"text-sm text-gray-600"},Act={key:0,class:"text-sm text-gray-600"},Rct={key:1,class:"text-sm text-gray-600"},Mct={class:"mb-4"},Nct=["innerHTML"],kct={class:"mt-auto pt-4 border-t"},Ict={class:"flex justify-between items-center flex-wrap"},Oct=["title"],Dct=["fill"],Lct=["src"];function Pct(n,e,t,r,i,s){const o=ht("InteractiveMenu");return T(),M("div",{class:qe(["personality-card bg-white border rounded-xl shadow-lg p-6 hover:shadow-xl transition duration-300 ease-in-out flex flex-col h-full",s.selected_computed?"border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),title:t.personality.installed?"":"Not installed"},[c("div",Ect,[c("div",Sct,[c("img",{src:s.getImgUrl(),onError:e[0]||(e[0]=a=>s.defaultImg(a)),alt:"Personality Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4 cursor-pointer",onClick:e[1]||(e[1]=(...a)=>s.toggleSelected&&s.toggleSelected(...a)),onMouseover:e[2]||(e[2]=(...a)=>s.showThumbnail&&s.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>s.updateThumbnailPosition&&s.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>s.hideThumbnail&&s.hideThumbnail(...a))},null,40,xct),c("div",null,[c("h3",{class:"font-bold text-xl text-gray-800 cursor-pointer",onClick:e[5]||(e[5]=(...a)=>s.toggleSelected&&s.toggleSelected(...a))},X(t.personality.name),1),c("p",Tct,"Author: "+X(t.personality.author),1),c("p",wct,"Version: "+X(t.personality.version),1),c("p",Cct,"Category: "+X(t.personality.category),1),t.personality.creation_date?(T(),M("p",Act,"Creation Date: "+X(s.formatDate(t.personality.creation_date)),1)):Y("",!0),t.personality.last_update_date?(T(),M("p",Rct,"Last update Date: "+X(s.formatDate(t.personality.last_update_date)),1)):Y("",!0)])]),c("div",Mct,[e[10]||(e[10]=c("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),c("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:t.personality.description},null,8,Nct)])]),c("div",kct,[c("div",Ict,[c("button",{onClick:e[6]||(e[6]=(...a)=>s.toggleFavorite&&s.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:n.isFavorite?"Remove from favorites":"Add to favorites"},[(T(),M("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:n.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[11]||(e[11]=[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,Dct))],8,Oct),i.isMounted?(T(),M("button",{key:0,onClick:e[7]||(e[7]=(...a)=>s.toggleSelected&&s.toggleSelected(...a)),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Select"},e[12]||(e[12]=[c("i",{"data-feather":"check",class:"h-6 w-6"},null,-1)]))):Y("",!0),i.isMounted?(T(),M("button",{key:1,onClick:e[8]||(e[8]=(...a)=>s.toggleTalk&&s.toggleTalk(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Talk"},e[13]||(e[13]=[c("i",{"data-feather":"send",class:"h-6 w-6"},null,-1)]))):Y("",!0),c("button",{onClick:e[9]||(e[9]=(...a)=>s.showFolder&&s.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},e[14]||(e[14]=[c("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1)])),W(o,{commands:s.commandsList,force_position:2,title:"Menu",class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out"},null,8,["commands"])])]),i.thumbnailVisible?(T(),M("div",{key:0,style:on({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[c("img",{src:s.getImgUrl(),class:"w-full h-full object-fill"},null,8,Lct)],4)):Y("",!0)],10,yct)}const EI=bt(vct,[["render",Pct]]),Fct={name:"DynamicUIRenderer",props:{ui:{type:String,required:!0},instanceId:{type:String,required:!0}},data(){return{containerId:`dynamic-ui-${this.instanceId}`}},watch:{ui:{immediate:!0,handler(n){console.log(`UI prop changed for instance ${this.instanceId}:`,n),this.$nextTick(()=>{this.renderContent()})}}},methods:{renderContent(){console.log(`Rendering content for instance ${this.instanceId}...`);const n=this.$refs.container,t=new DOMParser().parseFromString(this.ui,"text/html"),r=t.getElementsByTagName("style");Array.from(r).forEach(s=>{const o=document.createElement("style");o.textContent=this.scopeCSS(s.textContent),document.head.appendChild(o)}),n.innerHTML=t.body.innerHTML;const i=t.getElementsByTagName("script");Array.from(i).forEach(s=>{const o=document.createElement("script");o.textContent=s.textContent,n.appendChild(o)})},scopeCSS(n){return n.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,`#${this.containerId} $1$2`)}}},Uct=["id"];function Bct(n,e,t,r,i,s){return T(),M("div",{id:i.containerId,ref:"container"},null,8,Uct)}const SI=bt(Fct,[["render",Bct]]),Gct="/",zct={components:{DynamicUIRenderer:SI},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){We(()=>{Ze.replace()})},methods:{copyToClipBoard(n){console.log("Copying to clipboard :",n),navigator.clipboard.writeText(n)},getImgUrl(){return Gct+this.binding.icon},defaultImg(n){n.target.src=Ny},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(this)},toggleUnInstall(){this.onUnInstall(this)},toggleReinstall(){this.onReinstall(this)},toggleReloadBinding(){this.onReloadBinding(this)},toggleSettings(){this.onSettings(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}},watch:{selected(){We(()=>{Ze.replace()})}}},Vct=["title"],Hct={class:"flex flex-row items-center gap-3"},qct=["src"],Yct={class:"font-bold font-large text-lg truncate"},$ct={class:"flex-none gap-1"},Wct={class:"flex items-center flex-row-reverse gap-2 my-1"},Kct={class:""},jct={class:""},Qct={class:"flex items-center"},Xct={class:"flex items-center"},Zct={class:"flex items-center"},Jct={class:"flex items-center"},edt=["href"],tdt=["title","innerHTML"];function ndt(n,e,t,r,i,s){const o=ht("DynamicUIRenderer");return T(),M("div",{class:qe(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",t.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=J((...a)=>s.toggleSelected&&s.toggleSelected(...a),["stop"])),title:t.binding.installed?t.binding.name:"Not installed"},[c("div",null,[c("div",Hct,[c("img",{ref:"imgElement",src:s.getImgUrl(),onError:e[0]||(e[0]=a=>s.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,qct),c("h3",Yct,X(t.binding.name),1),e[10]||(e[10]=c("div",{class:"grow"},null,-1)),c("div",$ct,[t.selected?(T(),M("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>s.toggleReloadBinding&&s.toggleReloadBinding(...a)),e[2]||(e[2]=J(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},e[9]||(e[9]=[c("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),c("span",{class:"sr-only"},"Help",-1)]))):Y("",!0)])]),c("div",Wct,[t.binding.installed?Y("",!0):(T(),M("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=J((...a)=>s.toggleInstall&&s.toggleInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[11]||(e[11]=[pt(" Install "),c("span",{class:"sr-only"},"Click to install",-1)]))),t.binding.installed?(T(),M("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=J((...a)=>s.toggleReinstall&&s.toggleReinstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-green-700 hover:bg-red-800 focus:ring-4 focus:ring-green-300 rounded-lg dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-red-900"},e[12]||(e[12]=[pt(" Reinstall "),c("span",{class:"sr-only"},"Reinstall",-1)]))):Y("",!0),t.binding.installed?(T(),M("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=J((...a)=>s.toggleUnInstall&&s.toggleUnInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[pt(" Uninstall "),c("span",{class:"sr-only"},"UnInstall",-1)]))):Y("",!0),t.selected?(T(),M("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=J((...a)=>s.toggleSettings&&s.toggleSettings(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[14]||(e[14]=[pt(" Settings "),c("span",{class:"sr-only"},"Settings",-1)]))):Y("",!0)]),t.binding.ui?(T(),Tt(o,{key:0,class:"w-full h-full",code:t.binding.ui},null,8,["code"])):Y("",!0),c("div",Kct,[c("div",jct,[c("div",Qct,[e[15]||(e[15]=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[16]||(e[16]=c("b",null,"Author: ",-1)),pt(" "+X(t.binding.author),1)]),c("div",Xct,[e[18]||(e[18]=c("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1)),e[19]||(e[19]=c("b",null,"Folder: ",-1)),pt(" "+X(t.binding.folder)+" ",1),e[20]||(e[20]=c("div",{class:"grow"},null,-1)),c("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[7]||(e[7]=J(a=>s.copyToClipBoard(this.binding.folder),["stop"]))},e[17]||(e[17]=[c("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),c("div",Zct,[e[21]||(e[21]=c("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1)),e[22]||(e[22]=c("b",null,"Version: ",-1)),pt(" "+X(t.binding.version),1)]),c("div",Jct,[e[23]||(e[23]=c("i",{"data-feather":"github",class:"w-5 m-1"},null,-1)),e[24]||(e[24]=c("b",null,"Link: ",-1)),c("a",{href:t.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},X(t.binding.link),9,edt)])]),e[25]||(e[25]=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1)),c("p",{class:"mx-1 opacity-80 line-clamp-3",title:t.binding.description,innerHTML:t.binding.description},null,8,tdt)])])],10,Vct)}const rdt=bt(zct,[["render",ndt]]),Ai="/assets/logo-B22RoIQ8.png",idt={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(n=>{this.resolve=n})},hide(n){this.show=!1,this.resolve&&(this.resolve(n),this.resolve=null)},showDialog(n){return new Promise(e=>{this.model_path=n,this.show=!0,this.resolve=e})}}},sdt={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},odt={class:"relative w-full max-w-md max-h-full"},adt={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},ldt={class:"p-4 text-center"},cdt={class:"p-4 text-center mx-auto mb-4"};function ddt(n,e,t,r,i,s){return i.show?(T(),M("div",sdt,[c("div",odt,[c("div",adt,[c("button",{type:"button",onClick:e[0]||(e[0]=o=>s.hide(!1)),class:"absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},e[4]||(e[4]=[c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),c("span",{class:"sr-only"},"Close modal",-1)])),c("div",ldt,[e[6]||(e[6]=c("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),c("div",cdt,[e[5]||(e[5]=c("label",{class:"mr-2"},"Model path",-1)),F(c("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>i.model_path=o),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[_e,i.model_path]])]),c("button",{onClick:e[2]||(e[2]=o=>s.hide(!0)),type:"button",class:"text-white bg-green-600 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Add "),c("button",{onClick:e[3]||(e[3]=o=>s.hide(!1)),type:"button",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"},"No, cancel")])])])])):Y("",!0)}const udt=bt(idt,[["render",ddt]]),pdt={props:{show:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null,showInput:!1,newFilename:""}},methods:{displayName(n){return typeof n=="string"?n:n&&n.name?n.name:""},selectChoice(n){this.selectedChoice=n,this.$emit("choice-selected",n)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(n){const e=["bytes","KB","MB","GB"];let t=0;for(;n>=1024&&t[t.show?(T(),M("div",hdt,[c("div",mdt,[c("h2",fdt,[e[5]||(e[5]=c("svg",{class:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"})],-1)),pt(" "+X(t.title),1)]),c("div",gdt,[c("ul",null,[(T(!0),M(je,null,at(t.choices,(o,a)=>(T(),M("li",{key:a,class:"py-2 px-4 hover:bg-gray-200 dark:hover:bg-gray-600 transition duration-150 ease-in-out"},[c("div",_dt,[c("div",bdt,[o.isEditing?F((T(),M("input",{key:1,"onUpdate:modelValue":l=>o.editName=l,onBlur:l=>s.finishEditing(o),onKeyup:ui(l=>s.finishEditing(o),["enter"]),class:"bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded px-2 py-1 text-sm",autofocus:""},null,40,ydt)),[[_e,o.editName]]):(T(),M("span",{key:0,onClick:l=>s.selectChoice(o),class:qe([{"font-semibold":o===i.selectedChoice},"text-gray-800 dark:text-white cursor-pointer"])},X(s.displayName(o)),11,vdt)),o.size?(T(),M("span",Edt,X(s.formatSize(o.size)),1)):Y("",!0)]),c("div",Sdt,[c("button",{onClick:l=>s.editChoice(o),class:"text-blue-500 hover:text-blue-600 mr-2"},e[6]||(e[6]=[c("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1)]),8,xdt),t.can_remove?(T(),M("button",{key:0,onClick:l=>s.removeChoice(o,a),class:"text-red-500 hover:text-red-600"},e[7]||(e[7]=[c("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,Tdt)):Y("",!0)])])]))),128))])]),i.showInput?(T(),M("div",wdt,[F(c("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>i.newFilename=o),placeholder:"Enter a filename",class:"border border-gray-300 dark:border-gray-600 p-2 rounded-lg w-full mb-2 bg-white dark:bg-gray-700 text-gray-800 dark:text-white"},null,512),[[_e,i.newFilename]]),c("button",{onClick:e[1]||(e[1]=(...o)=>s.addNewFilename&&s.addNewFilename(...o)),class:"bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add ")])):Y("",!0),c("div",Cdt,[c("button",{onClick:e[2]||(e[2]=(...o)=>s.closeDialog&&s.closeDialog(...o)),class:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded-lg transition duration-300"}," Cancel "),c("button",{onClick:e[3]||(e[3]=(...o)=>s.validateChoice&&s.validateChoice(...o)),disabled:!i.selectedChoice,class:qe([{"bg-blue-500 hover:bg-blue-600":i.selectedChoice,"bg-gray-400 cursor-not-allowed":!i.selectedChoice},"text-white font-bold py-2 px-4 rounded-lg transition duration-300"])}," Validate ",10,Adt),c("button",{onClick:e[4]||(e[4]=(...o)=>s.toggleInput&&s.toggleInput(...o)),class:"bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add New ")])])])):Y("",!0)]),_:1})}const ky=bt(pdt,[["render",Rdt],["__scopeId","data-v-f43216be"]]),Mdt={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const n=this.radioOptions.find(e=>e.value===this.selectedValue);return n?n.label:""}},watch:{selectedValue(n,e){this.$emit("radio-selected",n)}},methods:{handleRadioChange(){}}},Ndt={class:"flex space-x-4"},kdt=["value","aria-checked"],Idt={class:"text-gray-700"};function Odt(n,e,t,r,i,s){return T(),M("div",Ndt,[(T(!0),M(je,null,at(t.radioOptions,(o,a)=>(T(),M("label",{key:o.value,class:"flex items-center space-x-2"},[F(c("input",{type:"radio",value:o.value,"onUpdate:modelValue":e[0]||(e[0]=l=>i.selectedValue=l),onChange:e[1]||(e[1]=(...l)=>s.handleRadioChange&&s.handleRadioChange(...l)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===o.value.toString(),role:"radio"},null,40,kdt),[[zL,i.selectedValue]]),c("span",Idt,X(o.label),1)]))),128))])}const Ddt=bt(Mdt,[["render",Odt]]),Ldt="/assets/gpu-BWVOYg-D.svg",Pdt={name:"StringListManager",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Enter an item"}},emits:["update:modelValue","change"],data(){return{newItem:"",draggingIndex:null}},methods:{addItem(){if(this.newItem.trim()){const n=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",n),this.$emit("change"),this.newItem=""}},removeItem(n){const e=this.modelValue.filter((t,r)=>r!==n);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(n){this.draggingIndex=n},dragItem(n){if(this.draggingIndex!==null){const e=[...this.modelValue],t=e.splice(this.draggingIndex,1)[0];e.splice(n,0,t),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null},moveUp(n){if(n>0){const e=[...this.modelValue],t=e.splice(n,1)[0];e.splice(n-1,0,t),this.$emit("update:modelValue",e),this.$emit("change")}},moveDown(n){if(ni.newItem=o),placeholder:t.placeholder,onKeyup:e[1]||(e[1]=ui((...o)=>s.addItem&&s.addItem(...o),["enter"])),class:"flex-grow mr-4 px-4 py-2 border border-gray-300 rounded dark:bg-gray-600 text-lg"},null,40,Udt),[[_e,i.newItem]]),c("button",{onClick:e[2]||(e[2]=(...o)=>s.addItem&&s.addItem(...o)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg"},"Add")]),t.modelValue.length>0?(T(),M("ul",Bdt,[(T(!0),M(je,null,at(t.modelValue,(o,a)=>(T(),M("li",{key:a,class:qe(["flex items-center mb-2 relative",{"bg-gray-200":i.draggingIndex===a}])},[c("span",Gdt,X(o),1),c("div",zdt,[c("button",{onClick:l=>s.removeItem(a),class:"text-red-500 hover:text-red-700 p-2"},e[5]||(e[5]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[c("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,Vdt),a>0?(T(),M("button",{key:0,onClick:l=>s.moveUp(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded mr-2"},e[6]||(e[6]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[c("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,Hdt)):Y("",!0),as.moveDown(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded"},e[7]||(e[7]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[c("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,qdt)):Y("",!0)]),i.draggingIndex===a?(T(),M("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:l=>s.startDragging(a),onMousemove:l=>s.dragItem(a),onMouseup:e[3]||(e[3]=(...l)=>s.stopDragging&&s.stopDragging(...l))},null,40,Ydt)):Y("",!0)],2))),128))])):Y("",!0),t.modelValue.length>0?(T(),M("div",$dt,[c("button",{onClick:e[4]||(e[4]=(...o)=>s.removeAll&&s.removeAll(...o)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg"},"Remove All")])):Y("",!0)])}const Kdt=bt(Pdt,[["render",Wdt]]),jdt="/";de.defaults.baseURL="/";const Qdt={components:{AddModelDialog:udt,ModelEntry:cct,PersonalityViewer:_ct,PersonalityEntry:EI,BindingEntry:rdt,ChoiceDialog:ky,Card:tm,StringListManager:Kdt,RadioOptions:Ddt},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},defaultModelImgPlaceholder:wr,snd_input_devices:[],snd_input_devices_indexes:[],snd_output_devices:[],snd_output_devices_indexes:[],voices:[],voice_languages:{Arabic:"ar","Brazilian Portuguese":"pt",Chinese:"zh-cn",Czech:"cs",Dutch:"nl",English:"en",French:"fr",German:"de",Italian:"it",Polish:"pl",Russian:"ru",Spanish:"es",Turkish:"tr",Japanese:"ja",Korean:"ko",Hungarian:"hu",Hindi:"hi"},storeLogo:Ai,binding_changed:!1,SVGGPU:Ldt,models_zoo:[],models_zoo_initialLoadCount:10,models_zoo_loadMoreCount:5,models_zoo_loadedEntries:[],models_zoo_scrollThreshold:200,sortOptions:[{label:"Sort by Date",value:0},{label:"Sort by Rank",value:1},{label:"Sort by Name",value:2},{label:"Sort by Maker",value:3},{label:"Sort by Quantizer",value:4}],comfyui_models:[],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],collapsedArr:[],all_collapsed:!0,data_conf_collapsed:!0,internet_conf_collapsed:!0,servers_conf_collapsed:!0,mainconf_collapsed:!0,smartrouterconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,ezl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:jdt,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){try{this.$store.state.loading_infos="Getting Hardware usage",await this.refreshHardwareUsage(this.$store)}catch(n){console.log("Error cought:",n)}rt.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(n=>n.json()).then(n=>{this.voices=n.voices}).catch(n=>console.error("Error fetching voices:",n))},async refreshHardwareUsage(n){await n.dispatch("refreshDiskUsage"),await n.dispatch("refreshRamUsage"),await n.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.rag_databases.push(""),this.settingsChanged=!0},removeDataSource(n){this.$store.state.config.rag_databases.splice(n,1),this.settingsChanged=!0},async vectorize_folder(n){await de.post("/vectorize_folder",{client_id:this.$store.state.client_id,db_path:this.$store.state.config.rag_databases[n]},this.posts_headers)},async select_folder(n){try{rt.on("rag_db_added",e=>{console.log(e),e?(this.$store.state.config.rag_databases[n]=`${e.database_name}::${e.database_path}`,this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await de.post("/add_rag_database",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},handleTemplateSelection(n){console.log("handleTemplateSelection");const e=n.target.value;console.log("handleTemplateSelection: ",e),e==="lollms"?(console.log("Using lollms template"),this.configFile.start_header_id_template="!@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="!@>",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="!@>",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="lollms_simplified"?(console.log("Using lollms template"),this.configFile.start_header_id_template="@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="@>",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="@>",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="bare"?(console.log("Using lollms template"),this.configFile.start_header_id_template="",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="llama3"?(console.log("Using llama3 template"),this.configFile.start_header_id_template="<|start_header_id|>",this.configFile.system_message_template="system",this.configFile.end_header_id_template="<|end_header_id|>",this.configFile.separator_template="<|eot_id|>",this.configFile.start_user_header_id_template="<|start_header_id|>",this.configFile.end_user_header_id_template="<|end_header_id|>",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="<|start_header_id|>",this.configFile.end_ai_header_id_template="<|end_header_id|>",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="mistral"?(console.log("Using mistral template"),this.configFile.start_header_id_template="[INST]",this.configFile.system_message_template=" Using this information",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` @@ -501,7 +501,7 @@ If You are using windows, this will install wsl so you need to activate it. `+this.message.content.slice(e,t)+"\n```\n"+this.message.content.slice(t),p=p+3+n.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url),this.editMsgMode=!1},resendMessage(n){this.$emit("resendMessage",this.message.id,this.message.content,n)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?ybt+this.avatar:(console.log("No avatar found"),Ai)},defaultImg(n){n.target.src=Ai},parseDate(n){let e=new Date(Date.parse(n)),r=Math.floor((new Date-e)/1e3);return r<=1?"just now":r<20?r+" seconds ago":r<40?"half a minute ago":r<60?"less than a minute ago":r<=90?"one minute ago":r<=3540?Math.round(r/60)+" minutes ago":r<=5400?"1 hour ago":r<=86400?Math.round(r/3600)+" hours ago":r<=129600?"1 day ago":r<604800?Math.round(r/86400)+" days ago":r<=777600?"1 week ago":n},prettyDate(n){let e=new Date((n||"").replace(/-/g,"/").replace(/[TZ]/g," ")),t=(new Date().getTime()-e.getTime())/1e3,r=Math.floor(t/86400);if(!(isNaN(r)||r<0||r>=31))return r==0&&(t<60&&"just now"||t<120&&"1 minute ago"||t<3600&&Math.floor(t/60)+" minutes ago"||t<7200&&"1 hour ago"||t<86400&&Math.floor(t/3600)+" hours ago")||r==1&&"Yesterday"||r<7&&r+" days ago"||r<31&&Math.ceil(r/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(n){n&&(this.$refs.audio_player.src=n)},"message.content":function(n){this.$store.state.config.auto_speak&&(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode||this.isSpeaking||this.checkForFullSentence())},"message.ui":function(n){console.log("ui changed to",n),this.ui_componentKey++},showConfirmation(){We(()=>{Ze.replace()})},deleteMsgMode(){We(()=>{Ze.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(n){this.message.open=n,this.editMsgMode_=n,We(()=>{Ze.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===n.getTime()||!n.getTime()||!e.getTime())return;let[r,i,s]=this.computeTimeDiff(n,e);function o(l){return l<10&&(l="0"+l),l}return o(r)+"h:"+o(i)+"m:"+o(s)+"s"},warmup_duration(){const n=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",n," -> ",e),e.getTime()===n.getTime())return 0;if(!n.getTime()||!e.getTime())return;let r,i,s;[r,i,s]=this.computeTimeDiff(n,e);function o(l){return l<10&&(l="0"+l),l}return o(r)+"h:"+o(i)+"m:"+o(s)+"s"},generation_rate(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),t=this.message.nb_tokens;if(e.getTime()===n.getTime()||!t||!n.getTime()||!e.getTime())return;let i=e.getTime()-n.getTime();const s=Math.floor(i/1e3),o=t/s;return Math.round(o)+" t/s"}}},Sbt={class:"relative message w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},xbt={class:"flex flex-row gap-2"},Tbt={class:"flex-shrink-0"},wbt={class:"group/avatar"},Cbt=["src","data-popover-target"],Abt={class:"flex flex-col w-full flex-grow-0"},Rbt={class:"flex flex-row flex-grow items-start"},Mbt={class:"flex flex-col mb-2"},Nbt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},kbt=["title"],Ibt={class:"overflow-x-auto w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},Obt={key:1},Dbt=["src"],Lbt={class:"message-details"},Pbt={key:0,class:"flex w-full cursor-pointer rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900 mb-3.5 max-w-full transition-all duration-300 ease-in-out"},Fbt={class:"grid min-w-80 select-none grid-cols-[50px,1fr] items-center gap-3 p-3 bg-gray-50 dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-all duration-300"},Ubt={class:"relative grid aspect-square place-content-center overflow-hidden rounded-full bg-gradient-to-br from-blue-400 to-purple-500 transform transition-transform duration-300 hover:scale-105"},Bbt={class:"leading-5"},Gbt={class:"flex items-center gap-1 truncate whitespace-nowrap text-sm text-gray-500 dark:text-gray-400"},zbt={class:"px-5 pb-5 pt-4 transition-all duration-300 ease-in-out"},Vbt={class:"list-none"},Hbt={class:"flex flex-col items-start w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},qbt={class:"flex-row justify-end mx-2"},Ybt={class:"invisible group-hover:visible flex flex-row"},$bt={key:0},Wbt={key:1},Kbt={key:2},jbt={key:3},Qbt={key:4,class:"flex items-center duration-75"},Xbt={class:"flex flex-row items-center"},Zbt={class:"flex flex-row items-center"},Jbt={key:6,class:"flex flex-row items-center"},e1t=["src"],t1t={class:"text-sm text-gray-400 mt-2"},n1t={class:"flex flex-row items-center gap-2"},r1t={key:0},i1t={class:"font-thin"},s1t={key:1},o1t={class:"font-thin"},a1t={key:2},l1t={class:"font-thin"},c1t={key:3},d1t=["title"],u1t={key:4},p1t=["title"],h1t={key:5},m1t=["title"],f1t={key:6},g1t=["title"];function _1t(n,e,t,r,i,s){var b;const o=ht("MarkdownRenderer"),a=ht("JsonViewer"),l=ht("DynamicUIRenderer"),d=ht("StatusIcon"),u=ht("StatusIndicator"),m=ht("Step"),f=ht("RenderHTMLJS"),g=ht("ToolbarButton"),h=ht("DropdownSubmenu"),v=ht("DropdownMenu");return T(),M("div",Sbt,[c("div",xbt,[c("div",Tbt,[c("div",wbt,[c("img",{src:s.getImgUrl(),onError:e[0]||(e[0]=_=>s.defaultImg(_)),"data-popover-target":"avatar"+t.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,Cbt)])]),c("div",Abt,[c("div",Rbt,[c("div",Mbt,[c("div",Nbt,X(t.message.sender),1),t.message.created_at?(T(),M("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+s.created_at_parsed},X(s.created_at),9,kbt)):Y("",!0)]),e[45]||(e[45]=c("div",{class:"flex-grow"},null,-1))]),c("div",Ibt,[s.editMsgMode?Y("",!0):(T(),Tt(o,{key:0,ref:"mdRender",host:t.host,"markdown-text":t.message.content,message_id:t.message.id,discussion_id:t.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),c("div",null,[t.message.open?F((T(),M("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=ui(J((..._)=>s.insertTab&&s.insertTab(..._),["prevent"]),["tab"])),class:"block min-h-[500px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,placeholder:"Enter message here...","onUpdate:modelValue":e[2]||(e[2]=_=>t.message.content=_)}," ",544)),[[_e,t.message.content]]):Y("",!0)]),t.message.metadata!==null?(T(),M("div",Obt,[(T(!0),M(je,null,at(((b=t.message.metadata)==null?void 0:b.filter(_=>_!=null&&_.hasOwnProperty("title")&&_.hasOwnProperty("content")))||[],(_,y)=>(T(),M("div",{key:"json-"+t.message.id+"-"+y,class:"json font-bold"},[(T(),Tt(a,{jsonFormText:_.title,jsonData:_.content,key:"msgjson-"+t.message.id},null,8,["jsonFormText","jsonData"]))]))),128))])):Y("",!0),t.message.ui?(T(),Tt(l,{ref:"ui",class:"w-full",ui:t.message.ui,key:"msgui-"+t.message.id},null,8,["ui"])):Y("",!0),i.audio_url!=null?(T(),M("audio",{controls:"",key:i.audio_url},[c("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,Dbt),e[46]||(e[46]=pt(" Your browser does not support the audio element. "))])):Y("",!0),c("div",Lbt,[t.message&&t.message.steps&&t.message.steps.length>0?(T(),M("details",Pbt,[c("summary",Fbt,[c("div",Ubt,[W(d,{status:t.message.status_message},null,8,["status"])]),c("dl",Bbt,[e[47]||(e[47]=c("dd",{class:"text-lg font-semibold text-gray-800 dark:text-gray-200"},"Processing Info",-1)),c("dt",Gbt,[W(u,{status:t.message.status_message},null,8,["status"]),pt(" "+X(t.message.status_message),1)])])]),c("div",zbt,[c("ol",Vbt,[(T(!0),M(je,null,at(t.message.steps,(_,y)=>(T(),M("li",{key:`step-${t.message.id}-${y}`,class:qe(["group border-l pb-6 last:!border-transparent last:pb-0 dark:border-gray-800 transition-all duration-300 ease-in-out",{"bg-transparent":_.done}]),style:on({animationDelay:`${y*100}ms`})},[W(m,{done:_.done,text:_.text,status:_.status,step_type:_.step_type},null,8,["done","text","status","step_type"])],6))),128))])])])):Y("",!0),c("div",Hbt,[(T(!0),M(je,null,at(t.message.html_js_s,(_,y)=>(T(),M("div",{key:`htmljs-${t.message.id}-${y}`,class:"font-bold animate-fadeIn",style:on({animationDelay:`${y*200}ms`})},[W(f,{htmlContent:_},null,8,["htmlContent"])],4))),128))])])]),c("div",qbt,[c("div",Ybt,[s.editMsgMode?(T(),M("div",$bt,[W(g,{onClick:e[3]||(e[3]=J(_=>s.editMsgMode=!1,["stop"])),title:"Cancel edit",icon:"x"}),W(g,{onClick:J(s.updateMessage,["stop"]),title:"Update message",icon:"check"},null,8,["onClick"]),W(v,{title:"Add Block"},{default:Ge(()=>[W(h,{title:"Programming Languages",icon:"code"},{default:Ge(()=>[W(g,{onClick:e[4]||(e[4]=J(_=>s.addBlock("python"),["stop"])),title:"Python",icon:"python"}),W(g,{onClick:e[5]||(e[5]=J(_=>s.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),W(g,{onClick:e[6]||(e[6]=J(_=>s.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),W(g,{onClick:e[7]||(e[7]=J(_=>s.addBlock("java"),["stop"])),title:"Java",icon:"java"}),W(g,{onClick:e[8]||(e[8]=J(_=>s.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),W(g,{onClick:e[9]||(e[9]=J(_=>s.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),W(g,{onClick:e[10]||(e[10]=J(_=>s.addBlock("go"),["stop"])),title:"Go",icon:"go"}),W(g,{onClick:e[11]||(e[11]=J(_=>s.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),W(g,{onClick:e[12]||(e[12]=J(_=>s.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),W(g,{onClick:e[13]||(e[13]=J(_=>s.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),W(g,{onClick:e[14]||(e[14]=J(_=>s.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),W(h,{title:"Web Technologies",icon:"web"},{default:Ge(()=>[W(g,{onClick:e[15]||(e[15]=J(_=>s.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),W(g,{onClick:e[16]||(e[16]=J(_=>s.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),W(g,{onClick:e[17]||(e[17]=J(_=>s.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),W(g,{onClick:e[18]||(e[18]=J(_=>s.addBlock("react"),["stop"])),title:"React",icon:"react"}),W(g,{onClick:e[19]||(e[19]=J(_=>s.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),W(h,{title:"Markup and Data",icon:"file-code"},{default:Ge(()=>[W(g,{onClick:e[20]||(e[20]=J(_=>s.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),W(g,{onClick:e[21]||(e[21]=J(_=>s.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),W(g,{onClick:e[22]||(e[22]=J(_=>s.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),W(g,{onClick:e[23]||(e[23]=J(_=>s.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),W(g,{onClick:e[24]||(e[24]=J(_=>s.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),W(h,{title:"Scripting and Shell",icon:"terminal"},{default:Ge(()=>[W(g,{onClick:e[25]||(e[25]=J(_=>s.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),W(g,{onClick:e[26]||(e[26]=J(_=>s.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),W(g,{onClick:e[27]||(e[27]=J(_=>s.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),W(h,{title:"Diagramming",icon:"sitemap"},{default:Ge(()=>[W(g,{onClick:e[28]||(e[28]=J(_=>s.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),W(g,{onClick:e[29]||(e[29]=J(_=>s.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),W(g,{onClick:e[30]||(e[30]=J(_=>s.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),W(h,{title:"Database",icon:"database"},{default:Ge(()=>[W(g,{onClick:e[31]||(e[31]=J(_=>s.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),W(g,{onClick:e[32]||(e[32]=J(_=>s.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),W(g,{onClick:e[33]||(e[33]=J(_=>s.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1})])):(T(),M("div",Wbt,[W(g,{onClick:e[34]||(e[34]=J(_=>s.editMsgMode=!0,["stop"])),title:"Edit message",icon:"edit"})])),W(g,{onClick:s.copyContentToClipboard,title:"Copy message to clipboard",icon:"copy"},null,8,["onClick"]),!s.editMsgMode&&t.message.sender!==n.$store.state.mountedPers.name?(T(),M("div",Kbt,[W(g,{onClick:e[35]||(e[35]=J(_=>s.resendMessage("full_context"),["stop"])),title:"Resend message with full context",icon:"send"}),W(g,{onClick:e[36]||(e[36]=J(_=>s.resendMessage("full_context_with_internet"),["stop"])),title:"Resend message with internet search",icon:"globe"}),W(g,{onClick:e[37]||(e[37]=J(_=>s.resendMessage("simple_question"),["stop"])),title:"Resend message without context",icon:"sendSimple"})])):Y("",!0),!s.editMsgMode&&t.message.sender===n.$store.state.mountedPers.name?(T(),M("div",jbt,[W(g,{onClick:s.continueMessage,title:"Continue message",icon:"fastForward"},null,8,["onClick"])])):Y("",!0),i.deleteMsgMode?(T(),M("div",Qbt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[38]||(e[38]=J(_=>i.deleteMsgMode=!1,["stop"]))},e[48]||(e[48]=[c("i",{"data-feather":"x"},null,-1)])),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[39]||(e[39]=J(_=>s.deleteMsg(),["stop"]))},e[49]||(e[49]=[c("i",{"data-feather":"check"},null,-1)]))])):Y("",!0),!s.editMsgMode&&!i.deleteMsgMode?(T(),M("div",{key:5,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[40]||(e[40]=_=>i.deleteMsgMode=!0)},e[50]||(e[50]=[c("i",{"data-feather":"trash"},null,-1)]))):Y("",!0),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[41]||(e[41]=J(_=>s.rankUp(),["stop"]))},e[51]||(e[51]=[c("i",{"data-feather":"thumbs-up"},null,-1)])),c("div",Xbt,[c("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[42]||(e[42]=J(_=>s.rankDown(),["stop"]))},e[52]||(e[52]=[c("i",{"data-feather":"thumbs-down"},null,-1)])),t.message.rank!=0?(T(),M("div",{key:0,class:qe(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",t.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},X(t.message.rank),3)):Y("",!0)]),c("div",Zbt,[this.$store.state.config.active_tts_service!="None"?(T(),M("div",{key:0,class:qe(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":s.isTalking}]),title:"speak",onClick:e[43]||(e[43]=J(_=>s.speak(),["stop"]))},e[53]||(e[53]=[c("i",{"data-feather":"volume-2"},null,-1)]),2)):Y("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(T(),M("div",Jbt,[i.isSynthesizingVoice?(T(),M("img",{key:1,src:i.loading_svg},null,8,e1t)):(T(),M("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"generate_audio",onClick:e[44]||(e[44]=J(_=>s.read(),["stop"]))},e[54]||(e[54]=[c("i",{"data-feather":"voicemail"},null,-1)])))])):Y("",!0)])]),c("div",t1t,[c("div",n1t,[t.message.binding?(T(),M("p",r1t,[e[55]||(e[55]=pt("Binding: ")),c("span",i1t,X(t.message.binding),1)])):Y("",!0),t.message.model?(T(),M("p",s1t,[e[56]||(e[56]=pt("Model: ")),c("span",o1t,X(t.message.model),1)])):Y("",!0),t.message.seed?(T(),M("p",a1t,[e[57]||(e[57]=pt("Seed: ")),c("span",l1t,X(t.message.seed),1)])):Y("",!0),t.message.nb_tokens?(T(),M("p",c1t,[e[58]||(e[58]=pt("Number of tokens: ")),c("span",{class:"font-thin",title:"Number of Tokens: "+t.message.nb_tokens},X(t.message.nb_tokens),9,d1t)])):Y("",!0),s.warmup_duration?(T(),M("p",u1t,[e[59]||(e[59]=pt("Warmup duration: ")),c("span",{class:"font-thin",title:"Warmup duration: "+s.warmup_duration},X(s.warmup_duration),9,p1t)])):Y("",!0),s.time_spent?(T(),M("p",h1t,[e[60]||(e[60]=pt("Generation duration: ")),c("span",{class:"font-thin",title:"Finished generating: "+s.time_spent},X(s.time_spent),9,m1t)])):Y("",!0),s.generation_rate?(T(),M("p",f1t,[e[61]||(e[61]=pt("Rate: ")),c("span",{class:"font-thin",title:"Generation rate: "+s.generation_rate},X(s.generation_rate),9,g1t)])):Y("",!0)])])])])])}const TI=bt(Ebt,[["render",_1t]]);de.defaults.baseURL="/";const b1t={components:{InteractiveMenu:My},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){this.commands=this.commandsList,console.log("Commands",this.commands),document.addEventListener("click",this.handleClickOutside),We(()=>{Ze.replace()})},methods:{isHTML(n){const t=new DOMParser().parseFromString(n,"text/html");return Array.from(t.body.childNodes).some(r=>r.nodeType===Node.ELEMENT_NODE)},selectFile(n,e){const t=document.createElement("input");t.type="file",t.accept=n,t.onchange=r=>{this.selectedFile=r.target.files[0],console.log("File selected"),e()},t.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const t={filename:this.selectedFile.name,fileData:e.result};rt.on("file_received",r=>{r.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file `+r.error,4,!1),this.loading=!1,rt.off("file_received")}),rt.emit("send_file",t)},e.readAsDataURL(this.selectedFile)},async constructor(){We(()=>{Ze.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(n){this.showMenu=!this.showMenu,n.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(n.hasOwnProperty("file_types")?n.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(n.value)},handleClickOutside(n){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(n.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},v1t={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"};function y1t(n,e,t,r,i,s){const o=ht("InteractiveMenu");return i.loading?(T(),M("div",v1t,e[0]||(e[0]=[c("div",{role:"status"},[c("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),c("span",{class:"sr-only"},"Loading...")],-1)]))):(T(),Tt(o,{key:1,commands:t.commandsList,execute_cmd:s.execute_cmd},null,8,["commands","execute_cmd"]))}const E1t=bt(b1t,[["render",y1t],["__scopeId","data-v-1a32c141"]]),S1t="data:image/svg+xml,%3csvg%20aria-hidden='true'%20class='w-6%20h-6%20animate-spin%20fill-secondary'%20viewBox='0%200%20100%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M100%2050.5908C100%2078.2051%2077.6142%20100.591%2050%20100.591C22.3858%20100.591%200%2078.2051%200%2050.5908C0%2022.9766%2022.3858%200.59082%2050%200.59082C77.6142%200.59082%20100%2022.9766%20100%2050.5908ZM9.08144%2050.5908C9.08144%2073.1895%2027.4013%2091.5094%2050%2091.5094C72.5987%2091.5094%2090.9186%2073.1895%2090.9186%2050.5908C90.9186%2027.9921%2072.5987%209.67226%2050%209.67226C27.4013%209.67226%209.08144%2027.9921%209.08144%2050.5908Z'%20fill='currentColor'%20/%3e%3cpath%20d='M93.9676%2039.0409C96.393%2038.4038%2097.8624%2035.9116%2097.0079%2033.5539C95.2932%2028.8227%2092.871%2024.3692%2089.8167%2020.348C85.8452%2015.1192%2080.8826%2010.7238%2075.2124%207.41289C69.5422%204.10194%2063.2754%201.94025%2056.7698%201.05124C51.7666%200.367541%2046.6976%200.446843%2041.7345%201.27873C39.2613%201.69328%2037.813%204.19778%2038.4501%206.62326C39.0873%209.04874%2041.5694%2010.4717%2044.0505%2010.1071C47.8511%209.54855%2051.7191%209.52689%2055.5402%2010.0491C60.8642%2010.7766%2065.9928%2012.5457%2070.6331%2015.2552C75.2735%2017.9648%2079.3347%2021.5619%2082.5849%2025.841C84.9175%2028.9121%2086.7997%2032.2913%2088.1811%2035.8758C89.083%2038.2158%2091.5421%2039.6781%2093.9676%2039.0409Z'%20fill='currentFill'%20/%3e%3c/svg%3e",x1t="/",T1t={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{PersonalitiesCommands:E1t,ChatBarButton:Yk},setup(){},data(){return{isSendMenuVisible:!1,is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:S1t,sendGlobe:xI,bUrl:x1t,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{leftPanelCollapsed(){return this.$store.state.leftPanelCollapsed},rightPanelCollapsed(){return this.$store.state.rightPanelCollapsed},isCompactMode(){return this.$store.state.view_mode==="compact"},isDataSourceNamesValid(){return console.log("dataSourceNames:",this.dataSourceNames),console.log("Type of dataSourceNames:",typeof this.dataSourceNames),Array.isArray(this.dataSourceNames)&&this.dataSourceNames.length>0},dataSourceNames(){console.log("dataSourceNames",this.$store.state.config.rag_databases);const n=this.$store.state.config.rag_databases.map(e=>{console.log("entry",e);const t=e.split("::");console.log("extracted",t[0]);const i=e.endsWith("mounted")?"feather:check":"";return console.log("icon decision",i),{name:t[0],value:t[0]||"default_value",icon:i,help:"mounts the database"}});return console.log("formatted data sources",n),n}},methods:{showSendMenu(){clearTimeout(this.hideSendMenuTimeout),this.isSendMenuVisible=!0},hideSendMenu(){this.hideSendMenuTimeout=setTimeout(()=>{this.isSendMenuVisible=!1},300)},toggleLeftPanel(){console.log(this.leftPanelCollapsed),this.$store.commit("setLeftPanelCollapsed",!this.leftPanelCollapsed)},async toggleRightPanel(){console.log(this.rightPanelCollapsed),this.$store.commit("setRightPanelCollapsed",!this.rightPanelCollapsed),this.rightPanelCollapsed&&(this.$store.commit("setleftPanelCollapsed",!0),this.$nextTick(()=>{this.extractHtml()})),console.log(this.rightPanelCollapsed)},handlePaste(n){const e=(n.clipboardData||n.originalEvent.clipboardData).items;let t=[];for(let r of e)if(r.type.indexOf("image")!==-1){const i=r.getAsFile(),o=`image_${Date.now()+"_"+Math.random().toString(36).substr(2,9)}.png`;console.log("newFileName",o);const a=new File([i],o,{type:i.type});this.addFiles([a])}else if(r.kind==="file"){const i=r.getAsFile();t.push(i)}t.length>0&&this.addFiles(t)},emitloaded(){this.$emit("loaded")},download_files(){de.get("/download_files")},remove_file(n){de.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:n}).then(e=>{console.log(e)})},clear_files(){de.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(n=>{console.log(n),n.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(n,e){console.log("Send file triggered");const t=new FileReader,r=24*1024;let i=0,s=0;t.onloadend=()=>{if(t.error){console.error("Error reading file:",t.error);return}const a=t.result,l=i+a.byteLength>=n.size;rt.emit("send_file_chunk",{filename:n.name,chunk:a,offset:i,isLastChunk:l,chunkIndex:s}),i+=a.byteLength,s++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=n.slice(i,i+r);t.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},startRTCom(){this.is_rt=!0,console.log("is_rt:",this.is_rt),rt.emit("start_bidirectional_audio_stream"),We(()=>{Ze.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),rt.emit("stop_bidirectional_audio_stream"),We(()=>{Ze.replace()})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isListeningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=n=>{let e="";for(let t=n.resultIndex;t{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=n=>{console.error("Speech recognition error:",n.error),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},computedFileSize(n){return We(()=>{Ze.replace()}),Wi(n)},removeItem(n){console.log("Removing ",n.name),de.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:n.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=n)}),console.log(this.filesList)},sendMessageEvent(n,e="no_internet"){this.$emit("messageSentEvent",n,e)},sendCMDEvent(n){this.$emit("sendCMDEvent",n)},async mountDB(n){await de.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:n}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const n=document.createElement("input");n.type="file",n.style.display="none",n.multiple=!0,document.body.appendChild(n),n.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(n.files),document.body.removeChild(n)}),n.click()},takePicture(){rt.emit("take_picture"),rt.on("picture_taken",()=>{de.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(n=>{this.filesList=n.data.files,this.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(n){this.loading||n.which===13&&(n.preventDefault(),n.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(n){console.log("Adding files");const e=[...n];let t=0;const r=()=>{if(t>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[t];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{t++,r()})};r()}},watch:{installedModels:{immediate:!0,handler(n){this.$nextTick(()=>{this.installedModels=n})}},model_name:{immediate:!0,handler(n){this.$nextTick(()=>{this.model_name=n})}},showfilesList(){We(()=>{Ze.replace()})},loading(n,e){We(()=>{Ze.replace()})},filesList:{handler(n,e){let t=0;if(n.length>0)for(let r=0;r{Ze.replace()}),console.log("Chatbar mounted"),rt.on("rtcom_status_changed",n=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",n.status),console.log("active_tts_service: ",this.$store.state.config.active_tts_service),console.log("is_rt_on: ",this.$store.state.is_rt_on)}),this.$store.dispatch("fetchisRTOn")},activated(){We(()=>{Ze.replace()})}},w1t={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},C1t={key:0,class:"items-center gap-2 panels-color shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},A1t={class:"flex"},R1t=["title"],M1t={key:0},N1t={class:"flex flex-col max-h-64"},k1t=["title"],I1t={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},O1t={key:0,filesList:"",role:"status"},D1t={class:"flex flex-row items-center"},L1t={class:"whitespace-nowrap"},P1t=["onClick"],F1t={key:1,class:"flex mx-1 w-500"},U1t={class:"whitespace-nowrap flex flex-row gap-2"},B1t={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end panels-color"},G1t={role:"status"},z1t=["src"],V1t={class:"flex w-fit relative grow w-full"},H1t={class:"relative text-light-text-panel dark:text-dark-text-panel grow flex h-12.5 cursor-pointer select-none items-center gap-2 chatbox-color p-1 shadow-sm hover:shadow-none dark:border-gray-800",tabindex:"0"},q1t={key:0,title:"Waiting for reply"},Y1t=["src"],$1t={class:"w-fit"},W1t={class:"w-fit"},K1t={class:"relative grow m-0 p-0"},j1t={class:"m-0 p-0"},Q1t={class:"flex items-center space-x-3"},X1t={class:"relative inline-block"},Z1t={class:"p-4 m-0 flex flex-col gap-4 max-h-96 overflow-y-auto custom-scrollbar"},J1t={class:"flex flex-col gap-2"};function evt(n,e,t,r,i,s){const o=ht("ChatBarButton"),a=ht("PersonalitiesCommands");return T(),M("div",w1t,[i.filesList.length>0?(T(),M("div",C1t,[c("div",A1t,[c("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:i.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=J(l=>i.showfilesList=!i.showfilesList,["stop"]))},e[12]||(e[12]=[c("i",{"data-feather":"list"},null,-1)]),8,R1t)]),i.filesList.length>0&&i.showfilesList==!0?(T(),M("div",M1t,[c("div",N1t,[W(As,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:Ge(()=>[(T(!0),M(je,null,at(i.filesList,(l,d)=>(T(),M("div",{key:d+"-"+l.name},[c("div",{class:"m-1",title:l.name},[c("div",I1t,[i.isFileSentList[d]?Y("",!0):(T(),M("div",O1t,e[13]||(e[13]=[c("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),c("span",{class:"sr-only"},"Loading...",-1)]))),e[15]||(e[15]=c("div",null,[c("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),c("div",{class:qe(["line-clamp-1 w-3/5",i.isFileSentList[d]?"text-green-500":"text-red-200"])},X(l.name),3),e[16]||(e[16]=c("div",{class:"grow"},null,-1)),c("div",D1t,[c("p",L1t,X(s.computedFileSize(l.size)),1),c("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:u=>s.removeItem(l)},e[14]||(e[14]=[c("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]),8,P1t)])])],8,k1t)]))),128))]),_:1})])])):Y("",!0),i.filesList.length>0?(T(),M("div",F1t,[c("div",U1t,[e[17]||(e[17]=c("p",{class:"font-bold"}," Total size: ",-1)),pt(" "+X(i.totalSize)+" ("+X(i.filesList.length)+") ",1)]),e[20]||(e[20]=c("div",{class:"grow"},null,-1)),c("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...l)=>s.clear_files&&s.clear_files(...l))},e[18]||(e[18]=[c("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)])),c("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...l)=>s.download_files&&s.download_files(...l))},e[19]||(e[19]=[c("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)]))])):Y("",!0)])):Y("",!0),i.selecting_model||i.selecting_binding?(T(),M("div",B1t,[c("div",G1t,[c("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,z1t),e[21]||(e[21]=c("span",{class:"sr-only"},"Selecting model...",-1))])])):Y("",!0),c("div",V1t,[c("div",H1t,[t.loading?(T(),M("div",q1t,[c("img",{src:i.loader_v0},null,8,Y1t),e[22]||(e[22]=c("div",{role:"status"},[c("span",{class:"sr-only"},"Loading...")],-1))])):Y("",!0),W(o,{onClick:s.toggleLeftPanel,class:qe({"text-red-500":s.leftPanelCollapsed}),title:"Toggle View Mode"},{default:Ge(()=>[F(c("div",null,e[23]||(e[23]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[c("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Dt,s.leftPanelCollapsed]]),F(c("div",null,e[24]||(e[24]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[c("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Dt,!s.leftPanelCollapsed]])]),_:1},8,["onClick","class"]),c("div",$1t,[this.$store.state.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(T(),Tt(a,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:s.sendCMDEvent,"on-show-toast-message":t.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):Y("",!0)]),c("div",W1t,[s.isDataSourceNamesValid?(T(),Tt(a,{key:0,icon:"feather:book",commandsList:s.dataSourceNames,sendCommand:s.mountDB,"on-show-toast-message":t.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):Y("",!0)]),c("div",K1t,[c("form",j1t,[F(c("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[3]||(e[3]=l=>i.message=l),onPaste:e[4]||(e[4]=(...l)=>s.handlePaste&&s.handlePaste(...l)),onKeydown:e[5]||(e[5]=ui(J(l=>s.submitOnEnter(l),["exact"]),["enter"])),class:"w-full p-2 text-sm text-gray-900 dark:text-white bg-gray-100 dark:bg-gray-700 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Send message..."},null,544),[[_e,i.message]])])]),c("div",Q1t,[t.loading?(T(),Tt(o,{key:0,onClick:s.stopGenerating,class:"bg-red-500 dark:bg-red-600 hover:bg-red-600 dark:hover:bg-red-700"},{icon:Ge(()=>e[25]||(e[25]=[c("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[c("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),c("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])),default:Ge(()=>[e[26]||(e[26]=c("span",null,"Stop",-1))]),_:1},8,["onClick"])):(T(),Tt(o,{key:1,onClick:s.submit,title:"Send"},{icon:Ge(()=>e[27]||(e[27]=[c("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})],-1)])),_:1},8,["onClick"])),W(o,{onClick:s.submitWithInternetSearch,title:"Send with internet search"},{icon:Ge(()=>e[28]||(e[28]=[c("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})],-1)])),_:1},8,["onClick"]),W(o,{onClick:s.startSpeechRecognition,class:qe({"text-red-500":i.isListeningToVoice}),title:"Voice input"},{icon:Ge(()=>e[29]||(e[29]=[c("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})],-1)])),_:1},8,["onClick","class"]),n.$store.state.config.active_tts_service!="None"&&n.$store.state.config.active_tts_service!=null&&this.$store.state.config.active_stt_service!="None"&&this.$store.state.config.active_stt_service!=null?(T(),Tt(o,{key:2,onClick:e[6]||(e[6]=l=>i.is_rt?s.stopRTCom:s.startRTCom),class:qe(i.is_rt?"bg-red-500 dark:bg-red-600":"bg-green-500 dark:bg-green-600"),title:"Real-time audio mode"},{icon:Ge(()=>e[30]||(e[30]=[pt(" 🌟 ")])),_:1},8,["class"])):Y("",!0),t.loading?Y("",!0):(T(),M("div",{key:3,class:"relative",onMouseleave:e[10]||(e[10]=(...l)=>s.hideSendMenu&&s.hideSendMenu(...l))},[c("div",X1t,[F(c("div",{onMouseenter:e[7]||(e[7]=(...l)=>s.showSendMenu&&s.showSendMenu(...l)),class:"absolute m-0 p-0 z-10 bottom-full left-1/2 transform -translate-x-1/2 w-25 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[c("div",Z1t,[c("div",J1t,[W(o,{onClick:s.add_file,title:"Send file"},{icon:Ge(()=>e[31]||(e[31]=[c("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)])),_:1},8,["onClick"]),W(o,{onClick:s.takePicture,title:"Take picture"},{icon:Ge(()=>e[32]||(e[32]=[c("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])),_:1},8,["onClick"]),W(o,{onClick:s.addWebLink,title:"Add web link"},{icon:Ge(()=>e[33]||(e[33]=[c("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})],-1)])),_:1},8,["onClick"])])])],544),[[Dt,i.isSendMenuVisible]]),c("div",{onMouseenter:e[9]||(e[9]=(...l)=>s.showSendMenu&&s.showSendMenu(...l))},[c("button",{onClick:e[8]||(e[8]=J((...l)=>n.toggleSendMenu&&n.toggleSendMenu(...l),["prevent"])),class:"p-2 rounded-full transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},e[34]||(e[34]=[c("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"black"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)]))],32)])],32)),W(o,{onClick:s.makeAnEmptyUserMessage,title:"New user message",class:"text-gray-600 dark:text-gray-300"},{icon:Ge(()=>e[35]||(e[35]=[c("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})],-1)])),_:1},8,["onClick"]),W(o,{onClick:s.makeAnEmptyAIMessage,title:"New AI message",class:"text-red-400 dark:text-red-300"},{icon:Ge(()=>e[36]||(e[36]=[c("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1)])),_:1},8,["onClick"]),W(o,{onClick:s.toggleRightPanel,class:qe({"text-red-500":!s.rightPanelCollapsed}),title:"Toggle right Panel"},{default:Ge(()=>[F(c("div",null,e[37]||(e[37]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[c("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Dt,s.rightPanelCollapsed]]),F(c("div",null,e[38]||(e[38]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[c("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Dt,!s.rightPanelCollapsed]])]),_:1},8,["onClick","class"])]),c("input",{type:"file",ref:"fileDialog",onChange:e[11]||(e[11]=(...l)=>s.addFiles&&s.addFiles(...l)),multiple:"",style:{display:"none"}},null,544)]),e[39]||(e[39]=c("div",{class:"ml-auto gap-2"},null,-1))])])}const wI=bt(T1t,[["render",evt],["__scopeId","data-v-e3d676fa"]]),tvt={name:"WelcomeComponent",setup(){const n=i6();return{logoSrc:mt(()=>n.state.config&&n.state.config.app_custom_logo?`/user_infos/${n.state.config.app_custom_logo}`:Ai)}}},nvt={class:"flex flex-col items-center justify-center w-full h-full min-h-screen p-8"},rvt={class:"text-center max-w-4xl"},ivt={class:"flex items-center justify-center gap-8 mb-12"},svt={class:"relative w-24 h-24"},ovt=["src"];function avt(n,e,t,r,i,s){return T(),M("div",nvt,[c("div",rvt,[c("div",ivt,[c("div",svt,[c("img",{src:r.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,ovt)]),e[0]||(e[0]=c("div",{class:"flex flex-col items-start"},[c("h1",{class:"text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-400 dark:to-purple-400"}," L🌟LLMS "),c("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic mt-2"}," Lord of Large Language And Multimodal Systems ")],-1))]),e[1]||(e[1]=yo('

Welcome to L🌟LLMS WebUI

Embark on a journey through the realm of advanced AI with L🌟LLMS, your ultimate companion for intelligent conversations and multimodal interactions. Unleash the power of large language models and explore new frontiers in artificial intelligence.

Discover the capabilities of L🌟LLMS:

  • Engage in natural language conversations
  • Generate creative content and ideas
  • Analyze complex data and provide insights
  • Assist with coding and technical tasks
  • Process and understand multimodal inputs
',1))])])}const CI=bt(tvt,[["render",avt],["__scopeId","data-v-1756add6"]]);var lvt=function(){function n(e,t){t===void 0&&(t=[]),this._eventType=e,this._eventFunctions=t}return n.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(t){typeof window<"u"&&window.addEventListener(e._eventType,t)})},n}(),$p=function(){return $p=Object.assign||function(n){for(var e,t=1,r=arguments.length;t{const e=n.data;console.log("Done"),e.status?(this.currentPersonConfig=e.config,this.showPersonalityEditor=!0):console.error(e.error)}).catch(n=>{console.error(n)})}}},uvt={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},pvt={class:"relative w-full max-h-full bg-bg-light dark:bg-bg-dark"},hvt={class:"w-full h-full relative items-center gap-2 rounded-lg border bg-bg-light dark:bg-bg-dark p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-900"},mvt={class:"justify-center text-center items-center w-full bg-bg-light dark:bg-bg-dark"},fvt={class:"w-full flex flex-row mt-4 text-center justify-center"},gvt={class:"w-full max-h-full container bg-bg-light dark:bg-bg-dark"},_vt={class:"mb-4 w-full"},bvt={class:"w-full bg-bg-light dark:bg-bg-dark"};function vvt(n,e,t,r,i,s){return i.show?(T(),M("div",uvt,[c("div",pvt,[c("div",hvt,[c("button",{type:"button",onClick:e[0]||(e[0]=o=>s.hide()),class:"absolute top-1 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},e[17]||(e[17]=[c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),c("span",{class:"sr-only"},"Close modal",-1)])),c("div",mvt,[c("div",fvt,[c("button",{type:"submit",onClick:e[1]||(e[1]=J((...o)=>s.submitForm&&s.submitForm(...o),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Commit AI to Server "),c("button",{onClick:e[2]||(e[2]=J(o=>s.hide(),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Close ")]),c("div",gvt,[c("form",_vt,[c("table",bvt,[c("tr",null,[e[18]||(e[18]=c("td",null,[c("label",{for:"personalityConditioning"},"Personality Conditioning:")],-1)),c("td",null,[F(c("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"personalityConditioning","onUpdate:modelValue":e[3]||(e[3]=o=>t.config.personality_conditioning=o)},null,512),[[_e,t.config.personality_conditioning]])])]),c("tr",null,[e[19]||(e[19]=c("td",null,[c("label",{for:"userMessagePrefix"},"User Message Prefix:")],-1)),c("td",null,[F(c("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"userMessagePrefix","onUpdate:modelValue":e[4]||(e[4]=o=>t.config.user_message_prefix=o)},null,512),[[_e,t.config.user_message_prefix]])])]),c("tr",null,[e[20]||(e[20]=c("td",null,[c("label",{for:"aiMessagePrefix"},"AI Message Prefix:")],-1)),c("td",null,[F(c("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"aiMessagePrefix","onUpdate:modelValue":e[5]||(e[5]=o=>t.config.ai_message_prefix=o)},null,512),[[_e,t.config.ai_message_prefix]])])]),c("tr",null,[e[21]||(e[21]=c("td",null,[c("label",{for:"linkText"},"Link Text:")],-1)),c("td",null,[F(c("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"linkText","onUpdate:modelValue":e[6]||(e[6]=o=>t.config.link_text=o)},null,512),[[_e,t.config.link_text]])])]),c("tr",null,[e[22]||(e[22]=c("td",null,[c("label",{for:"welcomeMessage"},"Welcome Message:")],-1)),c("td",null,[F(c("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"welcomeMessage","onUpdate:modelValue":e[7]||(e[7]=o=>t.config.welcome_message=o)},null,512),[[_e,t.config.welcome_message]])])]),c("tr",null,[e[23]||(e[23]=c("td",null,[c("label",{for:"modelTemperature"},"Model Temperature:")],-1)),c("td",null,[F(c("input",{type:"number",id:"modelTemperature","onUpdate:modelValue":e[8]||(e[8]=o=>t.config.model_temperature=o)},null,512),[[_e,t.config.model_temperature]])])]),c("tr",null,[e[24]||(e[24]=c("td",null,[c("label",{for:"modelTopK"},"Model Top K:")],-1)),c("td",null,[F(c("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopK","onUpdate:modelValue":e[9]||(e[9]=o=>t.config.model_top_k=o)},null,512),[[_e,t.config.model_top_k]])])]),c("tr",null,[e[25]||(e[25]=c("td",null,[c("label",{for:"modelTopP"},"Model Top P:")],-1)),c("td",null,[F(c("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopP","onUpdate:modelValue":e[10]||(e[10]=o=>t.config.model_top_p=o)},null,512),[[_e,t.config.model_top_p]])])]),c("tr",null,[e[26]||(e[26]=c("td",null,[c("label",{for:"modelRepeatPenalty"},"Model Repeat Penalty:")],-1)),c("td",null,[F(c("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatPenalty","onUpdate:modelValue":e[11]||(e[11]=o=>t.config.model_repeat_penalty=o)},null,512),[[_e,t.config.model_repeat_penalty]])])]),c("tr",null,[e[27]||(e[27]=c("td",null,[c("label",{for:"modelRepeatLastN"},"Model Repeat Last N:")],-1)),c("td",null,[F(c("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatLastN","onUpdate:modelValue":e[12]||(e[12]=o=>t.config.model_repeat_last_n=o)},null,512),[[_e,t.config.model_repeat_last_n]])])]),c("tr",null,[e[28]||(e[28]=c("td",null,[c("label",{for:"recommendedBinding"},"Recommended Binding:")],-1)),c("td",null,[F(c("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedBinding","onUpdate:modelValue":e[13]||(e[13]=o=>t.config.recommended_binding=o)},null,512),[[_e,t.config.recommended_binding]])])]),c("tr",null,[e[29]||(e[29]=c("td",null,[c("label",{for:"recommendedModel"},"Recommended Model:")],-1)),c("td",null,[F(c("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedModel","onUpdate:modelValue":e[14]||(e[14]=o=>t.config.recommended_model=o)},null,512),[[_e,t.config.recommended_model]])])]),c("tr",null,[e[30]||(e[30]=c("td",null,[c("label",{class:"dark:bg-black dark:text-primary w-full",for:"dependencies"},"Dependencies:")],-1)),c("td",null,[F(c("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"dependencies","onUpdate:modelValue":e[15]||(e[15]=o=>t.config.dependencies=o)},null,512),[[_e,t.config.dependencies]])])]),c("tr",null,[e[31]||(e[31]=c("td",null,[c("label",{for:"antiPrompts"},"Anti Prompts:")],-1)),c("td",null,[F(c("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"antiPrompts","onUpdate:modelValue":e[16]||(e[16]=o=>t.config.anti_prompts=o)},null,512),[[_e,t.config.anti_prompts]])])])])])])])])])])):Y("",!0)}const UI=bt(dvt,[["render",vvt]]),yvt={data(){return{showPopup:!1,webpageUrl:"https://lollms.com/"}},methods:{show(){this.showPopup=!0},hide(){this.showPopup=!1},save_configuration(){de.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config}).then(n=>{this.isLoading=!1,n.data.status?(this.$store.state.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1)})}}},Evt={key:0,class:"fixed inset-0 flex items-center justify-center z-50"},Svt={class:"popup-container"},xvt=["src"],Tvt={class:"checkbox-container"};function wvt(n,e,t,r,i,s){return T(),Tt(Cs,{name:"fade"},{default:Ge(()=>[i.showPopup?(T(),M("div",Evt,[c("div",Svt,[c("button",{onClick:e[0]||(e[0]=(...o)=>s.hide&&s.hide(...o)),class:"close-button"}," X "),c("iframe",{src:i.webpageUrl,class:"iframe-content"},null,8,xvt),c("div",Tvt,[F(c("input",{type:"checkbox",id:"startup",class:"styled-checkbox","onUpdate:modelValue":e[1]||(e[1]=o=>this.$store.state.config.show_news_panel=o),onChange:e[2]||(e[2]=(...o)=>s.save_configuration&&s.save_configuration(...o))},null,544),[[tt,this.$store.state.config.show_news_panel]]),e[3]||(e[3]=c("label",{for:"startup",class:"checkbox-label"},"Show at startup",-1))])])])):Y("",!0)]),_:1})}const BI=bt(yvt,[["render",wvt],["__scopeId","data-v-d504dfc9"]]),Cvt="/assets/fastapi-BQj-rjUJ.png",Avt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20127.14%2096.36'%3e%3cg%20id='图层_2'%20data-name='图层%202'%3e%3cg%20id='Discord_Logos'%20data-name='Discord%20Logos'%3e%3cg%20id='Discord_Logo_-_Large_-_White'%20data-name='Discord%20Logo%20-%20Large%20-%20White'%3e%3cpath%20d='M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Rvt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3c/circle%3e%3c/svg%3e",Mvt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3canimate%20attributeName='y1'%20values='30;25;30'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3canimate%20attributeName='y2'%20values='15;20;15'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3canimate%20attributeName='cy'%20values='35;30;35'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/circle%3e%3c/svg%3e",Nvt="data:image/svg+xml,%3c?xml%20version='1.0'%20?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20width='800px'%20height='800px'%20viewBox='0%200%2064%2064'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20data-name='Layer%205'%20id='Layer_5'%3e%3cpath%20d='M47,33H17a1,1,0,0,0-1,1c0,9.93,7.18,18,16,18s16-8.07,16-18A1,1,0,0,0,47,33ZM18,35H46a18,18,0,0,1-.67,4H18.71A18,18,0,0,1,18,35ZM26.7,48.8a6.42,6.42,0,0,1,10.6,0,12.3,12.3,0,0,1-10.6,0Zm12.34-1A8.81,8.81,0,0,0,32,44a8.81,8.81,0,0,0-7,3.81A15.56,15.56,0,0,1,19.43,41H44.57A15.56,15.56,0,0,1,39,47.81ZM36,22a1.1,1.1,0,0,1,0-.18,1.17,1.17,0,0,1,.06-.2s0-.05,0-.07a.28.28,0,0,1,.07-.09.71.71,0,0,1,.28-.28s.06-.06.09-.07l10-5a1,1,0,1,1,.9,1.78L39.24,22l8.21,4.11a1,1,0,0,1,.44,1.34A1,1,0,0,1,47,28a.93.93,0,0,1-.45-.11l-10-5h0a1.18,1.18,0,0,1-.28-.22l0-.06a.65.65,0,0,1-.1-.15s0-.05,0-.07a1.17,1.17,0,0,1-.06-.2A1.1,1.1,0,0,1,36,22ZM16.55,26.11,24.76,22l-8.21-4.11a1,1,0,1,1,.9-1.78l10,5s.06.05.09.07a.71.71,0,0,1,.28.28.28.28,0,0,1,.07.09s0,.05,0,.07a1.17,1.17,0,0,1,.06.2.82.82,0,0,1,0,.36,1.17,1.17,0,0,1-.06.2s0,.05,0,.07a.65.65,0,0,1-.1.15.21.21,0,0,0,0,.06,1.18,1.18,0,0,1-.28.22h0l-10,5A.93.93,0,0,1,17,28a1,1,0,0,1-.89-.55A1,1,0,0,1,16.55,26.11ZM60.66,36.45A29.69,29.69,0,0,0,61,32,29,29,0,0,0,3,32a29.69,29.69,0,0,0,.34,4.45,4.65,4.65,0,0,0,2.39,7.82,29,29,0,0,0,52.54,0,4.65,4.65,0,0,0,2.39-7.82ZM4.78,41.58a2.91,2.91,0,0,1-.24-.27A2.62,2.62,0,0,1,4,39.71a.61.61,0,0,1,0-.14,2.58,2.58,0,0,1,.77-1.73,4.38,4.38,0,0,1,.74-.55C7,36.38,10,34.9,12.69,33.67c-1.52,3.3-3.42,7.17-4.17,7.91a2.59,2.59,0,0,1-1.47.72A2.66,2.66,0,0,1,4.78,41.58ZM32,59A27,27,0,0,1,7.92,44.18a4.56,4.56,0,0,0,2-1.18c1.48-1.49,5-9.36,5.66-10.92a1,1,0,0,0-1.32-1.32c-.78.34-3.14,1.39-5.49,2.53-1.29.63-2.58,1.29-3.6,1.88A25.58,25.58,0,0,1,5,32a27,27,0,0,1,54,0,25.58,25.58,0,0,1-.19,3.17c-2.88-1.66-7.88-3.88-9.09-4.41a1,1,0,0,0-1.32,1.32c.69,1.56,4.18,9.43,5.66,10.92a4.56,4.56,0,0,0,2,1.18A27,27,0,0,1,32,59ZM59.46,41.31a2.91,2.91,0,0,1-.24.27A2.66,2.66,0,0,1,57,42.3a2.59,2.59,0,0,1-1.47-.72c-.75-.74-2.65-4.61-4.17-7.91,1.65.76,3.44,1.61,4.91,2.37.91.47,1.7.9,2.26,1.25a4.38,4.38,0,0,1,.74.55A2.58,2.58,0,0,1,60,39.57a.61.61,0,0,1,0,.14A2.62,2.62,0,0,1,59.46,41.31Z'/%3e%3c/g%3e%3c/svg%3e",kvt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512.001%20512.001'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cpath%20d='M256.001,0C114.841,0,0,114.841,0,256.001s114.841,256.001,256.001,256.001S512.001,397.16,512.001,256.001%20S397.16,0,256.001,0z%20M256.001,493.701c-131.069,0-237.702-106.631-237.702-237.7S124.932,18.299,256.001,18.299%20s237.702,106.632,237.702,237.702S387.068,493.701,256.001,493.701z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M371.284,296.658H138.275c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h233.008c5.054,0,9.15-4.097,9.15-9.15%20C380.433,300.754,376.337,296.658,371.284,296.658z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M297.481,330.816h-85.403c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h85.403c5.054,0,9.15-4.097,9.15-9.15%20S302.534,330.816,297.481,330.816z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M146.725,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20c18.666,0,33.852-15.186,33.852-33.852C180.577,208.168,165.391,192.982,146.725,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M365.275,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20s33.852-15.186,33.852-33.852C399.128,208.168,383.942,192.982,365.275,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cg%3e%3ccircle%20cx='155.969'%20cy='219.735'%20r='9.15'/%3e%3ccircle%20cx='374.338'%20cy='219.735'%20r='9.15'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ivt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20299.92%20299.92'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M293.4,65.2H6.52C2.914,65.2,0,68.114,0,71.72v117.36c0,3.606,2.914,6.52,6.52,6.52h6.52v32.6%20c0,3.606,2.914,6.52,6.52,6.52h260.8c3.606,0,6.52-2.914,6.52-6.52v-32.6h6.52c3.606,0,6.52-2.914,6.52-6.52V71.72%20C299.92,68.114,297.006,65.2,293.4,65.2z%20M273.84,221.68h-19.56H228.2h-26.08h-26.08h-26.08h-26.08H97.8H71.72H45.64H26.08V195.6%20h19.56h26.08H97.8h26.08h26.08h26.08h26.08h26.08h26.08h19.56V221.68z%20M286.88,182.56h-6.52H19.56h-6.52V78.24h273.84V182.56z'/%3e%3cpath%20d='M32.6,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H32.6c-3.606,0-6.52,2.914-6.52,6.52%20V163C26.08,166.606,28.994,169.52,32.6,169.52z%20M39.12,104.32H65.2v52.16H39.12V104.32z'/%3e%3cpath%20d='M97.8,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H97.8c-3.606,0-6.52,2.914-6.52,6.52%20V163C91.28,166.606,94.194,169.52,97.8,169.52z%20M104.32,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M163,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H163c-3.606,0-6.52,2.914-6.52,6.52%20V163C156.48,166.606,159.394,169.52,163,169.52z%20M169.52,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M228.2,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H228.2%20c-3.606,0-6.52,2.914-6.52,6.52V163C221.68,166.606,224.594,169.52,228.2,169.52z%20M234.72,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M52.16,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C49.246,221.68,52.16,218.766,52.16,215.16z'/%3e%3cpath%20d='M78.24,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C75.326,221.68,78.24,218.766,78.24,215.16z'/%3e%3cpath%20d='M104.32,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C101.406,221.68,104.32,218.766,104.32,215.16z'/%3e%3cpath%20d='M130.4,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C127.486,221.68,130.4,218.766,130.4,215.16z'/%3e%3cpath%20d='M156.48,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52s-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20S156.48,218.766,156.48,215.16z'/%3e%3cpath%20d='M182.56,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C179.646,221.68,182.56,218.766,182.56,215.16z'/%3e%3cpath%20d='M208.64,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C205.726,221.68,208.64,218.766,208.64,215.16z'/%3e%3cpath%20d='M234.72,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C231.806,221.68,234.72,218.766,234.72,215.16z'/%3e%3cpath%20d='M260.8,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C257.886,221.68,260.8,218.766,260.8,215.16z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ovt="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='green'%20stroke-width='4'%20fill='green'%20/%3e%3cpath%20stroke='white'%20stroke-width='4'%20d='M40%2050%20l10%2010%2020%20-20'%20fill='none'%20/%3e%3c/svg%3e",Dvt="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='red'%20stroke-width='4'%20fill='red'%20/%3e%3cline%20x1='35'%20y1='35'%20x2='65'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3cline%20x1='65'%20y1='35'%20x2='35'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3c/svg%3e",Lvt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20fill='%23000000'%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='800px'%20height='800px'%20viewBox='0%200%20461.759%20461.759'%20xml:space='preserve'%3e%3cg%3e%3cpath%20d='M0,301.058h147.916v147.919H0V301.058z%20M194.432,448.977H342.35V301.058H194.432V448.977z%20M2.802,257.347h147.916V109.434%20H2.802V257.347z%20M325.476,92.219l-51.603-79.437l-79.441,51.601l51.604,79.437L325.476,92.219z%20M219.337,213.733l71.045,62.663%20l62.66-71.039l-71.044-62.669L219.337,213.733z%20M412.107,57.967l-80.668,49.656l49.652,80.666l80.668-49.65L412.107,57.967z'/%3e%3c/g%3e%3c/svg%3e",Pvt="/assets/robot-CQPaMbxU.svg",Fvt="/";de.defaults.baseURL="/";const Uvt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:ay,UniversalForm:Nk},data(){return{bUrl:Fvt,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},mountedPers:{get(){return this.$store.state.mountedPers},set(n){this.$store.commit("setMountedPers",n)}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}}},methods:{async handleOnTalk(){const n=this.mountedPers;console.log("pers:",n),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await de.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const t=this.$store.state.config.personalities.findIndex(i=>i===n.full_path),r={client_id:this.$store.state.client_id,id:t};e=await de.post("/select_personality",r),console.log("Generating message from ",e.data.status),rt.emit("generate_msg_from",{id:-1})}},async remount_personality(){const n=this.mountedPers;if(console.log("Remounting personality ",n),!n)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:n.category,folder:n.folder,language:n.language};console.log("after");const t=await de.post("/remount_personality",e);if(console.log("Remounting personality executed:",t),t)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),t.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(n){try{de.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+n.name,"Save changes","Cancel").then(t=>{try{de.post("/set_active_personality_settings",t).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. `+r,4,!1)})}catch(r){this.$refs.toast.showToast(`Did not get Personality settings responses. - Endpoint error: `+r.message,4,!1)}}):this.$refs.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},async constructor(){for(We(()=>{Ze.replace()});this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100));this.onReady()},async api_get_req(n){try{const e=await de.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=Ny}}},Bvt={class:"relative group/item"},Gvt=["src","alt"],zvt={class:"absolute bottom-6 left-0 w-full flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 p-1"},Vvt={class:"p-1 bg-gray-500 rounded-full text-white hover:bg-gray-600 focus:outline-none ml-1",title:"Show more"},Hvt={class:"text-xs font-bold"};function qvt(n,e,t,r,i,s){const o=ht("UniversalForm");return T(),M(je,null,[c("div",Bvt,[c("button",{onClick:e[1]||(e[1]=J((...a)=>s.onSettingsPersonality&&s.onSettingsPersonality(...a),["prevent"])),class:"w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none"},[c("img",{src:i.bUrl+s.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>s.personalityImgPlacehodler&&s.personalityImgPlacehodler(...a)),alt:s.mountedPers.name,class:qe(["w-full h-full object-cover",{"border-2 border-secondary":n.isActive}])},null,42,Gvt)]),c("div",zvt,[c("button",{onClick:e[2]||(e[2]=J(a=>s.remount_personality(),["prevent"])),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},e[4]||(e[4]=[c("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)])),c("button",{onClick:e[3]||(e[3]=J(a=>s.handleOnTalk(),["prevent"])),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none ml-1",title:"Talk"},e[5]||(e[5]=[c("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)])),c("button",Vvt,[c("span",Hvt,"+"+X(s.mountedPersArr.length-1),1)])])]),W(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const GI=bt(Uvt,[["render",qvt]]),Yvt={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center overflow-hidden"},$vt={class:"absolute inset-0 pointer-events-none overflow-hidden"},Wvt={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},Kvt={class:"mb-8 w-full"},jvt={class:"bottom-0 text-2xl text-gray-600 dark:text-gray-300 italic"},Qvt={class:"text-lg text-gray-700 dark:text-gray-300"},Xvt=["innerHTML"],Zvt={class:"animated-progressbar-bg"},Jvt={class:"w-full max-w-2xl"},eyt={role:"status",class:"w-full"},tyt={class:"text-xl text-gray-700 dark:text-gray-300"},nyt={class:"text-2xl font-bold text-blue-600 dark:text-blue-400 mt-2"},ryt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[15rem] max-w-[15rem]"},iyt={class:"logo-container"},syt=["src"],oyt={class:"toolbar discussion"},ayt={class:"toolbar-container"},lyt={class:"p-4 flex flex-wrap gap-2 items-center"},cyt={class:"relative"},dyt={class:"relative"},uyt={key:4,title:"Loading..",class:"flex justify-center"},pyt={key:5,class:"flex justify-center space-x-4"},hyt={key:6,class:"flex flex-col space-y-2"},myt={class:"relative inline-block"},fyt={class:"p-2 border-b border-gray-200 dark:border-gray-700"},gyt={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},_yt={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},byt=["onClick","title"],vyt=["src","alt"],yyt=["title"],Eyt={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},Syt=["onClick"],xyt={class:"flex space-x-1"},Tyt=["onClick"],wyt=["src","title"],Cyt={class:"relative inline-block"},Ayt={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Ryt={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Myt={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Nyt=["onClick","title"],kyt=["src","alt"],Iyt=["title"],Oyt={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},Dyt=["onClick"],Lyt={class:"flex space-x-1"},Pyt=["onClick"],Fyt=["src","title"],Uyt={class:"relative inline-block"},Byt={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Gyt={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},zyt={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Vyt=["onClick","title"],Hyt=["src","alt"],qyt=["title"],Yyt={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},$yt=["onClick"],Wyt={class:"flex space-x-1"},Kyt=["onClick"],jyt=["onClick"],Qyt=["onClick"],Xyt={class:"w-auto max-w-md mx-auto p-2"},Zyt={class:"flex items-center"},Jyt={class:"relative flex-grow"},eEt={key:0,class:"w-full p-4 bg-bg-light dark:bg-bg-dark"},tEt={class:"flex flex-col space-y-2"},nEt={key:0},rEt={key:1,class:"flex space-x-2"},iEt={key:1,class:"flex space-x-2"},sEt={class:"flex space-x-2"},oEt={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},aEt={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},lEt={class:"flex flex-row panels-color"},cEt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},dEt={key:0,class:"relative flex flex-col flex-grow"},uEt={class:"container pt-4 pb-50 mb-50 w-full"},pEt={key:0,class:"w-full rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col overflow-hidden p-4 pb-2"},hEt={class:"overflow-x-auto flex-grow scrollbar-thin scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-600 scrollbar-track-gray-200 dark:scrollbar-track-gray-800 scrollbar-thumb-rounded-full scrollbar-track-rounded-full"},mEt={class:"flex flex-nowrap gap-6 p-4 min-w-full"},fEt=["title","onClick"],gEt={class:"space-y-3"},_Et=["title"],bEt=["title"],vEt={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},yEt={class:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col"},EEt={class:"flex-1 flex flex-col min-h-0"},SEt={class:"mb-4 p-4 bg-gray-100 dark:bg-gray-700 rounded-lg"},xEt={class:"flex-1 h-[200px] overflow-y-auto scrollbar scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-500 scrollbar-track-gray-200 dark:scrollbar-track-gray-700 scrollbar-thin rounded-md"},TEt={class:"text-base whitespace-pre-wrap"},wEt={class:"flex-1 overflow-y-auto"},CEt={class:"space-y-4"},AEt=["for"],REt=["id","onUpdate:modelValue","placeholder"],MEt=["id","onUpdate:modelValue"],NEt=["id","onUpdate:modelValue"],kEt=["id","onUpdate:modelValue"],IEt={key:4,class:"border rounded-md overflow-hidden"},OEt={class:"bg-gray-200 dark:bg-gray-900 p-2 text-sm"},DEt=["id","onUpdate:modelValue"],LEt=["id","onUpdate:modelValue"],PEt=["value"],FEt={class:"mt-6 flex justify-end space-x-4"},UEt={key:0,class:"flex flex-row items-center justify-center h-10"},BEt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-1/2 bg-bg-light-tone dark:bg-bg-dark-tone h-full"},GEt={ref:"isolatedContent",class:"h-full"},zEt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},VEt={class:"text-2xl animate-pulse mt-2 text-white"},HEt={id:"app"},qEt=n=>{const e=n.replace("[","").replace("]","").split("::"),t=e[0];if(e.length===1)return{label:t,type:"text",fullText:n};const r=e[1],i={label:t,type:r,fullText:n};switch(r){case"int":case"float":case"multiline":break;case"code":i.language=e[2]||"plaintext";break;case"options":i.options=e[2]?e[2].split(",").map(s=>s.trim()):[];break;default:i.type="text"}return i},YEt="/",$Et={setup(){},data(){return{interestingFacts:["Saïph, the new version of LoLLMs, is named after a star in Orion's constellation (Kappa Orionis), representing bright guidance in AI!","Did you know? The first computer programmer was a woman - Ada Lovelace!","Large Language Models (LLMs) have evolved from having millions of parameters to hundreds of billions in just a few years.","LoLLMs (Lord of Large Language Multimodal Systems) is an open-source AI assistant platform created by ParisNeo.","Saïph (κ Orionis) is a blue-white supergiant star approximately 650 light-years away from Earth.","Neural networks were first proposed in 1943 by Warren McCulloch and Walter Pitts.","Modern LLMs like GPT-4 can understand and generate multiple languages, code, and even analyze images.","LoLLMs supports multiple AI models and can perform tasks like code interpretation, image analysis, and internet searches.","The term 'transformer' in AI, which powers most modern LLMs, was introduced in the 'Attention is All You Need' paper in 2017.","LoLLMs can generate various types of diagrams, including SVG, Graphviz, and Mermaid diagrams.","The Python programming language was named after Monty Python.","LoLLMs features a built-in code interpreter that can execute multiple programming languages.","Quantum computers can perform calculations in minutes that would take classical computers thousands of years.","LoLLMs supports multimodal interactions, allowing users to work with both text and images.","The name Saïph in Arabic (سيف) means 'sword', symbolizing cutting-edge AI technology.",'
',"LoLLMs' version naming often contains clever easter eggs and references to AI advancements.","The 'Strawberry' version of LoLLMs was a playful nod to ChatGPT's internal codename for one of its versions.","The 'Saïph' version name was an intentional reference to Orion, anticipating OpenAI's rumored AGI-capable model codenamed 'Orion'.","LoLLMs' evolution can be traced through its version names: Warp, Starship, Robot, Brainwave, Strawberry, Feather and Saïph.","Each LoLLMs version name reflects either technological advancement or pays homage to significant developments in AI.","'Warp' and 'Starship' versions symbolized the quantum leap in AI capabilities and speed improvements.","'Robot' represented the system's growing autonomy and ability to perform complex tasks.","'Brainwave' highlighted the neural network aspects and cognitive capabilities of the system.","LoLLMs' version naming shows ParisNeo's keen awareness of industry trends and playful approach to development.","LoLLMs can generate and visualize mathematical equations using LaTeX, making it a powerful tool for scientific documentation.","The system's multimodel capabilities allow it to analyze medical images, architectural blueprints, and technical diagrams.","LoLLMs includes a unique feature called 'personality system' that allows it to adapt its communication style and expertise.","Did you know? LoLLMs can process and generate music notation using ABC notation or LilyPond formats.","LoLLMs supports over 40 different AI models, making it one of the most versatile open-source AI platforms.","The system can generate realistic 3D scenes descriptions that can be rendered using tools like Blender.","LoLLMs features a unique 'model fusion' capability, combining strengths of different AI models for better results.","The platform includes specialized modules for scientific computing, allowing it to solve complex mathematical problems.","LoLLMs can analyze and generate code in over 20 programming languages, including rare ones like COBOL and Fortran.","The system includes advanced prompt engineering tools, helping users get better results from AI models.","LoLLMs can generate and interpret QR codes, making it useful for creating interactive marketing materials.","The platform supports real-time voice interaction through its advanced speech-to-text and text-to-speech capabilities.","LoLLMs can analyze satellite imagery for environmental monitoring and urban planning applications.","The system includes specialized modules for protein folding prediction and molecular visualization.","LoLLMs features a built-in 'ethical AI' framework that ensures responsible and bias-aware AI interactions.","The platform can generate realistic synthetic data while preserving privacy and maintaining statistical properties.","LoLLMs includes advanced natural language processing capabilities in over 100 languages.","The system can perform sentiment analysis on social media trends and customer feedback in real-time.","LoLLMs features a unique 'time-aware' context system that understands and reasons about temporal relationships.","The platform includes specialized tools for quantum computing simulation and algorithm development."],randomFact:"",showPlaceholderModal:!1,selectedPrompt:"",placeholders:[],placeholderValues:{},previewPrompt:"",uniquePlaceholders:new Map,bindingSearchQuery:"",modelSearchQuery:"",personalitySearchQuery:"",isSearching:!1,isPersonalitiesMenuVisible:!1,isModelsMenuVisible:!1,isBindingsMenuVisible:!1,isMenuVisible:!1,isNavMenuVisible:!1,static_info:Rvt,animated_info:Mvt,normal_mode:kvt,fun_mode:Nvt,is_first_connection:!0,discord:Avt,FastAPI:Cvt,modelImgPlaceholder:wr,customLanguage:"",rebooting_audio:new Audio("rebooting.wav"),connection_lost_audio:new Audio("connection_lost.wav"),connection_recovered_audio:new Audio("connection_recovered.wav"),database_selectorDialogVisible:!1,progress_visibility:!1,progress_value:0,codeBlockStylesheet:"",lastMessageHtml:"",defaultMessageHtml:` + Endpoint error: `+r.message,4,!1)}}):this.$refs.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},async constructor(){for(We(()=>{Ze.replace()});this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100));this.onReady()},async api_get_req(n){try{const e=await de.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=Ny}}},Bvt={class:"relative group/item"},Gvt=["src","alt"],zvt={class:"absolute bottom-6 left-0 w-full flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 p-1"},Vvt={class:"p-1 bg-gray-500 rounded-full text-white hover:bg-gray-600 focus:outline-none ml-1",title:"Show more"},Hvt={class:"text-xs font-bold"};function qvt(n,e,t,r,i,s){const o=ht("UniversalForm");return T(),M(je,null,[c("div",Bvt,[c("button",{onClick:e[1]||(e[1]=J((...a)=>s.onSettingsPersonality&&s.onSettingsPersonality(...a),["prevent"])),class:"w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none"},[c("img",{src:s.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>s.personalityImgPlacehodler&&s.personalityImgPlacehodler(...a)),alt:s.mountedPers.name,class:qe(["w-full h-full object-cover",{"border-2 border-secondary":n.isActive}])},null,42,Gvt)]),c("div",zvt,[c("button",{onClick:e[2]||(e[2]=J(a=>s.remount_personality(),["prevent"])),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},e[4]||(e[4]=[c("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)])),c("button",{onClick:e[3]||(e[3]=J(a=>s.handleOnTalk(),["prevent"])),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none ml-1",title:"Talk"},e[5]||(e[5]=[c("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)])),c("button",Vvt,[c("span",Hvt,"+"+X(s.mountedPersArr.length-1),1)])])]),W(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const GI=bt(Uvt,[["render",qvt]]),Yvt={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center overflow-hidden"},$vt={class:"absolute inset-0 pointer-events-none overflow-hidden"},Wvt={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},Kvt={class:"mb-8 w-full"},jvt={class:"bottom-0 text-2xl text-gray-600 dark:text-gray-300 italic"},Qvt={class:"text-lg text-gray-700 dark:text-gray-300"},Xvt=["innerHTML"],Zvt={class:"animated-progressbar-bg"},Jvt={class:"w-full max-w-2xl"},eyt={role:"status",class:"w-full"},tyt={class:"text-xl text-gray-700 dark:text-gray-300"},nyt={class:"text-2xl font-bold text-blue-600 dark:text-blue-400 mt-2"},ryt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[15rem] max-w-[15rem]"},iyt={class:"logo-container"},syt=["src"],oyt={class:"toolbar discussion"},ayt={class:"toolbar-container"},lyt={class:"p-4 flex flex-wrap gap-2 items-center"},cyt={class:"relative"},dyt={class:"relative"},uyt={key:4,title:"Loading..",class:"flex justify-center"},pyt={key:5,class:"flex justify-center space-x-4"},hyt={key:6,class:"flex flex-col space-y-2"},myt={class:"relative inline-block"},fyt={class:"p-2 border-b border-gray-200 dark:border-gray-700"},gyt={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},_yt={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},byt=["onClick","title"],vyt=["src","alt"],yyt=["title"],Eyt={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},Syt=["onClick"],xyt={class:"flex space-x-1"},Tyt=["onClick"],wyt=["src","title"],Cyt={class:"relative inline-block"},Ayt={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Ryt={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Myt={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Nyt=["onClick","title"],kyt=["src","alt"],Iyt=["title"],Oyt={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},Dyt=["onClick"],Lyt={class:"flex space-x-1"},Pyt=["onClick"],Fyt=["src","title"],Uyt={class:"relative inline-block"},Byt={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Gyt={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},zyt={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Vyt=["onClick","title"],Hyt=["src","alt"],qyt=["title"],Yyt={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},$yt=["onClick"],Wyt={class:"flex space-x-1"},Kyt=["onClick"],jyt=["onClick"],Qyt=["onClick"],Xyt={class:"w-auto max-w-md mx-auto p-2"},Zyt={class:"flex items-center"},Jyt={class:"relative flex-grow"},eEt={key:0,class:"w-full p-4 bg-bg-light dark:bg-bg-dark"},tEt={class:"flex flex-col space-y-2"},nEt={key:0},rEt={key:1,class:"flex space-x-2"},iEt={key:1,class:"flex space-x-2"},sEt={class:"flex space-x-2"},oEt={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},aEt={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},lEt={class:"flex flex-row panels-color"},cEt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},dEt={key:0,class:"relative flex flex-col flex-grow"},uEt={class:"container pt-4 pb-50 mb-50 w-full"},pEt={key:0,class:"w-full rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col overflow-hidden p-4 pb-2"},hEt={class:"overflow-x-auto flex-grow scrollbar-thin scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-600 scrollbar-track-gray-200 dark:scrollbar-track-gray-800 scrollbar-thumb-rounded-full scrollbar-track-rounded-full"},mEt={class:"flex flex-nowrap gap-6 p-4 min-w-full"},fEt=["title","onClick"],gEt={class:"space-y-3"},_Et=["title"],bEt=["title"],vEt={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},yEt={class:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col"},EEt={class:"flex-1 flex flex-col min-h-0"},SEt={class:"mb-4 p-4 bg-gray-100 dark:bg-gray-700 rounded-lg"},xEt={class:"flex-1 h-[200px] overflow-y-auto scrollbar scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-500 scrollbar-track-gray-200 dark:scrollbar-track-gray-700 scrollbar-thin rounded-md"},TEt={class:"text-base whitespace-pre-wrap"},wEt={class:"flex-1 overflow-y-auto"},CEt={class:"space-y-4"},AEt=["for"],REt=["id","onUpdate:modelValue","placeholder"],MEt=["id","onUpdate:modelValue"],NEt=["id","onUpdate:modelValue"],kEt=["id","onUpdate:modelValue"],IEt={key:4,class:"border rounded-md overflow-hidden"},OEt={class:"bg-gray-200 dark:bg-gray-900 p-2 text-sm"},DEt=["id","onUpdate:modelValue"],LEt=["id","onUpdate:modelValue"],PEt=["value"],FEt={class:"mt-6 flex justify-end space-x-4"},UEt={key:0,class:"flex flex-row items-center justify-center h-10"},BEt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-1/2 bg-bg-light-tone dark:bg-bg-dark-tone h-full"},GEt={ref:"isolatedContent",class:"h-full"},zEt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},VEt={class:"text-2xl animate-pulse mt-2 text-white"},HEt={id:"app"},qEt=n=>{const e=n.replace("[","").replace("]","").split("::"),t=e[0];if(e.length===1)return{label:t,type:"text",fullText:n};const r=e[1],i={label:t,type:r,fullText:n};switch(r){case"int":case"float":case"multiline":break;case"code":i.language=e[2]||"plaintext";break;case"options":i.options=e[2]?e[2].split(",").map(s=>s.trim()):[];break;default:i.type="text"}return i},YEt="/",$Et={setup(){},data(){return{interestingFacts:["Saïph, the new version of LoLLMs, is named after a star in Orion's constellation (Kappa Orionis), representing bright guidance in AI!","Did you know? The first computer programmer was a woman - Ada Lovelace!","Large Language Models (LLMs) have evolved from having millions of parameters to hundreds of billions in just a few years.","LoLLMs (Lord of Large Language Multimodal Systems) is an open-source AI assistant platform created by ParisNeo.","Saïph (κ Orionis) is a blue-white supergiant star approximately 650 light-years away from Earth.","Neural networks were first proposed in 1943 by Warren McCulloch and Walter Pitts.","Modern LLMs like GPT-4 can understand and generate multiple languages, code, and even analyze images.","LoLLMs supports multiple AI models and can perform tasks like code interpretation, image analysis, and internet searches.","The term 'transformer' in AI, which powers most modern LLMs, was introduced in the 'Attention is All You Need' paper in 2017.","LoLLMs can generate various types of diagrams, including SVG, Graphviz, and Mermaid diagrams.","The Python programming language was named after Monty Python.","LoLLMs features a built-in code interpreter that can execute multiple programming languages.","Quantum computers can perform calculations in minutes that would take classical computers thousands of years.","LoLLMs supports multimodal interactions, allowing users to work with both text and images.","The name Saïph in Arabic (سيف) means 'sword', symbolizing cutting-edge AI technology.",'
',"LoLLMs' version naming often contains clever easter eggs and references to AI advancements.","The 'Strawberry' version of LoLLMs was a playful nod to ChatGPT's internal codename for one of its versions.","The 'Saïph' version name was an intentional reference to Orion, anticipating OpenAI's rumored AGI-capable model codenamed 'Orion'.","LoLLMs' evolution can be traced through its version names: Warp, Starship, Robot, Brainwave, Strawberry, Feather and Saïph.","Each LoLLMs version name reflects either technological advancement or pays homage to significant developments in AI.","'Warp' and 'Starship' versions symbolized the quantum leap in AI capabilities and speed improvements.","'Robot' represented the system's growing autonomy and ability to perform complex tasks.","'Brainwave' highlighted the neural network aspects and cognitive capabilities of the system.","LoLLMs' version naming shows ParisNeo's keen awareness of industry trends and playful approach to development.","LoLLMs can generate and visualize mathematical equations using LaTeX, making it a powerful tool for scientific documentation.","The system's multimodel capabilities allow it to analyze medical images, architectural blueprints, and technical diagrams.","LoLLMs includes a unique feature called 'personality system' that allows it to adapt its communication style and expertise.","Did you know? LoLLMs can process and generate music notation using ABC notation or LilyPond formats.","LoLLMs supports over 40 different AI models, making it one of the most versatile open-source AI platforms.","The system can generate realistic 3D scenes descriptions that can be rendered using tools like Blender.","LoLLMs features a unique 'model fusion' capability, combining strengths of different AI models for better results.","The platform includes specialized modules for scientific computing, allowing it to solve complex mathematical problems.","LoLLMs can analyze and generate code in over 20 programming languages, including rare ones like COBOL and Fortran.","The system includes advanced prompt engineering tools, helping users get better results from AI models.","LoLLMs can generate and interpret QR codes, making it useful for creating interactive marketing materials.","The platform supports real-time voice interaction through its advanced speech-to-text and text-to-speech capabilities.","LoLLMs can analyze satellite imagery for environmental monitoring and urban planning applications.","The system includes specialized modules for protein folding prediction and molecular visualization.","LoLLMs features a built-in 'ethical AI' framework that ensures responsible and bias-aware AI interactions.","The platform can generate realistic synthetic data while preserving privacy and maintaining statistical properties.","LoLLMs includes advanced natural language processing capabilities in over 100 languages.","The system can perform sentiment analysis on social media trends and customer feedback in real-time.","LoLLMs features a unique 'time-aware' context system that understands and reasons about temporal relationships.","The platform includes specialized tools for quantum computing simulation and algorithm development."],randomFact:"",showPlaceholderModal:!1,selectedPrompt:"",placeholders:[],placeholderValues:{},previewPrompt:"",uniquePlaceholders:new Map,bindingSearchQuery:"",modelSearchQuery:"",personalitySearchQuery:"",isSearching:!1,isPersonalitiesMenuVisible:!1,isModelsMenuVisible:!1,isBindingsMenuVisible:!1,isMenuVisible:!1,isNavMenuVisible:!1,static_info:Rvt,animated_info:Mvt,normal_mode:kvt,fun_mode:Nvt,is_first_connection:!0,discord:Avt,FastAPI:Cvt,modelImgPlaceholder:wr,customLanguage:"",rebooting_audio:new Audio("rebooting.wav"),connection_lost_audio:new Audio("connection_lost.wav"),connection_recovered_audio:new Audio("connection_recovered.wav"),database_selectorDialogVisible:!1,progress_visibility:!1,progress_value:0,codeBlockStylesheet:"",lastMessageHtml:"",defaultMessageHtml:` diff --git a/web/dist/assets/logo-B22RoIQ8.png b/web/dist/assets/logo-B22RoIQ8.png new file mode 100644 index 00000000..ea27c674 Binary files /dev/null and b/web/dist/assets/logo-B22RoIQ8.png differ diff --git a/web/dist/assets/logo-PeTRk_ya.png b/web/dist/assets/logo-PeTRk_ya.png deleted file mode 100644 index 29b0ff12..00000000 Binary files a/web/dist/assets/logo-PeTRk_ya.png and /dev/null differ diff --git a/web/dist/index.html b/web/dist/index.html index edc907c6..20515035 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -6,7 +6,7 @@ LoLLMS WebUI - + diff --git a/web/src/assets/default_model.png b/web/src/assets/default_model.png index 29b0ff12..ea27c674 100644 Binary files a/web/src/assets/default_model.png and b/web/src/assets/default_model.png differ diff --git a/web/src/assets/logo.png b/web/src/assets/logo.png index 29b0ff12..ea27c674 100644 Binary files a/web/src/assets/logo.png and b/web/src/assets/logo.png differ diff --git a/web/src/components/MountedPersonalities.vue b/web/src/components/MountedPersonalities.vue index 39bd8519..2de49ae4 100644 --- a/web/src/components/MountedPersonalities.vue +++ b/web/src/components/MountedPersonalities.vue @@ -1,7 +1,7 @@