${t}
@@ -77,8 +77,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`),me=F,le=W),ne===void 0
`?(this.text=this.text.slice(0,e)+"```"+t+`
`+this.text.slice(e,n)+"\n```\n"+this.text.slice(n),e=e+4+t.length):(this.text=this.text.slice(0,e)+"\n```"+t+`
`+this.text.slice(e,n)+"\n```\n"+this.text.slice(n),e=e+3+t.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},insertTab(t){const e=t.target,n=e.selectionStart,s=e.selectionEnd,i=e.value.substring(0,n),r=e.value.substring(s),o=i+" "+r;this.text=o,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4}),t.preventDefault()},mdTextarea_changed(){console.log("mdTextarea_changed"),this.cursorPosition=this.$refs.mdTextarea.selectionStart},mdTextarea_clicked(){console.log(`mdTextarea_clicked: ${this.$refs.mdTextarea.selectionStart}`),this.cursorPosition=this.$refs.mdTextarea.selectionStart},setModel(){this.selecting_model=!0,ae.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:this.selectedModel}).then(t=>{console.log(t),t.status&&this.$refs.toast.showToast(`Model changed to ${this.selectedModel}`,4,!0),this.selecting_model=!1}).catch(t=>{this.$refs.toast.showToast(`Error ${t}`,4,!0),this.selecting_model=!1})},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){console.log("READING..."),this.isSynthesizingVoice=!0;let t=this.$refs.mdTextarea.selectionStart,e=this.$refs.mdTextarea.selectionEnd,n=this.text;t!=e&&(n=n.slice(t,e)),ae.post("./text2Wave",{client_id:this.$store.state.client_id,text:n}).then(s=>{console.log(s.data.url);let i=s.data.url;this.audio_url=i,this.isSynthesizingVoice=!1,Le(()=>{ze.replace()})}).catch(s=>{this.$refs.toast.showToast(`Error: ${s}`,4,!1),this.isSynthesizingVoice=!1,Le(()=>{ze.replace()})})},speak(){if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let t=0;console.log("voice on"),this.isSpeaking=!0;const e=200;this.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(i=>i.name===this.$store.state.config.audio_out_voice)[0]);const n=i=>{let r=this.text.substring(i,i+e);const o=[".","!","?",`
-`];let a=-1;return o.forEach(c=>{const d=r.lastIndexOf(c);d>a&&(a=d)}),a==-1&&(a=r.length),console.log(a),a+i+1},s=()=>{const i=n(t),r=this.text.substring(t,i);this.msg.text=r,t=i+1,this.msg.onend=o=>{t
{s()},1):(this.isSpeaking=!1,console.log("voice off :",this.text.length," ",i))},this.speechSynthesis.speak(this.msg)};s()},getCursorPosition(){return this.$refs.mdTextarea.selectionStart},appendToOutput(t){this.pre_text+=t,this.text=this.pre_text+this.post_text},generate_in_placeholder(){console.log("Finding cursor position");let t=this.text.indexOf("@@");if(t<0){this.$refs.toast.showToast("No generation placeholder found",4,!1);return}this.text=this.text.substring(0,t)+this.text.substring(t+26,this.text.length),this.pre_text=this.text.substring(0,t),this.post_text=this.text.substring(t,this.text.length);var e=this.text.substring(0,t);console.log(e),qe.emit("generate_text",{prompt:e,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},async tokenize_text(){const t=await ae.post("/lollms_tokenize",{prompt:this.text},{headers:this.posts_headers});console.log(t.data.named_tokens),this.namedTokens=t.data.named_tokens},generate(){console.log("Finding cursor position"),this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length);var t=this.text.substring(0,this.getCursorPosition());console.log(this.text),console.log(`cursor position :${this.getCursorPosition()}`),console.log(`pretext:${this.pre_text}`),console.log(`post_text:${this.post_text}`),console.log(`prompt:${t}`),qe.emit("generate_text",{prompt:t,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},stopGeneration(){qe.emit("cancel_text_generation",{})},exportText(){const t=this.text,e=document.createElement("a"),n=new Blob([t],{type:"text/plain"});e.href=URL.createObjectURL(n),e.download="exported_text.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)},importText(){const t=document.getElementById("import-input");t&&(t.addEventListener("change",e=>{if(e.target.files&&e.target.files[0]){const n=new FileReader;n.onload=()=>{this.text=n.result},n.readAsText(e.target.files[0])}else alert("Please select a file.")}),t.click())},setPreset(){console.log("Setting preset"),console.log(this.selectedPreset),this.tab_id="render",this.text=Qet(this.selectedPreset.content,t=>{console.log("Done"),console.log(t),this.text=t})},addPreset(){let t=prompt("Enter the title of the preset:");this.presets[t]={client_id:this.$store.state.client_id,name:t,content:this.text},ae.post("./add_preset",this.presets[t]).then(e=>{console.log(e.data)}).catch(e=>{this.$refs.toast.showToast(`Error: ${e}`,4,!1)})},removePreset(){this.selectedPreset&&delete this.presets[this.selectedPreset.name]},reloadPresets(){ae.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecording(){this.pending=!0,this.is_recording?ae.post("/stop_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!1,this.pending=!1,console.log(t),this.text+=t.data.text,console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):ae.post("/start_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!0,this.pending=!1,console.log(t.data)}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecordingAndTranscribing(){this.pending=!0,this.is_deaf_transcribing?ae.get("/stop_recording").then(t=>{this.is_deaf_transcribing=!1,this.pending=!1,this.text=t.data.text,this.read()}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):ae.get("/start_recording").then(t=>{this.is_deaf_transcribing=!0,this.pending=!1}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},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.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length),this.recognition.onresult=t=>{this.generated="";for(let e=t.resultIndex;e{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,this.pre_text=this.pre_text+this.generated,this.cursorPosition=this.pre_text.length,clearTimeout(this.silenceTimer)},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")}}},Zet={class:"container w-full background-color shadow-lg 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"},Jet={class:"container flex flex-row m-2 w-full"},ett={class:"flex-grow w-full m-2"},ttt={class:"flex panels-color gap-3 flex-1 items-center flex-grow flex-row rounded-md border-2 border-blue-300 m-2 p-4"},ntt={class:"flex items-center space-x-2"},stt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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),itt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"})],-1),rtt=["src"],ott=l("span",{class:"w-80"},null,-1),att=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),ltt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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),ctt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15.536a5 5 0 001.414 1.414m2.828-9.9a9 9 0 012.828-2.828"})],-1),dtt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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),utt=["src"],ptt=["src"],_tt=["src"],htt=["src"],ftt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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),mtt={key:1,class:"w-6 h-6"},gtt=l("svg",{class:"animate-spin h-5 w-5 text-secondary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("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),btt=[gtt],Ett=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),ytt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1),vtt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1),Stt={class:"flex gap-3 flex-1 items-center flex-grow justify-end"},Ttt=l("input",{type:"file",id:"import-input",class:"hidden"},null,-1),xtt={key:0},Ctt=["src"],wtt={key:2},Rtt={key:0,class:"settings scrollbar bg-white dark:bg-gray-800 rounded-lg shadow-md p-6"},Att=l("h2",{class:"text-2xl font-bold text-gray-900 dark:text-white mb-4"},"Settings",-1),Ntt=["value"],Ott={key:0,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},Mtt=l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Selecting model...")],-1),Itt=[Mtt],ktt=["value"],Dtt=l("br",null,null,-1),Ltt=l("i",{"data-feather":"check"},null,-1),Ptt=[Ltt],Ftt=l("i",{"data-feather":"plus"},null,-1),Utt=[Ftt],Btt=l("i",{"data-feather":"x"},null,-1),Gtt=[Btt],Vtt=l("i",{"data-feather":"refresh-ccw"},null,-1),ztt=[Vtt],Htt={class:"slider-container ml-2 mr-2"},qtt=l("h3",{class:"text-gray-600"},"Temperature",-1),$tt={class:"slider-value text-gray-500"},Ytt={class:"slider-container ml-2 mr-2"},Wtt=l("h3",{class:"text-gray-600"},"Top K",-1),Ktt={class:"slider-value text-gray-500"},jtt={class:"slider-container ml-2 mr-2"},Qtt=l("h3",{class:"text-gray-600"},"Top P",-1),Xtt={class:"slider-value text-gray-500"},Ztt={class:"slider-container ml-2 mr-2"},Jtt=l("h3",{class:"text-gray-600"},"Repeat Penalty",-1),ent={class:"slider-value text-gray-500"},tnt={class:"slider-container ml-2 mr-2"},nnt=l("h3",{class:"text-gray-600"},"Repeat Last N",-1),snt={class:"slider-value text-gray-500"},int={class:"slider-container ml-2 mr-2"},rnt=l("h3",{class:"text-gray-600"},"Number of tokens to crop the text to",-1),ont={class:"slider-value text-gray-500"},ant={class:"slider-container ml-2 mr-2"},lnt=l("h3",{class:"text-gray-600"},"Number of tokens to generate",-1),cnt={class:"slider-value text-gray-500"},dnt={class:"slider-container ml-2 mr-2"},unt=l("h3",{class:"text-gray-600"},"Seed",-1),pnt={class:"slider-value text-gray-500"};function _nt(t,e,n,s,i,r){const o=tt("ChatBarButton"),a=tt("ToolbarButton"),c=tt("DropdownSubmenu"),d=tt("DropdownMenu"),u=tt("tokens-hilighter"),h=tt("MarkdownRenderer"),f=tt("Card"),m=tt("Toast");return T(),x(Fe,null,[l("div",Zet,[l("div",Jet,[l("div",ett,[l("div",ttt,[l("div",ntt,[P(V(o,{onClick:r.generate,title:"Generate from the current cursor position"},{icon:Ie(()=>[stt]),_:1},8,["onClick"]),[[wt,!i.generating]]),P(V(o,{onClick:r.generate_in_placeholder,title:"Generate from the next placeholder"},{icon:Ie(()=>[itt]),_:1},8,["onClick"]),[[wt,!i.generating]]),P(V(o,{onClick:r.tokenize_text,title:"Tokenize the text"},{icon:Ie(()=>[l("img",{src:i.tokenize_icon,alt:"Tokenize",class:"h-5 w-5"},null,8,rtt)]),_:1},8,["onClick"]),[[wt,!i.generating]]),ott,P(V(o,{onClick:r.stopGeneration,title:"Stop generation"},{icon:Ie(()=>[att]),_:1},8,["onClick"]),[[wt,i.generating]]),V(o,{onClick:r.startSpeechRecognition,class:Ge({"text-red-500":t.isListeningToVoice}),title:"Dictate (using your browser's transcription)"},{icon:Ie(()=>[ltt]),_:1},8,["onClick","class"]),V(o,{onClick:r.speak,class:Ge({"text-red-500":r.isTalking}),title:"Convert text to audio (not saved, uses your browser's TTS service)"},{icon:Ie(()=>[ctt]),_:1},8,["onClick","class"]),V(o,{onClick:r.triggerFileUpload,title:"Upload a voice"},{icon:Ie(()=>[dtt]),_:1},8,["onClick"]),V(o,{onClick:r.startRecordingAndTranscribing,class:Ge({"text-green-500":i.isLesteningToVoice}),title:"Start audio to audio"},{icon:Ie(()=>[i.pending?(T(),x("img",{key:1,src:i.loading_icon,alt:"Loading",class:"h-5 w-5"},null,8,ptt)):(T(),x("img",{key:0,src:i.is_deaf_transcribing?i.deaf_on:i.deaf_off,alt:"Deaf",class:"h-5 w-5"},null,8,utt))]),_:1},8,["onClick","class"]),V(o,{onClick:r.startRecording,class:Ge({"text-green-500":i.isLesteningToVoice}),title:"Start audio recording"},{icon:Ie(()=>[i.pending?(T(),x("img",{key:1,src:i.loading_icon,alt:"Loading",class:"h-5 w-5"},null,8,htt)):(T(),x("img",{key:0,src:i.is_recording?i.rec_on:i.rec_off,alt:"Record",class:"h-5 w-5"},null,8,_tt))]),_:1},8,["onClick","class"]),i.isSynthesizingVoice?(T(),x("div",mtt,btt)):(T(),dt(o,{key:0,onClick:r.read,title:"Generate audio from text"},{icon:Ie(()=>[ftt]),_:1},8,["onClick"])),P(V(o,{onClick:r.exportText,title:"Export text"},{icon:Ie(()=>[Ett]),_:1},8,["onClick"]),[[wt,!i.generating]]),P(V(o,{onClick:r.importText,title:"Import text"},{icon:Ie(()=>[ytt]),_:1},8,["onClick"]),[[wt,!i.generating]]),V(o,{onClick:e[0]||(e[0]=_=>i.showSettings=!i.showSettings),title:"Settings"},{icon:Ie(()=>[vtt]),_:1})]),l("input",{type:"file",ref:"fileInput",onChange:e[1]||(e[1]=(..._)=>r.handleFileUpload&&r.handleFileUpload(..._)),style:{display:"none"},accept:".wav"},null,544),l("div",Stt,[l("button",{class:Ge(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="source"}]),onClick:e[2]||(e[2]=_=>i.tab_id="source")}," Source ",2),l("button",{class:Ge(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="render"}]),onClick:e[3]||(e[3]=_=>i.tab_id="render")}," Render ",2)]),Ttt]),l("div",{class:Ge(["flex-grow m-2 p-2 border panels-color border-blue-300 rounded-md",{"border-red-500":i.generating}])},[i.tab_id==="source"?(T(),x("div",xtt,[V(d,{title:"Add Block"},{default:Ie(()=>[V(c,{title:"Programming Languages",icon:"code"},{default:Ie(()=>[V(a,{onClick:e[4]||(e[4]=j(_=>r.addBlock("python"),["stop"])),title:"Python",icon:"python"}),V(a,{onClick:e[5]||(e[5]=j(_=>r.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),V(a,{onClick:e[6]||(e[6]=j(_=>r.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),V(a,{onClick:e[7]||(e[7]=j(_=>r.addBlock("java"),["stop"])),title:"Java",icon:"java"}),V(a,{onClick:e[8]||(e[8]=j(_=>r.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),V(a,{onClick:e[9]||(e[9]=j(_=>r.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),V(a,{onClick:e[10]||(e[10]=j(_=>r.addBlock("go"),["stop"])),title:"Go",icon:"go"}),V(a,{onClick:e[11]||(e[11]=j(_=>r.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),V(a,{onClick:e[12]||(e[12]=j(_=>r.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),V(a,{onClick:e[13]||(e[13]=j(_=>r.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),V(a,{onClick:e[14]||(e[14]=j(_=>r.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),V(c,{title:"Web Technologies",icon:"web"},{default:Ie(()=>[V(a,{onClick:e[15]||(e[15]=j(_=>r.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),V(a,{onClick:e[16]||(e[16]=j(_=>r.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),V(a,{onClick:e[17]||(e[17]=j(_=>r.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),V(a,{onClick:e[18]||(e[18]=j(_=>r.addBlock("react"),["stop"])),title:"React",icon:"react"}),V(a,{onClick:e[19]||(e[19]=j(_=>r.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),V(c,{title:"Markup and Data",icon:"file-code"},{default:Ie(()=>[V(a,{onClick:e[20]||(e[20]=j(_=>r.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),V(a,{onClick:e[21]||(e[21]=j(_=>r.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),V(a,{onClick:e[22]||(e[22]=j(_=>r.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),V(a,{onClick:e[23]||(e[23]=j(_=>r.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),V(a,{onClick:e[24]||(e[24]=j(_=>r.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),V(c,{title:"Scripting and Shell",icon:"terminal"},{default:Ie(()=>[V(a,{onClick:e[25]||(e[25]=j(_=>r.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),V(a,{onClick:e[26]||(e[26]=j(_=>r.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),V(a,{onClick:e[27]||(e[27]=j(_=>r.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),V(c,{title:"Diagramming",icon:"sitemap"},{default:Ie(()=>[V(a,{onClick:e[28]||(e[28]=j(_=>r.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),V(a,{onClick:e[29]||(e[29]=j(_=>r.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),V(a,{onClick:e[30]||(e[30]=j(_=>r.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),V(c,{title:"Database",icon:"database"},{default:Ie(()=>[V(a,{onClick:e[31]||(e[31]=j(_=>r.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),V(a,{onClick:e[32]||(e[32]=j(_=>r.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),V(a,{onClick:e[33]||(e[33]=j(_=>r.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1}),V(a,{onClick:e[34]||(e[34]=j(_=>t.copyContentToClipboard(),["stop"])),title:"Copy message to clipboard",icon:"copy"}),P(l("textarea",{ref:"mdTextarea",onKeydown:e[35]||(e[35]=zs(j((..._)=>r.insertTab&&r.insertTab(..._),["prevent"]),["tab"])),class:"block min-h-500 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,style:Ht({minHeight:i.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[36]||(e[36]=_=>i.text=_),onClick:e[37]||(e[37]=j((..._)=>r.mdTextarea_clicked&&r.mdTextarea_clicked(..._),["prevent"])),onChange:e[38]||(e[38]=j((..._)=>r.mdTextarea_changed&&r.mdTextarea_changed(..._),["prevent"]))},`\r
- `,36),[[pe,i.text]]),l("span",null,"Cursor position "+K(i.cursorPosition),1)])):G("",!0),i.audio_url!=null?(T(),x("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,Ctt),et(" Your browser does not support the audio element. ")])):G("",!0),V(u,{namedTokens:i.namedTokens},null,8,["namedTokens"]),i.tab_id==="render"?(T(),x("div",wtt,[V(h,{ref:"mdRender",client_id:this.$store.state.client_id,message_id:0,discussion_id:0,"markdown-text":i.text,class:"mt-4 p-2 rounded shadow-lg dark:bg-bg-dark"},null,8,["client_id","markdown-text"])])):G("",!0)],2)]),i.showSettings?(T(),x("div",Rtt,[Att,V(f,{title:"Model",class:"slider-container ml-0 mr-0",isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[P(l("select",{"onUpdate:modelValue":e[39]||(e[39]=_=>this.$store.state.selectedModel=_),onChange:e[40]||(e[40]=(..._)=>r.setModel&&r.setModel(..._)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),x(Fe,null,Ke(r.models,_=>(T(),x("option",{key:_,value:_},K(_),9,Ntt))),128))],544),[[Dt,this.$store.state.selectedModel]]),i.selecting_model?(T(),x("div",Ott,Itt)):G("",!0)]),_:1}),V(f,{title:"Presets",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[P(l("select",{"onUpdate:modelValue":e[41]||(e[41]=_=>i.selectedPreset=_),class:"bg-white dark:bg-black mb-2 border-2 rounded-md shadow-sm w-full"},[(T(!0),x(Fe,null,Ke(i.presets,_=>(T(),x("option",{key:_,value:_},K(_.name),9,ktt))),128))],512),[[Dt,i.selectedPreset]]),Dtt,l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[42]||(e[42]=(..._)=>r.setPreset&&r.setPreset(..._)),title:"Use preset"},Ptt),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[43]||(e[43]=(..._)=>r.addPreset&&r.addPreset(..._)),title:"Add this text as a preset"},Utt),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[44]||(e[44]=(..._)=>r.removePreset&&r.removePreset(..._)),title:"Remove preset"},Gtt),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[45]||(e[45]=(..._)=>r.reloadPresets&&r.reloadPresets(..._)),title:"Reload presets list"},ztt)]),_:1}),V(f,{title:"Generation params",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[l("div",Htt,[qtt,P(l("input",{type:"range","onUpdate:modelValue":e[46]||(e[46]=_=>i.temperature=_),min:"0",max:"5",step:"0.1",class:"w-full"},null,512),[[pe,i.temperature]]),l("span",$tt,"Current value: "+K(i.temperature),1)]),l("div",Ytt,[Wtt,P(l("input",{type:"range","onUpdate:modelValue":e[47]||(e[47]=_=>i.top_k=_),min:"1",max:"100",step:"1",class:"w-full"},null,512),[[pe,i.top_k]]),l("span",Ktt,"Current value: "+K(i.top_k),1)]),l("div",jtt,[Qtt,P(l("input",{type:"range","onUpdate:modelValue":e[48]||(e[48]=_=>i.top_p=_),min:"0",max:"1",step:"0.1",class:"w-full"},null,512),[[pe,i.top_p]]),l("span",Xtt,"Current value: "+K(i.top_p),1)]),l("div",Ztt,[Jtt,P(l("input",{type:"range","onUpdate:modelValue":e[49]||(e[49]=_=>i.repeat_penalty=_),min:"0",max:"5",step:"0.1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.repeat_penalty]]),l("span",ent,"Current value: "+K(i.repeat_penalty),1)]),l("div",tnt,[nnt,P(l("input",{type:"range","onUpdate:modelValue":e[50]||(e[50]=_=>i.repeat_last_n=_),min:"0",max:"100",step:"1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.repeat_last_n]]),l("span",snt,"Current value: "+K(i.repeat_last_n),1)]),l("div",int,[rnt,P(l("input",{type:"number","onUpdate:modelValue":e[51]||(e[51]=_=>i.n_crop=_),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.n_crop]]),l("span",ont,"Current value: "+K(i.n_crop),1)]),l("div",ant,[lnt,P(l("input",{type:"number","onUpdate:modelValue":e[52]||(e[52]=_=>i.n_predicts=_),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.n_predicts]]),l("span",cnt,"Current value: "+K(i.n_predicts),1)]),l("div",dnt,[unt,P(l("input",{type:"number","onUpdate:modelValue":e[53]||(e[53]=_=>i.seed=_),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.seed]]),l("span",pnt,"Current value: "+K(i.seed),1)])]),_:1})])):G("",!0)])]),V(m,{ref:"toast"},null,512)],64)}const hnt=ot(Xet,[["render",_nt]]);const fnt={data(){return{activeExtension:null}},computed:{activeExtensions(){return console.log(this.$store.state.extensionsZoo),console.log(BO(this.$store.state.extensionsZoo)),this.$store.state.extensionsZoo}},methods:{showExtensionPage(t){this.activeExtension=t}}},mnt={class:"container overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll w-full 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"},gnt={key:0},bnt=["onClick"],Ent={key:0},ynt=["src"],vnt={key:1},Snt=l("p",null,"No extension is active. Please install and activate an extension.",-1),Tnt=[Snt];function xnt(t,e,n,s,i,r){return T(),x("div",mnt,[r.activeExtensions.length>0?(T(),x("div",gnt,[(T(!0),x(Fe,null,Ke(r.activeExtensions,o=>(T(),x("div",{key:o.name,onClick:a=>r.showExtensionPage(o)},[l("div",{class:Ge({"active-tab":o===i.activeExtension})},K(o.name),3)],8,bnt))),128)),i.activeExtension?(T(),x("div",Ent,[l("iframe",{src:i.activeExtension.page,width:"100%",height:"500px",frameborder:"0"},null,8,ynt)])):G("",!0)])):(T(),x("div",vnt,Tnt))])}const Cnt=ot(fnt,[["render",xnt]]);const wnt={data(){return{sections:[{id:"introduction",title:"Introduction",content:`
+`];let a=-1;return o.forEach(c=>{const d=r.lastIndexOf(c);d>a&&(a=d)}),a==-1&&(a=r.length),console.log(a),a+i+1},s=()=>{const i=n(t),r=this.text.substring(t,i);this.msg.text=r,t=i+1,this.msg.onend=o=>{t{s()},1):(this.isSpeaking=!1,console.log("voice off :",this.text.length," ",i))},this.speechSynthesis.speak(this.msg)};s()},getCursorPosition(){return this.$refs.mdTextarea.selectionStart},appendToOutput(t){this.pre_text+=t,this.text=this.pre_text+this.post_text},generate_in_placeholder(){console.log("Finding cursor position");let t=this.text.indexOf("@@");if(t<0){this.$refs.toast.showToast("No generation placeholder found",4,!1);return}this.text=this.text.substring(0,t)+this.text.substring(t+26,this.text.length),this.pre_text=this.text.substring(0,t),this.post_text=this.text.substring(t,this.text.length);var e=this.text.substring(0,t);console.log(e),qe.emit("generate_text",{prompt:e,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},async tokenize_text(){const t=await ae.post("/lollms_tokenize",{prompt:this.text},{headers:this.posts_headers});console.log(t.data.named_tokens),this.namedTokens=t.data.named_tokens},generate(){console.log("Finding cursor position"),this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length);var t=this.text.substring(0,this.getCursorPosition());console.log(this.text),console.log(`cursor position :${this.getCursorPosition()}`),console.log(`pretext:${this.pre_text}`),console.log(`post_text:${this.post_text}`),console.log(`prompt:${t}`),qe.emit("generate_text",{prompt:t,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},stopGeneration(){qe.emit("cancel_text_generation",{})},exportText(){const t=this.text,e=document.createElement("a"),n=new Blob([t],{type:"text/plain"});e.href=URL.createObjectURL(n),e.download="exported_text.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)},importText(){const t=document.getElementById("import-input");t&&(t.addEventListener("change",e=>{if(e.target.files&&e.target.files[0]){const n=new FileReader;n.onload=()=>{this.text=n.result},n.readAsText(e.target.files[0])}else alert("Please select a file.")}),t.click())},setPreset(){console.log("Setting preset"),console.log(this.selectedPreset),this.tab_id="render",this.text=Qet(this.selectedPreset.content,t=>{console.log("Done"),console.log(t),this.text=t})},addPreset(){let t=prompt("Enter the title of the preset:");this.presets[t]={client_id:this.$store.state.client_id,name:t,content:this.text},ae.post("./add_preset",this.presets[t]).then(e=>{console.log(e.data)}).catch(e=>{this.$refs.toast.showToast(`Error: ${e}`,4,!1)})},removePreset(){this.selectedPreset&&delete this.presets[this.selectedPreset.name]},reloadPresets(){ae.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecording(){this.pending=!0,this.is_recording?ae.post("/stop_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!1,this.pending=!1,console.log(t),this.text+=t.data.text,console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):ae.post("/start_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!0,this.pending=!1,console.log(t.data)}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecordingAndTranscribing(){this.pending=!0,this.is_deaf_transcribing?ae.get("/stop_recording").then(t=>{this.is_deaf_transcribing=!1,this.pending=!1,this.text=t.data.text,this.read()}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):ae.get("/start_recording").then(t=>{this.is_deaf_transcribing=!0,this.pending=!1}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},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.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length),this.recognition.onresult=t=>{this.generated="";for(let e=t.resultIndex;e{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,this.pre_text=this.pre_text+this.generated,this.cursorPosition=this.pre_text.length,clearTimeout(this.silenceTimer)},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")}}},Zet={class:"container w-full background-color shadow-lg 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"},Jet={class:"container flex flex-row m-2 w-full"},ett={class:"flex-grow w-full m-2"},ttt={class:"flex panels-color gap-3 flex-1 items-center flex-grow flex-row rounded-md border-2 border-blue-300 m-2 p-4"},ntt={class:"flex items-center space-x-2"},stt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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),itt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"})],-1),rtt=["src"],ott=l("span",{class:"w-80"},null,-1),att=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),ltt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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),ctt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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),dtt=["src"],utt=["src"],ptt=["src"],_tt=["src"],htt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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),ftt={key:1,class:"w-6 h-6"},mtt=l("svg",{class:"animate-spin h-5 w-5 text-secondary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("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),gtt=[mtt],btt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),Ett=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1),ytt=l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1),vtt={class:"flex gap-3 flex-1 items-center flex-grow justify-end"},Stt=l("input",{type:"file",id:"import-input",class:"hidden"},null,-1),Ttt={key:0},xtt=["src"],Ctt={key:2},wtt={key:0,class:"settings scrollbar bg-white dark:bg-gray-800 rounded-lg shadow-md p-6"},Rtt=l("h2",{class:"text-2xl font-bold text-gray-900 dark:text-white mb-4"},"Settings",-1),Att=["value"],Ntt={key:0,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},Ott=l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Selecting model...")],-1),Mtt=[Ott],Itt=["value"],ktt=l("br",null,null,-1),Dtt=l("i",{"data-feather":"check"},null,-1),Ltt=[Dtt],Ptt=l("i",{"data-feather":"plus"},null,-1),Ftt=[Ptt],Utt=l("i",{"data-feather":"x"},null,-1),Btt=[Utt],Gtt=l("i",{"data-feather":"refresh-ccw"},null,-1),Vtt=[Gtt],ztt={class:"slider-container ml-2 mr-2"},Htt=l("h3",{class:"text-gray-600"},"Temperature",-1),qtt={class:"slider-value text-gray-500"},$tt={class:"slider-container ml-2 mr-2"},Ytt=l("h3",{class:"text-gray-600"},"Top K",-1),Wtt={class:"slider-value text-gray-500"},Ktt={class:"slider-container ml-2 mr-2"},jtt=l("h3",{class:"text-gray-600"},"Top P",-1),Qtt={class:"slider-value text-gray-500"},Xtt={class:"slider-container ml-2 mr-2"},Ztt=l("h3",{class:"text-gray-600"},"Repeat Penalty",-1),Jtt={class:"slider-value text-gray-500"},ent={class:"slider-container ml-2 mr-2"},tnt=l("h3",{class:"text-gray-600"},"Repeat Last N",-1),nnt={class:"slider-value text-gray-500"},snt={class:"slider-container ml-2 mr-2"},int=l("h3",{class:"text-gray-600"},"Number of tokens to crop the text to",-1),rnt={class:"slider-value text-gray-500"},ont={class:"slider-container ml-2 mr-2"},ant=l("h3",{class:"text-gray-600"},"Number of tokens to generate",-1),lnt={class:"slider-value text-gray-500"},cnt={class:"slider-container ml-2 mr-2"},dnt=l("h3",{class:"text-gray-600"},"Seed",-1),unt={class:"slider-value text-gray-500"};function pnt(t,e,n,s,i,r){const o=tt("ChatBarButton"),a=tt("ToolbarButton"),c=tt("DropdownSubmenu"),d=tt("DropdownMenu"),u=tt("tokens-hilighter"),h=tt("MarkdownRenderer"),f=tt("Card"),m=tt("Toast");return T(),x(Fe,null,[l("div",Zet,[l("div",Jet,[l("div",ett,[l("div",ttt,[l("div",ntt,[P(V(o,{onClick:r.generate,title:"Generate from the current cursor position"},{icon:Ie(()=>[stt]),_:1},8,["onClick"]),[[wt,!i.generating]]),P(V(o,{onClick:r.generate_in_placeholder,title:"Generate from the next placeholder"},{icon:Ie(()=>[itt]),_:1},8,["onClick"]),[[wt,!i.generating]]),P(V(o,{onClick:r.tokenize_text,title:"Tokenize the text"},{icon:Ie(()=>[l("img",{src:i.tokenize_icon,alt:"Tokenize",class:"h-5 w-5"},null,8,rtt)]),_:1},8,["onClick"]),[[wt,!i.generating]]),ott,P(V(o,{onClick:r.stopGeneration,title:"Stop generation"},{icon:Ie(()=>[att]),_:1},8,["onClick"]),[[wt,i.generating]]),V(o,{onClick:r.startSpeechRecognition,class:Ge({"text-red-500":t.isListeningToVoice}),title:"Dictate (using your browser's transcription)"},{icon:Ie(()=>[ltt]),_:1},8,["onClick","class"]),V(o,{onClick:r.speak,class:Ge({"text-red-500":r.isTalking}),title:"Convert text to audio (not saved, uses your browser's TTS service)"},{icon:Ie(()=>[Je(" 🍓 ")]),_:1},8,["onClick","class"]),V(o,{onClick:r.triggerFileUpload,title:"Upload a voice"},{icon:Ie(()=>[ctt]),_:1},8,["onClick"]),V(o,{onClick:r.startRecordingAndTranscribing,class:Ge({"text-green-500":i.isLesteningToVoice}),title:"Start audio to audio"},{icon:Ie(()=>[i.pending?(T(),x("img",{key:1,src:i.loading_icon,alt:"Loading",class:"h-5 w-5"},null,8,utt)):(T(),x("img",{key:0,src:i.is_deaf_transcribing?i.deaf_on:i.deaf_off,alt:"Deaf",class:"h-5 w-5"},null,8,dtt))]),_:1},8,["onClick","class"]),V(o,{onClick:r.startRecording,class:Ge({"text-green-500":i.isLesteningToVoice}),title:"Start audio recording"},{icon:Ie(()=>[i.pending?(T(),x("img",{key:1,src:i.loading_icon,alt:"Loading",class:"h-5 w-5"},null,8,_tt)):(T(),x("img",{key:0,src:i.is_recording?i.rec_on:i.rec_off,alt:"Record",class:"h-5 w-5"},null,8,ptt))]),_:1},8,["onClick","class"]),i.isSynthesizingVoice?(T(),x("div",ftt,gtt)):(T(),dt(o,{key:0,onClick:r.read,title:"Generate audio from text"},{icon:Ie(()=>[htt]),_:1},8,["onClick"])),P(V(o,{onClick:r.exportText,title:"Export text"},{icon:Ie(()=>[btt]),_:1},8,["onClick"]),[[wt,!i.generating]]),P(V(o,{onClick:r.importText,title:"Import text"},{icon:Ie(()=>[Ett]),_:1},8,["onClick"]),[[wt,!i.generating]]),V(o,{onClick:e[0]||(e[0]=_=>i.showSettings=!i.showSettings),title:"Settings"},{icon:Ie(()=>[ytt]),_:1})]),l("input",{type:"file",ref:"fileInput",onChange:e[1]||(e[1]=(..._)=>r.handleFileUpload&&r.handleFileUpload(..._)),style:{display:"none"},accept:".wav"},null,544),l("div",vtt,[l("button",{class:Ge(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="source"}]),onClick:e[2]||(e[2]=_=>i.tab_id="source")}," Source ",2),l("button",{class:Ge(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="render"}]),onClick:e[3]||(e[3]=_=>i.tab_id="render")}," Render ",2)]),Stt]),l("div",{class:Ge(["flex-grow m-2 p-2 border panels-color border-blue-300 rounded-md",{"border-red-500":i.generating}])},[i.tab_id==="source"?(T(),x("div",Ttt,[V(d,{title:"Add Block"},{default:Ie(()=>[V(c,{title:"Programming Languages",icon:"code"},{default:Ie(()=>[V(a,{onClick:e[4]||(e[4]=j(_=>r.addBlock("python"),["stop"])),title:"Python",icon:"python"}),V(a,{onClick:e[5]||(e[5]=j(_=>r.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),V(a,{onClick:e[6]||(e[6]=j(_=>r.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),V(a,{onClick:e[7]||(e[7]=j(_=>r.addBlock("java"),["stop"])),title:"Java",icon:"java"}),V(a,{onClick:e[8]||(e[8]=j(_=>r.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),V(a,{onClick:e[9]||(e[9]=j(_=>r.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),V(a,{onClick:e[10]||(e[10]=j(_=>r.addBlock("go"),["stop"])),title:"Go",icon:"go"}),V(a,{onClick:e[11]||(e[11]=j(_=>r.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),V(a,{onClick:e[12]||(e[12]=j(_=>r.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),V(a,{onClick:e[13]||(e[13]=j(_=>r.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),V(a,{onClick:e[14]||(e[14]=j(_=>r.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),V(c,{title:"Web Technologies",icon:"web"},{default:Ie(()=>[V(a,{onClick:e[15]||(e[15]=j(_=>r.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),V(a,{onClick:e[16]||(e[16]=j(_=>r.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),V(a,{onClick:e[17]||(e[17]=j(_=>r.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),V(a,{onClick:e[18]||(e[18]=j(_=>r.addBlock("react"),["stop"])),title:"React",icon:"react"}),V(a,{onClick:e[19]||(e[19]=j(_=>r.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),V(c,{title:"Markup and Data",icon:"file-code"},{default:Ie(()=>[V(a,{onClick:e[20]||(e[20]=j(_=>r.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),V(a,{onClick:e[21]||(e[21]=j(_=>r.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),V(a,{onClick:e[22]||(e[22]=j(_=>r.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),V(a,{onClick:e[23]||(e[23]=j(_=>r.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),V(a,{onClick:e[24]||(e[24]=j(_=>r.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),V(c,{title:"Scripting and Shell",icon:"terminal"},{default:Ie(()=>[V(a,{onClick:e[25]||(e[25]=j(_=>r.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),V(a,{onClick:e[26]||(e[26]=j(_=>r.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),V(a,{onClick:e[27]||(e[27]=j(_=>r.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),V(c,{title:"Diagramming",icon:"sitemap"},{default:Ie(()=>[V(a,{onClick:e[28]||(e[28]=j(_=>r.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),V(a,{onClick:e[29]||(e[29]=j(_=>r.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),V(a,{onClick:e[30]||(e[30]=j(_=>r.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),V(c,{title:"Database",icon:"database"},{default:Ie(()=>[V(a,{onClick:e[31]||(e[31]=j(_=>r.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),V(a,{onClick:e[32]||(e[32]=j(_=>r.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),V(a,{onClick:e[33]||(e[33]=j(_=>r.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1}),V(a,{onClick:e[34]||(e[34]=j(_=>t.copyContentToClipboard(),["stop"])),title:"Copy message to clipboard",icon:"copy"}),P(l("textarea",{ref:"mdTextarea",onKeydown:e[35]||(e[35]=zs(j((..._)=>r.insertTab&&r.insertTab(..._),["prevent"]),["tab"])),class:"block min-h-500 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,style:Ht({minHeight:i.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[36]||(e[36]=_=>i.text=_),onClick:e[37]||(e[37]=j((..._)=>r.mdTextarea_clicked&&r.mdTextarea_clicked(..._),["prevent"])),onChange:e[38]||(e[38]=j((..._)=>r.mdTextarea_changed&&r.mdTextarea_changed(..._),["prevent"]))},`\r
+ `,36),[[pe,i.text]]),l("span",null,"Cursor position "+K(i.cursorPosition),1)])):G("",!0),i.audio_url!=null?(T(),x("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,xtt),Je(" Your browser does not support the audio element. ")])):G("",!0),V(u,{namedTokens:i.namedTokens},null,8,["namedTokens"]),i.tab_id==="render"?(T(),x("div",Ctt,[V(h,{ref:"mdRender",client_id:this.$store.state.client_id,message_id:0,discussion_id:0,"markdown-text":i.text,class:"mt-4 p-2 rounded shadow-lg dark:bg-bg-dark"},null,8,["client_id","markdown-text"])])):G("",!0)],2)]),i.showSettings?(T(),x("div",wtt,[Rtt,V(f,{title:"Model",class:"slider-container ml-0 mr-0",isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[P(l("select",{"onUpdate:modelValue":e[39]||(e[39]=_=>this.$store.state.selectedModel=_),onChange:e[40]||(e[40]=(..._)=>r.setModel&&r.setModel(..._)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),x(Fe,null,Ke(r.models,_=>(T(),x("option",{key:_,value:_},K(_),9,Att))),128))],544),[[Dt,this.$store.state.selectedModel]]),i.selecting_model?(T(),x("div",Ntt,Mtt)):G("",!0)]),_:1}),V(f,{title:"Presets",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[P(l("select",{"onUpdate:modelValue":e[41]||(e[41]=_=>i.selectedPreset=_),class:"bg-white dark:bg-black mb-2 border-2 rounded-md shadow-sm w-full"},[(T(!0),x(Fe,null,Ke(i.presets,_=>(T(),x("option",{key:_,value:_},K(_.name),9,Itt))),128))],512),[[Dt,i.selectedPreset]]),ktt,l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[42]||(e[42]=(..._)=>r.setPreset&&r.setPreset(..._)),title:"Use preset"},Ltt),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[43]||(e[43]=(..._)=>r.addPreset&&r.addPreset(..._)),title:"Add this text as a preset"},Ftt),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[44]||(e[44]=(..._)=>r.removePreset&&r.removePreset(..._)),title:"Remove preset"},Btt),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[45]||(e[45]=(..._)=>r.reloadPresets&&r.reloadPresets(..._)),title:"Reload presets list"},Vtt)]),_:1}),V(f,{title:"Generation params",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[l("div",ztt,[Htt,P(l("input",{type:"range","onUpdate:modelValue":e[46]||(e[46]=_=>i.temperature=_),min:"0",max:"5",step:"0.1",class:"w-full"},null,512),[[pe,i.temperature]]),l("span",qtt,"Current value: "+K(i.temperature),1)]),l("div",$tt,[Ytt,P(l("input",{type:"range","onUpdate:modelValue":e[47]||(e[47]=_=>i.top_k=_),min:"1",max:"100",step:"1",class:"w-full"},null,512),[[pe,i.top_k]]),l("span",Wtt,"Current value: "+K(i.top_k),1)]),l("div",Ktt,[jtt,P(l("input",{type:"range","onUpdate:modelValue":e[48]||(e[48]=_=>i.top_p=_),min:"0",max:"1",step:"0.1",class:"w-full"},null,512),[[pe,i.top_p]]),l("span",Qtt,"Current value: "+K(i.top_p),1)]),l("div",Xtt,[Ztt,P(l("input",{type:"range","onUpdate:modelValue":e[49]||(e[49]=_=>i.repeat_penalty=_),min:"0",max:"5",step:"0.1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.repeat_penalty]]),l("span",Jtt,"Current value: "+K(i.repeat_penalty),1)]),l("div",ent,[tnt,P(l("input",{type:"range","onUpdate:modelValue":e[50]||(e[50]=_=>i.repeat_last_n=_),min:"0",max:"100",step:"1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.repeat_last_n]]),l("span",nnt,"Current value: "+K(i.repeat_last_n),1)]),l("div",snt,[int,P(l("input",{type:"number","onUpdate:modelValue":e[51]||(e[51]=_=>i.n_crop=_),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.n_crop]]),l("span",rnt,"Current value: "+K(i.n_crop),1)]),l("div",ont,[ant,P(l("input",{type:"number","onUpdate:modelValue":e[52]||(e[52]=_=>i.n_predicts=_),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.n_predicts]]),l("span",lnt,"Current value: "+K(i.n_predicts),1)]),l("div",cnt,[dnt,P(l("input",{type:"number","onUpdate:modelValue":e[53]||(e[53]=_=>i.seed=_),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[pe,i.seed]]),l("span",unt,"Current value: "+K(i.seed),1)])]),_:1})])):G("",!0)])]),V(m,{ref:"toast"},null,512)],64)}const _nt=ot(Xet,[["render",pnt]]);const hnt={data(){return{activeExtension:null}},computed:{activeExtensions(){return console.log(this.$store.state.extensionsZoo),console.log(BO(this.$store.state.extensionsZoo)),this.$store.state.extensionsZoo}},methods:{showExtensionPage(t){this.activeExtension=t}}},fnt={class:"container overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll w-full 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"},mnt={key:0},gnt=["onClick"],bnt={key:0},Ent=["src"],ynt={key:1},vnt=l("p",null,"No extension is active. Please install and activate an extension.",-1),Snt=[vnt];function Tnt(t,e,n,s,i,r){return T(),x("div",fnt,[r.activeExtensions.length>0?(T(),x("div",mnt,[(T(!0),x(Fe,null,Ke(r.activeExtensions,o=>(T(),x("div",{key:o.name,onClick:a=>r.showExtensionPage(o)},[l("div",{class:Ge({"active-tab":o===i.activeExtension})},K(o.name),3)],8,gnt))),128)),i.activeExtension?(T(),x("div",bnt,[l("iframe",{src:i.activeExtension.page,width:"100%",height:"500px",frameborder:"0"},null,8,Ent)])):G("",!0)])):(T(),x("div",ynt,Snt))])}const xnt=ot(hnt,[["render",Tnt]]);const Cnt={data(){return{sections:[{id:"introduction",title:"Introduction",content:`
LoLLMs (Lord of Large Language Multimodal Systems) is a powerful and versatile AI system designed to handle a wide range of tasks. Developed by ParisNeo, a computer geek passionate about AI, LoLLMs aims to be the ultimate tool for AI-assisted work and creativity.
With its advanced capabilities in natural language processing, multimodal understanding, and code interpretation, LoLLMs can assist users in various domains, from content creation to complex problem-solving.
`},{id:"key-features",title:"Key Features",content:`
@@ -151,7 +151,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),me=F,le=W),ne===void 0
Consult the FAQ section for common issues and solutions
If problems persist, please reach out to our support team through one of the contact methods listed below.
- `}],contactLinks:[{text:"Email",url:"mailto:parisneoai@gmail.com"},{text:"Twitter",url:"https://twitter.com/ParisNeo_AI"},{text:"Discord",url:"https://discord.gg/BDxacQmv"},{text:"Sub-Reddit",url:"https://www.reddit.com/r/lollms"},{text:"Instagram",url:"https://www.instagram.com/spacenerduino/"}]}},methods:{scrollToSection(t){const e=document.getElementById(t);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}}},Rnt={class:"min-h-screen w-full bg-gradient-to-br from-blue-100 to-purple-100 dark:from-blue-900 dark:to-purple-900 overflow-y-auto"},Ant={class:"container mx-auto px-4 py-8 relative z-10"},Nnt=l("header",{class:"text-center mb-12 sticky top-0 bg-white dark:bg-gray-800 bg-opacity-90 dark:bg-opacity-90 backdrop-filter backdrop-blur-lg p-4 rounded-b-lg shadow-md"},[l("h1",{class:"text-5xl md:text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400 mb-2 animate-glow"}," LoLLMs Help Documentation "),l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic"},' "One tool to rule them all" ')],-1),Ont={class:"bg-white dark:bg-gray-800 shadow-md rounded-lg p-6 mb-8 animate-fade-in sticky top-32 max-h-[calc(100vh-8rem)] overflow-y-auto"},Mnt=l("h2",{class:"text-3xl font-semibold mb-4 text-gray-800 dark:text-gray-200"},"Table of Contents",-1),Int={class:"space-y-2"},knt=["href","onClick"],Dnt={key:0,class:"ml-4 mt-2 space-y-1"},Lnt=["href","onClick"],Pnt={class:"bg-white dark:bg-gray-800 shadow-md rounded-lg p-6 animate-fade-in"},Fnt=["id"],Unt={class:"text-4xl font-semibold mb-6 text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400"},Bnt=["innerHTML"],Gnt={key:0,class:"mt-8"},Vnt=["id"],znt={class:"text-3xl font-semibold mb-4 text-gray-700 dark:text-gray-300"},Hnt=["innerHTML"],qnt={class:"mt-12 pt-8 border-t border-gray-300 dark:border-gray-700 animate-fade-in"},$nt=l("h2",{class:"text-3xl font-semibold mb-6 text-center text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400"},"Contact",-1),Ynt={class:"flex flex-wrap justify-center gap-6 mb-8"},Wnt=["href"],Knt=l("p",{class:"text-center font-bold text-2xl text-gray-700 dark:text-gray-300"},"See ya!",-1),jnt={class:"fixed inset-0 pointer-events-none overflow-hidden"},Qnt=l("svg",{class:"w-2 h-2 text-yellow-300",fill:"currentColor",viewBox:"0 0 20 20"},[l("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})],-1),Xnt=[Qnt];function Znt(t,e,n,s,i,r){return T(),x("div",Rnt,[l("div",Ant,[Nnt,l("nav",Ont,[Mnt,l("ul",Int,[(T(!0),x(Fe,null,Ke(i.sections,o=>(T(),x("li",{key:o.id,class:"ml-4"},[l("a",{href:`#${o.id}`,onClick:a=>r.scrollToSection(o.id),class:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 hover:underline transition-colors duration-200"},K(o.title),9,knt),o.subsections?(T(),x("ul",Dnt,[(T(!0),x(Fe,null,Ke(o.subsections,a=>(T(),x("li",{key:a.id},[l("a",{href:`#${a.id}`,onClick:c=>r.scrollToSection(a.id),class:"text-blue-500 dark:text-blue-300 hover:text-blue-700 dark:hover:text-blue-200 hover:underline transition-colors duration-200"},K(a.title),9,Lnt)]))),128))])):G("",!0)]))),128))])]),l("main",Pnt,[(T(!0),x(Fe,null,Ke(i.sections,o=>(T(),x("section",{key:o.id,id:o.id,class:"mb-12"},[l("h2",Unt,K(o.title),1),l("div",{innerHTML:o.content,class:"prose dark:prose-invert max-w-none"},null,8,Bnt),o.subsections?(T(),x("div",Gnt,[(T(!0),x(Fe,null,Ke(o.subsections,a=>(T(),x("section",{key:a.id,id:a.id,class:"mb-8"},[l("h3",znt,K(a.title),1),l("div",{innerHTML:a.content,class:"prose dark:prose-invert max-w-none"},null,8,Hnt)],8,Vnt))),128))])):G("",!0)],8,Fnt))),128))]),l("footer",qnt,[$nt,l("div",Ynt,[(T(!0),x(Fe,null,Ke(i.contactLinks,(o,a)=>(T(),x("a",{key:a,href:o.url,target:"_blank",class:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 hover:underline transition-colors duration-200"},K(o.text),9,Wnt))),128))]),Knt])]),l("div",jnt,[(T(),x(Fe,null,Ke(50,o=>l("div",{key:o,class:"absolute animate-fall",style:Ht({left:`${Math.random()*100}%`,top:"-20px",animationDuration:`${3+Math.random()*7}s`,animationDelay:`${Math.random()*5}s`})},Xnt,4)),64))])])}const Jnt=ot(wnt,[["render",Znt]]);function si(t,e=!0,n=1){const s=e?1e3:1024;if(Math.abs(t)=s&&r{ze.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected",t),t.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(t))},positionMenu(){var t;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),n=window.innerHeight;t=e.bottom>n/2}else this.force_position==1?t=!0:t=!1;this.menuPosition.top=t?"auto":"calc(100% + 10px)",this.menuPosition.bottom=t?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),Le(()=>{ze.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},tst={class:"menu-container"},nst=["title"],sst=["src"],ist=["data-feather"],rst={key:2,class:"w-5 h-5"},ost={key:3,"data-feather":"menu"},ast={class:"flex-grow menu-ul"},lst=["onClick"],cst={key:0,"data-feather":"check"},dst=["src","alt"],ust=["data-feather"],pst={key:3,class:"menu-icon"};function _st(t,e,n,s,i,r){return T(),x("div",tst,[l("button",{onClick:e[0]||(e[0]=j((...o)=>r.toggleMenu&&r.toggleMenu(...o),["prevent"])),title:n.title,class:Ge([n.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"},[n.icon&&!n.icon.includes("#")&&!n.icon.includes("feather")?(T(),x("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,sst)):n.icon&&n.icon.includes("feather")?(T(),x("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,ist)):n.icon&&n.icon.includes("#")?(T(),x("p",rst,K(n.icon.split("#")[1]),1)):(T(),x("i",ost))],10,nst),V(Fs,{name:"slide"},{default:Ie(()=>[i.isMenuOpen?(T(),x("div",{key:0,class:"menu-list flex-grow",style:Ht(i.menuPosition),ref:"menu"},[l("ul",ast,[(T(!0),x(Fe,null,Ke(n.commands,(o,a)=>(T(),x("li",{key:a,onClick:j(c=>r.executeCommand(o),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==o.name?(T(),x("i",cst)):o.icon&&!o.icon.includes("feather")&&!o.is_file?(T(),x("img",{key:1,src:o.icon,alt:o.name,class:"menu-icon"},null,8,dst)):G("",!0),o.icon&&o.icon.includes("feather")&&!o.is_file?(T(),x("i",{key:2,"data-feather":o.icon.split(":")[1],class:"mr-2"},null,8,ust)):(T(),x("span",pst)),l("span",null,K(o.name),1)],8,lst))),128))])],4)):G("",!0)]),_:1})])}const wE=ot(est,[["render",_st]]),hst={components:{InteractiveMenu:wE},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(){Le(()=>{ze.replace()})},methods:{formatFileSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(t){return si(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?Is:this.model.icon},defaultImg(t){t.target.src=Is},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t){if(console.log("event.target.tagName.toLowerCase()"),console.log(t.target.tagName.toLowerCase()),t.target.tagName.toLowerCase()==="button"||t.target.tagName.toLowerCase()==="svg"){t.stopPropagation();return}this.onSelected(this),this.model.selected=!0,Le(()=>{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 t=[{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&&t.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&t.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),t},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const t=this.model.variants[0].size;return this.formatFileSize(t)}return null}},speed_computed(){return si(this.speed)},total_size_computed(){return si(this.total_size)},downloaded_size_computed(){return si(this.downloaded_size)}},watch:{linkNotValid(){Le(()=>{ze.replace()})}}},fst=["title"],mst={key:0,class:"flex flex-row"},gst={class:"max-w-[300px] overflow-x-auto"},bst={class:"flex gap-3 items-center grow"},Est=["href"],yst=["src"],vst={class:"flex-1 overflow-hidden"},Sst={class:"font-bold font-large text-lg truncate"},Tst={key:1,class:"flex items-center flex-row gap-2 my-1"},xst={class:"flex grow items-center"},Cst=l("i",{"data-feather":"box",class:"w-5"},null,-1),wst=l("span",{class:"sr-only"},"Custom model / local model",-1),Rst=[Cst,wst],Ast=l("span",{class:"sr-only"},"Remove",-1),Nst={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"},Ost={class:"relative flex flex-col items-center justify-center flex-grow h-full"},Mst=l("div",{role:"status",class:"justify-center"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1),Ist={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},kst={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},Dst={class:"flex justify-between mb-1"},Lst=l("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1),Pst={class:"text-sm font-medium text-blue-700 dark:text-white"},Fst={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Ust={class:"flex justify-between mb-1"},Bst={class:"text-base font-medium text-blue-700 dark:text-white"},Gst={class:"text-sm font-medium text-blue-700 dark:text-white"},Vst={class:"flex flex-grow"},zst={class:"flex flex-row flex-grow gap-3"},Hst={class:"p-2 text-center grow"},qst={key:3},$st={class:"flex flex-row items-center gap-3"},Yst=["src"],Wst={class:"font-bold font-large text-lg truncate"},Kst=l("div",{class:"grow"},null,-1),jst={class:"flex items-center flex-row-reverse gap-2 my-1"},Qst={class:"flex flex-row items-center"},Xst={key:0,class:"text-base text-red-600 flex items-center mt-1"},Zst=l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),Jst=["title"],eit={class:""},tit={class:"flex flex-row items-center"},nit=l("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1),sit=l("b",null,"Card: ",-1),iit=["href","title"],rit=l("div",{class:"grow"},null,-1),oit=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),ait=[oit],lit={class:"flex items-center"},cit=l("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),dit=l("b",null,"File size: ",-1),uit={class:"flex items-center"},pit=l("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),_it=l("b",null,"License: ",-1),hit={key:0,class:"flex items-center"},fit=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),mit=l("b",null,"quantizer: ",-1),git=["href"],bit={class:"flex items-center"},Eit=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),yit=l("b",null,"Model creator: ",-1),vit=["href"],Sit={class:"flex items-center"},Tit=l("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1),xit=l("b",null,"Release date: ",-1),Cit={class:"flex items-center"},wit=l("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1),Rit=l("b",null,"Category: ",-1),Ait=["href"];function Nit(t,e,n,s,i,r){const o=tt("InteractiveMenu");return T(),x("div",{class:Ge(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",r.computed_classes]),title:n.model.name,onClick:e[10]||(e[10]=j(a=>r.toggleSelected(a),["prevent"]))},[n.model.isCustomModel?(T(),x("div",mst,[l("div",gst,[l("div",bst,[l("a",{href:n.model.model_creator_link,target:"_blank"},[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,yst)],8,Est),l("div",vst,[l("h3",Sst,K(n.model.name),1)])])])])):G("",!0),n.model.isCustomModel?(T(),x("div",Tst,[l("div",xst,[l("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"]))},Rst),et(" Custom model ")]),l("div",null,[n.model.isInstalled?(T(),x("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=j((...a)=>r.uninstall&&r.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"},[et(" Uninstall "),Ast])):G("",!0)])])):G("",!0),i.installing?(T(),x("div",Nst,[l("div",Ost,[Mst,l("div",Ist,[l("div",kst,[l("div",Dst,[Lst,l("span",Pst,K(Math.floor(i.progress))+"%",1)]),l("div",Fst,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht({width:i.progress+"%"})},null,4)]),l("div",Ust,[l("span",Bst,"Download speed: "+K(r.speed_computed)+"/s",1),l("span",Gst,K(r.downloaded_size_computed)+"/"+K(r.total_size_computed),1)])])]),l("div",Vst,[l("div",zst,[l("div",Hst,[l("button",{onClick:e[3]||(e[3]=j((...a)=>r.toggleCancelInstall&&r.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 ")])])])])])):G("",!0),n.model.isCustomModel?G("",!0):(T(),x("div",qst,[l("div",$st,[l("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[4]||(e[4]=a=>r.defaultImg(a)),class:Ge(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,Yst),l("h3",Wst,K(n.model.name),1),Kst,V(o,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),l("div",jst,[l("div",Qst,[i.linkNotValid?(T(),x("div",Xst,[Zst,et(" Link is not valid ")])):G("",!0)])]),l("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[l("div",eit,[l("div",tit,[nit,sit,l("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.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,iit),rit,l("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=>r.toggleCopyLink(),["stop"]))},ait)]),l("div",lit,[l("div",{class:Ge(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[cit,dit,et(" "+K(r.fileSize),1)],2)]),l("div",uit,[pit,_it,et(" "+K(n.model.license),1)]),n.model.quantizer!="None"&&n.model.type!="transformers"?(T(),x("div",hit,[fit,mit,l("a",{href:"https://huggingface.co/"+n.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"},K(n.model.quantizer),9,git)])):G("",!0),l("div",bit,[Eit,yit,l("a",{href:n.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"},K(n.model.model_creator),9,vit)]),l("div",Sit,[Tit,xit,et(" "+K(n.model.last_commit_time),1)]),l("div",Cit,[wit,Rit,l("a",{href:"https://huggingface.co/"+n.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"},K(n.model.category),9,Ait)])])],8,Jst)]))],10,fst)}const Oit=ot(hst,[["render",Nit]]),Mit={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}}},Iit={class:"p-4"},kit={class:"flex items-center mb-4"},Dit=["src"],Lit={class:"text-lg font-semibold"},Pit=l("strong",null,"Author:",-1),Fit=l("strong",null,"Description:",-1),Uit=l("strong",null,"Category:",-1),Bit={key:0},Git=l("strong",null,"Disclaimer:",-1),Vit=l("strong",null,"Conditioning Text:",-1),zit=l("strong",null,"AI Prefix:",-1),Hit=l("strong",null,"User Prefix:",-1),qit=l("strong",null,"Antiprompts:",-1);function $it(t,e,n,s,i,r){return T(),x("div",Iit,[l("div",kit,[l("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,Dit),l("h2",Lit,K(i.personalityName),1)]),l("p",null,[Pit,et(" "+K(i.personalityAuthor),1)]),l("p",null,[Fit,et(" "+K(i.personalityDescription),1)]),l("p",null,[Uit,et(" "+K(i.personalityCategory),1)]),i.disclaimer?(T(),x("p",Bit,[Git,et(" "+K(i.disclaimer),1)])):G("",!0),l("p",null,[Vit,et(" "+K(i.conditioningText),1)]),l("p",null,[zit,et(" "+K(i.aiPrefix),1)]),l("p",null,[Hit,et(" "+K(i.userPrefix),1)]),l("div",null,[qit,l("ul",null,[(T(!0),x(Fe,null,Ke(i.antipromptsList,o=>(T(),x("li",{key:o.id},K(o.text),1))),128))])]),l("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(),x("button",{key:1,onClick:e[1]||(e[1]=(...o)=>r.commitChanges&&r.commitChanges(...o)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):G("",!0)])}const Yit=ot(Mit,[["render",$it]]),Zu="/assets/logo-9d653710.svg",Wit="/",Kit={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:wE},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0}}},computed:{commandsList(){let t=[{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"?t.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):t.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&t.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),t},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,Le(()=>{ze.replace()})},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return Wit+this.personality.avatar},defaultImg(t){t.target.src=Zu},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(){Le(()=>{ze.replace()})}}},jit=["title"],Qit={class:"flex-grow"},Xit={class:"flex items-center mb-4"},Zit=["src"],Jit={class:"text-sm text-gray-600"},ert={class:"text-sm text-gray-600"},trt={class:"text-sm text-gray-600"},nrt={key:0,class:"text-sm text-gray-600"},srt={key:1,class:"text-sm text-gray-600"},irt={class:"mb-4"},rrt=l("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1),ort=["innerHTML"],art={class:"mt-auto pt-4 border-t"},lrt={class:"flex justify-between items-center flex-wrap"},crt=["title"],drt=["fill"],urt=l("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),prt=[urt],_rt=l("i",{"data-feather":"check",class:"h-6 w-6"},null,-1),hrt=[_rt],frt=l("i",{"data-feather":"send",class:"h-6 w-6"},null,-1),mrt=[frt],grt=l("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1),brt=[grt],Ert=["src"];function yrt(t,e,n,s,i,r){const o=tt("InteractiveMenu");return T(),x("div",{class:Ge(["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",r.selected_computed?"border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),title:n.personality.installed?"":"Not installed"},[l("div",Qit,[l("div",Xit,[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.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)=>r.toggleSelected&&r.toggleSelected(...a)),onMouseover:e[2]||(e[2]=(...a)=>r.showThumbnail&&r.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>r.updateThumbnailPosition&&r.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>r.hideThumbnail&&r.hideThumbnail(...a))},null,40,Zit),l("div",null,[l("h3",{class:"font-bold text-xl text-gray-800 cursor-pointer",onClick:e[5]||(e[5]=(...a)=>r.toggleSelected&&r.toggleSelected(...a))},K(n.personality.name),1),l("p",Jit,"Author: "+K(n.personality.author),1),l("p",ert,"Version: "+K(n.personality.version),1),l("p",trt,"Category: "+K(n.personality.category),1),n.personality.creation_date?(T(),x("p",nrt,"Creation Date: "+K(r.formatDate(n.personality.creation_date)),1)):G("",!0),n.personality.last_update_date?(T(),x("p",srt,"Last update Date: "+K(r.formatDate(n.personality.last_update_date)),1)):G("",!0)])]),l("div",irt,[rrt,l("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:n.personality.description},null,8,ort)])]),l("div",art,[l("div",lrt,[l("button",{onClick:e[6]||(e[6]=(...a)=>r.toggleFavorite&&r.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(T(),x("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:t.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},prt,8,drt))],8,crt),i.isMounted?(T(),x("button",{key:0,onClick:e[7]||(e[7]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Select"},hrt)):G("",!0),i.isMounted?(T(),x("button",{key:1,onClick:e[8]||(e[8]=(...a)=>r.toggleTalk&&r.toggleTalk(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Talk"},mrt)):G("",!0),l("button",{onClick:e[9]||(e[9]=(...a)=>r.showFolder&&r.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},brt),V(o,{commands:r.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(),x("div",{key:0,style:Ht({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[l("img",{src:r.getImgUrl(),class:"w-full h-full object-fill"},null,8,Ert)],4)):G("",!0)],10,jit)}const RE=ot(Kit,[["render",yrt]]),vrt={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(t){console.log(`UI prop changed for instance ${this.instanceId}:`,t),this.$nextTick(()=>{this.renderContent()})}}},methods:{renderContent(){console.log(`Rendering content for instance ${this.instanceId}...`);const t=this.$refs.container,n=new DOMParser().parseFromString(this.ui,"text/html"),s=n.getElementsByTagName("style");Array.from(s).forEach(r=>{const o=document.createElement("style");o.textContent=this.scopeCSS(r.textContent),document.head.appendChild(o)}),t.innerHTML=n.body.innerHTML;const i=n.getElementsByTagName("script");Array.from(i).forEach(r=>{const o=document.createElement("script");o.textContent=r.textContent,t.appendChild(o)})},scopeCSS(t){return t.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,`#${this.containerId} $1$2`)}}},Srt=["id"];function Trt(t,e,n,s,i,r){return T(),x("div",{id:i.containerId,ref:"container"},null,8,Srt)}const oN=ot(vrt,[["render",Trt]]),xrt="/",Crt={components:{DynamicUIRenderer:oN},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){Le(()=>{ze.replace()})},methods:{copyToClipBoard(t){console.log("Copying to clipboard :",t),navigator.clipboard.writeText(t)},getImgUrl(){return xrt+this.binding.icon},defaultImg(t){t.target.src=Zu},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(){Le(()=>{ze.replace()})}}},wrt=["title"],Rrt={class:"flex flex-row items-center gap-3"},Art=["src"],Nrt={class:"font-bold font-large text-lg truncate"},Ort=l("div",{class:"grow"},null,-1),Mrt={class:"flex-none gap-1"},Irt=l("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),krt=l("span",{class:"sr-only"},"Help",-1),Drt=[Irt,krt],Lrt={class:"flex items-center flex-row-reverse gap-2 my-1"},Prt=l("span",{class:"sr-only"},"Click to install",-1),Frt=l("span",{class:"sr-only"},"Reinstall",-1),Urt=l("span",{class:"sr-only"},"UnInstall",-1),Brt=l("span",{class:"sr-only"},"Settings",-1),Grt={class:""},Vrt={class:""},zrt={class:"flex items-center"},Hrt=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),qrt=l("b",null,"Author: ",-1),$rt={class:"flex items-center"},Yrt=l("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),Wrt=l("b",null,"Folder: ",-1),Krt=l("div",{class:"grow"},null,-1),jrt=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),Qrt=[jrt],Xrt={class:"flex items-center"},Zrt=l("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),Jrt=l("b",null,"Version: ",-1),eot={class:"flex items-center"},tot=l("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),not=l("b",null,"Link: ",-1),sot=["href"],iot=l("div",{class:"flex items-center"},[l("i",{"data-feather":"info",class:"w-5 m-1"}),l("b",null,"Description: "),l("br")],-1),rot=["title","innerHTML"];function oot(t,e,n,s,i,r){const o=tt("DynamicUIRenderer");return T(),x("div",{class:Ge(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",n.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=j((...a)=>r.toggleSelected&&r.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[l("div",null,[l("div",Rrt,[l("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,Art),l("h3",Nrt,K(n.binding.name),1),Ort,l("div",Mrt,[n.selected?(T(),x("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>r.toggleReloadBinding&&r.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"},Drt)):G("",!0)])]),l("div",Lrt,[n.binding.installed?G("",!0):(T(),x("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=j((...a)=>r.toggleInstall&&r.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"},[et(" Install "),Prt])),n.binding.installed?(T(),x("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=j((...a)=>r.toggleReinstall&&r.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"},[et(" Reinstall "),Frt])):G("",!0),n.binding.installed?(T(),x("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=j((...a)=>r.toggleUnInstall&&r.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"},[et(" Uninstall "),Urt])):G("",!0),n.selected?(T(),x("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=j((...a)=>r.toggleSettings&&r.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"},[et(" Settings "),Brt])):G("",!0)]),n.binding.ui?(T(),dt(o,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):G("",!0),l("div",Grt,[l("div",Vrt,[l("div",zrt,[Hrt,qrt,et(" "+K(n.binding.author),1)]),l("div",$rt,[Yrt,Wrt,et(" "+K(n.binding.folder)+" ",1),Krt,l("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=>r.copyToClipBoard(this.binding.folder),["stop"]))},Qrt)]),l("div",Xrt,[Zrt,Jrt,et(" "+K(n.binding.version),1)]),l("div",eot,[tot,not,l("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},K(n.binding.link),9,sot)])]),iot,l("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,rot)])])],10,wrt)}const aot=ot(Crt,[["render",oot]]),lot={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(t=>{this.resolve=t})},hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},showDialog(t){return new Promise(e=>{this.model_path=t,this.show=!0,this.resolve=e})}}},cot={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},dot={class:"relative w-full max-w-md max-h-full"},uot={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},pot=l("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("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),_ot=l("span",{class:"sr-only"},"Close modal",-1),hot=[pot,_ot],fot={class:"p-4 text-center"},mot=l("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"},[l("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),got={class:"p-4 text-center mx-auto mb-4"},bot=l("label",{class:"mr-2"},"Model path",-1);function Eot(t,e,n,s,i,r){return i.show?(T(),x("div",cot,[l("div",dot,[l("div",uot,[l("button",{type:"button",onClick:e[0]||(e[0]=o=>r.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"},hot),l("div",fot,[mot,l("div",got,[bot,P(l("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),[[pe,i.model_path]])]),l("button",{onClick:e[2]||(e[2]=o=>r.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 "),l("button",{onClick:e[3]||(e[3]=o=>r.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")])])])])):G("",!0)}const yot=ot(lot,[["render",Eot]]);const vot={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(t){return typeof t=="string"?t:t&&t.name?t.name:""},selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(t){const e=["bytes","KB","MB","GB"];let n=0;for(;t>=1024&&n(vs("data-v-f43216be"),t=t(),Ss(),t),Sot={key:0,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},Tot={class:"bg-white dark:bg-gray-800 rounded-lg shadow-xl p-6 w-96 max-w-md"},xot={class:"text-2xl font-bold mb-4 text-gray-800 dark:text-white flex items-center"},Cot=AE(()=>l("svg",{class:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("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)),wot={class:"h-48 bg-gray-100 dark:bg-gray-700 rounded-lg mb-4 overflow-y-auto scrollbar-thin scrollbar-thumb-gray-400 scrollbar-track-gray-200 dark:scrollbar-thumb-gray-600 dark:scrollbar-track-gray-800"},Rot={class:"flex items-center justify-between"},Aot={class:"flex-grow"},Not=["onClick"],Oot=["onUpdate:modelValue","onBlur","onKeyup"],Mot={key:2,class:"text-xs text-gray-500 dark:text-gray-400 ml-2"},Iot={class:"flex items-center"},kot=["onClick"],Dot=AE(()=>l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("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)),Lot=[Dot],Pot=["onClick"],Fot=AE(()=>l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("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)),Uot=[Fot],Bot={key:0,class:"flex flex-col mb-4"},Got={class:"flex justify-between"},Vot=["disabled"];function zot(t,e,n,s,i,r){return T(),dt(Fs,{name:"fade"},{default:Ie(()=>[n.show?(T(),x("div",Sot,[l("div",Tot,[l("h2",xot,[Cot,et(" "+K(n.title),1)]),l("div",wot,[l("ul",null,[(T(!0),x(Fe,null,Ke(n.choices,(o,a)=>(T(),x("li",{key:a,class:"py-2 px-4 hover:bg-gray-200 dark:hover:bg-gray-600 transition duration-150 ease-in-out"},[l("div",Rot,[l("div",Aot,[o.isEditing?P((T(),x("input",{key:1,"onUpdate:modelValue":c=>o.editName=c,onBlur:c=>r.finishEditing(o),onKeyup:zs(c=>r.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,Oot)),[[pe,o.editName]]):(T(),x("span",{key:0,onClick:c=>r.selectChoice(o),class:Ge([{"font-semibold":o===i.selectedChoice},"text-gray-800 dark:text-white cursor-pointer"])},K(r.displayName(o)),11,Not)),o.size?(T(),x("span",Mot,K(r.formatSize(o.size)),1)):G("",!0)]),l("div",Iot,[l("button",{onClick:c=>r.editChoice(o),class:"text-blue-500 hover:text-blue-600 mr-2"},Lot,8,kot),n.can_remove?(T(),x("button",{key:0,onClick:c=>r.removeChoice(o,a),class:"text-red-500 hover:text-red-600"},Uot,8,Pot)):G("",!0)])])]))),128))])]),i.showInput?(T(),x("div",Bot,[P(l("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),[[pe,i.newFilename]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.addNewFilename&&r.addNewFilename(...o)),class:"bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add ")])):G("",!0),l("div",Got,[l("button",{onClick:e[2]||(e[2]=(...o)=>r.closeDialog&&r.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 "),l("button",{onClick:e[3]||(e[3]=(...o)=>r.validateChoice&&r.validateChoice(...o)),disabled:!i.selectedChoice,class:Ge([{"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,Vot),l("button",{onClick:e[4]||(e[4]=(...o)=>r.toggleInput&&r.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 ")])])])):G("",!0)]),_:1})}const NE=ot(vot,[["render",zot],["__scopeId","data-v-f43216be"]]),Hot={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const t=this.radioOptions.find(e=>e.value===this.selectedValue);return t?t.label:""}},watch:{selectedValue(t,e){this.$emit("radio-selected",t)}},methods:{handleRadioChange(){}}},qot={class:"flex space-x-4"},$ot=["value","aria-checked"],Yot={class:"text-gray-700"};function Wot(t,e,n,s,i,r){return T(),x("div",qot,[(T(!0),x(Fe,null,Ke(n.radioOptions,(o,a)=>(T(),x("label",{key:o.value,class:"flex items-center space-x-2"},[P(l("input",{type:"radio",value:o.value,"onUpdate:modelValue":e[0]||(e[0]=c=>i.selectedValue=c),onChange:e[1]||(e[1]=(...c)=>r.handleRadioChange&&r.handleRadioChange(...c)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===o.value.toString(),role:"radio"},null,40,$ot),[[Nk,i.selectedValue]]),l("span",Yot,K(o.label),1)]))),128))])}const Kot=ot(Hot,[["render",Wot]]),jot="/assets/gpu-df72bf63.svg",Qot={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 t=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",t),this.$emit("change"),this.newItem=""}},removeItem(t){const e=this.modelValue.filter((n,s)=>s!==t);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(t){this.draggingIndex=t},dragItem(t){if(this.draggingIndex!==null){const e=[...this.modelValue],n=e.splice(this.draggingIndex,1)[0];e.splice(t,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null},moveUp(t){if(t>0){const e=[...this.modelValue],n=e.splice(t,1)[0];e.splice(t-1,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},moveDown(t){if(ti.newItem=o),placeholder:n.placeholder,onKeyup:e[1]||(e[1]=zs((...o)=>r.addItem&&r.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,Zot),[[pe,i.newItem]]),l("button",{onClick:e[2]||(e[2]=(...o)=>r.addItem&&r.addItem(...o)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg"},"Add")]),n.modelValue.length>0?(T(),x("ul",Jot,[(T(!0),x(Fe,null,Ke(n.modelValue,(o,a)=>(T(),x("li",{key:a,class:Ge(["flex items-center mb-2 relative",{"bg-gray-200":i.draggingIndex===a}])},[l("span",eat,K(o),1),l("div",tat,[l("button",{onClick:c=>r.removeItem(a),class:"text-red-500 hover:text-red-700 p-2"},iat,8,nat),a>0?(T(),x("button",{key:0,onClick:c=>r.moveUp(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded mr-2"},aat,8,rat)):G("",!0),ar.moveDown(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded"},dat,8,lat)):G("",!0)]),i.draggingIndex===a?(T(),x("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:c=>r.startDragging(a),onMousemove:c=>r.dragItem(a),onMouseup:e[3]||(e[3]=(...c)=>r.stopDragging&&r.stopDragging(...c))},null,40,uat)):G("",!0)],2))),128))])):G("",!0),n.modelValue.length>0?(T(),x("div",pat,[l("button",{onClick:e[4]||(e[4]=(...o)=>r.removeAll&&r.removeAll(...o)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg"},"Remove All")])):G("",!0)])}const hat=ot(Qot,[["render",_at]]);const fat="/";ae.defaults.baseURL="/";const mat={components:{AddModelDialog:yot,ModelEntry:Oit,PersonalityViewer:Yit,PersonalityEntry:RE,BindingEntry:aot,ChoiceDialog:NE,Card:ju,StringListManager:hat,RadioOptions:Kot},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},defaultModelImgPlaceholder:Is,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:Bs,binding_changed:!1,SVGGPU:jot,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:fat,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(t){console.log("Error cought:",t)}qe.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(t=>t.json()).then(t=>{this.voices=t.voices}).catch(t=>console.error("Error fetching voices:",t))},async refreshHardwareUsage(t){await t.dispatch("refreshDiskUsage"),await t.dispatch("refreshRamUsage"),await t.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.rag_databases.push(""),this.settingsChanged=!0},removeDataSource(t){this.$store.state.config.rag_databases.splice(t,1),this.settingsChanged=!0},async vectorize_folder(t){await ae.post("/vectorize_folder",{client_id:this.$store.state.client_id,db_path:this.$store.state.config.rag_databases[t]},this.posts_headers)},async select_folder(t){try{qe.on("rag_db_added",e=>{console.log(e),e?(this.$store.state.config.rag_databases[t]=`${e.database_name}::${e.database_path}`,this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await ae.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(t){console.log("handleTemplateSelection");const e=t.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=`
+ `}],contactLinks:[{text:"Email",url:"mailto:parisneoai@gmail.com"},{text:"Twitter",url:"https://twitter.com/ParisNeo_AI"},{text:"Discord",url:"https://discord.gg/BDxacQmv"},{text:"Sub-Reddit",url:"https://www.reddit.com/r/lollms"},{text:"Instagram",url:"https://www.instagram.com/spacenerduino/"}]}},methods:{scrollToSection(t){const e=document.getElementById(t);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}}},wnt={class:"min-h-screen w-full bg-gradient-to-br from-blue-100 to-purple-100 dark:from-blue-900 dark:to-purple-900 overflow-y-auto"},Rnt={class:"container mx-auto px-4 py-8 relative z-10"},Ant=l("header",{class:"text-center mb-12 sticky top-0 bg-white dark:bg-gray-800 bg-opacity-90 dark:bg-opacity-90 backdrop-filter backdrop-blur-lg p-4 rounded-b-lg shadow-md"},[l("h1",{class:"text-5xl md:text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400 mb-2 animate-glow"}," LoLLMs Help Documentation "),l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic"},' "One tool to rule them all" ')],-1),Nnt={class:"bg-white dark:bg-gray-800 shadow-md rounded-lg p-6 mb-8 animate-fade-in sticky top-32 max-h-[calc(100vh-8rem)] overflow-y-auto"},Ont=l("h2",{class:"text-3xl font-semibold mb-4 text-gray-800 dark:text-gray-200"},"Table of Contents",-1),Mnt={class:"space-y-2"},Int=["href","onClick"],knt={key:0,class:"ml-4 mt-2 space-y-1"},Dnt=["href","onClick"],Lnt={class:"bg-white dark:bg-gray-800 shadow-md rounded-lg p-6 animate-fade-in"},Pnt=["id"],Fnt={class:"text-4xl font-semibold mb-6 text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400"},Unt=["innerHTML"],Bnt={key:0,class:"mt-8"},Gnt=["id"],Vnt={class:"text-3xl font-semibold mb-4 text-gray-700 dark:text-gray-300"},znt=["innerHTML"],Hnt={class:"mt-12 pt-8 border-t border-gray-300 dark:border-gray-700 animate-fade-in"},qnt=l("h2",{class:"text-3xl font-semibold mb-6 text-center text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400"},"Contact",-1),$nt={class:"flex flex-wrap justify-center gap-6 mb-8"},Ynt=["href"],Wnt=l("p",{class:"text-center font-bold text-2xl text-gray-700 dark:text-gray-300"},"See ya!",-1),Knt={class:"fixed inset-0 pointer-events-none overflow-hidden"},jnt=l("svg",{class:"w-2 h-2 text-yellow-300",fill:"currentColor",viewBox:"0 0 20 20"},[l("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})],-1),Qnt=[jnt];function Xnt(t,e,n,s,i,r){return T(),x("div",wnt,[l("div",Rnt,[Ant,l("nav",Nnt,[Ont,l("ul",Mnt,[(T(!0),x(Fe,null,Ke(i.sections,o=>(T(),x("li",{key:o.id,class:"ml-4"},[l("a",{href:`#${o.id}`,onClick:a=>r.scrollToSection(o.id),class:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 hover:underline transition-colors duration-200"},K(o.title),9,Int),o.subsections?(T(),x("ul",knt,[(T(!0),x(Fe,null,Ke(o.subsections,a=>(T(),x("li",{key:a.id},[l("a",{href:`#${a.id}`,onClick:c=>r.scrollToSection(a.id),class:"text-blue-500 dark:text-blue-300 hover:text-blue-700 dark:hover:text-blue-200 hover:underline transition-colors duration-200"},K(a.title),9,Dnt)]))),128))])):G("",!0)]))),128))])]),l("main",Lnt,[(T(!0),x(Fe,null,Ke(i.sections,o=>(T(),x("section",{key:o.id,id:o.id,class:"mb-12"},[l("h2",Fnt,K(o.title),1),l("div",{innerHTML:o.content,class:"prose dark:prose-invert max-w-none"},null,8,Unt),o.subsections?(T(),x("div",Bnt,[(T(!0),x(Fe,null,Ke(o.subsections,a=>(T(),x("section",{key:a.id,id:a.id,class:"mb-8"},[l("h3",Vnt,K(a.title),1),l("div",{innerHTML:a.content,class:"prose dark:prose-invert max-w-none"},null,8,znt)],8,Gnt))),128))])):G("",!0)],8,Pnt))),128))]),l("footer",Hnt,[qnt,l("div",$nt,[(T(!0),x(Fe,null,Ke(i.contactLinks,(o,a)=>(T(),x("a",{key:a,href:o.url,target:"_blank",class:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 hover:underline transition-colors duration-200"},K(o.text),9,Ynt))),128))]),Wnt])]),l("div",Knt,[(T(),x(Fe,null,Ke(50,o=>l("div",{key:o,class:"absolute animate-fall",style:Ht({left:`${Math.random()*100}%`,top:"-20px",animationDuration:`${3+Math.random()*7}s`,animationDelay:`${Math.random()*5}s`})},Qnt,4)),64))])])}const Znt=ot(Cnt,[["render",Xnt]]);function si(t,e=!0,n=1){const s=e?1e3:1024;if(Math.abs(t)=s&&r{ze.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected",t),t.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(t))},positionMenu(){var t;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),n=window.innerHeight;t=e.bottom>n/2}else this.force_position==1?t=!0:t=!1;this.menuPosition.top=t?"auto":"calc(100% + 10px)",this.menuPosition.bottom=t?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),Le(()=>{ze.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},est={class:"menu-container"},tst=["title"],nst=["src"],sst=["data-feather"],ist={key:2,class:"w-5 h-5"},rst={key:3,"data-feather":"menu"},ost={class:"flex-grow menu-ul"},ast=["onClick"],lst={key:0,"data-feather":"check"},cst=["src","alt"],dst=["data-feather"],ust={key:3,class:"menu-icon"};function pst(t,e,n,s,i,r){return T(),x("div",est,[l("button",{onClick:e[0]||(e[0]=j((...o)=>r.toggleMenu&&r.toggleMenu(...o),["prevent"])),title:n.title,class:Ge([n.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"},[n.icon&&!n.icon.includes("#")&&!n.icon.includes("feather")?(T(),x("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,nst)):n.icon&&n.icon.includes("feather")?(T(),x("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,sst)):n.icon&&n.icon.includes("#")?(T(),x("p",ist,K(n.icon.split("#")[1]),1)):(T(),x("i",rst))],10,tst),V(Fs,{name:"slide"},{default:Ie(()=>[i.isMenuOpen?(T(),x("div",{key:0,class:"menu-list flex-grow",style:Ht(i.menuPosition),ref:"menu"},[l("ul",ost,[(T(!0),x(Fe,null,Ke(n.commands,(o,a)=>(T(),x("li",{key:a,onClick:j(c=>r.executeCommand(o),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==o.name?(T(),x("i",lst)):o.icon&&!o.icon.includes("feather")&&!o.is_file?(T(),x("img",{key:1,src:o.icon,alt:o.name,class:"menu-icon"},null,8,cst)):G("",!0),o.icon&&o.icon.includes("feather")&&!o.is_file?(T(),x("i",{key:2,"data-feather":o.icon.split(":")[1],class:"mr-2"},null,8,dst)):(T(),x("span",ust)),l("span",null,K(o.name),1)],8,ast))),128))])],4)):G("",!0)]),_:1})])}const wE=ot(Jnt,[["render",pst]]),_st={components:{InteractiveMenu:wE},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(){Le(()=>{ze.replace()})},methods:{formatFileSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(t){return si(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?Is:this.model.icon},defaultImg(t){t.target.src=Is},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t){if(console.log("event.target.tagName.toLowerCase()"),console.log(t.target.tagName.toLowerCase()),t.target.tagName.toLowerCase()==="button"||t.target.tagName.toLowerCase()==="svg"){t.stopPropagation();return}this.onSelected(this),this.model.selected=!0,Le(()=>{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 t=[{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&&t.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&t.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),t},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const t=this.model.variants[0].size;return this.formatFileSize(t)}return null}},speed_computed(){return si(this.speed)},total_size_computed(){return si(this.total_size)},downloaded_size_computed(){return si(this.downloaded_size)}},watch:{linkNotValid(){Le(()=>{ze.replace()})}}},hst=["title"],fst={key:0,class:"flex flex-row"},mst={class:"max-w-[300px] overflow-x-auto"},gst={class:"flex gap-3 items-center grow"},bst=["href"],Est=["src"],yst={class:"flex-1 overflow-hidden"},vst={class:"font-bold font-large text-lg truncate"},Sst={key:1,class:"flex items-center flex-row gap-2 my-1"},Tst={class:"flex grow items-center"},xst=l("i",{"data-feather":"box",class:"w-5"},null,-1),Cst=l("span",{class:"sr-only"},"Custom model / local model",-1),wst=[xst,Cst],Rst=l("span",{class:"sr-only"},"Remove",-1),Ast={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"},Nst={class:"relative flex flex-col items-center justify-center flex-grow h-full"},Ost=l("div",{role:"status",class:"justify-center"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1),Mst={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Ist={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},kst={class:"flex justify-between mb-1"},Dst=l("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1),Lst={class:"text-sm font-medium text-blue-700 dark:text-white"},Pst={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Fst={class:"flex justify-between mb-1"},Ust={class:"text-base font-medium text-blue-700 dark:text-white"},Bst={class:"text-sm font-medium text-blue-700 dark:text-white"},Gst={class:"flex flex-grow"},Vst={class:"flex flex-row flex-grow gap-3"},zst={class:"p-2 text-center grow"},Hst={key:3},qst={class:"flex flex-row items-center gap-3"},$st=["src"],Yst={class:"font-bold font-large text-lg truncate"},Wst=l("div",{class:"grow"},null,-1),Kst={class:"flex items-center flex-row-reverse gap-2 my-1"},jst={class:"flex flex-row items-center"},Qst={key:0,class:"text-base text-red-600 flex items-center mt-1"},Xst=l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),Zst=["title"],Jst={class:""},eit={class:"flex flex-row items-center"},tit=l("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1),nit=l("b",null,"Card: ",-1),sit=["href","title"],iit=l("div",{class:"grow"},null,-1),rit=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),oit=[rit],ait={class:"flex items-center"},lit=l("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),cit=l("b",null,"File size: ",-1),dit={class:"flex items-center"},uit=l("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),pit=l("b",null,"License: ",-1),_it={key:0,class:"flex items-center"},hit=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),fit=l("b",null,"quantizer: ",-1),mit=["href"],git={class:"flex items-center"},bit=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),Eit=l("b",null,"Model creator: ",-1),yit=["href"],vit={class:"flex items-center"},Sit=l("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1),Tit=l("b",null,"Release date: ",-1),xit={class:"flex items-center"},Cit=l("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1),wit=l("b",null,"Category: ",-1),Rit=["href"];function Ait(t,e,n,s,i,r){const o=tt("InteractiveMenu");return T(),x("div",{class:Ge(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",r.computed_classes]),title:n.model.name,onClick:e[10]||(e[10]=j(a=>r.toggleSelected(a),["prevent"]))},[n.model.isCustomModel?(T(),x("div",fst,[l("div",mst,[l("div",gst,[l("a",{href:n.model.model_creator_link,target:"_blank"},[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,Est)],8,bst),l("div",yst,[l("h3",vst,K(n.model.name),1)])])])])):G("",!0),n.model.isCustomModel?(T(),x("div",Sst,[l("div",Tst,[l("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"]))},wst),Je(" Custom model ")]),l("div",null,[n.model.isInstalled?(T(),x("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=j((...a)=>r.uninstall&&r.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"},[Je(" Uninstall "),Rst])):G("",!0)])])):G("",!0),i.installing?(T(),x("div",Ast,[l("div",Nst,[Ost,l("div",Mst,[l("div",Ist,[l("div",kst,[Dst,l("span",Lst,K(Math.floor(i.progress))+"%",1)]),l("div",Pst,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht({width:i.progress+"%"})},null,4)]),l("div",Fst,[l("span",Ust,"Download speed: "+K(r.speed_computed)+"/s",1),l("span",Bst,K(r.downloaded_size_computed)+"/"+K(r.total_size_computed),1)])])]),l("div",Gst,[l("div",Vst,[l("div",zst,[l("button",{onClick:e[3]||(e[3]=j((...a)=>r.toggleCancelInstall&&r.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 ")])])])])])):G("",!0),n.model.isCustomModel?G("",!0):(T(),x("div",Hst,[l("div",qst,[l("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[4]||(e[4]=a=>r.defaultImg(a)),class:Ge(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,$st),l("h3",Yst,K(n.model.name),1),Wst,V(o,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),l("div",Kst,[l("div",jst,[i.linkNotValid?(T(),x("div",Qst,[Xst,Je(" Link is not valid ")])):G("",!0)])]),l("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[l("div",Jst,[l("div",eit,[tit,nit,l("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.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,sit),iit,l("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=>r.toggleCopyLink(),["stop"]))},oit)]),l("div",ait,[l("div",{class:Ge(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[lit,cit,Je(" "+K(r.fileSize),1)],2)]),l("div",dit,[uit,pit,Je(" "+K(n.model.license),1)]),n.model.quantizer!="None"&&n.model.type!="transformers"?(T(),x("div",_it,[hit,fit,l("a",{href:"https://huggingface.co/"+n.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"},K(n.model.quantizer),9,mit)])):G("",!0),l("div",git,[bit,Eit,l("a",{href:n.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"},K(n.model.model_creator),9,yit)]),l("div",vit,[Sit,Tit,Je(" "+K(n.model.last_commit_time),1)]),l("div",xit,[Cit,wit,l("a",{href:"https://huggingface.co/"+n.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"},K(n.model.category),9,Rit)])])],8,Zst)]))],10,hst)}const Nit=ot(_st,[["render",Ait]]),Oit={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}}},Mit={class:"p-4"},Iit={class:"flex items-center mb-4"},kit=["src"],Dit={class:"text-lg font-semibold"},Lit=l("strong",null,"Author:",-1),Pit=l("strong",null,"Description:",-1),Fit=l("strong",null,"Category:",-1),Uit={key:0},Bit=l("strong",null,"Disclaimer:",-1),Git=l("strong",null,"Conditioning Text:",-1),Vit=l("strong",null,"AI Prefix:",-1),zit=l("strong",null,"User Prefix:",-1),Hit=l("strong",null,"Antiprompts:",-1);function qit(t,e,n,s,i,r){return T(),x("div",Mit,[l("div",Iit,[l("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,kit),l("h2",Dit,K(i.personalityName),1)]),l("p",null,[Lit,Je(" "+K(i.personalityAuthor),1)]),l("p",null,[Pit,Je(" "+K(i.personalityDescription),1)]),l("p",null,[Fit,Je(" "+K(i.personalityCategory),1)]),i.disclaimer?(T(),x("p",Uit,[Bit,Je(" "+K(i.disclaimer),1)])):G("",!0),l("p",null,[Git,Je(" "+K(i.conditioningText),1)]),l("p",null,[Vit,Je(" "+K(i.aiPrefix),1)]),l("p",null,[zit,Je(" "+K(i.userPrefix),1)]),l("div",null,[Hit,l("ul",null,[(T(!0),x(Fe,null,Ke(i.antipromptsList,o=>(T(),x("li",{key:o.id},K(o.text),1))),128))])]),l("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(),x("button",{key:1,onClick:e[1]||(e[1]=(...o)=>r.commitChanges&&r.commitChanges(...o)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):G("",!0)])}const $it=ot(Oit,[["render",qit]]),Zu="/assets/logo-9d653710.svg",Yit="/",Wit={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:wE},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0}}},computed:{commandsList(){let t=[{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"?t.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):t.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&t.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),t},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,Le(()=>{ze.replace()})},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return Yit+this.personality.avatar},defaultImg(t){t.target.src=Zu},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(){Le(()=>{ze.replace()})}}},Kit=["title"],jit={class:"flex-grow"},Qit={class:"flex items-center mb-4"},Xit=["src"],Zit={class:"text-sm text-gray-600"},Jit={class:"text-sm text-gray-600"},ert={class:"text-sm text-gray-600"},trt={key:0,class:"text-sm text-gray-600"},nrt={key:1,class:"text-sm text-gray-600"},srt={class:"mb-4"},irt=l("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1),rrt=["innerHTML"],ort={class:"mt-auto pt-4 border-t"},art={class:"flex justify-between items-center flex-wrap"},lrt=["title"],crt=["fill"],drt=l("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),urt=[drt],prt=l("i",{"data-feather":"check",class:"h-6 w-6"},null,-1),_rt=[prt],hrt=l("i",{"data-feather":"send",class:"h-6 w-6"},null,-1),frt=[hrt],mrt=l("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1),grt=[mrt],brt=["src"];function Ert(t,e,n,s,i,r){const o=tt("InteractiveMenu");return T(),x("div",{class:Ge(["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",r.selected_computed?"border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),title:n.personality.installed?"":"Not installed"},[l("div",jit,[l("div",Qit,[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.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)=>r.toggleSelected&&r.toggleSelected(...a)),onMouseover:e[2]||(e[2]=(...a)=>r.showThumbnail&&r.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>r.updateThumbnailPosition&&r.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>r.hideThumbnail&&r.hideThumbnail(...a))},null,40,Xit),l("div",null,[l("h3",{class:"font-bold text-xl text-gray-800 cursor-pointer",onClick:e[5]||(e[5]=(...a)=>r.toggleSelected&&r.toggleSelected(...a))},K(n.personality.name),1),l("p",Zit,"Author: "+K(n.personality.author),1),l("p",Jit,"Version: "+K(n.personality.version),1),l("p",ert,"Category: "+K(n.personality.category),1),n.personality.creation_date?(T(),x("p",trt,"Creation Date: "+K(r.formatDate(n.personality.creation_date)),1)):G("",!0),n.personality.last_update_date?(T(),x("p",nrt,"Last update Date: "+K(r.formatDate(n.personality.last_update_date)),1)):G("",!0)])]),l("div",srt,[irt,l("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:n.personality.description},null,8,rrt)])]),l("div",ort,[l("div",art,[l("button",{onClick:e[6]||(e[6]=(...a)=>r.toggleFavorite&&r.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(T(),x("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:t.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},urt,8,crt))],8,lrt),i.isMounted?(T(),x("button",{key:0,onClick:e[7]||(e[7]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Select"},_rt)):G("",!0),i.isMounted?(T(),x("button",{key:1,onClick:e[8]||(e[8]=(...a)=>r.toggleTalk&&r.toggleTalk(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Talk"},frt)):G("",!0),l("button",{onClick:e[9]||(e[9]=(...a)=>r.showFolder&&r.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},grt),V(o,{commands:r.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(),x("div",{key:0,style:Ht({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[l("img",{src:r.getImgUrl(),class:"w-full h-full object-fill"},null,8,brt)],4)):G("",!0)],10,Kit)}const RE=ot(Wit,[["render",Ert]]),yrt={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(t){console.log(`UI prop changed for instance ${this.instanceId}:`,t),this.$nextTick(()=>{this.renderContent()})}}},methods:{renderContent(){console.log(`Rendering content for instance ${this.instanceId}...`);const t=this.$refs.container,n=new DOMParser().parseFromString(this.ui,"text/html"),s=n.getElementsByTagName("style");Array.from(s).forEach(r=>{const o=document.createElement("style");o.textContent=this.scopeCSS(r.textContent),document.head.appendChild(o)}),t.innerHTML=n.body.innerHTML;const i=n.getElementsByTagName("script");Array.from(i).forEach(r=>{const o=document.createElement("script");o.textContent=r.textContent,t.appendChild(o)})},scopeCSS(t){return t.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,`#${this.containerId} $1$2`)}}},vrt=["id"];function Srt(t,e,n,s,i,r){return T(),x("div",{id:i.containerId,ref:"container"},null,8,vrt)}const oN=ot(yrt,[["render",Srt]]),Trt="/",xrt={components:{DynamicUIRenderer:oN},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){Le(()=>{ze.replace()})},methods:{copyToClipBoard(t){console.log("Copying to clipboard :",t),navigator.clipboard.writeText(t)},getImgUrl(){return Trt+this.binding.icon},defaultImg(t){t.target.src=Zu},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(){Le(()=>{ze.replace()})}}},Crt=["title"],wrt={class:"flex flex-row items-center gap-3"},Rrt=["src"],Art={class:"font-bold font-large text-lg truncate"},Nrt=l("div",{class:"grow"},null,-1),Ort={class:"flex-none gap-1"},Mrt=l("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),Irt=l("span",{class:"sr-only"},"Help",-1),krt=[Mrt,Irt],Drt={class:"flex items-center flex-row-reverse gap-2 my-1"},Lrt=l("span",{class:"sr-only"},"Click to install",-1),Prt=l("span",{class:"sr-only"},"Reinstall",-1),Frt=l("span",{class:"sr-only"},"UnInstall",-1),Urt=l("span",{class:"sr-only"},"Settings",-1),Brt={class:""},Grt={class:""},Vrt={class:"flex items-center"},zrt=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),Hrt=l("b",null,"Author: ",-1),qrt={class:"flex items-center"},$rt=l("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),Yrt=l("b",null,"Folder: ",-1),Wrt=l("div",{class:"grow"},null,-1),Krt=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),jrt=[Krt],Qrt={class:"flex items-center"},Xrt=l("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),Zrt=l("b",null,"Version: ",-1),Jrt={class:"flex items-center"},eot=l("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),tot=l("b",null,"Link: ",-1),not=["href"],sot=l("div",{class:"flex items-center"},[l("i",{"data-feather":"info",class:"w-5 m-1"}),l("b",null,"Description: "),l("br")],-1),iot=["title","innerHTML"];function rot(t,e,n,s,i,r){const o=tt("DynamicUIRenderer");return T(),x("div",{class:Ge(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",n.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=j((...a)=>r.toggleSelected&&r.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[l("div",null,[l("div",wrt,[l("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,Rrt),l("h3",Art,K(n.binding.name),1),Nrt,l("div",Ort,[n.selected?(T(),x("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>r.toggleReloadBinding&&r.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"},krt)):G("",!0)])]),l("div",Drt,[n.binding.installed?G("",!0):(T(),x("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=j((...a)=>r.toggleInstall&&r.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"},[Je(" Install "),Lrt])),n.binding.installed?(T(),x("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=j((...a)=>r.toggleReinstall&&r.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"},[Je(" Reinstall "),Prt])):G("",!0),n.binding.installed?(T(),x("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=j((...a)=>r.toggleUnInstall&&r.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"},[Je(" Uninstall "),Frt])):G("",!0),n.selected?(T(),x("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=j((...a)=>r.toggleSettings&&r.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"},[Je(" Settings "),Urt])):G("",!0)]),n.binding.ui?(T(),dt(o,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):G("",!0),l("div",Brt,[l("div",Grt,[l("div",Vrt,[zrt,Hrt,Je(" "+K(n.binding.author),1)]),l("div",qrt,[$rt,Yrt,Je(" "+K(n.binding.folder)+" ",1),Wrt,l("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=>r.copyToClipBoard(this.binding.folder),["stop"]))},jrt)]),l("div",Qrt,[Xrt,Zrt,Je(" "+K(n.binding.version),1)]),l("div",Jrt,[eot,tot,l("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},K(n.binding.link),9,not)])]),sot,l("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,iot)])])],10,Crt)}const oot=ot(xrt,[["render",rot]]),aot={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(t=>{this.resolve=t})},hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},showDialog(t){return new Promise(e=>{this.model_path=t,this.show=!0,this.resolve=e})}}},lot={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},cot={class:"relative w-full max-w-md max-h-full"},dot={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},uot=l("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("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),pot=l("span",{class:"sr-only"},"Close modal",-1),_ot=[uot,pot],hot={class:"p-4 text-center"},fot=l("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"},[l("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),mot={class:"p-4 text-center mx-auto mb-4"},got=l("label",{class:"mr-2"},"Model path",-1);function bot(t,e,n,s,i,r){return i.show?(T(),x("div",lot,[l("div",cot,[l("div",dot,[l("button",{type:"button",onClick:e[0]||(e[0]=o=>r.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"},_ot),l("div",hot,[fot,l("div",mot,[got,P(l("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),[[pe,i.model_path]])]),l("button",{onClick:e[2]||(e[2]=o=>r.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 "),l("button",{onClick:e[3]||(e[3]=o=>r.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")])])])])):G("",!0)}const Eot=ot(aot,[["render",bot]]);const yot={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(t){return typeof t=="string"?t:t&&t.name?t.name:""},selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(t){const e=["bytes","KB","MB","GB"];let n=0;for(;t>=1024&&n(vs("data-v-f43216be"),t=t(),Ss(),t),vot={key:0,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},Sot={class:"bg-white dark:bg-gray-800 rounded-lg shadow-xl p-6 w-96 max-w-md"},Tot={class:"text-2xl font-bold mb-4 text-gray-800 dark:text-white flex items-center"},xot=AE(()=>l("svg",{class:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("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)),Cot={class:"h-48 bg-gray-100 dark:bg-gray-700 rounded-lg mb-4 overflow-y-auto scrollbar-thin scrollbar-thumb-gray-400 scrollbar-track-gray-200 dark:scrollbar-thumb-gray-600 dark:scrollbar-track-gray-800"},wot={class:"flex items-center justify-between"},Rot={class:"flex-grow"},Aot=["onClick"],Not=["onUpdate:modelValue","onBlur","onKeyup"],Oot={key:2,class:"text-xs text-gray-500 dark:text-gray-400 ml-2"},Mot={class:"flex items-center"},Iot=["onClick"],kot=AE(()=>l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("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)),Dot=[kot],Lot=["onClick"],Pot=AE(()=>l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("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)),Fot=[Pot],Uot={key:0,class:"flex flex-col mb-4"},Bot={class:"flex justify-between"},Got=["disabled"];function Vot(t,e,n,s,i,r){return T(),dt(Fs,{name:"fade"},{default:Ie(()=>[n.show?(T(),x("div",vot,[l("div",Sot,[l("h2",Tot,[xot,Je(" "+K(n.title),1)]),l("div",Cot,[l("ul",null,[(T(!0),x(Fe,null,Ke(n.choices,(o,a)=>(T(),x("li",{key:a,class:"py-2 px-4 hover:bg-gray-200 dark:hover:bg-gray-600 transition duration-150 ease-in-out"},[l("div",wot,[l("div",Rot,[o.isEditing?P((T(),x("input",{key:1,"onUpdate:modelValue":c=>o.editName=c,onBlur:c=>r.finishEditing(o),onKeyup:zs(c=>r.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,Not)),[[pe,o.editName]]):(T(),x("span",{key:0,onClick:c=>r.selectChoice(o),class:Ge([{"font-semibold":o===i.selectedChoice},"text-gray-800 dark:text-white cursor-pointer"])},K(r.displayName(o)),11,Aot)),o.size?(T(),x("span",Oot,K(r.formatSize(o.size)),1)):G("",!0)]),l("div",Mot,[l("button",{onClick:c=>r.editChoice(o),class:"text-blue-500 hover:text-blue-600 mr-2"},Dot,8,Iot),n.can_remove?(T(),x("button",{key:0,onClick:c=>r.removeChoice(o,a),class:"text-red-500 hover:text-red-600"},Fot,8,Lot)):G("",!0)])])]))),128))])]),i.showInput?(T(),x("div",Uot,[P(l("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),[[pe,i.newFilename]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.addNewFilename&&r.addNewFilename(...o)),class:"bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add ")])):G("",!0),l("div",Bot,[l("button",{onClick:e[2]||(e[2]=(...o)=>r.closeDialog&&r.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 "),l("button",{onClick:e[3]||(e[3]=(...o)=>r.validateChoice&&r.validateChoice(...o)),disabled:!i.selectedChoice,class:Ge([{"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,Got),l("button",{onClick:e[4]||(e[4]=(...o)=>r.toggleInput&&r.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 ")])])])):G("",!0)]),_:1})}const NE=ot(yot,[["render",Vot],["__scopeId","data-v-f43216be"]]),zot={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const t=this.radioOptions.find(e=>e.value===this.selectedValue);return t?t.label:""}},watch:{selectedValue(t,e){this.$emit("radio-selected",t)}},methods:{handleRadioChange(){}}},Hot={class:"flex space-x-4"},qot=["value","aria-checked"],$ot={class:"text-gray-700"};function Yot(t,e,n,s,i,r){return T(),x("div",Hot,[(T(!0),x(Fe,null,Ke(n.radioOptions,(o,a)=>(T(),x("label",{key:o.value,class:"flex items-center space-x-2"},[P(l("input",{type:"radio",value:o.value,"onUpdate:modelValue":e[0]||(e[0]=c=>i.selectedValue=c),onChange:e[1]||(e[1]=(...c)=>r.handleRadioChange&&r.handleRadioChange(...c)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===o.value.toString(),role:"radio"},null,40,qot),[[Nk,i.selectedValue]]),l("span",$ot,K(o.label),1)]))),128))])}const Wot=ot(zot,[["render",Yot]]),Kot="/assets/gpu-df72bf63.svg",jot={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 t=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",t),this.$emit("change"),this.newItem=""}},removeItem(t){const e=this.modelValue.filter((n,s)=>s!==t);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(t){this.draggingIndex=t},dragItem(t){if(this.draggingIndex!==null){const e=[...this.modelValue],n=e.splice(this.draggingIndex,1)[0];e.splice(t,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null},moveUp(t){if(t>0){const e=[...this.modelValue],n=e.splice(t,1)[0];e.splice(t-1,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},moveDown(t){if(ti.newItem=o),placeholder:n.placeholder,onKeyup:e[1]||(e[1]=zs((...o)=>r.addItem&&r.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,Xot),[[pe,i.newItem]]),l("button",{onClick:e[2]||(e[2]=(...o)=>r.addItem&&r.addItem(...o)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg"},"Add")]),n.modelValue.length>0?(T(),x("ul",Zot,[(T(!0),x(Fe,null,Ke(n.modelValue,(o,a)=>(T(),x("li",{key:a,class:Ge(["flex items-center mb-2 relative",{"bg-gray-200":i.draggingIndex===a}])},[l("span",Jot,K(o),1),l("div",eat,[l("button",{onClick:c=>r.removeItem(a),class:"text-red-500 hover:text-red-700 p-2"},sat,8,tat),a>0?(T(),x("button",{key:0,onClick:c=>r.moveUp(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded mr-2"},oat,8,iat)):G("",!0),ar.moveDown(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded"},cat,8,aat)):G("",!0)]),i.draggingIndex===a?(T(),x("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:c=>r.startDragging(a),onMousemove:c=>r.dragItem(a),onMouseup:e[3]||(e[3]=(...c)=>r.stopDragging&&r.stopDragging(...c))},null,40,dat)):G("",!0)],2))),128))])):G("",!0),n.modelValue.length>0?(T(),x("div",uat,[l("button",{onClick:e[4]||(e[4]=(...o)=>r.removeAll&&r.removeAll(...o)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg"},"Remove All")])):G("",!0)])}const _at=ot(jot,[["render",pat]]);const hat="/";ae.defaults.baseURL="/";const fat={components:{AddModelDialog:Eot,ModelEntry:Nit,PersonalityViewer:$it,PersonalityEntry:RE,BindingEntry:oot,ChoiceDialog:NE,Card:ju,StringListManager:_at,RadioOptions:Wot},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},defaultModelImgPlaceholder:Is,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:Bs,binding_changed:!1,SVGGPU:Kot,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:hat,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(t){console.log("Error cought:",t)}qe.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(t=>t.json()).then(t=>{this.voices=t.voices}).catch(t=>console.error("Error fetching voices:",t))},async refreshHardwareUsage(t){await t.dispatch("refreshDiskUsage"),await t.dispatch("refreshRamUsage"),await t.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.rag_databases.push(""),this.settingsChanged=!0},removeDataSource(t){this.$store.state.config.rag_databases.splice(t,1),this.settingsChanged=!0},async vectorize_folder(t){await ae.post("/vectorize_folder",{client_id:this.$store.state.client_id,db_path:this.$store.state.config.rag_databases[t]},this.posts_headers)},async select_folder(t){try{qe.on("rag_db_added",e=>{console.log(e),e?(this.$store.state.config.rag_databases[t]=`${e.database_name}::${e.database_path}`,this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await ae.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(t){console.log("handleTemplateSelection");const e=t.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=`
@@ -219,25 +219,25 @@ Verify that the personality is not already copied there.`,4,!1)}).catch(e=>{this
`,4,!1),console.error(e)})},async remountPersonality(t){await this.unmountPersonality(t),await this.mountPersonality(t)},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,console.log("Personality path:",t.personality.path),ae.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:t.personality.path},{headers:this.posts_headers}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$store.state.toast.showToast("Personality reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality
`+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(t){t.target.src=Bs},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){this.filterModels()}},async mounted(){console.log("Getting voices"),this.getVoices(),console.log("Constructing"),this.load_everything(),this.getSeviceVoices();try{console.log("Loading input devices list");const t=await ae.get("/get_snd_input_devices");this.snd_input_devices=t.data.device_names,this.snd_input_devices_indexes=t.data.device_indexes}catch{console.log("Couldin't list input devices")}try{console.log("Loading output devices list");const t=await ae.get("/get_snd_output_devices");this.snd_output_devices=t.data.device_names,this.snd_output_devices_indexes=t.data.device_indexes}catch{console.log("Couldin't list output devices")}try{console.log("Getting comfyui models");const t=await ae.get("/list_comfyui_models");console.log("res is ",t),t.data.status&&(this.comfyui_models=t.data.models)}catch{console.log("Couldin't list output devices")}this.fetchElevenLabsVoices()},activated(){},computed:{full_template:{get(){return(this.configFile.start_header_id_template+this.configFile.system_message_template+this.configFile.end_header_id_template+" system message"+this.configFile.separator_template+this.configFile.start_user_header_id_template+"user name"+this.configFile.end_user_header_id_template+" User prompt"+this.configFile.separator_template+this.configFile.end_user_message_id_template+this.configFile.separator_template+this.configFile.start_ai_header_id_template+"ai personality"+this.configFile.end_ai_header_id_template+"ai response"+this.configFile.end_ai_message_id_template).replace(`
`," ")}},rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(t=>t.isInstalled===!0):this.modelsFiltered.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)):(console.log("this.models_zoo"),console.log(this.models_zoo),console.log(this.models_zoo_initialLoadCount),this.show_only_installed_models?this.models_zoo.filter(t=>t.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return Is;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Is}}},imgModel:{get(){try{let t=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return t>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[t].icon}`),this.$store.state.modelsZoo[t].icon):Is}catch{console.log("error")}if(!this.isMounted)return Is;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Is}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(t){this.$store.state.config.audio_out_voice=t}},openaiWhisperModels(){return["whisper-1"]},whisperModels(){return["tiny.en","tiny","base.en","base","small.en","small","medium.en","medium","large-v1","large-v2","large-v3","large"]},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},userName:{get(){return this.$store.state.config.user_name},set(t){this.$store.state.config.user_name=t}},user_avatar:{get(){return this.$store.state.config.user_avatar!=""?"/user_infos/"+this.$store.state.config.user_avatar:Bs},set(t){this.$store.state.config.user_avatar=t}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(t){this.$store.state.config.hardware_mode=t}},auto_update:{get(){return this.$store.state.config.auto_update},set(t){this.$store.state.config.auto_update=t}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(t){this.$store.state.config.auto_speak=t}},auto_read:{get(){return this.$store.state.config.auto_read},set(t){this.$store.state.config.auto_read=t}},xtts_current_language:{get(){return this.$store.state.config.xtts_current_language},set(t){console.log("Current xtts voice set to ",t),this.$store.state.config.xtts_current_language=t}},xtts_current_voice:{get(){return this.$store.state.config.xtts_current_voice===null||this.$store.state.config.xtts_current_voice===void 0?(console.log("current voice",this.$store.state.config.xtts_current_voice),"main_voice"):this.$store.state.config.xtts_current_voice},set(t){t=="main_voice"||t===void 0?(console.log("Current voice set to None"),this.$store.state.config.xtts_current_voice=null):(console.log("Current voice set to ",t),this.$store.state.config.xtts_current_voice=t)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(t){this.$store.state.config.audio_pitch=t}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(t){this.$store.state.config.audio_in_language=t}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(t){this.$store.state.config.use_user_name_in_discussions=t}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(t){this.$store.state.config.discussion_db_name=t}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(t){this.$store.commit("setbindingsZoo",t)}},modelsArr:{get(){return this.$store.state.modelsArr},set(t){this.$store.commit("setModelsArr",t)}},models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},installed_models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},diskUsage:{get(){return this.$store.state.diskUsage},set(t){this.$store.commit("setDiskUsage",t)}},ramUsage:{get(){return this.$store.state.ramUsage},set(t){this.$store.commit("setRamUsage",t)}},vramUsage:{get(){return this.$store.state.vramUsage},set(t){this.$store.commit("setVramUsage",t)}},disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return console.log(`this.diskUsage : ${this.diskUsage}`),this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return null;const t=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);return t>-1?this.bindingsZoo[t].name:null},active_pesonality(){if(!this.isMounted)return null;const t=this.$store.state.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);return t>-1?this.$store.state.personalities[t].name:null},speed_computed(){return si(this.addModel.speed)},total_size_computed(){return si(this.addModel.total_size)},downloaded_size_computed(){return si(this.addModel.downloaded_size)}},watch:{bec_collapsed(){Le(()=>{ze.replace()})},pc_collapsed(){Le(()=>{ze.replace()})},mc_collapsed(){Le(()=>{ze.replace()})},sc_collapsed(){Le(()=>{ze.replace()})},showConfirmation(){Le(()=>{ze.replace()})},mzl_collapsed(){Le(()=>{ze.replace()})},pzl_collapsed(){Le(()=>{ze.replace()})},ezl_collapsed(){Le(()=>{ze.replace()})},bzl_collapsed(){Le(()=>{ze.replace()})},all_collapsed(t){this.collapseAll(t),Le(()=>{ze.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,Le(()=>{ze.replace()})},isLoading(){Le(()=>{ze.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},mzdc_collapsed(){Le(()=>{ze.replace()})}},async beforeRouteLeave(t){if(await this.$router.isReady(),this.settingsChanged)return await this.$store.state.yesNoDialog.askQuestion(`Did You forget to apply changes?
-You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},D=t=>(vs("data-v-80919fde"),t=t(),Ss(),t),gat={class:"container flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full background-color 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"},bat={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg panels-color shadow-lg"},Eat={key:0,class:"flex gap-3 flex-1 items-center duration-75"},yat=D(()=>l("i",{"data-feather":"x"},null,-1)),vat=[yat],Sat=D(()=>l("i",{"data-feather":"check"},null,-1)),Tat=[Sat],xat={key:1,class:"flex gap-3 flex-1 items-center"},Cat=D(()=>l("i",{"data-feather":"refresh-ccw"},null,-1)),wat=[Cat],Rat=D(()=>l("i",{"data-feather":"list"},null,-1)),Aat=[Rat],Nat={class:"flex gap-3 flex-1 items-center justify-end"},Oat=D(()=>l("i",{"data-feather":"trash-2"},null,-1)),Mat=[Oat],Iat=D(()=>l("i",{"data-feather":"refresh-ccw"},null,-1)),kat=[Iat],Dat=D(()=>l("i",{"data-feather":"arrow-up-circle"},null,-1)),Lat=D(()=>l("i",{"data-feather":"alert-circle"},null,-1)),Pat=[Dat,Lat],Fat={class:"flex gap-3 items-center"},Uat={key:0,class:"flex gap-3 items-center"},Bat=D(()=>l("div",{class:"flex flex-row"},[l("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),l("i",{"data-feather":"check"})],-1)),Gat=[Bat],Vat=D(()=>l("div",{class:"flex flex-row"},[l("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),l("i",{"data-feather":"x"})],-1)),zat=[Vat],Hat={key:1,role:"status"},qat=D(()=>l("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"},[l("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"}),l("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)),$at=D(()=>l("span",{class:"sr-only"},"Loading...",-1)),Yat={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Wat={class:"flex flex-row p-3"},Kat=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),jat=[Kat],Qat=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Xat=[Qat],Zat=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),Jat=D(()=>l("div",{class:"mr-2"},"|",-1)),elt={class:"text-base font-semibold cursor-pointer select-none items-center"},tlt={class:"flex gap-2 items-center"},nlt={key:0},slt=["src"],ilt={class:"font-bold font-large text-lg"},rlt={key:1},olt={class:"flex gap-2 items-center"},alt=["src"],llt={class:"font-bold font-large text-lg"},clt=D(()=>l("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),dlt={class:"font-bold font-large text-lg"},ult=D(()=>l("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),plt={class:"font-bold font-large text-lg"},_lt={class:"mb-2"},hlt=D(()=>l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[l("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),et(" CPU Ram usage: ")],-1)),flt={class:"flex flex-col mx-2"},mlt=D(()=>l("b",null,"Avaliable ram: ",-1)),glt=D(()=>l("b",null,"Ram usage: ",-1)),blt={class:"p-2"},Elt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},ylt={class:"mb-2"},vlt=D(()=>l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),et(" Disk usage: ")],-1)),Slt={class:"flex flex-col mx-2"},Tlt=D(()=>l("b",null,"Avaliable disk space: ",-1)),xlt=D(()=>l("b",null,"Disk usage: ",-1)),Clt={class:"p-2"},wlt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Rlt={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Alt=["src"],Nlt={class:"flex flex-col mx-2"},Olt=D(()=>l("b",null,"Model: ",-1)),Mlt=D(()=>l("b",null,"Avaliable vram: ",-1)),Ilt=D(()=>l("b",null,"GPU usage: ",-1)),klt={class:"p-2"},Dlt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Llt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Plt={class:"flex flex-row p-3"},Flt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Ult=[Flt],Blt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Glt=[Blt],Vlt=D(()=>l("div",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1)),zlt={class:"flex flex-col mb-2 px-3 pb-2"},Hlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},qlt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_smart_routing",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use Smart Routing:")],-1)),$lt={style:{width:"100%"}},Ylt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"restore_model_after_smart_routing",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Restore model after smart routing:")],-1)),Wlt={style:{width:"100%"}},Klt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"smart_routing_router_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Router Model:")],-1)),jlt={style:{width:"100%"}},Qlt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"smart_routing_models_by_power",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Models by Power:")],-1)),Xlt={style:{width:"100%"}},Zlt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Jlt={class:"flex flex-row p-3"},ect=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),tct=[ect],nct=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),sct=[nct],ict=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),rct={class:"flex flex-col mb-2 px-3 pb-2"},oct={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 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"},act=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),lct={for:"logo-upload"},cct=["src"],dct={style:{width:"10%"}},uct=D(()=>l("i",{"data-feather":"x"},null,-1)),pct=[uct],_ct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),hct={class:"text-center items-center"},fct={class:"flex flex-row"},mct=D(()=>l("option",{value:"cpu"},"CPU",-1)),gct=D(()=>l("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),bct=D(()=>l("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),Ect=D(()=>l("option",{value:"nvidia"},"NVIDIA",-1)),yct=D(()=>l("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),vct=D(()=>l("option",{value:"amd"},"AMD",-1)),Sct=D(()=>l("option",{value:"apple-intel"},"Apple Intel",-1)),Tct=D(()=>l("option",{value:"apple-silicon"},"Apple Silicon",-1)),xct=[mct,gct,bct,Ect,yct,vct,Sct,Tct],Cct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),wct={style:{width:"100%"}},Rct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),Act={class:"flex flex-row"},Nct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),Oct={class:"flex flex-row"},Mct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),Ict={class:"flex flex-row"},kct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate showing the full prompt in console (for debug):")],-1)),Dct={class:"flex flex-row"},Lct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show final full prompt in console:")],-1)),Pct={class:"flex flex-row"},Fct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show chunks in console:")],-1)),Uct={class:"flex flex-row"},Bct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),Gct={class:"flex flex-row"},Vct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),zct={class:"flex flex-row"},Hct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),qct={class:"flex flex-row"},$ct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),Yct={class:"flex flex-row"},Wct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),Kct={class:"flex flex-row"},jct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Qct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),Xct=D(()=>l("option",{value:"lollms"},"Lollms communication template",-1)),Zct=D(()=>l("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1)),Jct=D(()=>l("option",{value:"bare"},"Bare, useful when in chat mode",-1)),edt=D(()=>l("option",{value:"llama3"},"LLama3 communication template",-1)),tdt=D(()=>l("option",{value:"mistral"},"Mistral communication template",-1)),ndt=[Xct,Zct,Jct,edt,tdt],sdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),idt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),rdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),odt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),adt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),ldt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),cdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),ddt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),udt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),pdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),_dt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),hdt=["innerHTML"],fdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_continue_message",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"useful for chat models and repote models but can be less useful for instruct ones"},"Use continue message:")],-1)),mdt={style:{width:"100%"}},gdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},bdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),Edt={style:{width:"100%"}},ydt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),vdt={style:{width:"100%"}},Sdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),Tdt={style:{width:"100%"}},xdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),Cdt={style:{width:"100%"}},wdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),Rdt={for:"avatar-upload"},Adt=["src"],Ndt={style:{width:"10%"}},Odt=D(()=>l("i",{"data-feather":"x"},null,-1)),Mdt=[Odt],Idt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),kdt={class:"flex flex-row"},Ddt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),Ldt={style:{width:"100%"}},Pdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),Fdt={style:{width:"100%"}},Udt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Bdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),Gdt={style:{width:"100%"}},Vdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),zdt={style:{width:"100%"}},Hdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),qdt={style:{width:"100%"}},$dt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),Ydt={style:{width:"100%"}},Wdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),Kdt={style:{width:"100%"}},jdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Qdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),Xdt={class:"flex flex-row"},Zdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),Jdt={style:{width:"100%"}},eut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},tut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),nut={class:"flex flex-row"},sut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},iut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),rut={class:"flex flex-row"},out=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),aut={class:"flex flex-row"},lut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),cut={class:"flex flex-row"},dut={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},uut={class:"flex flex-row p-3"},put=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),_ut=[put],hut=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),fut=[hut],mut=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1)),gut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},but=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),Eut={style:{width:"100%"}},yut=["onUpdate:modelValue"],vut=["onClick"],Sut=["onClick"],Tut=["onClick"],xut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),Cut=D(()=>l("option",{value:"semantic"},"Semantic Vectorizer",-1)),wut=D(()=>l("option",{value:"tfidf"},"TFIDF Vectorizer",-1)),Rut=D(()=>l("option",{value:"openai"},"OpenAI Vectorizer",-1)),Aut=[Cut,wut,Rut],Nut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),Out=["disabled"],Mut={key:0,value:"sentence-transformers/bert-base-nli-mean-tokens"},Iut={key:1,value:"bert-base-uncased"},kut={key:2,value:"bert-base-multilingual-uncased"},Dut={key:3,value:"bert-large-uncased"},Lut={key:4,value:"bert-large-uncased-whole-word-masking-finetuned-squad"},Put={key:5,value:"distilbert-base-uncased"},Fut={key:6,value:"roberta-base"},Uut={key:7,value:"roberta-large"},But={key:8,value:"xlm-roberta-base"},Gut={key:9,value:"xlm-roberta-large"},Vut={key:10,value:"albert-base-v2"},zut={key:11,value:"albert-large-v2"},Hut={key:12,value:"albert-xlarge-v2"},qut={key:13,value:"albert-xxlarge-v2"},$ut={key:14,value:"sentence-transformers/all-MiniLM-L6-v2"},Yut={key:15,value:"sentence-transformers/all-MiniLM-L12-v2"},Wut={key:16,value:"sentence-transformers/all-distilroberta-v1"},Kut={key:17,value:"sentence-transformers/all-mpnet-base-v2"},jut={key:18,value:"text-embedding-ada-002"},Qut={key:19,value:"text-embedding-babbage-001"},Xut={key:20,value:"text-embedding-curie-001"},Zut={key:21,value:"text-embedding-davinci-001"},Jut={key:22,disabled:""},ept=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_openai_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key for open ai embedding method (if not provided I'll use OPENAI_API_KEY environment variable):")],-1)),tpt={class:"flex flex-row"},npt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),spt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_overlap",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG overlap size:")],-1)),ipt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),rpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),opt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),apt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),lpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),cpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_activate_multi_hops",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate multi hops RAG:")],-1)),dpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"contextual_summary",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use contextual summary instead of rag (consumes alot of tokens and may be very slow but efficient, useful for summary and global questions that RAG can't do):")],-1)),upt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_deactivate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Useful for very big contexts and global tasks that require the whole document"},"Use all the document content (No split):")],-1)),ppt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},_pt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save vectorized database:")],-1)),hpt={class:"flex flex-row"},fpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),mpt={class:"flex flex-row"},gpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),bpt={class:"flex flex-row"},Ept=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_force_first_chunk",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force adding the first chunk of the file to the context:")],-1)),ypt={class:"flex flex-row"},vpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),Spt={class:"flex flex-row"},Tpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),xpt=D(()=>l("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),Cpt=D(()=>l("option",{value:"bm25_vectorizer"},"bm25 Vectorizer",-1)),wpt=D(()=>l("option",{value:"model_embedding"},"Model Embedding",-1)),Rpt=D(()=>l("option",{value:"sentense_transformer"},"Sentense Transformer",-1)),Apt=[xpt,Cpt,wpt,Rpt],Npt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_sentense_transformer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization model (for Sentense Transformer):")],-1)),Opt={style:{width:"100%"}},Mpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),Ipt=D(()=>l("option",{value:"PCA"},"PCA",-1)),kpt=D(()=>l("option",{value:"TSNE"},"TSNE",-1)),Dpt=[Ipt,kpt],Lpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),Ppt={class:"flex flex-row"},Fpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),Upt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),Bpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),Gpt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Vpt={class:"flex flex-row p-3"},zpt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Hpt=[zpt],qpt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),$pt=[qpt],Ypt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1)),Wpt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Kpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),jpt={class:"flex flex-row"},Qpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),Xpt={class:"flex flex-row"},Zpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),Jpt={class:"flex flex-row"},e_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),t_t={class:"flex flex-row"},n_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),s_t={class:"flex flex-col"},i_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),r_t={class:"flex flex-col"},o_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),a_t={class:"flex flex-col"},l_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),c_t={class:"flex flex-col"},d_t={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},u_t={class:"flex flex-row p-3"},p_t=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),__t=[p_t],h_t=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),f_t=[h_t],m_t=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1)),g_t={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},b_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),E_t={style:{width:"100%"}},y_t=D(()=>l("option",{value:"None"},"None",-1)),v_t=D(()=>l("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1)),S_t=D(()=>l("option",{value:"xtts"},"XTTS",-1)),T_t=D(()=>l("option",{value:"parler-tts"},"Parler-TTS",-1)),x_t=D(()=>l("option",{value:"openai_tts"},"Open AI TTS",-1)),C_t=D(()=>l("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1)),w_t=[y_t,v_t,S_t,T_t,x_t,C_t],R_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),A_t={style:{width:"100%"}},N_t=D(()=>l("option",{value:"None"},"None",-1)),O_t=D(()=>l("option",{value:"whisper"},"Whisper",-1)),M_t=D(()=>l("option",{value:"openai_whisper"},"Open AI Whisper",-1)),I_t=[N_t,O_t,M_t],k_t=D(()=>l("tr",null,null,-1)),D_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),L_t={style:{width:"100%"}},P_t=D(()=>l("option",{value:"None"},"None",-1)),F_t=D(()=>l("option",{value:"diffusers"},"Diffusers",-1)),U_t=D(()=>l("option",{value:"diffusers_client"},"Diffusers Client",-1)),B_t=D(()=>l("option",{value:"autosd"},"AUTO1111's SD",-1)),G_t=D(()=>l("option",{value:"dall-e"},"Open AI DALL-E",-1)),V_t=D(()=>l("option",{value:"midjourney"},"Midjourney",-1)),z_t=D(()=>l("option",{value:"comfyui"},"Comfyui",-1)),H_t=D(()=>l("option",{value:"fooocus"},"Fooocus",-1)),q_t=[P_t,F_t,U_t,B_t,G_t,V_t,z_t,H_t],$_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),Y_t={style:{width:"100%"}},W_t=D(()=>l("option",{value:"None"},"None",-1)),K_t=D(()=>l("option",{value:"musicgen"},"Music Gen",-1)),j_t=[W_t,K_t],Q_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttv_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTV Service:")],-1)),X_t={style:{width:"100%"}},Z_t=D(()=>l("option",{value:"None"},"None",-1)),J_t=D(()=>l("option",{value:"cog_video_x"},"Cog Video X",-1)),eht=[Z_t,J_t],tht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},nht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),sht={class:"flex flex-row"},iht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),rht={class:"flex flex-row"},oht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),aht={class:"flex flex-row"},lht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),cht={class:"flex flex-row"},dht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},uht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),pht={style:{width:"100%"}},_ht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),hht={style:{width:"100%"}},fht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),mht={style:{width:"100%"}},ght=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),bht={style:{width:"100%"}},Eht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),yht={style:{width:"100%"}},vht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),Sht={style:{width:"100%"}},Tht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),xht={style:{width:"100%"}},Cht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),wht={class:"flex flex-row"},Rht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),Aht={class:"flex flex-row"},Nht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Oht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),Mht={style:{width:"100%"}},Iht=["value"],kht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),Dht={style:{width:"100%"}},Lht=["value"],Pht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Fht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Uht={style:{width:"100%"}},Bht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys:")],-1)),Ght={style:{width:"100%"}},Vht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"port",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),zht={style:{width:"100%"}},Hht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"headless_server_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode:")],-1)),qht={style:{width:"100%"}},$ht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),Yht={style:{width:"100%"}},Wht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_rag_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms RAG server:")],-1)),Kht={style:{width:"100%"}},jht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tts_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTS server:")],-1)),Qht={style:{width:"100%"}},Xht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_stt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms STT server:")],-1)),Zht={style:{width:"100%"}},Jht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tti_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTI server:")],-1)),eft={style:{width:"100%"}},tft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_itt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms ITT server:")],-1)),nft={style:{width:"100%"}},sft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_ttm_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTM server:")],-1)),ift={style:{width:"100%"}},rft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),oft={style:{width:"100%"}},aft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),lft={style:{width:"100%"}},cft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),dft={style:{width:"100%"}},uft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},pft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),_ft={class:"flex flex-row"},hft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),fft={class:"flex flex-row"},mft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),gft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),bft=["value"],Eft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},yft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),vft={class:"flex flex-row"},Sft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),Tft={class:"flex flex-row"},xft=["value"],Cft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},wft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),Rft={class:"flex flex-row"},Aft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),Nft={class:"flex flex-row"},Oft=["value"],Mft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Ift=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),kft={class:"flex flex-row"},Dft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),Lft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),Pft=["value"],Fft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Uft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),Bft={class:"flex flex-row"},Gft=["value"],Vft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),zft={class:"flex flex-row"},Hft=["value"],qft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),$ft={class:"flex flex-row"},Yft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),Wft={class:"flex flex-row"},Kft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),jft={class:"flex flex-row"},Qft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),Xft={class:"flex flex-row"},Zft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),Jft={class:"flex flex-row"},emt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),tmt={class:"flex flex-row"},nmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),smt={class:"flex flex-row"},imt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),rmt={class:"flex flex-row"},omt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),amt={class:"flex flex-row"},lmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),cmt={class:"flex flex-row"},dmt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},umt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),pmt={class:"flex flex-row"},_mt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),hmt={class:"flex flex-row"},fmt=D(()=>l("option",null," tts-1 ",-1)),mmt=D(()=>l("option",null," tts-2 ",-1)),gmt=[fmt,mmt],bmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),Emt={class:"flex flex-row"},ymt=D(()=>l("option",null," alloy ",-1)),vmt=D(()=>l("option",null," echo ",-1)),Smt=D(()=>l("option",null," fable ",-1)),Tmt=D(()=>l("option",null," nova ",-1)),xmt=D(()=>l("option",null," shimmer ",-1)),Cmt=[ymt,vmt,Smt,Tmt,xmt],wmt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Rmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),Amt={class:"flex flex-row"},Nmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),Omt={class:"flex flex-row"},Mmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),Imt={class:"flex flex-row"},kmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),Dmt={class:"flex flex-row"},Lmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),Pmt={class:"flex flex-row"},Fmt=["value"],Umt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Bmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),Gmt={class:"flex flex-row"},Vmt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),zmt=[Vmt],Hmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),qmt={class:"flex flex-row"},$mt=D(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1)),Ymt={class:"flex flex-row"},Wmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),Kmt={class:"flex flex-row"},jmt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Qmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),Xmt={class:"flex flex-row"},Zmt=D(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1)),Jmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),egt={class:"flex flex-row"},tgt=D(()=>l("td",null,null,-1)),ngt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},sgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_client_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers client base url:")],-1)),igt={class:"flex flex-row"},rgt=D(()=>l("td",null,null,-1)),ogt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},agt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),lgt={class:"flex flex-row"},cgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),dgt={class:"flex flex-row"},ugt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),pgt={class:"flex flex-row"},_gt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},hgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),fgt={class:"flex flex-row"},mgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),ggt={class:"flex flex-row"},bgt=D(()=>l("option",null," dall-e-2 ",-1)),Egt=D(()=>l("option",null," dall-e-3 ",-1)),ygt=[bgt,Egt],vgt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Sgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),Tgt={class:"flex flex-row"},xgt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Cgt=[xgt],wgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),Rgt={class:"flex flex-row"},Agt=["value"],Ngt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),Ogt={class:"flex flex-row"},Mgt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Igt=[Mgt],kgt=D(()=>l("td",{style:{"min-width":"200px"}},null,-1)),Dgt={class:"flex flex-row"},Lgt=D(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1)),Pgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),Fgt={class:"flex flex-row"},Ugt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Bgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),Ggt={class:"flex flex-row"},Vgt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),zgt=[Vgt],Hgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),qgt={class:"flex flex-row"},$gt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),Ygt={class:"flex flex-row"},Wgt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Kgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),jgt={class:"flex flex-row"},Qgt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Xgt=[Qgt],Zgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),Jgt={class:"flex flex-row"},ebt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),tbt={class:"flex flex-row"},nbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),sbt={class:"flex flex-col align-bottom"},ibt={class:"relative"},rbt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),obt={class:"absolute right-0"},abt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),lbt={class:"flex flex-row"},cbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),dbt={class:"flex flex-row"},ubt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),pbt={class:"flex flex-row"},_bt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},hbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),fbt={class:"flex flex-row"},mbt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),gbt=[mbt],bbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),Ebt={class:"flex flex-row"},ybt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),vbt={class:"flex flex-row"},Sbt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Tbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),xbt={class:"flex flex-row"},Cbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),wbt={class:"flex flex-row"},Rbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),Abt={class:"flex flex-row"},Nbt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Obt={class:"flex flex-row p-3"},Mbt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Ibt=[Mbt],kbt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Dbt=[kbt],Lbt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),Pbt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Fbt=D(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Ubt={key:1,class:"mr-2"},Bbt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},Gbt={class:"flex gap-1 items-center"},Vbt=["src"],zbt={class:"font-bold font-large text-lg line-clamp-1"},Hbt={key:0,class:"mb-2"},qbt={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},$bt=D(()=>l("i",{"data-feather":"chevron-up"},null,-1)),Ybt=[$bt],Wbt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Kbt=[Wbt],jbt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Qbt={class:"flex flex-row p-3"},Xbt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Zbt=[Xbt],Jbt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),eEt=[Jbt],tEt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),nEt={class:"flex flex-row items-center"},sEt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},iEt=D(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),rEt={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},oEt=D(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),aEt={key:2,class:"mr-2"},lEt={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},cEt={class:"flex gap-1 items-center"},dEt=["src"],uEt={class:"font-bold font-large text-lg line-clamp-1"},pEt={class:"mx-2 mb-4"},_Et={class:"relative"},hEt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},fEt={key:0},mEt=D(()=>l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"inline w-4 h-4 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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),gEt=[mEt],bEt={key:1},EEt=D(()=>l("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),yEt=[EEt],vEt=D(()=>l("label",{for:"only_installed"},"Show only installed models",-1)),SEt=D(()=>l("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),TEt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},xEt=D(()=>l("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("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"}),l("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)),CEt=D(()=>l("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),wEt=[xEt,CEt],REt={key:1,class:"mb-2"},AEt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},NEt=D(()=>l("i",{"data-feather":"chevron-up"},null,-1)),OEt=[NEt],MEt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),IEt=[MEt],kEt={class:"mb-2"},DEt={class:"p-2"},LEt={class:"mb-3"},PEt=D(()=>l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),FEt={key:0},UEt={class:"mb-3"},BEt=D(()=>l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),GEt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},VEt=D(()=>l("div",{role:"status",class:"justify-center"},null,-1)),zEt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},HEt={class:"w-full p-2"},qEt={class:"flex justify-between mb-1"},$Et=Na(' Downloading Loading... ',1),YEt={class:"text-sm font-medium text-blue-700 dark:text-white"},WEt=["title"],KEt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},jEt={class:"flex justify-between mb-1"},QEt={class:"text-base font-medium text-blue-700 dark:text-white"},XEt={class:"text-sm font-medium text-blue-700 dark:text-white"},ZEt={class:"flex flex-grow"},JEt={class:"flex flex-row flex-grow gap-3"},eyt={class:"p-2 text-center grow"},tyt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},nyt={class:"flex flex-row p-3 items-center"},syt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),iyt=[syt],ryt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),oyt=[ryt],ayt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),lyt={key:0,class:"mr-2"},cyt={class:"mr-2 font-bold font-large text-lg line-clamp-1"},dyt={key:1,class:"mr-2"},uyt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},pyt={key:0,class:"flex -space-x-4 items-center"},_yt={class:"group items-center flex flex-row"},hyt=["onClick"],fyt=["src","title"],myt=["onClick"],gyt=D(()=>l("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[l("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("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)),byt=[gyt],Eyt=D(()=>l("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("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)),yyt=[Eyt],vyt={class:"mx-2 mb-4"},Syt=D(()=>l("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Tyt={class:"relative"},xyt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Cyt={key:0},wyt=D(()=>l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"inline w-4 h-4 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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),Ryt=[wyt],Ayt={key:1},Nyt=D(()=>l("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Oyt=[Nyt],Myt={key:0,class:"mx-2 mb-4"},Iyt={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},kyt=["selected"],Dyt={key:0,class:"mb-2"},Lyt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Pyt=D(()=>l("i",{"data-feather":"chevron-up"},null,-1)),Fyt=[Pyt],Uyt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Byt=[Uyt],Gyt={class:"flex flex-col mb-2 p-3 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Vyt={class:"flex flex-row"},zyt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Hyt=[zyt],qyt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),$yt=[qyt],Yyt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),Wyt={class:"m-2"},Kyt={class:"flex flex-row gap-2 items-center"},jyt=D(()=>l("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),Qyt={class:"m-2"},Xyt=D(()=>l("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),Zyt={class:"m-2"},Jyt={class:"flex flex-col align-bottom"},evt={class:"relative"},tvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),nvt={class:"absolute right-0"},svt={class:"m-2"},ivt={class:"flex flex-col align-bottom"},rvt={class:"relative"},ovt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),avt={class:"absolute right-0"},lvt={class:"m-2"},cvt={class:"flex flex-col align-bottom"},dvt={class:"relative"},uvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),pvt={class:"absolute right-0"},_vt={class:"m-2"},hvt={class:"flex flex-col align-bottom"},fvt={class:"relative"},mvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),gvt={class:"absolute right-0"},bvt={class:"m-2"},Evt={class:"flex flex-col align-bottom"},yvt={class:"relative"},vvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),Svt={class:"absolute right-0"},Tvt={class:"m-2"},xvt={class:"flex flex-col align-bottom"},Cvt={class:"relative"},wvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),Rvt={class:"absolute right-0"};function Avt(t,e,n,s,i,r){const o=tt("StringListManager"),a=tt("Card"),c=tt("BindingEntry"),d=tt("RadioOptions"),u=tt("model-entry"),h=tt("personality-entry"),f=tt("AddModelDialog"),m=tt("ChoiceDialog");return T(),x(Fe,null,[l("div",gat,[l("div",bat,[i.showConfirmation?(T(),x("div",Eat,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=j(_=>i.showConfirmation=!1,["stop"]))},vat),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=j(_=>r.save_configuration(),["stop"]))},Tat)])):G("",!0),i.showConfirmation?G("",!0):(T(),x("div",xat,[l("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=_=>r.reset_configuration())},wat),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=j(_=>i.all_collapsed=!i.all_collapsed,["stop"]))},Aat)])),l("div",Nat,[l("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=_=>r.api_get_req("clear_uploads").then(g=>{g.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},Mat),l("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=_=>r.api_post_req("restart_program").then(g=>{g.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},kat),i.has_updates?(T(),x("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=_=>r.api_post_req("update_software").then(g=>{g.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},Pat)):G("",!0),l("div",Fat,[i.settingsChanged?(T(),x("div",Uat,[i.isLoading?G("",!0):(T(),x("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=j(_=>r.applyConfiguration(),["stop"]))},Gat)),i.isLoading?G("",!0):(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=j(_=>r.cancelConfiguration(),["stop"]))},zat))])):G("",!0),i.isLoading?(T(),x("div",Hat,[l("p",null,K(i.loading_text),1),qat,$at])):G("",!0)])])]),l("div",{class:Ge(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[l("div",Yat,[l("div",Wat,[l("button",{onClick:e[9]||(e[9]=j(_=>i.sc_collapsed=!i.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,jat,512),[[wt,i.sc_collapsed]]),P(l("div",null,Xat,512),[[wt,!i.sc_collapsed]]),Zat,Jat,l("div",elt,[l("div",tlt,[l("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(T(),x("div",nlt,[(T(!0),x(Fe,null,Ke(r.vramUsage.gpus,_=>(T(),x("div",{class:"flex gap-2 items-center",key:_},[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,slt),l("h3",ilt,[l("div",null,K(r.computedFileSize(_.used_vram))+" / "+K(r.computedFileSize(_.total_vram))+" ("+K(_.percentage)+"%) ",1)])]))),128))])):G("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(T(),x("div",rlt,[l("div",olt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,alt),l("h3",llt,[l("div",null,K(r.vramUsage.gpus.length)+"x ",1)])])])):G("",!0)]),clt,l("h3",dlt,[l("div",null,K(r.ram_usage)+" / "+K(r.ram_total_space)+" ("+K(r.ram_percent_usage)+"%)",1)]),ult,l("h3",plt,[l("div",null,K(r.disk_binding_models_usage)+" / "+K(r.disk_total_space)+" ("+K(r.disk_percent_usage)+"%)",1)])])])])]),l("div",{class:Ge([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",_lt,[hlt,l("div",flt,[l("div",null,[mlt,et(K(r.ram_available_space),1)]),l("div",null,[glt,et(" "+K(r.ram_usage)+" / "+K(r.ram_total_space)+" ("+K(r.ram_percent_usage)+")% ",1)])]),l("div",blt,[l("div",Elt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht("width: "+r.ram_percent_usage+"%;")},null,4)])])]),l("div",ylt,[vlt,l("div",Slt,[l("div",null,[Tlt,et(K(r.disk_available_space),1)]),l("div",null,[xlt,et(" "+K(r.disk_binding_models_usage)+" / "+K(r.disk_total_space)+" ("+K(r.disk_percent_usage)+"%)",1)])]),l("div",Clt,[l("div",wlt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(T(!0),x(Fe,null,Ke(r.vramUsage.gpus,_=>(T(),x("div",{class:"mb-2",key:_},[l("label",Rlt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Alt),et(" GPU usage: ")]),l("div",Nlt,[l("div",null,[Olt,et(K(_.gpu_model),1)]),l("div",null,[Mlt,et(K(this.computedFileSize(_.available_space)),1)]),l("div",null,[Ilt,et(" "+K(this.computedFileSize(_.used_vram))+" / "+K(this.computedFileSize(_.total_vram))+" ("+K(_.percentage)+"%)",1)])]),l("div",klt,[l("div",Dlt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht("width: "+_.percentage+"%;")},null,4)])])]))),128))],2)]),l("div",Llt,[l("div",Plt,[l("button",{onClick:e[10]||(e[10]=j(_=>i.smartrouterconf_collapsed=!i.smartrouterconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,Ult,512),[[wt,i.smartrouterconf_collapsed]]),P(l("div",null,Glt,512),[[wt,!i.smartrouterconf_collapsed]]),Vlt])]),l("div",{class:Ge([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",zlt,[V(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Hlt,[l("tr",null,[qlt,l("td",$lt,[P(l("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=_=>r.configFile.use_smart_routing=_),onChange:e[12]||(e[12]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_smart_routing]])])]),l("tr",null,[Ylt,l("td",Wlt,[P(l("input",{type:"checkbox",id:"restore_model_after_smart_routing","onUpdate:modelValue":e[13]||(e[13]=_=>r.configFile.restore_model_after_smart_routing=_),onChange:e[14]||(e[14]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.restore_model_after_smart_routing]])])]),l("tr",null,[Klt,l("td",jlt,[P(l("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[15]||(e[15]=_=>r.configFile.smart_routing_router_model=_),onChange:e[16]||(e[16]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.smart_routing_router_model]])])]),l("tr",null,[Qlt,l("td",Xlt,[V(o,{modelValue:r.configFile.smart_routing_models_by_power,"onUpdate:modelValue":e[17]||(e[17]=_=>r.configFile.smart_routing_models_by_power=_),onChange:e[18]||(e[18]=_=>i.settingsChanged=!0),placeholder:"Enter model name"},null,8,["modelValue"])])])])]),_:1})])],2)]),l("div",Zlt,[l("div",Jlt,[l("button",{onClick:e[19]||(e[19]=j(_=>i.mainconf_collapsed=!i.mainconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,tct,512),[[wt,i.mainconf_collapsed]]),P(l("div",null,sct,512),[[wt,!i.mainconf_collapsed]]),ict])]),l("div",{class:Ge([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",rct,[V(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",oct,[l("tr",null,[act,l("td",null,[l("label",lct,[l("img",{src:r.configFile.app_custom_logo!=null&&r.configFile.app_custom_logo!=""?"/user_infos/"+r.configFile.app_custom_logo:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,cct)]),l("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[20]||(e[20]=(..._)=>r.uploadLogo&&r.uploadLogo(..._))},null,32)]),l("td",dct,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[21]||(e[21]=j(_=>r.resetLogo(),["stop"]))},pct)])]),l("tr",null,[_ct,l("td",hct,[l("div",fct,[P(l("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[22]||(e[22]=_=>r.configFile.hardware_mode=_),onChange:e[23]||(e[23]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},xct,544),[[Dt,r.configFile.hardware_mode]])])])]),l("tr",null,[Cct,l("td",wct,[P(l("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[24]||(e[24]=_=>r.configFile.discussion_db_name=_),onChange:e[25]||(e[25]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.discussion_db_name]])])]),l("tr",null,[Rct,l("td",null,[l("div",Act,[P(l("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[26]||(e[26]=_=>r.configFile.copy_to_clipboard_add_all_details=_),onChange:e[27]||(e[27]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.copy_to_clipboard_add_all_details]])])])]),l("tr",null,[Nct,l("td",null,[l("div",Oct,[P(l("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[28]||(e[28]=_=>r.configFile.auto_show_browser=_),onChange:e[29]||(e[29]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_show_browser]])])])]),l("tr",null,[Mct,l("td",null,[l("div",Ict,[P(l("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[30]||(e[30]=_=>r.configFile.debug=_),onChange:e[31]||(e[31]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.debug]])])])]),l("tr",null,[kct,l("td",null,[l("div",Dct,[P(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[32]||(e[32]=_=>r.configFile.debug_show_final_full_prompt=_),onChange:e[33]||(e[33]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[Lct,l("td",null,[l("div",Pct,[P(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[34]||(e[34]=_=>r.configFile.debug_show_final_full_prompt=_),onChange:e[35]||(e[35]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[Fct,l("td",null,[l("div",Uct,[P(l("input",{type:"checkbox",id:"debug_show_chunks",required:"","onUpdate:modelValue":e[36]||(e[36]=_=>r.configFile.debug_show_chunks=_),onChange:e[37]||(e[37]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.debug_show_chunks]])])])]),l("tr",null,[Bct,l("td",null,[l("div",Gct,[P(l("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[38]||(e[38]=_=>r.configFile.debug_log_file_path=_),onChange:e[39]||(e[39]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.debug_log_file_path]])])])]),l("tr",null,[Vct,l("td",null,[l("div",zct,[P(l("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[40]||(e[40]=_=>r.configFile.show_news_panel=_),onChange:e[41]||(e[41]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.show_news_panel]])])])]),l("tr",null,[Hct,l("td",null,[l("div",qct,[P(l("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[42]||(e[42]=_=>r.configFile.auto_save=_),onChange:e[43]||(e[43]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_save]])])])]),l("tr",null,[$ct,l("td",null,[l("div",Yct,[P(l("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[44]||(e[44]=_=>r.configFile.auto_update=_),onChange:e[45]||(e[45]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_update]])])])]),l("tr",null,[Wct,l("td",null,[l("div",Kct,[P(l("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[46]||(e[46]=_=>r.configFile.auto_title=_),onChange:e[47]||(e[47]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_title]])])])])])]),_:1}),V(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",jct,[l("tr",null,[Qct,l("td",null,[l("select",{onChange:e[48]||(e[48]=(..._)=>r.handleTemplateSelection&&r.handleTemplateSelection(..._))},ndt,32)])]),l("tr",null,[sdt,l("td",null,[P(l("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[49]||(e[49]=_=>r.configFile.start_header_id_template=_),onChange:e[50]||(e[50]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.start_header_id_template]])])]),l("tr",null,[idt,l("td",null,[P(l("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[51]||(e[51]=_=>r.configFile.end_header_id_template=_),onChange:e[52]||(e[52]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_header_id_template]])])]),l("tr",null,[rdt,l("td",null,[P(l("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[53]||(e[53]=_=>r.configFile.start_user_header_id_template=_),onChange:e[54]||(e[54]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.start_user_header_id_template]])])]),l("tr",null,[odt,l("td",null,[P(l("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[55]||(e[55]=_=>r.configFile.end_user_header_id_template=_),onChange:e[56]||(e[56]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_user_header_id_template]])])]),l("tr",null,[adt,l("td",null,[P(l("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[57]||(e[57]=_=>r.configFile.end_user_message_id_template=_),onChange:e[58]||(e[58]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_user_message_id_template]])])]),l("tr",null,[ldt,l("td",null,[P(l("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[59]||(e[59]=_=>r.configFile.start_ai_header_id_template=_),onChange:e[60]||(e[60]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.start_ai_header_id_template]])])]),l("tr",null,[cdt,l("td",null,[P(l("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[61]||(e[61]=_=>r.configFile.end_ai_header_id_template=_),onChange:e[62]||(e[62]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_ai_header_id_template]])])]),l("tr",null,[ddt,l("td",null,[P(l("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[63]||(e[63]=_=>r.configFile.end_ai_message_id_template=_),onChange:e[64]||(e[64]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_ai_message_id_template]])])]),l("tr",null,[udt,l("td",null,[P(l("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[65]||(e[65]=_=>r.configFile.separator_template=_),onChange:e[66]||(e[66]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.separator_template]])])]),l("tr",null,[pdt,l("td",null,[P(l("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[67]||(e[67]=_=>r.configFile.system_message_template=_),onChange:e[68]||(e[68]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.system_message_template]])])]),l("tr",null,[_dt,l("td",null,[l("div",{innerHTML:r.full_template},null,8,hdt)])]),l("tr",null,[fdt,l("td",mdt,[P(l("input",{type:"checkbox",id:"use_continue_message",required:"","onUpdate:modelValue":e[69]||(e[69]=_=>r.configFile.use_continue_message=_),onChange:e[70]||(e[70]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_continue_message]])])])])]),_:1}),V(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",gdt,[l("tr",null,[bdt,l("td",Edt,[P(l("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[71]||(e[71]=_=>r.configFile.user_name=_),onChange:e[72]||(e[72]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.user_name]])])]),l("tr",null,[ydt,l("td",vdt,[P(l("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[73]||(e[73]=_=>r.configFile.user_description=_),onChange:e[74]||(e[74]=_=>i.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.user_description]])])]),l("tr",null,[Sdt,l("td",Tdt,[P(l("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[75]||(e[75]=_=>r.configFile.use_user_informations_in_discussion=_),onChange:e[76]||(e[76]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_user_informations_in_discussion]])])]),l("tr",null,[xdt,l("td",Cdt,[P(l("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[77]||(e[77]=_=>r.configFile.use_model_name_in_discussions=_),onChange:e[78]||(e[78]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_model_name_in_discussions]])])]),l("tr",null,[wdt,l("td",null,[l("label",Rdt,[l("img",{src:r.configFile.user_avatar!=null&&r.configFile.user_avatar!=""?"/user_infos/"+r.configFile.user_avatar:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,Adt)]),l("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[79]||(e[79]=(..._)=>r.uploadAvatar&&r.uploadAvatar(..._))},null,32)]),l("td",Ndt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[80]||(e[80]=j(_=>r.resetAvatar(),["stop"]))},Mdt)])]),l("tr",null,[Idt,l("td",null,[l("div",kdt,[P(l("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[81]||(e[81]=_=>r.configFile.use_user_name_in_discussions=_),onChange:e[82]||(e[82]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_user_name_in_discussions]])])])]),l("tr",null,[Ddt,l("td",Ldt,[P(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=_=>r.configFile.max_n_predict=_),onChange:e[84]||(e[84]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.max_n_predict]])])]),l("tr",null,[Pdt,l("td",Fdt,[P(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[85]||(e[85]=_=>r.configFile.max_n_predict=_),onChange:e[86]||(e[86]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.max_n_predict]])])])])]),_:1}),V(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Udt,[l("tr",null,[Bdt,l("td",Gdt,[P(l("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[87]||(e[87]=_=>r.configFile.turn_on_code_execution=_),onChange:e[88]||(e[88]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_code_execution]])])]),l("tr",null,[Vdt,l("td",zdt,[P(l("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=_=>r.configFile.turn_on_code_validation=_),onChange:e[90]||(e[90]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_code_validation]])])]),l("tr",null,[Hdt,l("td",qdt,[P(l("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=_=>r.configFile.turn_on_setting_update_validation=_),onChange:e[92]||(e[92]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_setting_update_validation]])])]),l("tr",null,[$dt,l("td",Ydt,[P(l("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=_=>r.configFile.turn_on_open_file_validation=_),onChange:e[94]||(e[94]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_open_file_validation]])])]),l("tr",null,[Wdt,l("td",Kdt,[P(l("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[95]||(e[95]=_=>r.configFile.turn_on_send_file_validation=_),onChange:e[96]||(e[96]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),V(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",jdt,[l("tr",null,[Qdt,l("td",null,[l("div",Xdt,[P(l("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[97]||(e[97]=_=>r.configFile.activate_skills_lib=_),onChange:e[98]||(e[98]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_skills_lib]])])])]),l("tr",null,[Zdt,l("td",Jdt,[P(l("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[99]||(e[99]=_=>r.configFile.skills_lib_database_name=_),onChange:e[100]||(e[100]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.skills_lib_database_name]])])])])]),_:1}),V(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",eut,[l("tr",null,[tut,l("td",null,[l("div",nut,[P(l("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[101]||(e[101]=_=>r.configFile.pdf_latex_path=_),onChange:e[102]||(e[102]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.pdf_latex_path]])])])])])]),_:1}),V(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",sut,[l("tr",null,[iut,l("td",null,[l("div",rut,[P(l("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=_=>r.configFile.positive_boost=_),onChange:e[104]||(e[104]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.positive_boost]])])])]),l("tr",null,[out,l("td",null,[l("div",aut,[P(l("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[105]||(e[105]=_=>r.configFile.negative_boost=_),onChange:e[106]||(e[106]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.negative_boost]])])])]),l("tr",null,[lut,l("td",null,[l("div",cut,[P(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[107]||(e[107]=_=>r.configFile.fun_mode=_),onChange:e[108]||(e[108]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.fun_mode]])])])])])]),_:1})])],2)]),l("div",dut,[l("div",uut,[l("button",{onClick:e[109]||(e[109]=j(_=>i.data_conf_collapsed=!i.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,_ut,512),[[wt,i.data_conf_collapsed]]),P(l("div",null,fut,512),[[wt,!i.data_conf_collapsed]]),mut])]),l("div",{class:Ge([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[V(a,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",gut,[l("tr",null,[but,l("td",Eut,[(T(!0),x(Fe,null,Ke(r.configFile.rag_databases,(_,g)=>(T(),x("div",{key:g,class:"flex items-center mb-2"},[P(l("input",{type:"text","onUpdate:modelValue":b=>r.configFile.rag_databases[g]=b,onChange:e[110]||(e[110]=b=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,40,yut),[[pe,r.configFile.rag_databases[g]]]),l("button",{onClick:b=>r.vectorize_folder(g),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded"},"(Re)Vectorize",8,vut),l("button",{onClick:b=>r.select_folder(g),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-green-300 rounded"},"Select Folder",8,Sut),l("button",{onClick:b=>r.removeDataSource(g),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-green-300 rounded"},"Remove",8,Tut)]))),128)),l("button",{onClick:e[111]||(e[111]=(..._)=>r.addDataSource&&r.addDataSource(..._)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),l("tr",null,[xut,l("td",null,[P(l("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[112]||(e[112]=_=>r.configFile.rag_vectorizer=_),onChange:e[113]||(e[113]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Aut,544),[[Dt,r.configFile.rag_vectorizer]])])]),l("tr",null,[Nut,l("td",null,[P(l("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[114]||(e[114]=_=>r.configFile.rag_vectorizer_model=_),onChange:e[115]||(e[115]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:r.configFile.rag_vectorizer==="tfidf"},[r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Mut,"sentence-transformers/bert-base-nli-mean-tokens")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Iut,"bert-base-uncased")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",kut,"bert-base-multilingual-uncased")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Dut,"bert-large-uncased")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Lut,"bert-large-uncased-whole-word-masking-finetuned-squad")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Put,"distilbert-base-uncased")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Fut,"roberta-base")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Uut,"roberta-large")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",But,"xlm-roberta-base")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Gut,"xlm-roberta-large")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Vut,"albert-base-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",zut,"albert-large-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Hut,"albert-xlarge-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",qut,"albert-xxlarge-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",$ut,"sentence-transformers/all-MiniLM-L6-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Yut,"sentence-transformers/all-MiniLM-L12-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Wut,"sentence-transformers/all-distilroberta-v1")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Kut,"sentence-transformers/all-mpnet-base-v2")):G("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",jut,"text-embedding-ada-002")):G("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",Qut,"text-embedding-babbage-001")):G("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",Xut,"text-embedding-curie-001")):G("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",Zut,"text-embedding-davinci-001")):G("",!0),r.configFile.rag_vectorizer==="tfidf"?(T(),x("option",Jut,"No models available for TFIDF")):G("",!0)],40,Out),[[Dt,r.configFile.rag_vectorizer_model]])])]),l("tr",null,[ept,l("td",null,[l("div",tpt,[P(l("input",{type:"text",id:"rag_vectorizer_openai_key",required:"","onUpdate:modelValue":e[116]||(e[116]=_=>r.configFile.rag_vectorizer_openai_key=_),onChange:e[117]||(e[117]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.rag_vectorizer_openai_key]])])])]),l("tr",null,[npt,l("td",null,[P(l("input",{id:"rag_chunk_size","onUpdate:modelValue":e[118]||(e[118]=_=>r.configFile.rag_chunk_size=_),onChange:e[119]||(e[119]=_=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.rag_chunk_size]]),P(l("input",{"onUpdate:modelValue":e[120]||(e[120]=_=>r.configFile.rag_chunk_size=_),type:"number",onChange:e[121]||(e[121]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.rag_chunk_size]])])]),l("tr",null,[spt,l("td",null,[P(l("input",{id:"rag_overlap","onUpdate:modelValue":e[122]||(e[122]=_=>r.configFile.rag_overlap=_),onChange:e[123]||(e[123]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.rag_overlap]]),P(l("input",{"onUpdate:modelValue":e[124]||(e[124]=_=>r.configFile.rag_overlap=_),type:"number",onChange:e[125]||(e[125]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.rag_overlap]])])]),l("tr",null,[ipt,l("td",null,[P(l("input",{id:"rag_n_chunks","onUpdate:modelValue":e[126]||(e[126]=_=>r.configFile.rag_n_chunks=_),onChange:e[127]||(e[127]=_=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.rag_n_chunks]]),P(l("input",{"onUpdate:modelValue":e[128]||(e[128]=_=>r.configFile.rag_n_chunks=_),type:"number",onChange:e[129]||(e[129]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.rag_n_chunks]])])]),l("tr",null,[rpt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[130]||(e[130]=_=>r.configFile.rag_clean_chunks=_),type:"checkbox",onChange:e[131]||(e[131]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_clean_chunks]])])]),l("tr",null,[opt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[132]||(e[132]=_=>r.configFile.rag_follow_subfolders=_),type:"checkbox",onChange:e[133]||(e[133]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_follow_subfolders]])])]),l("tr",null,[apt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[134]||(e[134]=_=>r.configFile.rag_check_new_files_at_startup=_),type:"checkbox",onChange:e[135]||(e[135]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_check_new_files_at_startup]])])]),l("tr",null,[lpt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[136]||(e[136]=_=>r.configFile.rag_preprocess_chunks=_),type:"checkbox",onChange:e[137]||(e[137]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_preprocess_chunks]])])]),l("tr",null,[cpt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[138]||(e[138]=_=>r.configFile.rag_activate_multi_hops=_),type:"checkbox",onChange:e[139]||(e[139]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_activate_multi_hops]])])]),l("tr",null,[dpt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[140]||(e[140]=_=>r.configFile.contextual_summary=_),type:"checkbox",onChange:e[141]||(e[141]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.contextual_summary]])])]),l("tr",null,[upt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[142]||(e[142]=_=>r.configFile.rag_deactivate=_),type:"checkbox",onChange:e[143]||(e[143]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_deactivate]])])])])]),_:1}),V(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",ppt,[l("tr",null,[_pt,l("td",null,[l("div",hpt,[P(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[144]||(e[144]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[145]||(e[145]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_save_db]])])])]),l("tr",null,[fpt,l("td",null,[l("div",mpt,[P(l("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[146]||(e[146]=_=>r.configFile.data_vectorization_visualize_on_vectorization=_),onChange:e[147]||(e[147]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),l("tr",null,[gpt,l("td",null,[l("div",bpt,[P(l("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[148]||(e[148]=_=>r.configFile.data_vectorization_build_keys_words=_),onChange:e[149]||(e[149]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_build_keys_words]])])])]),l("tr",null,[Ept,l("td",null,[l("div",ypt,[P(l("input",{type:"checkbox",id:"data_vectorization_force_first_chunk",required:"","onUpdate:modelValue":e[150]||(e[150]=_=>r.configFile.data_vectorization_force_first_chunk=_),onChange:e[151]||(e[151]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_force_first_chunk]])])])]),l("tr",null,[vpt,l("td",null,[l("div",Spt,[P(l("input",{type:"checkbox",id:"data_vectorization_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[152]||(e[152]=_=>r.configFile.data_vectorization_put_chunk_informations_into_context=_),onChange:e[153]||(e[153]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_put_chunk_informations_into_context]])])])]),l("tr",null,[Tpt,l("td",null,[P(l("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[154]||(e[154]=_=>r.configFile.data_vectorization_method=_),onChange:e[155]||(e[155]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Apt,544),[[Dt,r.configFile.data_vectorization_method]])])]),l("tr",null,[Npt,l("td",Opt,[P(l("input",{type:"text",id:"data_vectorization_sentense_transformer_model",required:"","onUpdate:modelValue":e[156]||(e[156]=_=>r.configFile.data_vectorization_sentense_transformer_model=_),onChange:e[157]||(e[157]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.data_vectorization_sentense_transformer_model]])])]),l("tr",null,[Mpt,l("td",null,[P(l("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[158]||(e[158]=_=>r.configFile.data_visualization_method=_),onChange:e[159]||(e[159]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Dpt,544),[[Dt,r.configFile.data_visualization_method]])])]),l("tr",null,[Lpt,l("td",null,[l("div",Ppt,[P(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[160]||(e[160]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[161]||(e[161]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_save_db]])])])]),l("tr",null,[Fpt,l("td",null,[P(l("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[162]||(e[162]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[163]||(e[163]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.data_vectorization_chunk_size]]),P(l("input",{"onUpdate:modelValue":e[164]||(e[164]=_=>r.configFile.data_vectorization_chunk_size=_),type:"number",onChange:e[165]||(e[165]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.data_vectorization_chunk_size]])])]),l("tr",null,[Upt,l("td",null,[P(l("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[166]||(e[166]=_=>r.configFile.data_vectorization_overlap_size=_),onChange:e[167]||(e[167]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.data_vectorization_overlap_size]]),P(l("input",{"onUpdate:modelValue":e[168]||(e[168]=_=>r.configFile.data_vectorization_overlap_size=_),type:"number",onChange:e[169]||(e[169]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.data_vectorization_overlap_size]])])]),l("tr",null,[Bpt,l("td",null,[P(l("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[170]||(e[170]=_=>r.configFile.data_vectorization_nb_chunks=_),onChange:e[171]||(e[171]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.data_vectorization_nb_chunks]]),P(l("input",{"onUpdate:modelValue":e[172]||(e[172]=_=>r.configFile.data_vectorization_nb_chunks=_),type:"number",onChange:e[173]||(e[173]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1})],2)]),l("div",Gpt,[l("div",Vpt,[l("button",{onClick:e[174]||(e[174]=j(_=>i.internet_conf_collapsed=!i.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,Hpt,512),[[wt,i.internet_conf_collapsed]]),P(l("div",null,$pt,512),[[wt,!i.internet_conf_collapsed]]),Ypt])]),l("div",{class:Ge([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[V(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Wpt,[l("tr",null,[Kpt,l("td",null,[l("div",jpt,[P(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[175]||(e[175]=_=>r.configFile.activate_internet_search=_),onChange:e[176]||(e[176]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_internet_search]])])])]),l("tr",null,[Qpt,l("td",null,[l("div",Xpt,[P(l("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[177]||(e[177]=_=>r.configFile.activate_internet_pages_judgement=_),onChange:e[178]||(e[178]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_internet_pages_judgement]])])])]),l("tr",null,[Zpt,l("td",null,[l("div",Jpt,[P(l("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[179]||(e[179]=_=>r.configFile.internet_quick_search=_),onChange:e[180]||(e[180]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.internet_quick_search]])])])]),l("tr",null,[e_t,l("td",null,[l("div",t_t,[P(l("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[181]||(e[181]=_=>r.configFile.internet_activate_search_decision=_),onChange:e[182]||(e[182]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.internet_activate_search_decision]])])])]),l("tr",null,[n_t,l("td",null,[l("div",s_t,[P(l("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[183]||(e[183]=_=>r.configFile.internet_vectorization_chunk_size=_),onChange:e[184]||(e[184]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.internet_vectorization_chunk_size]]),P(l("input",{"onUpdate:modelValue":e[185]||(e[185]=_=>r.configFile.internet_vectorization_chunk_size=_),type:"number",onChange:e[186]||(e[186]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.internet_vectorization_chunk_size]])])])]),l("tr",null,[i_t,l("td",null,[l("div",r_t,[P(l("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[187]||(e[187]=_=>r.configFile.internet_vectorization_overlap_size=_),onChange:e[188]||(e[188]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.internet_vectorization_overlap_size]]),P(l("input",{"onUpdate:modelValue":e[189]||(e[189]=_=>r.configFile.internet_vectorization_overlap_size=_),type:"number",onChange:e[190]||(e[190]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.internet_vectorization_overlap_size]])])])]),l("tr",null,[o_t,l("td",null,[l("div",a_t,[P(l("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[191]||(e[191]=_=>r.configFile.internet_vectorization_nb_chunks=_),onChange:e[192]||(e[192]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.internet_vectorization_nb_chunks]]),P(l("input",{"onUpdate:modelValue":e[193]||(e[193]=_=>r.configFile.internet_vectorization_nb_chunks=_),type:"number",onChange:e[194]||(e[194]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.internet_vectorization_nb_chunks]])])])]),l("tr",null,[l_t,l("td",null,[l("div",c_t,[P(l("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[195]||(e[195]=_=>r.configFile.internet_nb_search_pages=_),onChange:e[196]||(e[196]=_=>i.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.internet_nb_search_pages]]),P(l("input",{"onUpdate:modelValue":e[197]||(e[197]=_=>r.configFile.internet_nb_search_pages=_),type:"number",onChange:e[198]||(e[198]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),l("div",d_t,[l("div",u_t,[l("button",{onClick:e[199]||(e[199]=j(_=>i.servers_conf_collapsed=!i.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,__t,512),[[wt,i.servers_conf_collapsed]]),P(l("div",null,f_t,512),[[wt,!i.servers_conf_collapsed]]),m_t])]),l("div",{class:Ge([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[V(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",g_t,[l("tr",null,[b_t,l("td",E_t,[P(l("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[200]||(e[200]=_=>r.configFile.active_tts_service=_),onChange:e[201]||(e[201]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},w_t,544),[[Dt,r.configFile.active_tts_service]])])]),l("tr",null,[R_t,l("td",A_t,[P(l("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[202]||(e[202]=_=>r.configFile.active_stt_service=_),onChange:e[203]||(e[203]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},I_t,544),[[Dt,r.configFile.active_stt_service]])])]),k_t,l("tr",null,[D_t,l("td",L_t,[P(l("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[204]||(e[204]=_=>r.configFile.active_tti_service=_),onChange:e[205]||(e[205]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},q_t,544),[[Dt,r.configFile.active_tti_service]])])]),l("tr",null,[$_t,l("td",Y_t,[P(l("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[206]||(e[206]=_=>r.configFile.active_ttm_service=_),onChange:e[207]||(e[207]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},j_t,544),[[Dt,r.configFile.active_ttm_service]])])]),l("tr",null,[Q_t,l("td",X_t,[P(l("select",{id:"active_ttv_service",required:"","onUpdate:modelValue":e[208]||(e[208]=_=>r.configFile.active_ttv_service=_),onChange:e[209]||(e[209]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},eht,544),[[Dt,r.configFile.active_ttv_service]])])])])]),_:1}),V(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",tht,[l("tr",null,[nht,l("td",null,[l("div",sht,[P(l("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[210]||(e[210]=_=>r.configFile.use_negative_prompt=_),onChange:e[211]||(e[211]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_negative_prompt]])])])]),l("tr",null,[iht,l("td",null,[l("div",rht,[P(l("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[212]||(e[212]=_=>r.configFile.use_ai_generated_negative_prompt=_),onChange:e[213]||(e[213]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_ai_generated_negative_prompt]])])])]),l("tr",null,[oht,l("td",null,[l("div",aht,[P(l("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[214]||(e[214]=_=>r.configFile.negative_prompt_generation_prompt=_),onChange:e[215]||(e[215]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.negative_prompt_generation_prompt]])])])]),l("tr",null,[lht,l("td",null,[l("div",cht,[P(l("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[216]||(e[216]=_=>r.configFile.default_negative_prompt=_),onChange:e[217]||(e[217]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.default_negative_prompt]])])])])])]),_:1}),V(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",dht,[l("tr",null,[uht,l("td",pht,[P(l("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[218]||(e[218]=_=>r.configFile.stt_listening_threshold=_),onChange:e[219]||(e[219]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_listening_threshold]])])]),l("tr",null,[_ht,l("td",hht,[P(l("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[220]||(e[220]=_=>r.configFile.stt_silence_duration=_),onChange:e[221]||(e[221]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_silence_duration]])])]),l("tr",null,[fht,l("td",mht,[P(l("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[222]||(e[222]=_=>r.configFile.stt_sound_threshold_percentage=_),onChange:e[223]||(e[223]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_sound_threshold_percentage]])])]),l("tr",null,[ght,l("td",bht,[P(l("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[224]||(e[224]=_=>r.configFile.stt_gain=_),onChange:e[225]||(e[225]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_gain]])])]),l("tr",null,[Eht,l("td",yht,[P(l("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[226]||(e[226]=_=>r.configFile.stt_rate=_),onChange:e[227]||(e[227]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_rate]])])]),l("tr",null,[vht,l("td",Sht,[P(l("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[228]||(e[228]=_=>r.configFile.stt_channels=_),onChange:e[229]||(e[229]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_channels]])])]),l("tr",null,[Tht,l("td",xht,[P(l("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[230]||(e[230]=_=>r.configFile.stt_buffer_size=_),onChange:e[231]||(e[231]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_buffer_size]])])]),l("tr",null,[Cht,l("td",null,[l("div",wht,[P(l("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[232]||(e[232]=_=>r.configFile.stt_activate_word_detection=_),onChange:e[233]||(e[233]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.stt_activate_word_detection]])])])]),l("tr",null,[Rht,l("td",null,[l("div",Aht,[P(l("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[234]||(e[234]=_=>r.configFile.stt_word_detection_file=_),onChange:e[235]||(e[235]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_word_detection_file]])])])])])]),_:1}),V(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Nht,[l("tr",null,[Oht,l("td",Mht,[P(l("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[236]||(e[236]=_=>r.configFile.stt_input_device=_),onChange:e[237]||(e[237]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(i.snd_input_devices,(_,g)=>(T(),x("option",{key:_,value:i.snd_input_devices_indexes[g]},K(_),9,Iht))),128))],544),[[Dt,r.configFile.stt_input_device]])])]),l("tr",null,[kht,l("td",Dht,[P(l("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[238]||(e[238]=_=>r.configFile.tts_output_device=_),onChange:e[239]||(e[239]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(i.snd_output_devices,(_,g)=>(T(),x("option",{key:_,value:i.snd_output_devices_indexes[g]},K(_),9,Lht))),128))],544),[[Dt,r.configFile.tts_output_device]])])])])]),_:1}),V(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Pht,[l("tr",null,[Fht,l("td",Uht,[P(l("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[240]||(e[240]=_=>r.configFile.host=_),onChange:e[241]||(e[241]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.host]])])]),l("tr",null,[Bht,l("td",Ght,[V(o,{modelValue:r.configFile.lollms_access_keys,"onUpdate:modelValue":e[242]||(e[242]=_=>r.configFile.lollms_access_keys=_),onChange:e[243]||(e[243]=_=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])])]),l("tr",null,[Vht,l("td",zht,[P(l("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[244]||(e[244]=_=>r.configFile.port=_),onChange:e[245]||(e[245]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.port]])])]),l("tr",null,[Hht,l("td",qht,[P(l("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[246]||(e[246]=_=>r.configFile.headless_server_mode=_),onChange:e[247]||(e[247]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.headless_server_mode]])])]),l("tr",null,[$ht,l("td",Yht,[P(l("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[248]||(e[248]=_=>r.configFile.activate_lollms_server=_),onChange:e[249]||(e[249]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_server]])])]),l("tr",null,[Wht,l("td",Kht,[P(l("input",{type:"checkbox",id:"activate_lollms_rag_server",required:"","onUpdate:modelValue":e[250]||(e[250]=_=>r.configFile.activate_lollms_rag_server=_),onChange:e[251]||(e[251]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_rag_server]])])]),l("tr",null,[jht,l("td",Qht,[P(l("input",{type:"checkbox",id:"activate_lollms_tts_server",required:"","onUpdate:modelValue":e[252]||(e[252]=_=>r.configFile.activate_lollms_tts_server=_),onChange:e[253]||(e[253]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_tts_server]])])]),l("tr",null,[Xht,l("td",Zht,[P(l("input",{type:"checkbox",id:"activate_lollms_stt_server",required:"","onUpdate:modelValue":e[254]||(e[254]=_=>r.configFile.activate_lollms_stt_server=_),onChange:e[255]||(e[255]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_stt_server]])])]),l("tr",null,[Jht,l("td",eft,[P(l("input",{type:"checkbox",id:"activate_lollms_tti_server",required:"","onUpdate:modelValue":e[256]||(e[256]=_=>r.configFile.activate_lollms_tti_server=_),onChange:e[257]||(e[257]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_tti_server]])])]),l("tr",null,[tft,l("td",nft,[P(l("input",{type:"checkbox",id:"activate_lollms_itt_server",required:"","onUpdate:modelValue":e[258]||(e[258]=_=>r.configFile.activate_lollms_itt_server=_),onChange:e[259]||(e[259]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_itt_server]])])]),l("tr",null,[sft,l("td",ift,[P(l("input",{type:"checkbox",id:"activate_lollms_ttm_server",required:"","onUpdate:modelValue":e[260]||(e[260]=_=>r.configFile.activate_lollms_ttm_server=_),onChange:e[261]||(e[261]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_ttm_server]])])]),l("tr",null,[rft,l("td",oft,[P(l("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[262]||(e[262]=_=>r.configFile.activate_ollama_emulator=_),onChange:e[263]||(e[263]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_ollama_emulator]])])]),l("tr",null,[aft,l("td",lft,[P(l("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[264]||(e[264]=_=>r.configFile.activate_openai_emulator=_),onChange:e[265]||(e[265]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_openai_emulator]])])]),l("tr",null,[cft,l("td",dft,[P(l("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[266]||(e[266]=_=>r.configFile.activate_mistralai_emulator=_),onChange:e[267]||(e[267]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),V(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",uft,[l("tr",null,[pft,l("td",null,[l("div",_ft,[P(l("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[268]||(e[268]=_=>r.configFile.activate_audio_infos=_),onChange:e[269]||(e[269]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_audio_infos]])])])]),l("tr",null,[hft,l("td",null,[l("div",fft,[P(l("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[270]||(e[270]=_=>r.configFile.audio_auto_send_input=_),onChange:e[271]||(e[271]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.audio_auto_send_input]])])])]),l("tr",null,[mft,l("td",null,[P(l("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[272]||(e[272]=_=>r.configFile.audio_silenceTimer=_),onChange:e[273]||(e[273]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.audio_silenceTimer]]),P(l("input",{"onUpdate:modelValue":e[274]||(e[274]=_=>r.configFile.audio_silenceTimer=_),onChange:e[275]||(e[275]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.audio_silenceTimer]])])]),l("tr",null,[gft,l("td",null,[P(l("select",{id:"audio_in_language","onUpdate:modelValue":e[276]||(e[276]=_=>r.configFile.audio_in_language=_),onChange:e[277]||(e[277]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(r.audioLanguages,_=>(T(),x("option",{key:_.code,value:_.code},K(_.name),9,bft))),128))],544),[[Dt,r.configFile.audio_in_language]])])])])]),_:1}),V(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Eft,[l("tr",null,[yft,l("td",null,[l("div",vft,[P(l("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[278]||(e[278]=_=>r.configFile.whisper_activate=_),onChange:e[279]||(e[279]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.whisper_activate]])])])]),l("tr",null,[Sft,l("td",null,[l("div",Tft,[P(l("select",{id:"whisper_model","onUpdate:modelValue":e[280]||(e[280]=_=>r.configFile.whisper_model=_),onChange:e[281]||(e[281]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(r.whisperModels,_=>(T(),x("option",{key:_,value:_},K(_),9,xft))),128))],544),[[Dt,r.configFile.whisper_model]])])])])])]),_:1}),V(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Cft,[l("tr",null,[wft,l("td",null,[l("div",Rft,[P(l("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[282]||(e[282]=_=>r.configFile.openai_whisper_key=_),onChange:e[283]||(e[283]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.openai_whisper_key]])])])]),l("tr",null,[Aft,l("td",null,[l("div",Nft,[P(l("select",{id:"openai_whisper_model","onUpdate:modelValue":e[284]||(e[284]=_=>r.configFile.openai_whisper_model=_),onChange:e[285]||(e[285]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(r.openaiWhisperModels,_=>(T(),x("option",{key:_,value:_},K(_),9,Oft))),128))],544),[[Dt,r.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),V(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Mft,[l("tr",null,[Ift,l("td",null,[l("div",kft,[P(l("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[286]||(e[286]=_=>r.configFile.auto_speak=_),onChange:e[287]||(e[287]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_speak]])])])]),l("tr",null,[Dft,l("td",null,[P(l("input",{id:"audio_pitch","onUpdate:modelValue":e[288]||(e[288]=_=>r.configFile.audio_pitch=_),onChange:e[289]||(e[289]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.audio_pitch]]),P(l("input",{"onUpdate:modelValue":e[290]||(e[290]=_=>r.configFile.audio_pitch=_),onChange:e[291]||(e[291]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.audio_pitch]])])]),l("tr",null,[Lft,l("td",null,[P(l("select",{id:"audio_out_voice","onUpdate:modelValue":e[292]||(e[292]=_=>r.configFile.audio_out_voice=_),onChange:e[293]||(e[293]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(i.audioVoices,_=>(T(),x("option",{key:_.name,value:_.name},K(_.name),9,Pft))),128))],544),[[Dt,r.configFile.audio_out_voice]])])])])]),_:1}),V(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Fft,[l("tr",null,[Uft,l("td",null,[l("div",Bft,[P(l("select",{"onUpdate:modelValue":e[294]||(e[294]=_=>r.xtts_current_language=_),onChange:e[295]||(e[295]=_=>i.settingsChanged=!0)},[(T(!0),x(Fe,null,Ke(i.voice_languages,(_,g)=>(T(),x("option",{key:g,value:_},K(g),9,Gft))),128))],544),[[Dt,r.xtts_current_language]])])])]),l("tr",null,[Vft,l("td",null,[l("div",zft,[P(l("select",{"onUpdate:modelValue":e[296]||(e[296]=_=>r.xtts_current_voice=_),onChange:e[297]||(e[297]=_=>i.settingsChanged=!0)},[(T(!0),x(Fe,null,Ke(i.voices,_=>(T(),x("option",{key:_,value:_},K(_),9,Hft))),128))],544),[[Dt,r.xtts_current_voice]])])])]),l("tr",null,[qft,l("td",null,[l("div",$ft,[P(l("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[298]||(e[298]=_=>r.configFile.xtts_freq=_),onChange:e[299]||(e[299]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[pe,r.configFile.xtts_freq,void 0,{number:!0}]])])])]),l("tr",null,[Yft,l("td",null,[l("div",Wft,[P(l("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[300]||(e[300]=_=>r.configFile.auto_read=_),onChange:e[301]||(e[301]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_read]])])])]),l("tr",null,[Kft,l("td",null,[l("div",jft,[P(l("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[302]||(e[302]=_=>r.configFile.xtts_stream_chunk_size=_),onChange:e[303]||(e[303]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.xtts_stream_chunk_size]])])])]),l("tr",null,[Qft,l("td",null,[l("div",Xft,[P(l("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[304]||(e[304]=_=>r.configFile.xtts_temperature=_),onChange:e[305]||(e[305]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[pe,r.configFile.xtts_temperature,void 0,{number:!0}]])])])]),l("tr",null,[Zft,l("td",null,[l("div",Jft,[P(l("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[306]||(e[306]=_=>r.configFile.xtts_length_penalty=_),onChange:e[307]||(e[307]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[pe,r.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),l("tr",null,[emt,l("td",null,[l("div",tmt,[P(l("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[308]||(e[308]=_=>r.configFile.xtts_repetition_penalty=_),onChange:e[309]||(e[309]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[pe,r.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),l("tr",null,[nmt,l("td",null,[l("div",smt,[P(l("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[310]||(e[310]=_=>r.configFile.xtts_top_k=_),onChange:e[311]||(e[311]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.xtts_top_k,void 0,{number:!0}]])])])]),l("tr",null,[imt,l("td",null,[l("div",rmt,[P(l("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[312]||(e[312]=_=>r.configFile.xtts_top_p=_),onChange:e[313]||(e[313]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.xtts_top_p,void 0,{number:!0}]])])])]),l("tr",null,[omt,l("td",null,[l("div",amt,[P(l("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[314]||(e[314]=_=>r.configFile.xtts_speed=_),onChange:e[315]||(e[315]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[pe,r.configFile.xtts_speed,void 0,{number:!0}]])])])]),l("tr",null,[lmt,l("td",null,[l("div",cmt,[P(l("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[316]||(e[316]=_=>r.configFile.enable_text_splitting=_),onChange:e[317]||(e[317]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_text_splitting]])])])])])]),_:1}),V(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",dmt,[l("tr",null,[umt,l("td",null,[l("div",pmt,[P(l("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[318]||(e[318]=_=>r.configFile.openai_tts_key=_),onChange:e[319]||(e[319]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.openai_tts_key]])])])]),l("tr",null,[_mt,l("td",null,[l("div",hmt,[P(l("select",{"onUpdate:modelValue":e[320]||(e[320]=_=>r.configFile.openai_tts_model=_),onChange:e[321]||(e[321]=_=>i.settingsChanged=!0)},gmt,544),[[Dt,r.configFile.openai_tts_model]])])])]),l("tr",null,[bmt,l("td",null,[l("div",Emt,[P(l("select",{"onUpdate:modelValue":e[322]||(e[322]=_=>r.configFile.openai_tts_voice=_),onChange:e[323]||(e[323]=_=>i.settingsChanged=!0)},Cmt,544),[[Dt,r.configFile.openai_tts_voice]])])])])])]),_:1}),V(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",wmt,[l("tr",null,[Rmt,l("td",null,[l("div",Amt,[P(l("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[324]||(e[324]=_=>r.configFile.elevenlabs_tts_key=_),onChange:e[325]||(e[325]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.elevenlabs_tts_key]])])])]),l("tr",null,[Nmt,l("td",null,[l("div",Omt,[P(l("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[326]||(e[326]=_=>r.configFile.elevenlabs_tts_model_id=_),onChange:e[327]||(e[327]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.elevenlabs_tts_model_id]])])])]),l("tr",null,[Mmt,l("td",null,[l("div",Imt,[P(l("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[328]||(e[328]=_=>r.configFile.elevenlabs_tts_voice_stability=_),onChange:e[329]||(e[329]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[pe,r.configFile.elevenlabs_tts_voice_stability]])])])]),l("tr",null,[kmt,l("td",null,[l("div",Dmt,[P(l("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[330]||(e[330]=_=>r.configFile.elevenlabs_tts_voice_boost=_),onChange:e[331]||(e[331]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[pe,r.configFile.elevenlabs_tts_voice_boost]])])])]),l("tr",null,[Lmt,l("td",null,[l("div",Pmt,[P(l("select",{"onUpdate:modelValue":e[332]||(e[332]=_=>r.configFile.elevenlabs_tts_voice_id=_),onChange:e[333]||(e[333]=_=>i.settingsChanged=!0)},[(T(!0),x(Fe,null,Ke(i.voices,_=>(T(),x("option",{key:_.voice_id,value:_.voice_id},K(_.name),9,Fmt))),128))],544),[[Dt,r.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1})]),_:1}),V(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Umt,[l("tr",null,[Bmt,l("td",null,[l("div",Gmt,[P(l("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[334]||(e[334]=_=>r.configFile.enable_sd_service=_),onChange:e[335]||(e[335]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_sd_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[336]||(e[336]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},zmt)])]),l("tr",null,[Hmt,l("td",null,[l("div",qmt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[337]||(e[337]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[338]||(e[338]=(..._)=>r.upgradeSDService&&r.upgradeSDService(..._))},"upgrade sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[339]||(e[339]=(..._)=>r.startSDService&&r.startSDService(..._))},"start sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[340]||(e[340]=(..._)=>r.showSD&&r.showSD(..._))},"show sd ui"),$mt])]),l("td",null,[l("div",Ymt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[341]||(e[341]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service")])])]),l("tr",null,[Wmt,l("td",null,[l("div",Kmt,[P(l("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[342]||(e[342]=_=>r.configFile.sd_base_url=_),onChange:e[343]||(e[343]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.sd_base_url]])])])])])]),_:1}),V(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",jmt,[l("tr",null,[Qmt,l("td",null,[l("div",Xmt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[344]||(e[344]=(..._)=>r.reinstallDiffusersService&&r.reinstallDiffusersService(..._))},"install diffusers service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[345]||(e[345]=(..._)=>r.upgradeDiffusersService&&r.upgradeDiffusersService(..._))},"upgrade diffusers service"),Zmt])])]),l("tr",null,[Jmt,l("td",null,[l("div",egt,[P(l("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[346]||(e[346]=_=>r.configFile.diffusers_model=_),onChange:e[347]||(e[347]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.diffusers_model]])])]),tgt])])]),_:1}),V(a,{title:"Diffusers client service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",ngt,[l("tr",null,[sgt,l("td",null,[l("div",igt,[P(l("input",{type:"text",id:"diffusers_client_base_url",required:"","onUpdate:modelValue":e[348]||(e[348]=_=>r.configFile.diffusers_client_base_url=_),onChange:e[349]||(e[349]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.diffusers_client_base_url]])])]),rgt])])]),_:1}),V(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",ogt,[l("tr",null,[agt,l("td",null,[l("div",lgt,[P(l("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[350]||(e[350]=_=>r.configFile.midjourney_key=_),onChange:e[351]||(e[351]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.midjourney_key]])])])]),l("tr",null,[cgt,l("td",null,[l("div",dgt,[P(l("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[352]||(e[352]=_=>r.configFile.midjourney_timeout=_),onChange:e[353]||(e[353]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.midjourney_timeout]])])])]),l("tr",null,[ugt,l("td",null,[l("div",pgt,[P(l("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[354]||(e[354]=_=>r.configFile.midjourney_retries=_),onChange:e[355]||(e[355]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.midjourney_retries]])])])])])]),_:1}),V(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",_gt,[l("tr",null,[hgt,l("td",null,[l("div",fgt,[P(l("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[356]||(e[356]=_=>r.configFile.dall_e_key=_),onChange:e[357]||(e[357]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.dall_e_key]])])])]),l("tr",null,[mgt,l("td",null,[l("div",ggt,[P(l("select",{"onUpdate:modelValue":e[358]||(e[358]=_=>r.configFile.dall_e_generation_engine=_),onChange:e[359]||(e[359]=_=>i.settingsChanged=!0)},ygt,544),[[Dt,r.configFile.dall_e_generation_engine]])])])])])]),_:1}),V(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",vgt,[l("tr",null,[Sgt,l("td",null,[l("div",Tgt,[P(l("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[360]||(e[360]=_=>r.configFile.enable_comfyui_service=_),onChange:e[361]||(e[361]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_comfyui_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[362]||(e[362]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Cgt)])]),l("tr",null,[wgt,l("td",null,[l("div",Rgt,[P(l("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[363]||(e[363]=_=>r.configFile.comfyui_model=_),onChange:e[364]||(e[364]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(i.comfyui_models,(_,g)=>(T(),x("option",{key:_,value:_},K(_),9,Agt))),128))],544),[[Dt,r.configFile.comfyui_model]])])])]),l("tr",null,[Ngt,l("td",null,[l("div",Ogt,[P(l("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[365]||(e[365]=_=>r.configFile.comfyui_model=_),onChange:e[366]||(e[366]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.comfyui_model]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[367]||(e[367]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Igt)])]),l("tr",null,[kgt,l("td",null,[l("div",Dgt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[368]||(e[368]=(..._)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(..._))},"install comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[369]||(e[369]=(..._)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(..._))},"upgrade comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[370]||(e[370]=(..._)=>r.startComfyUIService&&r.startComfyUIService(..._))},"start comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[371]||(e[371]=(..._)=>r.showComfyui&&r.showComfyui(..._))},"show comfyui"),Lgt])])]),l("tr",null,[Pgt,l("td",null,[l("div",Fgt,[P(l("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[372]||(e[372]=_=>r.configFile.comfyui_base_url=_),onChange:e[373]||(e[373]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),V(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Ugt,[l("tr",null,[Bgt,l("td",null,[l("div",Ggt,[P(l("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[374]||(e[374]=_=>r.configFile.enable_ollama_service=_),onChange:e[375]||(e[375]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_ollama_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[376]||(e[376]=_=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding.
+You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},D=t=>(vs("data-v-80919fde"),t=t(),Ss(),t),mat={class:"container flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full background-color 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"},gat={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg panels-color shadow-lg"},bat={key:0,class:"flex gap-3 flex-1 items-center duration-75"},Eat=D(()=>l("i",{"data-feather":"x"},null,-1)),yat=[Eat],vat=D(()=>l("i",{"data-feather":"check"},null,-1)),Sat=[vat],Tat={key:1,class:"flex gap-3 flex-1 items-center"},xat=D(()=>l("i",{"data-feather":"refresh-ccw"},null,-1)),Cat=[xat],wat=D(()=>l("i",{"data-feather":"list"},null,-1)),Rat=[wat],Aat={class:"flex gap-3 flex-1 items-center justify-end"},Nat=D(()=>l("i",{"data-feather":"trash-2"},null,-1)),Oat=[Nat],Mat=D(()=>l("i",{"data-feather":"refresh-ccw"},null,-1)),Iat=[Mat],kat=D(()=>l("i",{"data-feather":"arrow-up-circle"},null,-1)),Dat=D(()=>l("i",{"data-feather":"alert-circle"},null,-1)),Lat=[kat,Dat],Pat={class:"flex gap-3 items-center"},Fat={key:0,class:"flex gap-3 items-center"},Uat=D(()=>l("div",{class:"flex flex-row"},[l("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),l("i",{"data-feather":"check"})],-1)),Bat=[Uat],Gat=D(()=>l("div",{class:"flex flex-row"},[l("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),l("i",{"data-feather":"x"})],-1)),Vat=[Gat],zat={key:1,role:"status"},Hat=D(()=>l("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"},[l("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"}),l("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)),qat=D(()=>l("span",{class:"sr-only"},"Loading...",-1)),$at={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Yat={class:"flex flex-row p-3"},Wat=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Kat=[Wat],jat=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Qat=[jat],Xat=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),Zat=D(()=>l("div",{class:"mr-2"},"|",-1)),Jat={class:"text-base font-semibold cursor-pointer select-none items-center"},elt={class:"flex gap-2 items-center"},tlt={key:0},nlt=["src"],slt={class:"font-bold font-large text-lg"},ilt={key:1},rlt={class:"flex gap-2 items-center"},olt=["src"],alt={class:"font-bold font-large text-lg"},llt=D(()=>l("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),clt={class:"font-bold font-large text-lg"},dlt=D(()=>l("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),ult={class:"font-bold font-large text-lg"},plt={class:"mb-2"},_lt=D(()=>l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[l("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),Je(" CPU Ram usage: ")],-1)),hlt={class:"flex flex-col mx-2"},flt=D(()=>l("b",null,"Avaliable ram: ",-1)),mlt=D(()=>l("b",null,"Ram usage: ",-1)),glt={class:"p-2"},blt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Elt={class:"mb-2"},ylt=D(()=>l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),Je(" Disk usage: ")],-1)),vlt={class:"flex flex-col mx-2"},Slt=D(()=>l("b",null,"Avaliable disk space: ",-1)),Tlt=D(()=>l("b",null,"Disk usage: ",-1)),xlt={class:"p-2"},Clt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},wlt={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Rlt=["src"],Alt={class:"flex flex-col mx-2"},Nlt=D(()=>l("b",null,"Model: ",-1)),Olt=D(()=>l("b",null,"Avaliable vram: ",-1)),Mlt=D(()=>l("b",null,"GPU usage: ",-1)),Ilt={class:"p-2"},klt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Dlt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Llt={class:"flex flex-row p-3"},Plt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Flt=[Plt],Ult=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Blt=[Ult],Glt=D(()=>l("div",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1)),Vlt={class:"flex flex-col mb-2 px-3 pb-2"},zlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Hlt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_smart_routing",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use Smart Routing:")],-1)),qlt={style:{width:"100%"}},$lt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"restore_model_after_smart_routing",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Restore model after smart routing:")],-1)),Ylt={style:{width:"100%"}},Wlt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"smart_routing_router_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Router Model:")],-1)),Klt={style:{width:"100%"}},jlt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"smart_routing_models_by_power",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Models by Power:")],-1)),Qlt={style:{width:"100%"}},Xlt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Zlt={class:"flex flex-row p-3"},Jlt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),ect=[Jlt],tct=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),nct=[tct],sct=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),ict={class:"flex flex-col mb-2 px-3 pb-2"},rct={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 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"},oct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),act={for:"logo-upload"},lct=["src"],cct={style:{width:"10%"}},dct=D(()=>l("i",{"data-feather":"x"},null,-1)),uct=[dct],pct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),_ct={class:"text-center items-center"},hct={class:"flex flex-row"},fct=D(()=>l("option",{value:"cpu"},"CPU",-1)),mct=D(()=>l("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),gct=D(()=>l("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),bct=D(()=>l("option",{value:"nvidia"},"NVIDIA",-1)),Ect=D(()=>l("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),yct=D(()=>l("option",{value:"amd"},"AMD",-1)),vct=D(()=>l("option",{value:"apple-intel"},"Apple Intel",-1)),Sct=D(()=>l("option",{value:"apple-silicon"},"Apple Silicon",-1)),Tct=[fct,mct,gct,bct,Ect,yct,vct,Sct],xct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),Cct={style:{width:"100%"}},wct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),Rct={class:"flex flex-row"},Act=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),Nct={class:"flex flex-row"},Oct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),Mct={class:"flex flex-row"},Ict=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate showing the full prompt in console (for debug):")],-1)),kct={class:"flex flex-row"},Dct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show final full prompt in console:")],-1)),Lct={class:"flex flex-row"},Pct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show chunks in console:")],-1)),Fct={class:"flex flex-row"},Uct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),Bct={class:"flex flex-row"},Gct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),Vct={class:"flex flex-row"},zct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),Hct={class:"flex flex-row"},qct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),$ct={class:"flex flex-row"},Yct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),Wct={class:"flex flex-row"},Kct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},jct=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),Qct=D(()=>l("option",{value:"lollms"},"Lollms communication template",-1)),Xct=D(()=>l("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1)),Zct=D(()=>l("option",{value:"bare"},"Bare, useful when in chat mode",-1)),Jct=D(()=>l("option",{value:"llama3"},"LLama3 communication template",-1)),edt=D(()=>l("option",{value:"mistral"},"Mistral communication template",-1)),tdt=[Qct,Xct,Zct,Jct,edt],ndt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),sdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),idt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),rdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),odt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),adt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),ldt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),cdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),ddt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),udt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),pdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),_dt=["innerHTML"],hdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_continue_message",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"useful for chat models and repote models but can be less useful for instruct ones"},"Use continue message:")],-1)),fdt={style:{width:"100%"}},mdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},gdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),bdt={style:{width:"100%"}},Edt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),ydt={style:{width:"100%"}},vdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),Sdt={style:{width:"100%"}},Tdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),xdt={style:{width:"100%"}},Cdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),wdt={for:"avatar-upload"},Rdt=["src"],Adt={style:{width:"10%"}},Ndt=D(()=>l("i",{"data-feather":"x"},null,-1)),Odt=[Ndt],Mdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),Idt={class:"flex flex-row"},kdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),Ddt={style:{width:"100%"}},Ldt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),Pdt={style:{width:"100%"}},Fdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Udt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),Bdt={style:{width:"100%"}},Gdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),Vdt={style:{width:"100%"}},zdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),Hdt={style:{width:"100%"}},qdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),$dt={style:{width:"100%"}},Ydt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),Wdt={style:{width:"100%"}},Kdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},jdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),Qdt={class:"flex flex-row"},Xdt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),Zdt={style:{width:"100%"}},Jdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},eut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),tut={class:"flex flex-row"},nut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},sut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),iut={class:"flex flex-row"},rut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),out={class:"flex flex-row"},aut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),lut={class:"flex flex-row"},cut={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},dut={class:"flex flex-row p-3"},uut=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),put=[uut],_ut=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),hut=[_ut],fut=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1)),mut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},gut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),but={style:{width:"100%"}},Eut=["onUpdate:modelValue"],yut=["onClick"],vut=["onClick"],Sut=["onClick"],Tut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),xut=D(()=>l("option",{value:"semantic"},"Semantic Vectorizer",-1)),Cut=D(()=>l("option",{value:"tfidf"},"TFIDF Vectorizer",-1)),wut=D(()=>l("option",{value:"openai"},"OpenAI Vectorizer",-1)),Rut=[xut,Cut,wut],Aut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),Nut=["disabled"],Out={key:0,value:"sentence-transformers/bert-base-nli-mean-tokens"},Mut={key:1,value:"bert-base-uncased"},Iut={key:2,value:"bert-base-multilingual-uncased"},kut={key:3,value:"bert-large-uncased"},Dut={key:4,value:"bert-large-uncased-whole-word-masking-finetuned-squad"},Lut={key:5,value:"distilbert-base-uncased"},Put={key:6,value:"roberta-base"},Fut={key:7,value:"roberta-large"},Uut={key:8,value:"xlm-roberta-base"},But={key:9,value:"xlm-roberta-large"},Gut={key:10,value:"albert-base-v2"},Vut={key:11,value:"albert-large-v2"},zut={key:12,value:"albert-xlarge-v2"},Hut={key:13,value:"albert-xxlarge-v2"},qut={key:14,value:"sentence-transformers/all-MiniLM-L6-v2"},$ut={key:15,value:"sentence-transformers/all-MiniLM-L12-v2"},Yut={key:16,value:"sentence-transformers/all-distilroberta-v1"},Wut={key:17,value:"sentence-transformers/all-mpnet-base-v2"},Kut={key:18,value:"text-embedding-ada-002"},jut={key:19,value:"text-embedding-babbage-001"},Qut={key:20,value:"text-embedding-curie-001"},Xut={key:21,value:"text-embedding-davinci-001"},Zut={key:22,disabled:""},Jut=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_openai_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key for open ai embedding method (if not provided I'll use OPENAI_API_KEY environment variable):")],-1)),ept={class:"flex flex-row"},tpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),npt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_overlap",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG overlap size:")],-1)),spt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),ipt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),rpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),opt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),apt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),lpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_activate_multi_hops",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate multi hops RAG:")],-1)),cpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"contextual_summary",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use contextual summary instead of rag (consumes alot of tokens and may be very slow but efficient, useful for summary and global questions that RAG can't do):")],-1)),dpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_deactivate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Useful for very big contexts and global tasks that require the whole document"},"Use all the document content (No split):")],-1)),upt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},ppt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save vectorized database:")],-1)),_pt={class:"flex flex-row"},hpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),fpt={class:"flex flex-row"},mpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),gpt={class:"flex flex-row"},bpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_force_first_chunk",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force adding the first chunk of the file to the context:")],-1)),Ept={class:"flex flex-row"},ypt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),vpt={class:"flex flex-row"},Spt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),Tpt=D(()=>l("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),xpt=D(()=>l("option",{value:"bm25_vectorizer"},"bm25 Vectorizer",-1)),Cpt=D(()=>l("option",{value:"model_embedding"},"Model Embedding",-1)),wpt=D(()=>l("option",{value:"sentense_transformer"},"Sentense Transformer",-1)),Rpt=[Tpt,xpt,Cpt,wpt],Apt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_sentense_transformer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization model (for Sentense Transformer):")],-1)),Npt={style:{width:"100%"}},Opt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),Mpt=D(()=>l("option",{value:"PCA"},"PCA",-1)),Ipt=D(()=>l("option",{value:"TSNE"},"TSNE",-1)),kpt=[Mpt,Ipt],Dpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),Lpt={class:"flex flex-row"},Ppt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),Fpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),Upt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),Bpt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Gpt={class:"flex flex-row p-3"},Vpt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),zpt=[Vpt],Hpt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),qpt=[Hpt],$pt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1)),Ypt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Wpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),Kpt={class:"flex flex-row"},jpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),Qpt={class:"flex flex-row"},Xpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),Zpt={class:"flex flex-row"},Jpt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),e_t={class:"flex flex-row"},t_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),n_t={class:"flex flex-col"},s_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),i_t={class:"flex flex-col"},r_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),o_t={class:"flex flex-col"},a_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),l_t={class:"flex flex-col"},c_t={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},d_t={class:"flex flex-row p-3"},u_t=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),p_t=[u_t],__t=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),h_t=[__t],f_t=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1)),m_t={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},g_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),b_t={style:{width:"100%"}},E_t=D(()=>l("option",{value:"None"},"None",-1)),y_t=D(()=>l("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1)),v_t=D(()=>l("option",{value:"xtts"},"XTTS",-1)),S_t=D(()=>l("option",{value:"parler-tts"},"Parler-TTS",-1)),T_t=D(()=>l("option",{value:"openai_tts"},"Open AI TTS",-1)),x_t=D(()=>l("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1)),C_t=[E_t,y_t,v_t,S_t,T_t,x_t],w_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),R_t={style:{width:"100%"}},A_t=D(()=>l("option",{value:"None"},"None",-1)),N_t=D(()=>l("option",{value:"whisper"},"Whisper",-1)),O_t=D(()=>l("option",{value:"openai_whisper"},"Open AI Whisper",-1)),M_t=[A_t,N_t,O_t],I_t=D(()=>l("tr",null,null,-1)),k_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),D_t={style:{width:"100%"}},L_t=D(()=>l("option",{value:"None"},"None",-1)),P_t=D(()=>l("option",{value:"diffusers"},"Diffusers",-1)),F_t=D(()=>l("option",{value:"diffusers_client"},"Diffusers Client",-1)),U_t=D(()=>l("option",{value:"autosd"},"AUTO1111's SD",-1)),B_t=D(()=>l("option",{value:"dall-e"},"Open AI DALL-E",-1)),G_t=D(()=>l("option",{value:"midjourney"},"Midjourney",-1)),V_t=D(()=>l("option",{value:"comfyui"},"Comfyui",-1)),z_t=D(()=>l("option",{value:"fooocus"},"Fooocus",-1)),H_t=[L_t,P_t,F_t,U_t,B_t,G_t,V_t,z_t],q_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),$_t={style:{width:"100%"}},Y_t=D(()=>l("option",{value:"None"},"None",-1)),W_t=D(()=>l("option",{value:"musicgen"},"Music Gen",-1)),K_t=[Y_t,W_t],j_t=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttv_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTV Service:")],-1)),Q_t={style:{width:"100%"}},X_t=D(()=>l("option",{value:"None"},"None",-1)),Z_t=D(()=>l("option",{value:"cog_video_x"},"Cog Video X",-1)),J_t=[X_t,Z_t],eht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},tht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),nht={class:"flex flex-row"},sht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),iht={class:"flex flex-row"},rht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),oht={class:"flex flex-row"},aht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),lht={class:"flex flex-row"},cht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},dht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),uht={style:{width:"100%"}},pht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),_ht={style:{width:"100%"}},hht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),fht={style:{width:"100%"}},mht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),ght={style:{width:"100%"}},bht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),Eht={style:{width:"100%"}},yht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),vht={style:{width:"100%"}},Sht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),Tht={style:{width:"100%"}},xht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),Cht={class:"flex flex-row"},wht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),Rht={class:"flex flex-row"},Aht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Nht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),Oht={style:{width:"100%"}},Mht=["value"],Iht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),kht={style:{width:"100%"}},Dht=["value"],Lht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Pht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Fht={style:{width:"100%"}},Uht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys:")],-1)),Bht={style:{width:"100%"}},Ght=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"port",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),Vht={style:{width:"100%"}},zht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"headless_server_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode:")],-1)),Hht={style:{width:"100%"}},qht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),$ht={style:{width:"100%"}},Yht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_rag_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms RAG server:")],-1)),Wht={style:{width:"100%"}},Kht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tts_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTS server:")],-1)),jht={style:{width:"100%"}},Qht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_stt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms STT server:")],-1)),Xht={style:{width:"100%"}},Zht=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tti_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTI server:")],-1)),Jht={style:{width:"100%"}},eft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_itt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms ITT server:")],-1)),tft={style:{width:"100%"}},nft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_ttm_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTM server:")],-1)),sft={style:{width:"100%"}},ift=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),rft={style:{width:"100%"}},oft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),aft={style:{width:"100%"}},lft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),cft={style:{width:"100%"}},dft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},uft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),pft={class:"flex flex-row"},_ft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),hft={class:"flex flex-row"},fft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),mft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),gft=["value"],bft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Eft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),yft={class:"flex flex-row"},vft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),Sft={class:"flex flex-row"},Tft=["value"],xft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Cft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),wft={class:"flex flex-row"},Rft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),Aft={class:"flex flex-row"},Nft=["value"],Oft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Mft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),Ift={class:"flex flex-row"},kft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),Dft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),Lft=["value"],Pft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Fft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),Uft={class:"flex flex-row"},Bft=["value"],Gft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),Vft={class:"flex flex-row"},zft=["value"],Hft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),qft={class:"flex flex-row"},$ft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),Yft={class:"flex flex-row"},Wft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),Kft={class:"flex flex-row"},jft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),Qft={class:"flex flex-row"},Xft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),Zft={class:"flex flex-row"},Jft=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),emt={class:"flex flex-row"},tmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),nmt={class:"flex flex-row"},smt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),imt={class:"flex flex-row"},rmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),omt={class:"flex flex-row"},amt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),lmt={class:"flex flex-row"},cmt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},dmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),umt={class:"flex flex-row"},pmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),_mt={class:"flex flex-row"},hmt=D(()=>l("option",null," tts-1 ",-1)),fmt=D(()=>l("option",null," tts-2 ",-1)),mmt=[hmt,fmt],gmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),bmt={class:"flex flex-row"},Emt=D(()=>l("option",null," alloy ",-1)),ymt=D(()=>l("option",null," echo ",-1)),vmt=D(()=>l("option",null," fable ",-1)),Smt=D(()=>l("option",null," nova ",-1)),Tmt=D(()=>l("option",null," shimmer ",-1)),xmt=[Emt,ymt,vmt,Smt,Tmt],Cmt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},wmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),Rmt={class:"flex flex-row"},Amt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),Nmt={class:"flex flex-row"},Omt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),Mmt={class:"flex flex-row"},Imt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),kmt={class:"flex flex-row"},Dmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),Lmt={class:"flex flex-row"},Pmt=["value"],Fmt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Umt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),Bmt={class:"flex flex-row"},Gmt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Vmt=[Gmt],zmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),Hmt={class:"flex flex-row"},qmt=D(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1)),$mt={class:"flex flex-row"},Ymt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),Wmt={class:"flex flex-row"},Kmt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},jmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),Qmt={class:"flex flex-row"},Xmt=D(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1)),Zmt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),Jmt={class:"flex flex-row"},egt=D(()=>l("td",null,null,-1)),tgt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},ngt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_client_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers client base url:")],-1)),sgt={class:"flex flex-row"},igt=D(()=>l("td",null,null,-1)),rgt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},ogt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),agt={class:"flex flex-row"},lgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),cgt={class:"flex flex-row"},dgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),ugt={class:"flex flex-row"},pgt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},_gt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),hgt={class:"flex flex-row"},fgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),mgt={class:"flex flex-row"},ggt=D(()=>l("option",null," dall-e-2 ",-1)),bgt=D(()=>l("option",null," dall-e-3 ",-1)),Egt=[ggt,bgt],ygt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},vgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),Sgt={class:"flex flex-row"},Tgt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),xgt=[Tgt],Cgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),wgt={class:"flex flex-row"},Rgt=["value"],Agt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),Ngt={class:"flex flex-row"},Ogt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Mgt=[Ogt],Igt=D(()=>l("td",{style:{"min-width":"200px"}},null,-1)),kgt={class:"flex flex-row"},Dgt=D(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1)),Lgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),Pgt={class:"flex flex-row"},Fgt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Ugt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),Bgt={class:"flex flex-row"},Ggt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Vgt=[Ggt],zgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),Hgt={class:"flex flex-row"},qgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),$gt={class:"flex flex-row"},Ygt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Wgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),Kgt={class:"flex flex-row"},jgt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Qgt=[jgt],Xgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),Zgt={class:"flex flex-row"},Jgt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),ebt={class:"flex flex-row"},tbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),nbt={class:"flex flex-col align-bottom"},sbt={class:"relative"},ibt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),rbt={class:"absolute right-0"},obt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),abt={class:"flex flex-row"},lbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),cbt={class:"flex flex-row"},dbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),ubt={class:"flex flex-row"},pbt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},_bt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),hbt={class:"flex flex-row"},fbt=D(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),mbt=[fbt],gbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),bbt={class:"flex flex-row"},Ebt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),ybt={class:"flex flex-row"},vbt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},Sbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),Tbt={class:"flex flex-row"},xbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),Cbt={class:"flex flex-row"},wbt=D(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),Rbt={class:"flex flex-row"},Abt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Nbt={class:"flex flex-row p-3"},Obt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Mbt=[Obt],Ibt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),kbt=[Ibt],Dbt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),Lbt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Pbt=D(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Fbt={key:1,class:"mr-2"},Ubt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},Bbt={class:"flex gap-1 items-center"},Gbt=["src"],Vbt={class:"font-bold font-large text-lg line-clamp-1"},zbt={key:0,class:"mb-2"},Hbt={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},qbt=D(()=>l("i",{"data-feather":"chevron-up"},null,-1)),$bt=[qbt],Ybt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Wbt=[Ybt],Kbt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},jbt={class:"flex flex-row p-3"},Qbt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Xbt=[Qbt],Zbt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Jbt=[Zbt],eEt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),tEt={class:"flex flex-row items-center"},nEt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},sEt=D(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),iEt={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},rEt=D(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),oEt={key:2,class:"mr-2"},aEt={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},lEt={class:"flex gap-1 items-center"},cEt=["src"],dEt={class:"font-bold font-large text-lg line-clamp-1"},uEt={class:"mx-2 mb-4"},pEt={class:"relative"},_Et={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},hEt={key:0},fEt=D(()=>l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"inline w-4 h-4 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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),mEt=[fEt],gEt={key:1},bEt=D(()=>l("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),EEt=[bEt],yEt=D(()=>l("label",{for:"only_installed"},"Show only installed models",-1)),vEt=D(()=>l("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),SEt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},TEt=D(()=>l("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("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"}),l("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)),xEt=D(()=>l("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),CEt=[TEt,xEt],wEt={key:1,class:"mb-2"},REt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},AEt=D(()=>l("i",{"data-feather":"chevron-up"},null,-1)),NEt=[AEt],OEt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),MEt=[OEt],IEt={class:"mb-2"},kEt={class:"p-2"},DEt={class:"mb-3"},LEt=D(()=>l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),PEt={key:0},FEt={class:"mb-3"},UEt=D(()=>l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),BEt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},GEt=D(()=>l("div",{role:"status",class:"justify-center"},null,-1)),VEt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},zEt={class:"w-full p-2"},HEt={class:"flex justify-between mb-1"},qEt=Na(' Downloading Loading... ',1),$Et={class:"text-sm font-medium text-blue-700 dark:text-white"},YEt=["title"],WEt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},KEt={class:"flex justify-between mb-1"},jEt={class:"text-base font-medium text-blue-700 dark:text-white"},QEt={class:"text-sm font-medium text-blue-700 dark:text-white"},XEt={class:"flex flex-grow"},ZEt={class:"flex flex-row flex-grow gap-3"},JEt={class:"p-2 text-center grow"},eyt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},tyt={class:"flex flex-row p-3 items-center"},nyt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),syt=[nyt],iyt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),ryt=[iyt],oyt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),ayt={key:0,class:"mr-2"},lyt={class:"mr-2 font-bold font-large text-lg line-clamp-1"},cyt={key:1,class:"mr-2"},dyt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},uyt={key:0,class:"flex -space-x-4 items-center"},pyt={class:"group items-center flex flex-row"},_yt=["onClick"],hyt=["src","title"],fyt=["onClick"],myt=D(()=>l("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[l("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("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)),gyt=[myt],byt=D(()=>l("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("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)),Eyt=[byt],yyt={class:"mx-2 mb-4"},vyt=D(()=>l("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Syt={class:"relative"},Tyt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},xyt={key:0},Cyt=D(()=>l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"inline w-4 h-4 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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),wyt=[Cyt],Ryt={key:1},Ayt=D(()=>l("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Nyt=[Ayt],Oyt={key:0,class:"mx-2 mb-4"},Myt={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},Iyt=["selected"],kyt={key:0,class:"mb-2"},Dyt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Lyt=D(()=>l("i",{"data-feather":"chevron-up"},null,-1)),Pyt=[Lyt],Fyt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Uyt=[Fyt],Byt={class:"flex flex-col mb-2 p-3 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Gyt={class:"flex flex-row"},Vyt=D(()=>l("i",{"data-feather":"chevron-right"},null,-1)),zyt=[Vyt],Hyt=D(()=>l("i",{"data-feather":"chevron-down"},null,-1)),qyt=[Hyt],$yt=D(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),Yyt={class:"m-2"},Wyt={class:"flex flex-row gap-2 items-center"},Kyt=D(()=>l("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),jyt={class:"m-2"},Qyt=D(()=>l("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),Xyt={class:"m-2"},Zyt={class:"flex flex-col align-bottom"},Jyt={class:"relative"},evt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),tvt={class:"absolute right-0"},nvt={class:"m-2"},svt={class:"flex flex-col align-bottom"},ivt={class:"relative"},rvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),ovt={class:"absolute right-0"},avt={class:"m-2"},lvt={class:"flex flex-col align-bottom"},cvt={class:"relative"},dvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),uvt={class:"absolute right-0"},pvt={class:"m-2"},_vt={class:"flex flex-col align-bottom"},hvt={class:"relative"},fvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),mvt={class:"absolute right-0"},gvt={class:"m-2"},bvt={class:"flex flex-col align-bottom"},Evt={class:"relative"},yvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),vvt={class:"absolute right-0"},Svt={class:"m-2"},Tvt={class:"flex flex-col align-bottom"},xvt={class:"relative"},Cvt=D(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),wvt={class:"absolute right-0"};function Rvt(t,e,n,s,i,r){const o=tt("StringListManager"),a=tt("Card"),c=tt("BindingEntry"),d=tt("RadioOptions"),u=tt("model-entry"),h=tt("personality-entry"),f=tt("AddModelDialog"),m=tt("ChoiceDialog");return T(),x(Fe,null,[l("div",mat,[l("div",gat,[i.showConfirmation?(T(),x("div",bat,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=j(_=>i.showConfirmation=!1,["stop"]))},yat),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=j(_=>r.save_configuration(),["stop"]))},Sat)])):G("",!0),i.showConfirmation?G("",!0):(T(),x("div",Tat,[l("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=_=>r.reset_configuration())},Cat),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=j(_=>i.all_collapsed=!i.all_collapsed,["stop"]))},Rat)])),l("div",Aat,[l("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=_=>r.api_get_req("clear_uploads").then(g=>{g.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},Oat),l("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=_=>r.api_post_req("restart_program").then(g=>{g.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},Iat),i.has_updates?(T(),x("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=_=>r.api_post_req("update_software").then(g=>{g.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},Lat)):G("",!0),l("div",Pat,[i.settingsChanged?(T(),x("div",Fat,[i.isLoading?G("",!0):(T(),x("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=j(_=>r.applyConfiguration(),["stop"]))},Bat)),i.isLoading?G("",!0):(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=j(_=>r.cancelConfiguration(),["stop"]))},Vat))])):G("",!0),i.isLoading?(T(),x("div",zat,[l("p",null,K(i.loading_text),1),Hat,qat])):G("",!0)])])]),l("div",{class:Ge(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[l("div",$at,[l("div",Yat,[l("button",{onClick:e[9]||(e[9]=j(_=>i.sc_collapsed=!i.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,Kat,512),[[wt,i.sc_collapsed]]),P(l("div",null,Qat,512),[[wt,!i.sc_collapsed]]),Xat,Zat,l("div",Jat,[l("div",elt,[l("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(T(),x("div",tlt,[(T(!0),x(Fe,null,Ke(r.vramUsage.gpus,_=>(T(),x("div",{class:"flex gap-2 items-center",key:_},[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,nlt),l("h3",slt,[l("div",null,K(r.computedFileSize(_.used_vram))+" / "+K(r.computedFileSize(_.total_vram))+" ("+K(_.percentage)+"%) ",1)])]))),128))])):G("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(T(),x("div",ilt,[l("div",rlt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,olt),l("h3",alt,[l("div",null,K(r.vramUsage.gpus.length)+"x ",1)])])])):G("",!0)]),llt,l("h3",clt,[l("div",null,K(r.ram_usage)+" / "+K(r.ram_total_space)+" ("+K(r.ram_percent_usage)+"%)",1)]),dlt,l("h3",ult,[l("div",null,K(r.disk_binding_models_usage)+" / "+K(r.disk_total_space)+" ("+K(r.disk_percent_usage)+"%)",1)])])])])]),l("div",{class:Ge([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",plt,[_lt,l("div",hlt,[l("div",null,[flt,Je(K(r.ram_available_space),1)]),l("div",null,[mlt,Je(" "+K(r.ram_usage)+" / "+K(r.ram_total_space)+" ("+K(r.ram_percent_usage)+")% ",1)])]),l("div",glt,[l("div",blt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht("width: "+r.ram_percent_usage+"%;")},null,4)])])]),l("div",Elt,[ylt,l("div",vlt,[l("div",null,[Slt,Je(K(r.disk_available_space),1)]),l("div",null,[Tlt,Je(" "+K(r.disk_binding_models_usage)+" / "+K(r.disk_total_space)+" ("+K(r.disk_percent_usage)+"%)",1)])]),l("div",xlt,[l("div",Clt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(T(!0),x(Fe,null,Ke(r.vramUsage.gpus,_=>(T(),x("div",{class:"mb-2",key:_},[l("label",wlt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Rlt),Je(" GPU usage: ")]),l("div",Alt,[l("div",null,[Nlt,Je(K(_.gpu_model),1)]),l("div",null,[Olt,Je(K(this.computedFileSize(_.available_space)),1)]),l("div",null,[Mlt,Je(" "+K(this.computedFileSize(_.used_vram))+" / "+K(this.computedFileSize(_.total_vram))+" ("+K(_.percentage)+"%)",1)])]),l("div",Ilt,[l("div",klt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht("width: "+_.percentage+"%;")},null,4)])])]))),128))],2)]),l("div",Dlt,[l("div",Llt,[l("button",{onClick:e[10]||(e[10]=j(_=>i.smartrouterconf_collapsed=!i.smartrouterconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,Flt,512),[[wt,i.smartrouterconf_collapsed]]),P(l("div",null,Blt,512),[[wt,!i.smartrouterconf_collapsed]]),Glt])]),l("div",{class:Ge([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Vlt,[V(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",zlt,[l("tr",null,[Hlt,l("td",qlt,[P(l("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=_=>r.configFile.use_smart_routing=_),onChange:e[12]||(e[12]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_smart_routing]])])]),l("tr",null,[$lt,l("td",Ylt,[P(l("input",{type:"checkbox",id:"restore_model_after_smart_routing","onUpdate:modelValue":e[13]||(e[13]=_=>r.configFile.restore_model_after_smart_routing=_),onChange:e[14]||(e[14]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.restore_model_after_smart_routing]])])]),l("tr",null,[Wlt,l("td",Klt,[P(l("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[15]||(e[15]=_=>r.configFile.smart_routing_router_model=_),onChange:e[16]||(e[16]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.smart_routing_router_model]])])]),l("tr",null,[jlt,l("td",Qlt,[V(o,{modelValue:r.configFile.smart_routing_models_by_power,"onUpdate:modelValue":e[17]||(e[17]=_=>r.configFile.smart_routing_models_by_power=_),onChange:e[18]||(e[18]=_=>i.settingsChanged=!0),placeholder:"Enter model name"},null,8,["modelValue"])])])])]),_:1})])],2)]),l("div",Xlt,[l("div",Zlt,[l("button",{onClick:e[19]||(e[19]=j(_=>i.mainconf_collapsed=!i.mainconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,ect,512),[[wt,i.mainconf_collapsed]]),P(l("div",null,nct,512),[[wt,!i.mainconf_collapsed]]),sct])]),l("div",{class:Ge([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",ict,[V(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",rct,[l("tr",null,[oct,l("td",null,[l("label",act,[l("img",{src:r.configFile.app_custom_logo!=null&&r.configFile.app_custom_logo!=""?"/user_infos/"+r.configFile.app_custom_logo:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,lct)]),l("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[20]||(e[20]=(..._)=>r.uploadLogo&&r.uploadLogo(..._))},null,32)]),l("td",cct,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[21]||(e[21]=j(_=>r.resetLogo(),["stop"]))},uct)])]),l("tr",null,[pct,l("td",_ct,[l("div",hct,[P(l("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[22]||(e[22]=_=>r.configFile.hardware_mode=_),onChange:e[23]||(e[23]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},Tct,544),[[Dt,r.configFile.hardware_mode]])])])]),l("tr",null,[xct,l("td",Cct,[P(l("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[24]||(e[24]=_=>r.configFile.discussion_db_name=_),onChange:e[25]||(e[25]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.discussion_db_name]])])]),l("tr",null,[wct,l("td",null,[l("div",Rct,[P(l("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[26]||(e[26]=_=>r.configFile.copy_to_clipboard_add_all_details=_),onChange:e[27]||(e[27]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.copy_to_clipboard_add_all_details]])])])]),l("tr",null,[Act,l("td",null,[l("div",Nct,[P(l("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[28]||(e[28]=_=>r.configFile.auto_show_browser=_),onChange:e[29]||(e[29]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_show_browser]])])])]),l("tr",null,[Oct,l("td",null,[l("div",Mct,[P(l("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[30]||(e[30]=_=>r.configFile.debug=_),onChange:e[31]||(e[31]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.debug]])])])]),l("tr",null,[Ict,l("td",null,[l("div",kct,[P(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[32]||(e[32]=_=>r.configFile.debug_show_final_full_prompt=_),onChange:e[33]||(e[33]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[Dct,l("td",null,[l("div",Lct,[P(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[34]||(e[34]=_=>r.configFile.debug_show_final_full_prompt=_),onChange:e[35]||(e[35]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[Pct,l("td",null,[l("div",Fct,[P(l("input",{type:"checkbox",id:"debug_show_chunks",required:"","onUpdate:modelValue":e[36]||(e[36]=_=>r.configFile.debug_show_chunks=_),onChange:e[37]||(e[37]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.debug_show_chunks]])])])]),l("tr",null,[Uct,l("td",null,[l("div",Bct,[P(l("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[38]||(e[38]=_=>r.configFile.debug_log_file_path=_),onChange:e[39]||(e[39]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.debug_log_file_path]])])])]),l("tr",null,[Gct,l("td",null,[l("div",Vct,[P(l("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[40]||(e[40]=_=>r.configFile.show_news_panel=_),onChange:e[41]||(e[41]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.show_news_panel]])])])]),l("tr",null,[zct,l("td",null,[l("div",Hct,[P(l("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[42]||(e[42]=_=>r.configFile.auto_save=_),onChange:e[43]||(e[43]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_save]])])])]),l("tr",null,[qct,l("td",null,[l("div",$ct,[P(l("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[44]||(e[44]=_=>r.configFile.auto_update=_),onChange:e[45]||(e[45]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_update]])])])]),l("tr",null,[Yct,l("td",null,[l("div",Wct,[P(l("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[46]||(e[46]=_=>r.configFile.auto_title=_),onChange:e[47]||(e[47]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_title]])])])])])]),_:1}),V(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Kct,[l("tr",null,[jct,l("td",null,[l("select",{onChange:e[48]||(e[48]=(..._)=>r.handleTemplateSelection&&r.handleTemplateSelection(..._))},tdt,32)])]),l("tr",null,[ndt,l("td",null,[P(l("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[49]||(e[49]=_=>r.configFile.start_header_id_template=_),onChange:e[50]||(e[50]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.start_header_id_template]])])]),l("tr",null,[sdt,l("td",null,[P(l("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[51]||(e[51]=_=>r.configFile.end_header_id_template=_),onChange:e[52]||(e[52]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_header_id_template]])])]),l("tr",null,[idt,l("td",null,[P(l("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[53]||(e[53]=_=>r.configFile.start_user_header_id_template=_),onChange:e[54]||(e[54]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.start_user_header_id_template]])])]),l("tr",null,[rdt,l("td",null,[P(l("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[55]||(e[55]=_=>r.configFile.end_user_header_id_template=_),onChange:e[56]||(e[56]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_user_header_id_template]])])]),l("tr",null,[odt,l("td",null,[P(l("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[57]||(e[57]=_=>r.configFile.end_user_message_id_template=_),onChange:e[58]||(e[58]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_user_message_id_template]])])]),l("tr",null,[adt,l("td",null,[P(l("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[59]||(e[59]=_=>r.configFile.start_ai_header_id_template=_),onChange:e[60]||(e[60]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.start_ai_header_id_template]])])]),l("tr",null,[ldt,l("td",null,[P(l("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[61]||(e[61]=_=>r.configFile.end_ai_header_id_template=_),onChange:e[62]||(e[62]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_ai_header_id_template]])])]),l("tr",null,[cdt,l("td",null,[P(l("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[63]||(e[63]=_=>r.configFile.end_ai_message_id_template=_),onChange:e[64]||(e[64]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.end_ai_message_id_template]])])]),l("tr",null,[ddt,l("td",null,[P(l("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[65]||(e[65]=_=>r.configFile.separator_template=_),onChange:e[66]||(e[66]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.separator_template]])])]),l("tr",null,[udt,l("td",null,[P(l("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[67]||(e[67]=_=>r.configFile.system_message_template=_),onChange:e[68]||(e[68]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.system_message_template]])])]),l("tr",null,[pdt,l("td",null,[l("div",{innerHTML:r.full_template},null,8,_dt)])]),l("tr",null,[hdt,l("td",fdt,[P(l("input",{type:"checkbox",id:"use_continue_message",required:"","onUpdate:modelValue":e[69]||(e[69]=_=>r.configFile.use_continue_message=_),onChange:e[70]||(e[70]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_continue_message]])])])])]),_:1}),V(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",mdt,[l("tr",null,[gdt,l("td",bdt,[P(l("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[71]||(e[71]=_=>r.configFile.user_name=_),onChange:e[72]||(e[72]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.user_name]])])]),l("tr",null,[Edt,l("td",ydt,[P(l("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[73]||(e[73]=_=>r.configFile.user_description=_),onChange:e[74]||(e[74]=_=>i.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.user_description]])])]),l("tr",null,[vdt,l("td",Sdt,[P(l("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[75]||(e[75]=_=>r.configFile.use_user_informations_in_discussion=_),onChange:e[76]||(e[76]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_user_informations_in_discussion]])])]),l("tr",null,[Tdt,l("td",xdt,[P(l("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[77]||(e[77]=_=>r.configFile.use_model_name_in_discussions=_),onChange:e[78]||(e[78]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_model_name_in_discussions]])])]),l("tr",null,[Cdt,l("td",null,[l("label",wdt,[l("img",{src:r.configFile.user_avatar!=null&&r.configFile.user_avatar!=""?"/user_infos/"+r.configFile.user_avatar:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,Rdt)]),l("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[79]||(e[79]=(..._)=>r.uploadAvatar&&r.uploadAvatar(..._))},null,32)]),l("td",Adt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[80]||(e[80]=j(_=>r.resetAvatar(),["stop"]))},Odt)])]),l("tr",null,[Mdt,l("td",null,[l("div",Idt,[P(l("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[81]||(e[81]=_=>r.configFile.use_user_name_in_discussions=_),onChange:e[82]||(e[82]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_user_name_in_discussions]])])])]),l("tr",null,[kdt,l("td",Ddt,[P(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=_=>r.configFile.max_n_predict=_),onChange:e[84]||(e[84]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.max_n_predict]])])]),l("tr",null,[Ldt,l("td",Pdt,[P(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[85]||(e[85]=_=>r.configFile.max_n_predict=_),onChange:e[86]||(e[86]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.max_n_predict]])])])])]),_:1}),V(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Fdt,[l("tr",null,[Udt,l("td",Bdt,[P(l("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[87]||(e[87]=_=>r.configFile.turn_on_code_execution=_),onChange:e[88]||(e[88]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_code_execution]])])]),l("tr",null,[Gdt,l("td",Vdt,[P(l("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=_=>r.configFile.turn_on_code_validation=_),onChange:e[90]||(e[90]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_code_validation]])])]),l("tr",null,[zdt,l("td",Hdt,[P(l("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=_=>r.configFile.turn_on_setting_update_validation=_),onChange:e[92]||(e[92]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_setting_update_validation]])])]),l("tr",null,[qdt,l("td",$dt,[P(l("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=_=>r.configFile.turn_on_open_file_validation=_),onChange:e[94]||(e[94]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_open_file_validation]])])]),l("tr",null,[Ydt,l("td",Wdt,[P(l("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[95]||(e[95]=_=>r.configFile.turn_on_send_file_validation=_),onChange:e[96]||(e[96]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),V(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Kdt,[l("tr",null,[jdt,l("td",null,[l("div",Qdt,[P(l("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[97]||(e[97]=_=>r.configFile.activate_skills_lib=_),onChange:e[98]||(e[98]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_skills_lib]])])])]),l("tr",null,[Xdt,l("td",Zdt,[P(l("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[99]||(e[99]=_=>r.configFile.skills_lib_database_name=_),onChange:e[100]||(e[100]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.skills_lib_database_name]])])])])]),_:1}),V(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Jdt,[l("tr",null,[eut,l("td",null,[l("div",tut,[P(l("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[101]||(e[101]=_=>r.configFile.pdf_latex_path=_),onChange:e[102]||(e[102]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.pdf_latex_path]])])])])])]),_:1}),V(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",nut,[l("tr",null,[sut,l("td",null,[l("div",iut,[P(l("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=_=>r.configFile.positive_boost=_),onChange:e[104]||(e[104]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.positive_boost]])])])]),l("tr",null,[rut,l("td",null,[l("div",out,[P(l("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[105]||(e[105]=_=>r.configFile.negative_boost=_),onChange:e[106]||(e[106]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.negative_boost]])])])]),l("tr",null,[aut,l("td",null,[l("div",lut,[P(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[107]||(e[107]=_=>r.configFile.fun_mode=_),onChange:e[108]||(e[108]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.fun_mode]])])])])])]),_:1})])],2)]),l("div",cut,[l("div",dut,[l("button",{onClick:e[109]||(e[109]=j(_=>i.data_conf_collapsed=!i.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,put,512),[[wt,i.data_conf_collapsed]]),P(l("div",null,hut,512),[[wt,!i.data_conf_collapsed]]),fut])]),l("div",{class:Ge([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[V(a,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",mut,[l("tr",null,[gut,l("td",but,[(T(!0),x(Fe,null,Ke(r.configFile.rag_databases,(_,g)=>(T(),x("div",{key:g,class:"flex items-center mb-2"},[P(l("input",{type:"text","onUpdate:modelValue":b=>r.configFile.rag_databases[g]=b,onChange:e[110]||(e[110]=b=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,40,Eut),[[pe,r.configFile.rag_databases[g]]]),l("button",{onClick:b=>r.vectorize_folder(g),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded"},"(Re)Vectorize",8,yut),l("button",{onClick:b=>r.select_folder(g),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-green-300 rounded"},"Select Folder",8,vut),l("button",{onClick:b=>r.removeDataSource(g),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-green-300 rounded"},"Remove",8,Sut)]))),128)),l("button",{onClick:e[111]||(e[111]=(..._)=>r.addDataSource&&r.addDataSource(..._)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),l("tr",null,[Tut,l("td",null,[P(l("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[112]||(e[112]=_=>r.configFile.rag_vectorizer=_),onChange:e[113]||(e[113]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Rut,544),[[Dt,r.configFile.rag_vectorizer]])])]),l("tr",null,[Aut,l("td",null,[P(l("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[114]||(e[114]=_=>r.configFile.rag_vectorizer_model=_),onChange:e[115]||(e[115]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:r.configFile.rag_vectorizer==="tfidf"},[r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Out,"sentence-transformers/bert-base-nli-mean-tokens")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Mut,"bert-base-uncased")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Iut,"bert-base-multilingual-uncased")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",kut,"bert-large-uncased")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Dut,"bert-large-uncased-whole-word-masking-finetuned-squad")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Lut,"distilbert-base-uncased")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Put,"roberta-base")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Fut,"roberta-large")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Uut,"xlm-roberta-base")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",But,"xlm-roberta-large")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Gut,"albert-base-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Vut,"albert-large-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",zut,"albert-xlarge-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Hut,"albert-xxlarge-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",qut,"sentence-transformers/all-MiniLM-L6-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",$ut,"sentence-transformers/all-MiniLM-L12-v2")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Yut,"sentence-transformers/all-distilroberta-v1")):G("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",Wut,"sentence-transformers/all-mpnet-base-v2")):G("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",Kut,"text-embedding-ada-002")):G("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",jut,"text-embedding-babbage-001")):G("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",Qut,"text-embedding-curie-001")):G("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",Xut,"text-embedding-davinci-001")):G("",!0),r.configFile.rag_vectorizer==="tfidf"?(T(),x("option",Zut,"No models available for TFIDF")):G("",!0)],40,Nut),[[Dt,r.configFile.rag_vectorizer_model]])])]),l("tr",null,[Jut,l("td",null,[l("div",ept,[P(l("input",{type:"text",id:"rag_vectorizer_openai_key",required:"","onUpdate:modelValue":e[116]||(e[116]=_=>r.configFile.rag_vectorizer_openai_key=_),onChange:e[117]||(e[117]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.rag_vectorizer_openai_key]])])])]),l("tr",null,[tpt,l("td",null,[P(l("input",{id:"rag_chunk_size","onUpdate:modelValue":e[118]||(e[118]=_=>r.configFile.rag_chunk_size=_),onChange:e[119]||(e[119]=_=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.rag_chunk_size]]),P(l("input",{"onUpdate:modelValue":e[120]||(e[120]=_=>r.configFile.rag_chunk_size=_),type:"number",onChange:e[121]||(e[121]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.rag_chunk_size]])])]),l("tr",null,[npt,l("td",null,[P(l("input",{id:"rag_overlap","onUpdate:modelValue":e[122]||(e[122]=_=>r.configFile.rag_overlap=_),onChange:e[123]||(e[123]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.rag_overlap]]),P(l("input",{"onUpdate:modelValue":e[124]||(e[124]=_=>r.configFile.rag_overlap=_),type:"number",onChange:e[125]||(e[125]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.rag_overlap]])])]),l("tr",null,[spt,l("td",null,[P(l("input",{id:"rag_n_chunks","onUpdate:modelValue":e[126]||(e[126]=_=>r.configFile.rag_n_chunks=_),onChange:e[127]||(e[127]=_=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.rag_n_chunks]]),P(l("input",{"onUpdate:modelValue":e[128]||(e[128]=_=>r.configFile.rag_n_chunks=_),type:"number",onChange:e[129]||(e[129]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.rag_n_chunks]])])]),l("tr",null,[ipt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[130]||(e[130]=_=>r.configFile.rag_clean_chunks=_),type:"checkbox",onChange:e[131]||(e[131]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_clean_chunks]])])]),l("tr",null,[rpt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[132]||(e[132]=_=>r.configFile.rag_follow_subfolders=_),type:"checkbox",onChange:e[133]||(e[133]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_follow_subfolders]])])]),l("tr",null,[opt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[134]||(e[134]=_=>r.configFile.rag_check_new_files_at_startup=_),type:"checkbox",onChange:e[135]||(e[135]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_check_new_files_at_startup]])])]),l("tr",null,[apt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[136]||(e[136]=_=>r.configFile.rag_preprocess_chunks=_),type:"checkbox",onChange:e[137]||(e[137]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_preprocess_chunks]])])]),l("tr",null,[lpt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[138]||(e[138]=_=>r.configFile.rag_activate_multi_hops=_),type:"checkbox",onChange:e[139]||(e[139]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_activate_multi_hops]])])]),l("tr",null,[cpt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[140]||(e[140]=_=>r.configFile.contextual_summary=_),type:"checkbox",onChange:e[141]||(e[141]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.contextual_summary]])])]),l("tr",null,[dpt,l("td",null,[P(l("input",{"onUpdate:modelValue":e[142]||(e[142]=_=>r.configFile.rag_deactivate=_),type:"checkbox",onChange:e[143]||(e[143]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.rag_deactivate]])])])])]),_:1}),V(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",upt,[l("tr",null,[ppt,l("td",null,[l("div",_pt,[P(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[144]||(e[144]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[145]||(e[145]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_save_db]])])])]),l("tr",null,[hpt,l("td",null,[l("div",fpt,[P(l("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[146]||(e[146]=_=>r.configFile.data_vectorization_visualize_on_vectorization=_),onChange:e[147]||(e[147]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),l("tr",null,[mpt,l("td",null,[l("div",gpt,[P(l("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[148]||(e[148]=_=>r.configFile.data_vectorization_build_keys_words=_),onChange:e[149]||(e[149]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_build_keys_words]])])])]),l("tr",null,[bpt,l("td",null,[l("div",Ept,[P(l("input",{type:"checkbox",id:"data_vectorization_force_first_chunk",required:"","onUpdate:modelValue":e[150]||(e[150]=_=>r.configFile.data_vectorization_force_first_chunk=_),onChange:e[151]||(e[151]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_force_first_chunk]])])])]),l("tr",null,[ypt,l("td",null,[l("div",vpt,[P(l("input",{type:"checkbox",id:"data_vectorization_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[152]||(e[152]=_=>r.configFile.data_vectorization_put_chunk_informations_into_context=_),onChange:e[153]||(e[153]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_put_chunk_informations_into_context]])])])]),l("tr",null,[Spt,l("td",null,[P(l("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[154]||(e[154]=_=>r.configFile.data_vectorization_method=_),onChange:e[155]||(e[155]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Rpt,544),[[Dt,r.configFile.data_vectorization_method]])])]),l("tr",null,[Apt,l("td",Npt,[P(l("input",{type:"text",id:"data_vectorization_sentense_transformer_model",required:"","onUpdate:modelValue":e[156]||(e[156]=_=>r.configFile.data_vectorization_sentense_transformer_model=_),onChange:e[157]||(e[157]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.data_vectorization_sentense_transformer_model]])])]),l("tr",null,[Opt,l("td",null,[P(l("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[158]||(e[158]=_=>r.configFile.data_visualization_method=_),onChange:e[159]||(e[159]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},kpt,544),[[Dt,r.configFile.data_visualization_method]])])]),l("tr",null,[Dpt,l("td",null,[l("div",Lpt,[P(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[160]||(e[160]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[161]||(e[161]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.data_vectorization_save_db]])])])]),l("tr",null,[Ppt,l("td",null,[P(l("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[162]||(e[162]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[163]||(e[163]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.data_vectorization_chunk_size]]),P(l("input",{"onUpdate:modelValue":e[164]||(e[164]=_=>r.configFile.data_vectorization_chunk_size=_),type:"number",onChange:e[165]||(e[165]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.data_vectorization_chunk_size]])])]),l("tr",null,[Fpt,l("td",null,[P(l("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[166]||(e[166]=_=>r.configFile.data_vectorization_overlap_size=_),onChange:e[167]||(e[167]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.data_vectorization_overlap_size]]),P(l("input",{"onUpdate:modelValue":e[168]||(e[168]=_=>r.configFile.data_vectorization_overlap_size=_),type:"number",onChange:e[169]||(e[169]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.data_vectorization_overlap_size]])])]),l("tr",null,[Upt,l("td",null,[P(l("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[170]||(e[170]=_=>r.configFile.data_vectorization_nb_chunks=_),onChange:e[171]||(e[171]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.data_vectorization_nb_chunks]]),P(l("input",{"onUpdate:modelValue":e[172]||(e[172]=_=>r.configFile.data_vectorization_nb_chunks=_),type:"number",onChange:e[173]||(e[173]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1})],2)]),l("div",Bpt,[l("div",Gpt,[l("button",{onClick:e[174]||(e[174]=j(_=>i.internet_conf_collapsed=!i.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,zpt,512),[[wt,i.internet_conf_collapsed]]),P(l("div",null,qpt,512),[[wt,!i.internet_conf_collapsed]]),$pt])]),l("div",{class:Ge([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[V(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Ypt,[l("tr",null,[Wpt,l("td",null,[l("div",Kpt,[P(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[175]||(e[175]=_=>r.configFile.activate_internet_search=_),onChange:e[176]||(e[176]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_internet_search]])])])]),l("tr",null,[jpt,l("td",null,[l("div",Qpt,[P(l("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[177]||(e[177]=_=>r.configFile.activate_internet_pages_judgement=_),onChange:e[178]||(e[178]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_internet_pages_judgement]])])])]),l("tr",null,[Xpt,l("td",null,[l("div",Zpt,[P(l("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[179]||(e[179]=_=>r.configFile.internet_quick_search=_),onChange:e[180]||(e[180]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.internet_quick_search]])])])]),l("tr",null,[Jpt,l("td",null,[l("div",e_t,[P(l("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[181]||(e[181]=_=>r.configFile.internet_activate_search_decision=_),onChange:e[182]||(e[182]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.internet_activate_search_decision]])])])]),l("tr",null,[t_t,l("td",null,[l("div",n_t,[P(l("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[183]||(e[183]=_=>r.configFile.internet_vectorization_chunk_size=_),onChange:e[184]||(e[184]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.internet_vectorization_chunk_size]]),P(l("input",{"onUpdate:modelValue":e[185]||(e[185]=_=>r.configFile.internet_vectorization_chunk_size=_),type:"number",onChange:e[186]||(e[186]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.internet_vectorization_chunk_size]])])])]),l("tr",null,[s_t,l("td",null,[l("div",i_t,[P(l("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[187]||(e[187]=_=>r.configFile.internet_vectorization_overlap_size=_),onChange:e[188]||(e[188]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.internet_vectorization_overlap_size]]),P(l("input",{"onUpdate:modelValue":e[189]||(e[189]=_=>r.configFile.internet_vectorization_overlap_size=_),type:"number",onChange:e[190]||(e[190]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.internet_vectorization_overlap_size]])])])]),l("tr",null,[r_t,l("td",null,[l("div",o_t,[P(l("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[191]||(e[191]=_=>r.configFile.internet_vectorization_nb_chunks=_),onChange:e[192]||(e[192]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.internet_vectorization_nb_chunks]]),P(l("input",{"onUpdate:modelValue":e[193]||(e[193]=_=>r.configFile.internet_vectorization_nb_chunks=_),type:"number",onChange:e[194]||(e[194]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.internet_vectorization_nb_chunks]])])])]),l("tr",null,[a_t,l("td",null,[l("div",l_t,[P(l("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[195]||(e[195]=_=>r.configFile.internet_nb_search_pages=_),onChange:e[196]||(e[196]=_=>i.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.internet_nb_search_pages]]),P(l("input",{"onUpdate:modelValue":e[197]||(e[197]=_=>r.configFile.internet_nb_search_pages=_),type:"number",onChange:e[198]||(e[198]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),l("div",c_t,[l("div",d_t,[l("button",{onClick:e[199]||(e[199]=j(_=>i.servers_conf_collapsed=!i.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,p_t,512),[[wt,i.servers_conf_collapsed]]),P(l("div",null,h_t,512),[[wt,!i.servers_conf_collapsed]]),f_t])]),l("div",{class:Ge([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[V(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",m_t,[l("tr",null,[g_t,l("td",b_t,[P(l("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[200]||(e[200]=_=>r.configFile.active_tts_service=_),onChange:e[201]||(e[201]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},C_t,544),[[Dt,r.configFile.active_tts_service]])])]),l("tr",null,[w_t,l("td",R_t,[P(l("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[202]||(e[202]=_=>r.configFile.active_stt_service=_),onChange:e[203]||(e[203]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},M_t,544),[[Dt,r.configFile.active_stt_service]])])]),I_t,l("tr",null,[k_t,l("td",D_t,[P(l("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[204]||(e[204]=_=>r.configFile.active_tti_service=_),onChange:e[205]||(e[205]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},H_t,544),[[Dt,r.configFile.active_tti_service]])])]),l("tr",null,[q_t,l("td",$_t,[P(l("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[206]||(e[206]=_=>r.configFile.active_ttm_service=_),onChange:e[207]||(e[207]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},K_t,544),[[Dt,r.configFile.active_ttm_service]])])]),l("tr",null,[j_t,l("td",Q_t,[P(l("select",{id:"active_ttv_service",required:"","onUpdate:modelValue":e[208]||(e[208]=_=>r.configFile.active_ttv_service=_),onChange:e[209]||(e[209]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},J_t,544),[[Dt,r.configFile.active_ttv_service]])])])])]),_:1}),V(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",eht,[l("tr",null,[tht,l("td",null,[l("div",nht,[P(l("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[210]||(e[210]=_=>r.configFile.use_negative_prompt=_),onChange:e[211]||(e[211]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_negative_prompt]])])])]),l("tr",null,[sht,l("td",null,[l("div",iht,[P(l("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[212]||(e[212]=_=>r.configFile.use_ai_generated_negative_prompt=_),onChange:e[213]||(e[213]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.use_ai_generated_negative_prompt]])])])]),l("tr",null,[rht,l("td",null,[l("div",oht,[P(l("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[214]||(e[214]=_=>r.configFile.negative_prompt_generation_prompt=_),onChange:e[215]||(e[215]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.negative_prompt_generation_prompt]])])])]),l("tr",null,[aht,l("td",null,[l("div",lht,[P(l("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[216]||(e[216]=_=>r.configFile.default_negative_prompt=_),onChange:e[217]||(e[217]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.default_negative_prompt]])])])])])]),_:1}),V(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",cht,[l("tr",null,[dht,l("td",uht,[P(l("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[218]||(e[218]=_=>r.configFile.stt_listening_threshold=_),onChange:e[219]||(e[219]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_listening_threshold]])])]),l("tr",null,[pht,l("td",_ht,[P(l("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[220]||(e[220]=_=>r.configFile.stt_silence_duration=_),onChange:e[221]||(e[221]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_silence_duration]])])]),l("tr",null,[hht,l("td",fht,[P(l("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[222]||(e[222]=_=>r.configFile.stt_sound_threshold_percentage=_),onChange:e[223]||(e[223]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_sound_threshold_percentage]])])]),l("tr",null,[mht,l("td",ght,[P(l("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[224]||(e[224]=_=>r.configFile.stt_gain=_),onChange:e[225]||(e[225]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_gain]])])]),l("tr",null,[bht,l("td",Eht,[P(l("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[226]||(e[226]=_=>r.configFile.stt_rate=_),onChange:e[227]||(e[227]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_rate]])])]),l("tr",null,[yht,l("td",vht,[P(l("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[228]||(e[228]=_=>r.configFile.stt_channels=_),onChange:e[229]||(e[229]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_channels]])])]),l("tr",null,[Sht,l("td",Tht,[P(l("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[230]||(e[230]=_=>r.configFile.stt_buffer_size=_),onChange:e[231]||(e[231]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_buffer_size]])])]),l("tr",null,[xht,l("td",null,[l("div",Cht,[P(l("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[232]||(e[232]=_=>r.configFile.stt_activate_word_detection=_),onChange:e[233]||(e[233]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.stt_activate_word_detection]])])])]),l("tr",null,[wht,l("td",null,[l("div",Rht,[P(l("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[234]||(e[234]=_=>r.configFile.stt_word_detection_file=_),onChange:e[235]||(e[235]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.stt_word_detection_file]])])])])])]),_:1}),V(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Aht,[l("tr",null,[Nht,l("td",Oht,[P(l("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[236]||(e[236]=_=>r.configFile.stt_input_device=_),onChange:e[237]||(e[237]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(i.snd_input_devices,(_,g)=>(T(),x("option",{key:_,value:i.snd_input_devices_indexes[g]},K(_),9,Mht))),128))],544),[[Dt,r.configFile.stt_input_device]])])]),l("tr",null,[Iht,l("td",kht,[P(l("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[238]||(e[238]=_=>r.configFile.tts_output_device=_),onChange:e[239]||(e[239]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(i.snd_output_devices,(_,g)=>(T(),x("option",{key:_,value:i.snd_output_devices_indexes[g]},K(_),9,Dht))),128))],544),[[Dt,r.configFile.tts_output_device]])])])])]),_:1}),V(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Lht,[l("tr",null,[Pht,l("td",Fht,[P(l("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[240]||(e[240]=_=>r.configFile.host=_),onChange:e[241]||(e[241]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.host]])])]),l("tr",null,[Uht,l("td",Bht,[V(o,{modelValue:r.configFile.lollms_access_keys,"onUpdate:modelValue":e[242]||(e[242]=_=>r.configFile.lollms_access_keys=_),onChange:e[243]||(e[243]=_=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])])]),l("tr",null,[Ght,l("td",Vht,[P(l("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[244]||(e[244]=_=>r.configFile.port=_),onChange:e[245]||(e[245]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.port]])])]),l("tr",null,[zht,l("td",Hht,[P(l("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[246]||(e[246]=_=>r.configFile.headless_server_mode=_),onChange:e[247]||(e[247]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.headless_server_mode]])])]),l("tr",null,[qht,l("td",$ht,[P(l("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[248]||(e[248]=_=>r.configFile.activate_lollms_server=_),onChange:e[249]||(e[249]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_server]])])]),l("tr",null,[Yht,l("td",Wht,[P(l("input",{type:"checkbox",id:"activate_lollms_rag_server",required:"","onUpdate:modelValue":e[250]||(e[250]=_=>r.configFile.activate_lollms_rag_server=_),onChange:e[251]||(e[251]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_rag_server]])])]),l("tr",null,[Kht,l("td",jht,[P(l("input",{type:"checkbox",id:"activate_lollms_tts_server",required:"","onUpdate:modelValue":e[252]||(e[252]=_=>r.configFile.activate_lollms_tts_server=_),onChange:e[253]||(e[253]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_tts_server]])])]),l("tr",null,[Qht,l("td",Xht,[P(l("input",{type:"checkbox",id:"activate_lollms_stt_server",required:"","onUpdate:modelValue":e[254]||(e[254]=_=>r.configFile.activate_lollms_stt_server=_),onChange:e[255]||(e[255]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_stt_server]])])]),l("tr",null,[Zht,l("td",Jht,[P(l("input",{type:"checkbox",id:"activate_lollms_tti_server",required:"","onUpdate:modelValue":e[256]||(e[256]=_=>r.configFile.activate_lollms_tti_server=_),onChange:e[257]||(e[257]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_tti_server]])])]),l("tr",null,[eft,l("td",tft,[P(l("input",{type:"checkbox",id:"activate_lollms_itt_server",required:"","onUpdate:modelValue":e[258]||(e[258]=_=>r.configFile.activate_lollms_itt_server=_),onChange:e[259]||(e[259]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_itt_server]])])]),l("tr",null,[nft,l("td",sft,[P(l("input",{type:"checkbox",id:"activate_lollms_ttm_server",required:"","onUpdate:modelValue":e[260]||(e[260]=_=>r.configFile.activate_lollms_ttm_server=_),onChange:e[261]||(e[261]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_lollms_ttm_server]])])]),l("tr",null,[ift,l("td",rft,[P(l("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[262]||(e[262]=_=>r.configFile.activate_ollama_emulator=_),onChange:e[263]||(e[263]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_ollama_emulator]])])]),l("tr",null,[oft,l("td",aft,[P(l("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[264]||(e[264]=_=>r.configFile.activate_openai_emulator=_),onChange:e[265]||(e[265]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_openai_emulator]])])]),l("tr",null,[lft,l("td",cft,[P(l("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[266]||(e[266]=_=>r.configFile.activate_mistralai_emulator=_),onChange:e[267]||(e[267]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),V(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",dft,[l("tr",null,[uft,l("td",null,[l("div",pft,[P(l("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[268]||(e[268]=_=>r.configFile.activate_audio_infos=_),onChange:e[269]||(e[269]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.activate_audio_infos]])])])]),l("tr",null,[_ft,l("td",null,[l("div",hft,[P(l("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[270]||(e[270]=_=>r.configFile.audio_auto_send_input=_),onChange:e[271]||(e[271]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.audio_auto_send_input]])])])]),l("tr",null,[fft,l("td",null,[P(l("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[272]||(e[272]=_=>r.configFile.audio_silenceTimer=_),onChange:e[273]||(e[273]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.audio_silenceTimer]]),P(l("input",{"onUpdate:modelValue":e[274]||(e[274]=_=>r.configFile.audio_silenceTimer=_),onChange:e[275]||(e[275]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.audio_silenceTimer]])])]),l("tr",null,[mft,l("td",null,[P(l("select",{id:"audio_in_language","onUpdate:modelValue":e[276]||(e[276]=_=>r.configFile.audio_in_language=_),onChange:e[277]||(e[277]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(r.audioLanguages,_=>(T(),x("option",{key:_.code,value:_.code},K(_.name),9,gft))),128))],544),[[Dt,r.configFile.audio_in_language]])])])])]),_:1}),V(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",bft,[l("tr",null,[Eft,l("td",null,[l("div",yft,[P(l("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[278]||(e[278]=_=>r.configFile.whisper_activate=_),onChange:e[279]||(e[279]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.whisper_activate]])])])]),l("tr",null,[vft,l("td",null,[l("div",Sft,[P(l("select",{id:"whisper_model","onUpdate:modelValue":e[280]||(e[280]=_=>r.configFile.whisper_model=_),onChange:e[281]||(e[281]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(r.whisperModels,_=>(T(),x("option",{key:_,value:_},K(_),9,Tft))),128))],544),[[Dt,r.configFile.whisper_model]])])])])])]),_:1}),V(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",xft,[l("tr",null,[Cft,l("td",null,[l("div",wft,[P(l("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[282]||(e[282]=_=>r.configFile.openai_whisper_key=_),onChange:e[283]||(e[283]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.openai_whisper_key]])])])]),l("tr",null,[Rft,l("td",null,[l("div",Aft,[P(l("select",{id:"openai_whisper_model","onUpdate:modelValue":e[284]||(e[284]=_=>r.configFile.openai_whisper_model=_),onChange:e[285]||(e[285]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(r.openaiWhisperModels,_=>(T(),x("option",{key:_,value:_},K(_),9,Nft))),128))],544),[[Dt,r.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),V(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Oft,[l("tr",null,[Mft,l("td",null,[l("div",Ift,[P(l("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[286]||(e[286]=_=>r.configFile.auto_speak=_),onChange:e[287]||(e[287]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_speak]])])])]),l("tr",null,[kft,l("td",null,[P(l("input",{id:"audio_pitch","onUpdate:modelValue":e[288]||(e[288]=_=>r.configFile.audio_pitch=_),onChange:e[289]||(e[289]=_=>i.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.audio_pitch]]),P(l("input",{"onUpdate:modelValue":e[290]||(e[290]=_=>r.configFile.audio_pitch=_),onChange:e[291]||(e[291]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.audio_pitch]])])]),l("tr",null,[Dft,l("td",null,[P(l("select",{id:"audio_out_voice","onUpdate:modelValue":e[292]||(e[292]=_=>r.configFile.audio_out_voice=_),onChange:e[293]||(e[293]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(i.audioVoices,_=>(T(),x("option",{key:_.name,value:_.name},K(_.name),9,Lft))),128))],544),[[Dt,r.configFile.audio_out_voice]])])])])]),_:1}),V(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Pft,[l("tr",null,[Fft,l("td",null,[l("div",Uft,[P(l("select",{"onUpdate:modelValue":e[294]||(e[294]=_=>r.xtts_current_language=_),onChange:e[295]||(e[295]=_=>i.settingsChanged=!0)},[(T(!0),x(Fe,null,Ke(i.voice_languages,(_,g)=>(T(),x("option",{key:g,value:_},K(g),9,Bft))),128))],544),[[Dt,r.xtts_current_language]])])])]),l("tr",null,[Gft,l("td",null,[l("div",Vft,[P(l("select",{"onUpdate:modelValue":e[296]||(e[296]=_=>r.xtts_current_voice=_),onChange:e[297]||(e[297]=_=>i.settingsChanged=!0)},[(T(!0),x(Fe,null,Ke(i.voices,_=>(T(),x("option",{key:_,value:_},K(_),9,zft))),128))],544),[[Dt,r.xtts_current_voice]])])])]),l("tr",null,[Hft,l("td",null,[l("div",qft,[P(l("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[298]||(e[298]=_=>r.configFile.xtts_freq=_),onChange:e[299]||(e[299]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[pe,r.configFile.xtts_freq,void 0,{number:!0}]])])])]),l("tr",null,[$ft,l("td",null,[l("div",Yft,[P(l("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[300]||(e[300]=_=>r.configFile.auto_read=_),onChange:e[301]||(e[301]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.auto_read]])])])]),l("tr",null,[Wft,l("td",null,[l("div",Kft,[P(l("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[302]||(e[302]=_=>r.configFile.xtts_stream_chunk_size=_),onChange:e[303]||(e[303]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.xtts_stream_chunk_size]])])])]),l("tr",null,[jft,l("td",null,[l("div",Qft,[P(l("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[304]||(e[304]=_=>r.configFile.xtts_temperature=_),onChange:e[305]||(e[305]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[pe,r.configFile.xtts_temperature,void 0,{number:!0}]])])])]),l("tr",null,[Xft,l("td",null,[l("div",Zft,[P(l("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[306]||(e[306]=_=>r.configFile.xtts_length_penalty=_),onChange:e[307]||(e[307]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[pe,r.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),l("tr",null,[Jft,l("td",null,[l("div",emt,[P(l("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[308]||(e[308]=_=>r.configFile.xtts_repetition_penalty=_),onChange:e[309]||(e[309]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[pe,r.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),l("tr",null,[tmt,l("td",null,[l("div",nmt,[P(l("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[310]||(e[310]=_=>r.configFile.xtts_top_k=_),onChange:e[311]||(e[311]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.xtts_top_k,void 0,{number:!0}]])])])]),l("tr",null,[smt,l("td",null,[l("div",imt,[P(l("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[312]||(e[312]=_=>r.configFile.xtts_top_p=_),onChange:e[313]||(e[313]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.xtts_top_p,void 0,{number:!0}]])])])]),l("tr",null,[rmt,l("td",null,[l("div",omt,[P(l("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[314]||(e[314]=_=>r.configFile.xtts_speed=_),onChange:e[315]||(e[315]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[pe,r.configFile.xtts_speed,void 0,{number:!0}]])])])]),l("tr",null,[amt,l("td",null,[l("div",lmt,[P(l("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[316]||(e[316]=_=>r.configFile.enable_text_splitting=_),onChange:e[317]||(e[317]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_text_splitting]])])])])])]),_:1}),V(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",cmt,[l("tr",null,[dmt,l("td",null,[l("div",umt,[P(l("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[318]||(e[318]=_=>r.configFile.openai_tts_key=_),onChange:e[319]||(e[319]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.openai_tts_key]])])])]),l("tr",null,[pmt,l("td",null,[l("div",_mt,[P(l("select",{"onUpdate:modelValue":e[320]||(e[320]=_=>r.configFile.openai_tts_model=_),onChange:e[321]||(e[321]=_=>i.settingsChanged=!0)},mmt,544),[[Dt,r.configFile.openai_tts_model]])])])]),l("tr",null,[gmt,l("td",null,[l("div",bmt,[P(l("select",{"onUpdate:modelValue":e[322]||(e[322]=_=>r.configFile.openai_tts_voice=_),onChange:e[323]||(e[323]=_=>i.settingsChanged=!0)},xmt,544),[[Dt,r.configFile.openai_tts_voice]])])])])])]),_:1}),V(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Cmt,[l("tr",null,[wmt,l("td",null,[l("div",Rmt,[P(l("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[324]||(e[324]=_=>r.configFile.elevenlabs_tts_key=_),onChange:e[325]||(e[325]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.elevenlabs_tts_key]])])])]),l("tr",null,[Amt,l("td",null,[l("div",Nmt,[P(l("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[326]||(e[326]=_=>r.configFile.elevenlabs_tts_model_id=_),onChange:e[327]||(e[327]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.elevenlabs_tts_model_id]])])])]),l("tr",null,[Omt,l("td",null,[l("div",Mmt,[P(l("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[328]||(e[328]=_=>r.configFile.elevenlabs_tts_voice_stability=_),onChange:e[329]||(e[329]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[pe,r.configFile.elevenlabs_tts_voice_stability]])])])]),l("tr",null,[Imt,l("td",null,[l("div",kmt,[P(l("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[330]||(e[330]=_=>r.configFile.elevenlabs_tts_voice_boost=_),onChange:e[331]||(e[331]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[pe,r.configFile.elevenlabs_tts_voice_boost]])])])]),l("tr",null,[Dmt,l("td",null,[l("div",Lmt,[P(l("select",{"onUpdate:modelValue":e[332]||(e[332]=_=>r.configFile.elevenlabs_tts_voice_id=_),onChange:e[333]||(e[333]=_=>i.settingsChanged=!0)},[(T(!0),x(Fe,null,Ke(i.voices,_=>(T(),x("option",{key:_.voice_id,value:_.voice_id},K(_.name),9,Pmt))),128))],544),[[Dt,r.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1})]),_:1}),V(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Fmt,[l("tr",null,[Umt,l("td",null,[l("div",Bmt,[P(l("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[334]||(e[334]=_=>r.configFile.enable_sd_service=_),onChange:e[335]||(e[335]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_sd_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[336]||(e[336]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Vmt)])]),l("tr",null,[zmt,l("td",null,[l("div",Hmt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[337]||(e[337]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[338]||(e[338]=(..._)=>r.upgradeSDService&&r.upgradeSDService(..._))},"upgrade sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[339]||(e[339]=(..._)=>r.startSDService&&r.startSDService(..._))},"start sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[340]||(e[340]=(..._)=>r.showSD&&r.showSD(..._))},"show sd ui"),qmt])]),l("td",null,[l("div",$mt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[341]||(e[341]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service")])])]),l("tr",null,[Ymt,l("td",null,[l("div",Wmt,[P(l("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[342]||(e[342]=_=>r.configFile.sd_base_url=_),onChange:e[343]||(e[343]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.sd_base_url]])])])])])]),_:1}),V(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Kmt,[l("tr",null,[jmt,l("td",null,[l("div",Qmt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[344]||(e[344]=(..._)=>r.reinstallDiffusersService&&r.reinstallDiffusersService(..._))},"install diffusers service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[345]||(e[345]=(..._)=>r.upgradeDiffusersService&&r.upgradeDiffusersService(..._))},"upgrade diffusers service"),Xmt])])]),l("tr",null,[Zmt,l("td",null,[l("div",Jmt,[P(l("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[346]||(e[346]=_=>r.configFile.diffusers_model=_),onChange:e[347]||(e[347]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.diffusers_model]])])]),egt])])]),_:1}),V(a,{title:"Diffusers client service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",tgt,[l("tr",null,[ngt,l("td",null,[l("div",sgt,[P(l("input",{type:"text",id:"diffusers_client_base_url",required:"","onUpdate:modelValue":e[348]||(e[348]=_=>r.configFile.diffusers_client_base_url=_),onChange:e[349]||(e[349]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.diffusers_client_base_url]])])]),igt])])]),_:1}),V(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",rgt,[l("tr",null,[ogt,l("td",null,[l("div",agt,[P(l("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[350]||(e[350]=_=>r.configFile.midjourney_key=_),onChange:e[351]||(e[351]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.midjourney_key]])])])]),l("tr",null,[lgt,l("td",null,[l("div",cgt,[P(l("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[352]||(e[352]=_=>r.configFile.midjourney_timeout=_),onChange:e[353]||(e[353]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.midjourney_timeout]])])])]),l("tr",null,[dgt,l("td",null,[l("div",ugt,[P(l("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[354]||(e[354]=_=>r.configFile.midjourney_retries=_),onChange:e[355]||(e[355]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.midjourney_retries]])])])])])]),_:1}),V(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",pgt,[l("tr",null,[_gt,l("td",null,[l("div",hgt,[P(l("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[356]||(e[356]=_=>r.configFile.dall_e_key=_),onChange:e[357]||(e[357]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.dall_e_key]])])])]),l("tr",null,[fgt,l("td",null,[l("div",mgt,[P(l("select",{"onUpdate:modelValue":e[358]||(e[358]=_=>r.configFile.dall_e_generation_engine=_),onChange:e[359]||(e[359]=_=>i.settingsChanged=!0)},Egt,544),[[Dt,r.configFile.dall_e_generation_engine]])])])])])]),_:1}),V(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",ygt,[l("tr",null,[vgt,l("td",null,[l("div",Sgt,[P(l("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[360]||(e[360]=_=>r.configFile.enable_comfyui_service=_),onChange:e[361]||(e[361]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_comfyui_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[362]||(e[362]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},xgt)])]),l("tr",null,[Cgt,l("td",null,[l("div",wgt,[P(l("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[363]||(e[363]=_=>r.configFile.comfyui_model=_),onChange:e[364]||(e[364]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Fe,null,Ke(i.comfyui_models,(_,g)=>(T(),x("option",{key:_,value:_},K(_),9,Rgt))),128))],544),[[Dt,r.configFile.comfyui_model]])])])]),l("tr",null,[Agt,l("td",null,[l("div",Ngt,[P(l("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[365]||(e[365]=_=>r.configFile.comfyui_model=_),onChange:e[366]||(e[366]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.comfyui_model]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[367]||(e[367]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Mgt)])]),l("tr",null,[Igt,l("td",null,[l("div",kgt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[368]||(e[368]=(..._)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(..._))},"install comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[369]||(e[369]=(..._)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(..._))},"upgrade comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[370]||(e[370]=(..._)=>r.startComfyUIService&&r.startComfyUIService(..._))},"start comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[371]||(e[371]=(..._)=>r.showComfyui&&r.showComfyui(..._))},"show comfyui"),Dgt])])]),l("tr",null,[Lgt,l("td",null,[l("div",Pgt,[P(l("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[372]||(e[372]=_=>r.configFile.comfyui_base_url=_),onChange:e[373]||(e[373]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),V(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Fgt,[l("tr",null,[Ugt,l("td",null,[l("div",Bgt,[P(l("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[374]||(e[374]=_=>r.configFile.enable_ollama_service=_),onChange:e[375]||(e[375]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_ollama_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[376]||(e[376]=_=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding.
If you are using windows, this uses wsl which requires you to have it installed or at least activated.
If You are using windows, this will install wsl so you need to activate it.
-Here is how you can do that `))},zgt)])]),l("tr",null,[Hgt,l("td",null,[l("div",qgt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[377]||(e[377]=(..._)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(..._))},"install ollama service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[378]||(e[378]=(..._)=>r.startollamaService&&r.startollamaService(..._))},"start ollama service")])])]),l("tr",null,[$gt,l("td",null,[l("div",Ygt,[P(l("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[379]||(e[379]=_=>r.configFile.ollama_base_url=_),onChange:e[380]||(e[380]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.ollama_base_url]])])])])])]),_:1}),V(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Wgt,[l("tr",null,[Kgt,l("td",null,[l("div",jgt,[P(l("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[381]||(e[381]=_=>r.configFile.enable_vllm_service=_),onChange:e[382]||(e[382]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_vllm_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[383]||(e[383]=_=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding.
+Here is how you can do that `))},Vgt)])]),l("tr",null,[zgt,l("td",null,[l("div",Hgt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[377]||(e[377]=(..._)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(..._))},"install ollama service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[378]||(e[378]=(..._)=>r.startollamaService&&r.startollamaService(..._))},"start ollama service")])])]),l("tr",null,[qgt,l("td",null,[l("div",$gt,[P(l("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[379]||(e[379]=_=>r.configFile.ollama_base_url=_),onChange:e[380]||(e[380]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.ollama_base_url]])])])])])]),_:1}),V(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Ygt,[l("tr",null,[Wgt,l("td",null,[l("div",Kgt,[P(l("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[381]||(e[381]=_=>r.configFile.enable_vllm_service=_),onChange:e[382]||(e[382]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_vllm_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[383]||(e[383]=_=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding.
If you are using windows, this uses wsl which requires you to have it installed or at least activated.
If You are using windows, this will install wsl so you need to activate it.
-Here is how you can do that `))},Xgt)])]),l("tr",null,[Zgt,l("td",null,[l("div",Jgt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[384]||(e[384]=(..._)=>r.reinstallvLLMService&&r.reinstallvLLMService(..._))},"install vLLM service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[385]||(e[385]=(..._)=>r.startvLLMService&&r.startvLLMService(..._))},"start vllm service")])])]),l("tr",null,[ebt,l("td",null,[l("div",tbt,[P(l("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[386]||(e[386]=_=>r.configFile.vllm_url=_),onChange:e[387]||(e[387]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.vllm_url]])])])]),l("tr",null,[nbt,l("td",null,[l("div",sbt,[l("div",ibt,[rbt,l("p",obt,[P(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[388]||(e[388]=_=>r.configFile.vllm_gpu_memory_utilization=_),onChange:e[389]||(e[389]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.vllm_gpu_memory_utilization]])])]),P(l("input",{id:"vllm_gpu_memory_utilization",onChange:e[390]||(e[390]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[391]||(e[391]=_=>r.configFile.vllm_gpu_memory_utilization=_),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.vllm_gpu_memory_utilization]])])])]),l("tr",null,[abt,l("td",null,[l("div",lbt,[P(l("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[392]||(e[392]=_=>r.configFile.vllm_max_num_seqs=_),onChange:e[393]||(e[393]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.vllm_max_num_seqs]])])])]),l("tr",null,[cbt,l("td",null,[l("div",dbt,[P(l("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[394]||(e[394]=_=>r.configFile.vllm_max_model_len=_),onChange:e[395]||(e[395]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.vllm_max_model_len]])])])]),l("tr",null,[ubt,l("td",null,[l("div",pbt,[P(l("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[396]||(e[396]=_=>r.configFile.vllm_model_path=_),onChange:e[397]||(e[397]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.vllm_model_path]])])])])])]),_:1}),V(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",_bt,[l("tr",null,[hbt,l("td",null,[l("div",fbt,[P(l("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[398]||(e[398]=_=>r.configFile.enable_petals_service=_),onChange:e[399]||(e[399]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_petals_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[400]||(e[400]=_=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network.
+Here is how you can do that `))},Qgt)])]),l("tr",null,[Xgt,l("td",null,[l("div",Zgt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[384]||(e[384]=(..._)=>r.reinstallvLLMService&&r.reinstallvLLMService(..._))},"install vLLM service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[385]||(e[385]=(..._)=>r.startvLLMService&&r.startvLLMService(..._))},"start vllm service")])])]),l("tr",null,[Jgt,l("td",null,[l("div",ebt,[P(l("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[386]||(e[386]=_=>r.configFile.vllm_url=_),onChange:e[387]||(e[387]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.vllm_url]])])])]),l("tr",null,[tbt,l("td",null,[l("div",nbt,[l("div",sbt,[ibt,l("p",rbt,[P(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[388]||(e[388]=_=>r.configFile.vllm_gpu_memory_utilization=_),onChange:e[389]||(e[389]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.vllm_gpu_memory_utilization]])])]),P(l("input",{id:"vllm_gpu_memory_utilization",onChange:e[390]||(e[390]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[391]||(e[391]=_=>r.configFile.vllm_gpu_memory_utilization=_),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.vllm_gpu_memory_utilization]])])])]),l("tr",null,[obt,l("td",null,[l("div",abt,[P(l("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[392]||(e[392]=_=>r.configFile.vllm_max_num_seqs=_),onChange:e[393]||(e[393]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.vllm_max_num_seqs]])])])]),l("tr",null,[lbt,l("td",null,[l("div",cbt,[P(l("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[394]||(e[394]=_=>r.configFile.vllm_max_model_len=_),onChange:e[395]||(e[395]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.vllm_max_model_len]])])])]),l("tr",null,[dbt,l("td",null,[l("div",ubt,[P(l("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[396]||(e[396]=_=>r.configFile.vllm_model_path=_),onChange:e[397]||(e[397]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.vllm_model_path]])])])])])]),_:1}),V(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",pbt,[l("tr",null,[_bt,l("td",null,[l("div",hbt,[P(l("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[398]||(e[398]=_=>r.configFile.enable_petals_service=_),onChange:e[399]||(e[399]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.enable_petals_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[400]||(e[400]=_=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network.
If You are using windows, this will install wsl so you need to activate it.
-Here is how you can do that `))},gbt)])]),l("tr",null,[bbt,l("td",null,[l("div",Ebt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[401]||(e[401]=(..._)=>r.reinstallPetalsService&&r.reinstallPetalsService(..._))},"install petals service")])])]),l("tr",null,[ybt,l("td",null,[l("div",vbt,[P(l("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[402]||(e[402]=_=>r.configFile.petals_base_url=_),onChange:e[403]||(e[403]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),V(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",Sbt,[l("tr",null,[Tbt,l("td",null,[l("div",xbt,[P(l("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[404]||(e[404]=_=>r.configFile.elastic_search_service=_),onChange:e[405]||(e[405]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.elastic_search_service]])])])]),l("tr",null,[Cbt,l("td",null,[l("div",wbt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[406]||(e[406]=(..._)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(..._))},"install ElasticSearch service")])])]),l("tr",null,[Rbt,l("td",null,[l("div",Abt,[P(l("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[407]||(e[407]=_=>r.configFile.elastic_search_url=_),onChange:e[408]||(e[408]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),l("div",Nbt,[l("div",Obt,[l("button",{onClick:e[409]||(e[409]=j(_=>i.bzc_collapsed=!i.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,Ibt,512),[[wt,i.bzc_collapsed]]),P(l("div",null,Dbt,512),[[wt,!i.bzc_collapsed]]),Lbt,r.configFile.binding_name?G("",!0):(T(),x("div",Pbt,[Fbt,et(" No binding selected! ")])),r.configFile.binding_name?(T(),x("div",Ubt,"|")):G("",!0),r.configFile.binding_name?(T(),x("div",Bbt,[l("div",Gbt,[l("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,Vbt),l("h3",zbt,K(r.binding_name),1)])])):G("",!0)])]),l("div",{class:Ge([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(T(),x("div",Hbt,[l("label",qbt," Bindings: ("+K(r.bindingsZoo.length)+") ",1),l("div",{class:Ge(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.bzl_collapsed?"":"max-h-96"])},[V(ii,{name:"list"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(r.bindingsZoo,(_,g)=>(T(),dt(c,{ref_for:!0,ref:"bindingZoo",key:"index-"+g+"-"+_.folder,binding:_,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:_.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):G("",!0),i.bzl_collapsed?(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[410]||(e[410]=_=>i.bzl_collapsed=!i.bzl_collapsed)},Ybt)):(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[411]||(e[411]=_=>i.bzl_collapsed=!i.bzl_collapsed)},Kbt))],2)]),l("div",jbt,[l("div",Qbt,[l("button",{onClick:e[412]||(e[412]=j(_=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[P(l("div",null,Zbt,512),[[wt,i.mzc_collapsed]]),P(l("div",null,eEt,512),[[wt,!i.mzc_collapsed]]),tEt,l("div",nEt,[r.configFile.binding_name?G("",!0):(T(),x("div",sEt,[iEt,et(" Select binding first! ")])),!r.configFile.model_name&&r.configFile.binding_name?(T(),x("div",rEt,[oEt,et(" No model selected! ")])):G("",!0),r.configFile.model_name?(T(),x("div",aEt,"|")):G("",!0),r.configFile.model_name?(T(),x("div",lEt,[l("div",cEt,[l("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,dEt),l("h3",uEt,K(r.configFile.model_name),1)])])):G("",!0)])])]),l("div",{class:Ge([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",pEt,[l("div",_Et,[l("div",hEt,[i.searchModelInProgress?(T(),x("div",fEt,gEt)):G("",!0),i.searchModelInProgress?G("",!0):(T(),x("div",bEt,yEt))]),P(l("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 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",placeholder:"Search models...",required:"","onUpdate:modelValue":e[413]||(e[413]=_=>i.searchModel=_),onKeyup:e[414]||(e[414]=zs((..._)=>r.searchModel_func&&r.searchModel_func(..._),["enter"]))},null,544),[[pe,i.searchModel]]),i.searchModel?(T(),x("button",{key:0,onClick:e[415]||(e[415]=j(_=>i.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):G("",!0)])]),l("div",null,[P(l("input",{"onUpdate:modelValue":e[416]||(e[416]=_=>i.show_only_installed_models=_),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[$e,i.show_only_installed_models]]),vEt]),l("div",null,[V(d,{radioOptions:i.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),SEt,i.is_loading_zoo?(T(),x("div",TEt,wEt)):G("",!0),i.models_zoo&&i.models_zoo.length>0?(T(),x("div",REt,[l("label",AEt," Models: ("+K(i.models_zoo.length)+") ",1),l("div",{class:Ge(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full 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",i.mzl_collapsed?"":"max-h-96"])},[V(ii,{name:"list"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(r.rendered_models_zoo,(_,g)=>(T(),dt(u,{ref_for:!0,ref:"modelZoo",key:"index-"+g+"-"+_.name,model:_,"is-installed":_.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:_.name===r.configFile.model_name,model_type:_.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),l("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[417]||(e[417]=(..._)=>r.load_more_models&&r.load_more_models(..._))},"Load more models",512)]),_:1})],2)])):G("",!0),i.mzl_collapsed?(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[418]||(e[418]=(..._)=>r.open_mzl&&r.open_mzl(..._))},OEt)):(T(),x("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[419]||(e[419]=(..._)=>r.open_mzl&&r.open_mzl(..._))},IEt)),l("div",kEt,[l("div",DEt,[l("div",null,[l("div",LEt,[PEt,P(l("input",{type:"text","onUpdate:modelValue":e[420]||(e[420]=_=>i.reference_path=_),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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",placeholder:"Enter Path ...",required:""},null,512),[[pe,i.reference_path]])]),l("button",{type:"button",onClick:e[421]||(e[421]=j(_=>r.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),i.modelDownlaodInProgress?G("",!0):(T(),x("div",FEt,[l("div",UEt,[BEt,P(l("input",{type:"text","onUpdate:modelValue":e[422]||(e[422]=_=>i.addModel.url=_),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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",placeholder:"Enter URL ...",required:""},null,512),[[pe,i.addModel.url]])]),l("button",{type:"button",onClick:e[423]||(e[423]=j(_=>r.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),i.modelDownlaodInProgress?(T(),x("div",GEt,[VEt,l("div",zEt,[l("div",HEt,[l("div",qEt,[$Et,l("span",YEt,K(Math.floor(i.addModel.progress))+"%",1)]),l("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},K(i.addModel.url),9,WEt),l("div",KEt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht({width:i.addModel.progress+"%"})},null,4)]),l("div",jEt,[l("span",QEt,"Download speed: "+K(r.speed_computed)+"/s",1),l("span",XEt,K(r.downloaded_size_computed)+"/"+K(r.total_size_computed),1)])])]),l("div",ZEt,[l("div",JEt,[l("div",eyt,[l("button",{onClick:e[424]||(e[424]=j((..._)=>r.onCancelInstall&&r.onCancelInstall(..._),["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 ")])])])])):G("",!0)])])],2)]),l("div",tyt,[l("div",nyt,[l("button",{onClick:e[427]||(e[427]=j(_=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[P(l("div",null,iyt,512),[[wt,i.pzc_collapsed]]),P(l("div",null,oyt,512),[[wt,!i.pzc_collapsed]]),ayt,r.configFile.personalities?(T(),x("div",lyt,"|")):G("",!0),l("div",cyt,K(r.active_pesonality),1),r.configFile.personalities?(T(),x("div",dyt,"|")):G("",!0),r.configFile.personalities?(T(),x("div",uyt,[r.mountedPersArr.length>0?(T(),x("div",pyt,[(T(!0),x(Fe,null,Ke(r.mountedPersArr,(_,g)=>(T(),x("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:g+"-"+_.name,ref_for:!0,ref:"mountedPersonalities"},[l("div",_yt,[l("button",{onClick:j(b=>r.onPersonalitySelected(_),["stop"])},[l("img",{src:i.bUrl+_.avatar,onError:e[425]||(e[425]=(...b)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...b)),class:Ge(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(_.full_path)?"border-secondary":"border-transparent z-0"]),title:_.name},null,42,fyt)],8,hyt),l("button",{onClick:j(b=>r.unmountPersonality(_),["stop"])},byt,8,myt)])]))),128))])):G("",!0)])):G("",!0),l("button",{onClick:e[426]||(e[426]=j(_=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},yyt)])]),l("div",{class:Ge([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",vyt,[Syt,l("div",Tyt,[l("div",xyt,[i.searchPersonalityInProgress?(T(),x("div",Cyt,Ryt)):G("",!0),i.searchPersonalityInProgress?G("",!0):(T(),x("div",Ayt,Oyt))]),P(l("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 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",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[428]||(e[428]=_=>i.searchPersonality=_),onKeyup:e[429]||(e[429]=j((..._)=>r.searchPersonality_func&&r.searchPersonality_func(..._),["stop"]))},null,544),[[pe,i.searchPersonality]]),i.searchPersonality?(T(),x("button",{key:0,onClick:e[430]||(e[430]=j(_=>i.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):G("",!0)])]),i.searchPersonality?G("",!0):(T(),x("div",Myt,[l("label",Iyt," Personalities Category: ("+K(i.persCatgArr.length)+") ",1),l("select",{id:"persCat",onChange:e[431]||(e[431]=_=>r.update_personality_category(_.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},[(T(!0),x(Fe,null,Ke(i.persCatgArr,(_,g)=>(T(),x("option",{key:g,selected:_==this.configFile.personality_category},K(_),9,kyt))),128))],32)])),l("div",null,[i.personalitiesFiltered.length>0?(T(),x("div",Dyt,[l("label",Lyt,K(i.searchPersonality?"Search results":"Personalities")+": ("+K(i.personalitiesFiltered.length)+") ",1),l("div",{class:Ge(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.pzl_collapsed?"":"max-h-96"])},[V(ii,{name:"bounce"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(i.personalitiesFiltered,(_,g)=>(T(),dt(h,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+g+"-"+_.name,personality:_,select_language:!0,full_path:_.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(b=>b===_.full_path||b===_.full_path+":"+_.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})],2)])):G("",!0)]),i.pzl_collapsed?(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[432]||(e[432]=_=>i.pzl_collapsed=!i.pzl_collapsed)},Fyt)):(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[433]||(e[433]=_=>i.pzl_collapsed=!i.pzl_collapsed)},Byt))],2)]),l("div",Gyt,[l("div",Vyt,[l("button",{onClick:e[434]||(e[434]=j(_=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[P(l("div",null,Hyt,512),[[wt,i.mc_collapsed]]),P(l("div",null,$yt,512),[[wt,!i.mc_collapsed]]),Yyt])]),l("div",{class:Ge([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[l("div",Wyt,[l("div",Kyt,[P(l("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[435]||(e[435]=j(()=>{},["stop"])),"onUpdate:modelValue":e[436]||(e[436]=_=>r.configFile.override_personality_model_parameters=_),onChange:e[437]||(e[437]=_=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[$e,r.configFile.override_personality_model_parameters]]),jyt])]),l("div",{class:Ge(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[l("div",Qyt,[Xyt,P(l("input",{type:"text",id:"seed","onUpdate:modelValue":e[438]||(e[438]=_=>r.configFile.seed=_),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[pe,r.configFile.seed]])]),l("div",Zyt,[l("div",Jyt,[l("div",evt,[tvt,l("p",nvt,[P(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[439]||(e[439]=_=>r.configFile.temperature=_),onChange:e[440]||(e[440]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.temperature]])])]),P(l("input",{id:"temperature",onChange:e[441]||(e[441]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[442]||(e[442]=_=>r.configFile.temperature=_),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.temperature]])])]),l("div",svt,[l("div",ivt,[l("div",rvt,[ovt,l("p",avt,[P(l("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[443]||(e[443]=_=>r.configFile.n_predict=_),onChange:e[444]||(e[444]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.n_predict]])])]),P(l("input",{id:"predict",type:"range",onChange:e[445]||(e[445]=_=>i.settingsChanged=!0),"onUpdate:modelValue":e[446]||(e[446]=_=>r.configFile.n_predict=_),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.n_predict]])])]),l("div",lvt,[l("div",cvt,[l("div",dvt,[uvt,l("p",pvt,[P(l("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[447]||(e[447]=_=>r.configFile.top_k=_),onChange:e[448]||(e[448]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.top_k]])])]),P(l("input",{id:"top_k",type:"range",onChange:e[449]||(e[449]=_=>i.settingsChanged=!0),"onUpdate:modelValue":e[450]||(e[450]=_=>r.configFile.top_k=_),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.top_k]])])]),l("div",_vt,[l("div",hvt,[l("div",fvt,[mvt,l("p",gvt,[P(l("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[451]||(e[451]=_=>r.configFile.top_p=_),onChange:e[452]||(e[452]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.top_p]])])]),P(l("input",{id:"top_p",type:"range","onUpdate:modelValue":e[453]||(e[453]=_=>r.configFile.top_p=_),min:"0",max:"1",step:"0.01",onChange:e[454]||(e[454]=_=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.top_p]])])]),l("div",bvt,[l("div",Evt,[l("div",yvt,[vvt,l("p",Svt,[P(l("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[455]||(e[455]=_=>r.configFile.repeat_penalty=_),onChange:e[456]||(e[456]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.repeat_penalty]])])]),P(l("input",{id:"repeat_penalty",onChange:e[457]||(e[457]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[458]||(e[458]=_=>r.configFile.repeat_penalty=_),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.repeat_penalty]])])]),l("div",Tvt,[l("div",xvt,[l("div",Cvt,[wvt,l("p",Rvt,[P(l("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[459]||(e[459]=_=>r.configFile.repeat_last_n=_),onChange:e[460]||(e[460]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.repeat_last_n]])])]),P(l("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[461]||(e[461]=_=>r.configFile.repeat_last_n=_),min:"0",max:"100",step:"1",onChange:e[462]||(e[462]=_=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),V(f,{ref:"addmodeldialog"},null,512),V(m,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const Nvt=ot(mat,[["render",Avt],["__scopeId","data-v-80919fde"]]),Ovt={components:{ClipBoardTextInput:gE,Card:ju},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const t={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};ae.post("/start_training",t).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(t){const e=t.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(t){console.log("watching model_name",t),this.$refs.clipboardInput.inputValue=t}}},Mvt={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Ivt={class:"mb-4"},kvt=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),Dvt=["value"],Lvt={class:"mb-4"},Pvt=l("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),Fvt={class:"mb-4"},Uvt=l("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),Bvt={class:"mb-4"},Gvt=l("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),Vvt={class:"mb-4"},zvt=l("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),Hvt={class:"mb-4"},qvt=l("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),$vt={class:"mb-4"},Yvt=l("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),Wvt=l("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),Kvt={key:1};function jvt(t,e,n,s,i,r){const o=tt("Card"),a=tt("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(T(),x("div",Mvt,[l("form",{onSubmit:e[2]||(e[2]=j((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:""},[V(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[V(o,{title:"Model",class:"",isHorizontal:!1},{default:Ie(()=>[l("div",Ivt,[kvt,P(l("select",{"onUpdate:modelValue":e[0]||(e[0]=c=>r.selectedModel=c),onChange:e[1]||(e[1]=(...c)=>t.setModel&&t.setModel(...c)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),x(Fe,null,Ke(r.models,c=>(T(),x("option",{key:c,value:c},K(c),9,Dvt))),128))],544),[[Dt,r.selectedModel]])])]),_:1}),V(o,{title:"Data",isHorizontal:!1},{default:Ie(()=>[l("div",Lvt,[Pvt,V(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),V(o,{title:"Training",isHorizontal:!1},{default:Ie(()=>[l("div",Fvt,[Uvt,V(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),l("div",Bvt,[Gvt,V(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),l("div",Vvt,[zvt,V(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),l("div",Hvt,[qvt,V(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),V(o,{title:"Output",isHorizontal:!1},{default:Ie(()=>[l("div",$vt,[Yvt,V(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),V(o,{disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[Wvt]),_:1})],32)])):(T(),x("div",Kvt,[V(o,{title:"Info",class:"",isHorizontal:!1},{default:Ie(()=>[et(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const Qvt=ot(Ovt,[["render",jvt]]),Xvt={components:{ClipBoardTextInput:gE,Card:ju},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(t){const e=t.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},Zvt={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Jvt={class:"mb-4"},eSt=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),tSt={class:"mb-4"},nSt=l("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),sSt=l("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function iSt(t,e,n,s,i,r){const o=tt("ClipBoardTextInput"),a=tt("Card");return T(),x("div",Zvt,[l("form",{onSubmit:e[0]||(e[0]=j((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:"max-w-md mx-auto"},[V(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[V(a,{title:"Model",class:"",isHorizontal:!1},{default:Ie(()=>[l("div",Jvt,[eSt,V(o,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),l("div",tSt,[nSt,V(o,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),V(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[sSt]),_:1})],32)])}const rSt=ot(Xvt,[["render",iSt]]),aN="/assets/strawberry-20d9a7ba.png",oSt={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,Le(()=>{ze.replace()})},watch:{showConfirmation(){Le(()=>{ze.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&Le(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&Le(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},aSt=["id"],lSt={class:"flex flex-row items-center gap-2"},cSt={key:0},dSt={class:"flex flex-row items-center w-full"},uSt=["title"],pSt=["value"],_St={class:"flex items-center flex-1 max-h-6"},hSt={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},fSt=l("i",{"data-feather":"x"},null,-1),mSt=[fSt],gSt=l("i",{"data-feather":"check"},null,-1),bSt=[gSt],ESt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},ySt=l("i",{"data-feather":"folder"},null,-1),vSt=[ySt],SSt=l("i",{"data-feather":"type"},null,-1),TSt=[SSt],xSt=l("i",{"data-feather":"edit-2"},null,-1),CSt=[xSt],wSt=l("i",{"data-feather":"trash"},null,-1),RSt=[wSt];function ASt(t,e,n,s,i,r){return T(),x("div",{class:Ge([n.selected?"discussion-hilighted shadow-md min-w-[23rem] max-w-[23rem]":"discussion min-w-[23rem] max-w-[23rem]","m-1 py-2 flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm hover:shadow-md rounded-md duration-75 group cursor-pointer"]),id:"dis-"+n.id,onClick:e[13]||(e[13]=j(o=>r.selectEvent(),["stop"]))},[l("div",lSt,[n.isCheckbox?(T(),x("div",cSt,[P(l("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[0]||(e[0]=j(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>i.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,n.id))},null,544),[[$e,i.checkBoxValue_local]])])):G("",!0),n.selected?(T(),x("div",{key:1,class:Ge(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):G("",!0),n.selected?G("",!0):(T(),x("div",{key:2,class:Ge(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),l("div",dSt,[i.editTitle?G("",!0):(T(),x("p",{key:0,title:n.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},K(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,uSt)),i.editTitle?(T(),x("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:n.title,required:"",onKeydown:[e[3]||(e[3]=zs(j(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=zs(j(o=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=j(()=>{},["stop"]))},null,40,pSt)):G("",!0),l("div",_St,[i.showConfirmation?(T(),x("div",hSt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=j(o=>r.cancel(),["stop"]))},mSt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=j(o=>i.editTitleMode?r.editTitleEvent():i.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},bSt)])):G("",!0),i.showConfirmation?G("",!0):(T(),x("div",ESt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=j(o=>r.openFolderEvent(),["stop"]))},vSt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=j(o=>i.makeTitleMode=!0,["stop"]))},TSt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=j(o=>i.editTitleMode=!0,["stop"]))},CSt),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=j(o=>i.deleteMode=!0,["stop"]))},RSt)]))])])],10,aSt)}const OE=ot(oSt,[["render",ASt]]),NSt={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(t){this.prompt=t}}},OSt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},MSt={class:"bg-white p-8 rounded"},ISt={class:"text-xl font-bold mb-4"};function kSt(t,e,n,s,i,r){return T(),x("div",null,[i.show?(T(),x("div",OSt,[l("div",MSt,[l("h2",ISt,K(n.promptText),1),P(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>i.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[pe,i.inputText]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),l("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):G("",!0)])}const lN=ot(NSt,[["render",kSt]]),DSt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:OE,MarkdownRenderer:Yu},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){ae.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),ae.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){ae.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),ae.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){ae.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},LSt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},PSt={class:"min-w-[23rem] max-w-[23rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},FSt={class:"search p-4"},USt={classclass:"absolute flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},BSt=l("h2",{class:"text-xl font-bold m-4"},"Titles",-1),GSt={class:"z-0 flex flex-col flex-grow 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"},VSt=l("h2",{class:"text-xl font-bold m-4"},"Content",-1);function zSt(t,e,n,s,i,r){const o=tt("Discussion"),a=tt("MarkdownRenderer");return T(),x("div",{class:Ge([{hidden:!i.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[l("div",LSt,[l("div",PSt,[l("div",FSt,[P(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=c=>i.searchQuery=c),placeholder:"Search skills",class:"border border-gray-300 rounded px-2 py-1 mr-2"},null,512),[[pe,i.searchQuery]]),l("button",{onClick:e[1]||(e[1]=(...c)=>r.searchSkills&&r.searchSkills(...c)),class:"bg-blue-500 text-white rounded px-4 py-1"},"Search")]),l("div",USt,[BSt,i.titles.length>0?(T(),dt(ii,{key:0,name:"list"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(i.titles,c=>(T(),dt(o,{key:c.id,id:c.id,title:c.title,selected:r.fetchContent(c.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,onSelect:d=>r.fetchContent(c.id),onDelete:d=>r.deleteSkill(c.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):G("",!0)])]),l("div",GSt,[VSt,V(a,{host:n.host,"markdown-text":i.content,message_id:i.id,discussion_id:i.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),l("button",{onClick:e[2]||(e[2]=(...c)=>r.closeComponent&&r.closeComponent(...c)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const cN=ot(DSt,[["render",zSt]]),HSt={props:{htmlContent:{type:String,required:!0}}},qSt=["innerHTML"];function $St(t,e,n,s,i,r){return T(),x("div",{class:"w-full h-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",innerHTML:n.htmlContent},null,8,qSt)}const YSt=ot(HSt,[["render",$St]]);const WSt={name:"JsonTreeView",props:{data:{type:[Object,Array],required:!0},depth:{type:Number,default:0}},data(){return{collapsedKeys:new Set}},methods:{isObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},isArray(t){return Array.isArray(t)},toggleCollapse(t){this.collapsedKeys.has(t)?this.collapsedKeys.delete(t):this.collapsedKeys.add(t)},isCollapsed(t){return this.collapsedKeys.has(t)},getValueType(t){return typeof t=="string"?"string":typeof t=="number"?"number":typeof t=="boolean"?"boolean":t===null?"null":""},formatValue(t){return typeof t=="string"?`"${t}"`:String(t)}}},KSt={class:"json-tree-view"},jSt=["onClick"],QSt={key:0,class:"toggle-icon"},XSt={class:"key"},ZSt={key:0,class:"json-nested"};function JSt(t,e,n,s,i,r){const o=tt("json-tree-view",!0);return T(),x("div",KSt,[(T(!0),x(Fe,null,Ke(n.data,(a,c)=>(T(),x("div",{key:c,class:"json-item"},[l("div",{class:"json-key",onClick:d=>r.toggleCollapse(c)},[r.isObject(a)||r.isArray(a)?(T(),x("span",QSt,[l("i",{class:Ge(r.isCollapsed(c)?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)])):G("",!0),l("span",XSt,K(c)+":",1),!r.isObject(a)&&!r.isArray(a)?(T(),x("span",{key:1,class:Ge(["value",r.getValueType(a)])},K(r.formatValue(a)),3)):G("",!0)],8,jSt),(r.isObject(a)||r.isArray(a))&&!r.isCollapsed(c)?(T(),x("div",ZSt,[V(o,{data:a,depth:n.depth+1},null,8,["data","depth"])])):G("",!0)]))),128))])}const e0t=ot(WSt,[["render",JSt],["__scopeId","data-v-40406ec6"]]);const t0t={components:{JsonTreeView:e0t},props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Viewer"}},data(){return{collapsed:!0}},computed:{isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")},parsedJsonData(){if(typeof this.jsonData=="string")try{return JSON.parse(this.jsonData)}catch(t){return console.error("Error parsing JSON string:",t),{error:"Invalid JSON string"}}return this.jsonData}},methods:{toggleCollapsible(){this.collapsed=!this.collapsed}}},n0t={key:0,class:"json-viewer"},s0t={class:"toggle-icon"},i0t={class:"json-content panels-color"};function r0t(t,e,n,s,i,r){const o=tt("json-tree-view");return r.isContentPresent?(T(),x("div",n0t,[l("div",{class:"collapsible-section",onClick:e[0]||(e[0]=(...a)=>r.toggleCollapsible&&r.toggleCollapsible(...a))},[l("span",s0t,[l("i",{class:Ge(i.collapsed?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)]),et(" "+K(n.jsonFormText),1)]),P(l("div",i0t,[V(o,{data:r.parsedJsonData,depth:0},null,8,["data"])],512),[[wt,!i.collapsed]])])):G("",!0)}const o0t=ot(t0t,[["render",r0t],["__scopeId","data-v-83fc9727"]]);const a0t={props:{done:{type:Boolean,default:!1},text:{type:String,default:""},status:{type:Boolean,default:!1},step_type:{type:String,default:"start_end"},description:{type:String,default:""}},mounted(){this.amounted()},methods:{amounted(){console.log("Component mounted with the following properties:"),console.log("done:",this.done),console.log("text:",this.text),console.log("status:",this.status),console.log("step_type:",this.step_type),console.log("description:",this.description)}},watch:{done(t){typeof t!="boolean"&&console.error("Invalid type for done. Expected Boolean.")},status(t){typeof t!="boolean"&&console.error("Invalid type for status. Expected Boolean."),this.done&&!t&&console.error("Task completed with errors.")}}},Ju=t=>(vs("data-v-78f415f6"),t=t(),Ss(),t),l0t={class:"step-container"},c0t={class:"step-icon"},d0t={key:0},u0t={key:0},p0t=Ju(()=>l("i",{"data-feather":"circle",class:"feather-icon text-gray-600 dark:text-gray-300"},null,-1)),_0t=[p0t],h0t={key:1},f0t=Ju(()=>l("i",{"data-feather":"check-circle",class:"feather-icon text-green-600 dark:text-green-400"},null,-1)),m0t=[f0t],g0t={key:2},b0t=Ju(()=>l("i",{"data-feather":"x-circle",class:"feather-icon text-red-600 dark:text-red-400"},null,-1)),E0t=[b0t],y0t={key:1},v0t=Ju(()=>l("div",{class:"spinner"},null,-1)),S0t=[v0t],T0t={class:"step-content"},x0t={key:0,class:"step-description"};function C0t(t,e,n,s,i,r){return T(),x("div",l0t,[l("div",{class:Ge(["step-wrapper transition-all duration-300 ease-in-out",{"bg-green-100 dark:bg-green-900":n.done&&n.status,"bg-red-100 dark:bg-red-900":n.done&&!n.status,"bg-gray-100 dark:bg-gray-800":!n.done}])},[l("div",c0t,[n.step_type==="start_end"?(T(),x("div",d0t,[n.done?n.done&&n.status?(T(),x("div",h0t,m0t)):(T(),x("div",g0t,E0t)):(T(),x("div",u0t,_0t))])):G("",!0),n.done?G("",!0):(T(),x("div",y0t,S0t))]),l("div",T0t,[l("h3",{class:Ge(["step-text",{"text-green-600 dark:text-green-400":n.done&&n.status,"text-red-600 dark:text-red-400":n.done&&!n.status,"text-gray-800 dark:text-gray-200":!n.done}])},K(n.text||"No text provided"),3),n.description?(T(),x("p",x0t,K(n.description||"No description provided"),1)):G("",!0)])],2)])}const w0t=ot(a0t,[["render",C0t],["__scopeId","data-v-78f415f6"]]),R0t="/assets/process-61f7a21b.svg",A0t="/assets/ok-a0b56451.svg",N0t="/assets/failed-183609e7.svg",dN="/assets/send_globe-305330b9.svg";const O0t="/",M0t={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:Yu,Step:w0t,RenderHTMLJS:YSt,JsonViewer:o0t,DynamicUIRenderer:oN,ToolbarButton:bE,DropdownMenu:rN},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:$2,html5_block:Y2,LaTeX_block:W2,json_block:q2,javascript_block:H2,process_svg:R0t,ok_svg:A0t,failed_svg:N0t,loading_svg:j2,sendGlobe:dN,code_block:V2,python_block:z2,bash_block:K2,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Le(()=>{ze.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const s=Math.floor(n/(1e3*60*60));n-=s*(1e3*60*60);const i=Math.floor(n/(1e3*60));n-=i*(1e3*60);const r=Math.floor(n/1e3);return n-=r*1e3,[s,i,r]},insertTab(t){const e=t.target,n=e.selectionStart,s=e.selectionEnd,i=t.shiftKey;if(n===s)if(i){if(e.value.substring(n-4,n)==" "){const r=e.value.substring(0,n-4),o=e.value.substring(s),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const r=e.value.substring(0,n),o=e.value.substring(s),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const o=e.value.substring(n,s).split(`
+Here is how you can do that `))},mbt)])]),l("tr",null,[gbt,l("td",null,[l("div",bbt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[401]||(e[401]=(..._)=>r.reinstallPetalsService&&r.reinstallPetalsService(..._))},"install petals service")])])]),l("tr",null,[Ebt,l("td",null,[l("div",ybt,[P(l("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[402]||(e[402]=_=>r.configFile.petals_base_url=_),onChange:e[403]||(e[403]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),V(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[V(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:Ie(()=>[l("table",vbt,[l("tr",null,[Sbt,l("td",null,[l("div",Tbt,[P(l("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[404]||(e[404]=_=>r.configFile.elastic_search_service=_),onChange:e[405]||(e[405]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[$e,r.configFile.elastic_search_service]])])])]),l("tr",null,[xbt,l("td",null,[l("div",Cbt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[406]||(e[406]=(..._)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(..._))},"install ElasticSearch service")])])]),l("tr",null,[wbt,l("td",null,[l("div",Rbt,[P(l("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[407]||(e[407]=_=>r.configFile.elastic_search_url=_),onChange:e[408]||(e[408]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[pe,r.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),l("div",Abt,[l("div",Nbt,[l("button",{onClick:e[409]||(e[409]=j(_=>i.bzc_collapsed=!i.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[P(l("div",null,Mbt,512),[[wt,i.bzc_collapsed]]),P(l("div",null,kbt,512),[[wt,!i.bzc_collapsed]]),Dbt,r.configFile.binding_name?G("",!0):(T(),x("div",Lbt,[Pbt,Je(" No binding selected! ")])),r.configFile.binding_name?(T(),x("div",Fbt,"|")):G("",!0),r.configFile.binding_name?(T(),x("div",Ubt,[l("div",Bbt,[l("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,Gbt),l("h3",Vbt,K(r.binding_name),1)])])):G("",!0)])]),l("div",{class:Ge([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(T(),x("div",zbt,[l("label",Hbt," Bindings: ("+K(r.bindingsZoo.length)+") ",1),l("div",{class:Ge(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.bzl_collapsed?"":"max-h-96"])},[V(ii,{name:"list"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(r.bindingsZoo,(_,g)=>(T(),dt(c,{ref_for:!0,ref:"bindingZoo",key:"index-"+g+"-"+_.folder,binding:_,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:_.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):G("",!0),i.bzl_collapsed?(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[410]||(e[410]=_=>i.bzl_collapsed=!i.bzl_collapsed)},$bt)):(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[411]||(e[411]=_=>i.bzl_collapsed=!i.bzl_collapsed)},Wbt))],2)]),l("div",Kbt,[l("div",jbt,[l("button",{onClick:e[412]||(e[412]=j(_=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[P(l("div",null,Xbt,512),[[wt,i.mzc_collapsed]]),P(l("div",null,Jbt,512),[[wt,!i.mzc_collapsed]]),eEt,l("div",tEt,[r.configFile.binding_name?G("",!0):(T(),x("div",nEt,[sEt,Je(" Select binding first! ")])),!r.configFile.model_name&&r.configFile.binding_name?(T(),x("div",iEt,[rEt,Je(" No model selected! ")])):G("",!0),r.configFile.model_name?(T(),x("div",oEt,"|")):G("",!0),r.configFile.model_name?(T(),x("div",aEt,[l("div",lEt,[l("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,cEt),l("h3",dEt,K(r.configFile.model_name),1)])])):G("",!0)])])]),l("div",{class:Ge([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",uEt,[l("div",pEt,[l("div",_Et,[i.searchModelInProgress?(T(),x("div",hEt,mEt)):G("",!0),i.searchModelInProgress?G("",!0):(T(),x("div",gEt,EEt))]),P(l("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 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",placeholder:"Search models...",required:"","onUpdate:modelValue":e[413]||(e[413]=_=>i.searchModel=_),onKeyup:e[414]||(e[414]=zs((..._)=>r.searchModel_func&&r.searchModel_func(..._),["enter"]))},null,544),[[pe,i.searchModel]]),i.searchModel?(T(),x("button",{key:0,onClick:e[415]||(e[415]=j(_=>i.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):G("",!0)])]),l("div",null,[P(l("input",{"onUpdate:modelValue":e[416]||(e[416]=_=>i.show_only_installed_models=_),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[$e,i.show_only_installed_models]]),yEt]),l("div",null,[V(d,{radioOptions:i.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),vEt,i.is_loading_zoo?(T(),x("div",SEt,CEt)):G("",!0),i.models_zoo&&i.models_zoo.length>0?(T(),x("div",wEt,[l("label",REt," Models: ("+K(i.models_zoo.length)+") ",1),l("div",{class:Ge(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full 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",i.mzl_collapsed?"":"max-h-96"])},[V(ii,{name:"list"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(r.rendered_models_zoo,(_,g)=>(T(),dt(u,{ref_for:!0,ref:"modelZoo",key:"index-"+g+"-"+_.name,model:_,"is-installed":_.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:_.name===r.configFile.model_name,model_type:_.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),l("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[417]||(e[417]=(..._)=>r.load_more_models&&r.load_more_models(..._))},"Load more models",512)]),_:1})],2)])):G("",!0),i.mzl_collapsed?(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[418]||(e[418]=(..._)=>r.open_mzl&&r.open_mzl(..._))},NEt)):(T(),x("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[419]||(e[419]=(..._)=>r.open_mzl&&r.open_mzl(..._))},MEt)),l("div",IEt,[l("div",kEt,[l("div",null,[l("div",DEt,[LEt,P(l("input",{type:"text","onUpdate:modelValue":e[420]||(e[420]=_=>i.reference_path=_),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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",placeholder:"Enter Path ...",required:""},null,512),[[pe,i.reference_path]])]),l("button",{type:"button",onClick:e[421]||(e[421]=j(_=>r.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),i.modelDownlaodInProgress?G("",!0):(T(),x("div",PEt,[l("div",FEt,[UEt,P(l("input",{type:"text","onUpdate:modelValue":e[422]||(e[422]=_=>i.addModel.url=_),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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",placeholder:"Enter URL ...",required:""},null,512),[[pe,i.addModel.url]])]),l("button",{type:"button",onClick:e[423]||(e[423]=j(_=>r.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),i.modelDownlaodInProgress?(T(),x("div",BEt,[GEt,l("div",VEt,[l("div",zEt,[l("div",HEt,[qEt,l("span",$Et,K(Math.floor(i.addModel.progress))+"%",1)]),l("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},K(i.addModel.url),9,YEt),l("div",WEt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Ht({width:i.addModel.progress+"%"})},null,4)]),l("div",KEt,[l("span",jEt,"Download speed: "+K(r.speed_computed)+"/s",1),l("span",QEt,K(r.downloaded_size_computed)+"/"+K(r.total_size_computed),1)])])]),l("div",XEt,[l("div",ZEt,[l("div",JEt,[l("button",{onClick:e[424]||(e[424]=j((..._)=>r.onCancelInstall&&r.onCancelInstall(..._),["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 ")])])])])):G("",!0)])])],2)]),l("div",eyt,[l("div",tyt,[l("button",{onClick:e[427]||(e[427]=j(_=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[P(l("div",null,syt,512),[[wt,i.pzc_collapsed]]),P(l("div",null,ryt,512),[[wt,!i.pzc_collapsed]]),oyt,r.configFile.personalities?(T(),x("div",ayt,"|")):G("",!0),l("div",lyt,K(r.active_pesonality),1),r.configFile.personalities?(T(),x("div",cyt,"|")):G("",!0),r.configFile.personalities?(T(),x("div",dyt,[r.mountedPersArr.length>0?(T(),x("div",uyt,[(T(!0),x(Fe,null,Ke(r.mountedPersArr,(_,g)=>(T(),x("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:g+"-"+_.name,ref_for:!0,ref:"mountedPersonalities"},[l("div",pyt,[l("button",{onClick:j(b=>r.onPersonalitySelected(_),["stop"])},[l("img",{src:i.bUrl+_.avatar,onError:e[425]||(e[425]=(...b)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...b)),class:Ge(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(_.full_path)?"border-secondary":"border-transparent z-0"]),title:_.name},null,42,hyt)],8,_yt),l("button",{onClick:j(b=>r.unmountPersonality(_),["stop"])},gyt,8,fyt)])]))),128))])):G("",!0)])):G("",!0),l("button",{onClick:e[426]||(e[426]=j(_=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},Eyt)])]),l("div",{class:Ge([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",yyt,[vyt,l("div",Syt,[l("div",Tyt,[i.searchPersonalityInProgress?(T(),x("div",xyt,wyt)):G("",!0),i.searchPersonalityInProgress?G("",!0):(T(),x("div",Ryt,Nyt))]),P(l("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 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",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[428]||(e[428]=_=>i.searchPersonality=_),onKeyup:e[429]||(e[429]=j((..._)=>r.searchPersonality_func&&r.searchPersonality_func(..._),["stop"]))},null,544),[[pe,i.searchPersonality]]),i.searchPersonality?(T(),x("button",{key:0,onClick:e[430]||(e[430]=j(_=>i.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):G("",!0)])]),i.searchPersonality?G("",!0):(T(),x("div",Oyt,[l("label",Myt," Personalities Category: ("+K(i.persCatgArr.length)+") ",1),l("select",{id:"persCat",onChange:e[431]||(e[431]=_=>r.update_personality_category(_.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 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"},[(T(!0),x(Fe,null,Ke(i.persCatgArr,(_,g)=>(T(),x("option",{key:g,selected:_==this.configFile.personality_category},K(_),9,Iyt))),128))],32)])),l("div",null,[i.personalitiesFiltered.length>0?(T(),x("div",kyt,[l("label",Dyt,K(i.searchPersonality?"Search results":"Personalities")+": ("+K(i.personalitiesFiltered.length)+") ",1),l("div",{class:Ge(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.pzl_collapsed?"":"max-h-96"])},[V(ii,{name:"bounce"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(i.personalitiesFiltered,(_,g)=>(T(),dt(h,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+g+"-"+_.name,personality:_,select_language:!0,full_path:_.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(b=>b===_.full_path||b===_.full_path+":"+_.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})],2)])):G("",!0)]),i.pzl_collapsed?(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[432]||(e[432]=_=>i.pzl_collapsed=!i.pzl_collapsed)},Pyt)):(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[433]||(e[433]=_=>i.pzl_collapsed=!i.pzl_collapsed)},Uyt))],2)]),l("div",Byt,[l("div",Gyt,[l("button",{onClick:e[434]||(e[434]=j(_=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[P(l("div",null,zyt,512),[[wt,i.mc_collapsed]]),P(l("div",null,qyt,512),[[wt,!i.mc_collapsed]]),$yt])]),l("div",{class:Ge([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[l("div",Yyt,[l("div",Wyt,[P(l("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[435]||(e[435]=j(()=>{},["stop"])),"onUpdate:modelValue":e[436]||(e[436]=_=>r.configFile.override_personality_model_parameters=_),onChange:e[437]||(e[437]=_=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[$e,r.configFile.override_personality_model_parameters]]),Kyt])]),l("div",{class:Ge(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[l("div",jyt,[Qyt,P(l("input",{type:"text",id:"seed","onUpdate:modelValue":e[438]||(e[438]=_=>r.configFile.seed=_),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[pe,r.configFile.seed]])]),l("div",Xyt,[l("div",Zyt,[l("div",Jyt,[evt,l("p",tvt,[P(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[439]||(e[439]=_=>r.configFile.temperature=_),onChange:e[440]||(e[440]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.temperature]])])]),P(l("input",{id:"temperature",onChange:e[441]||(e[441]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[442]||(e[442]=_=>r.configFile.temperature=_),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.temperature]])])]),l("div",nvt,[l("div",svt,[l("div",ivt,[rvt,l("p",ovt,[P(l("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[443]||(e[443]=_=>r.configFile.n_predict=_),onChange:e[444]||(e[444]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.n_predict]])])]),P(l("input",{id:"predict",type:"range",onChange:e[445]||(e[445]=_=>i.settingsChanged=!0),"onUpdate:modelValue":e[446]||(e[446]=_=>r.configFile.n_predict=_),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.n_predict]])])]),l("div",avt,[l("div",lvt,[l("div",cvt,[dvt,l("p",uvt,[P(l("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[447]||(e[447]=_=>r.configFile.top_k=_),onChange:e[448]||(e[448]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.top_k]])])]),P(l("input",{id:"top_k",type:"range",onChange:e[449]||(e[449]=_=>i.settingsChanged=!0),"onUpdate:modelValue":e[450]||(e[450]=_=>r.configFile.top_k=_),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.top_k]])])]),l("div",pvt,[l("div",_vt,[l("div",hvt,[fvt,l("p",mvt,[P(l("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[451]||(e[451]=_=>r.configFile.top_p=_),onChange:e[452]||(e[452]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.top_p]])])]),P(l("input",{id:"top_p",type:"range","onUpdate:modelValue":e[453]||(e[453]=_=>r.configFile.top_p=_),min:"0",max:"1",step:"0.01",onChange:e[454]||(e[454]=_=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.top_p]])])]),l("div",gvt,[l("div",bvt,[l("div",Evt,[yvt,l("p",vvt,[P(l("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[455]||(e[455]=_=>r.configFile.repeat_penalty=_),onChange:e[456]||(e[456]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.repeat_penalty]])])]),P(l("input",{id:"repeat_penalty",onChange:e[457]||(e[457]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[458]||(e[458]=_=>r.configFile.repeat_penalty=_),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.repeat_penalty]])])]),l("div",Svt,[l("div",Tvt,[l("div",xvt,[Cvt,l("p",wvt,[P(l("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[459]||(e[459]=_=>r.configFile.repeat_last_n=_),onChange:e[460]||(e[460]=_=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.repeat_last_n]])])]),P(l("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[461]||(e[461]=_=>r.configFile.repeat_last_n=_),min:"0",max:"100",step:"1",onChange:e[462]||(e[462]=_=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[pe,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),V(f,{ref:"addmodeldialog"},null,512),V(m,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const Avt=ot(fat,[["render",Rvt],["__scopeId","data-v-80919fde"]]),Nvt={components:{ClipBoardTextInput:gE,Card:ju},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const t={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};ae.post("/start_training",t).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(t){const e=t.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(t){console.log("watching model_name",t),this.$refs.clipboardInput.inputValue=t}}},Ovt={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Mvt={class:"mb-4"},Ivt=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),kvt=["value"],Dvt={class:"mb-4"},Lvt=l("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),Pvt={class:"mb-4"},Fvt=l("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),Uvt={class:"mb-4"},Bvt=l("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),Gvt={class:"mb-4"},Vvt=l("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),zvt={class:"mb-4"},Hvt=l("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),qvt={class:"mb-4"},$vt=l("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),Yvt=l("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),Wvt={key:1};function Kvt(t,e,n,s,i,r){const o=tt("Card"),a=tt("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(T(),x("div",Ovt,[l("form",{onSubmit:e[2]||(e[2]=j((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:""},[V(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[V(o,{title:"Model",class:"",isHorizontal:!1},{default:Ie(()=>[l("div",Mvt,[Ivt,P(l("select",{"onUpdate:modelValue":e[0]||(e[0]=c=>r.selectedModel=c),onChange:e[1]||(e[1]=(...c)=>t.setModel&&t.setModel(...c)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),x(Fe,null,Ke(r.models,c=>(T(),x("option",{key:c,value:c},K(c),9,kvt))),128))],544),[[Dt,r.selectedModel]])])]),_:1}),V(o,{title:"Data",isHorizontal:!1},{default:Ie(()=>[l("div",Dvt,[Lvt,V(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),V(o,{title:"Training",isHorizontal:!1},{default:Ie(()=>[l("div",Pvt,[Fvt,V(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),l("div",Uvt,[Bvt,V(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),l("div",Gvt,[Vvt,V(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),l("div",zvt,[Hvt,V(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),V(o,{title:"Output",isHorizontal:!1},{default:Ie(()=>[l("div",qvt,[$vt,V(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),V(o,{disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[Yvt]),_:1})],32)])):(T(),x("div",Wvt,[V(o,{title:"Info",class:"",isHorizontal:!1},{default:Ie(()=>[Je(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const jvt=ot(Nvt,[["render",Kvt]]),Qvt={components:{ClipBoardTextInput:gE,Card:ju},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(t){const e=t.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},Xvt={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Zvt={class:"mb-4"},Jvt=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),eSt={class:"mb-4"},tSt=l("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),nSt=l("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function sSt(t,e,n,s,i,r){const o=tt("ClipBoardTextInput"),a=tt("Card");return T(),x("div",Xvt,[l("form",{onSubmit:e[0]||(e[0]=j((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:"max-w-md mx-auto"},[V(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[V(a,{title:"Model",class:"",isHorizontal:!1},{default:Ie(()=>[l("div",Zvt,[Jvt,V(o,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),l("div",eSt,[tSt,V(o,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),V(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[nSt]),_:1})],32)])}const iSt=ot(Qvt,[["render",sSt]]),aN="/assets/strawberry-20d9a7ba.png",rSt={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,Le(()=>{ze.replace()})},watch:{showConfirmation(){Le(()=>{ze.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&Le(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&Le(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},oSt=["id"],aSt={class:"flex flex-row items-center gap-2"},lSt={key:0},cSt={class:"flex flex-row items-center w-full"},dSt=["title"],uSt=["value"],pSt={class:"flex items-center flex-1 max-h-6"},_St={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},hSt=l("i",{"data-feather":"x"},null,-1),fSt=[hSt],mSt=l("i",{"data-feather":"check"},null,-1),gSt=[mSt],bSt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},ESt=l("i",{"data-feather":"folder"},null,-1),ySt=[ESt],vSt=l("i",{"data-feather":"type"},null,-1),SSt=[vSt],TSt=l("i",{"data-feather":"edit-2"},null,-1),xSt=[TSt],CSt=l("i",{"data-feather":"trash"},null,-1),wSt=[CSt];function RSt(t,e,n,s,i,r){return T(),x("div",{class:Ge([n.selected?"discussion-hilighted shadow-md min-w-[23rem] max-w-[23rem]":"discussion min-w-[23rem] max-w-[23rem]","m-1 py-2 flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm hover:shadow-md rounded-md duration-75 group cursor-pointer"]),id:"dis-"+n.id,onClick:e[13]||(e[13]=j(o=>r.selectEvent(),["stop"]))},[l("div",aSt,[n.isCheckbox?(T(),x("div",lSt,[P(l("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[0]||(e[0]=j(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>i.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,n.id))},null,544),[[$e,i.checkBoxValue_local]])])):G("",!0),n.selected?(T(),x("div",{key:1,class:Ge(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):G("",!0),n.selected?G("",!0):(T(),x("div",{key:2,class:Ge(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),l("div",cSt,[i.editTitle?G("",!0):(T(),x("p",{key:0,title:n.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},K(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,dSt)),i.editTitle?(T(),x("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:n.title,required:"",onKeydown:[e[3]||(e[3]=zs(j(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=zs(j(o=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=j(()=>{},["stop"]))},null,40,uSt)):G("",!0),l("div",pSt,[i.showConfirmation?(T(),x("div",_St,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=j(o=>r.cancel(),["stop"]))},fSt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=j(o=>i.editTitleMode?r.editTitleEvent():i.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},gSt)])):G("",!0),i.showConfirmation?G("",!0):(T(),x("div",bSt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=j(o=>r.openFolderEvent(),["stop"]))},ySt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=j(o=>i.makeTitleMode=!0,["stop"]))},SSt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=j(o=>i.editTitleMode=!0,["stop"]))},xSt),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=j(o=>i.deleteMode=!0,["stop"]))},wSt)]))])])],10,oSt)}const OE=ot(rSt,[["render",RSt]]),ASt={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(t){this.prompt=t}}},NSt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},OSt={class:"bg-white p-8 rounded"},MSt={class:"text-xl font-bold mb-4"};function ISt(t,e,n,s,i,r){return T(),x("div",null,[i.show?(T(),x("div",NSt,[l("div",OSt,[l("h2",MSt,K(n.promptText),1),P(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>i.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[pe,i.inputText]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),l("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):G("",!0)])}const lN=ot(ASt,[["render",ISt]]),kSt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:OE,MarkdownRenderer:Yu},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){ae.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),ae.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){ae.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),ae.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){ae.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},DSt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},LSt={class:"min-w-[23rem] max-w-[23rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},PSt={class:"search p-4"},FSt={classclass:"absolute flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},USt=l("h2",{class:"text-xl font-bold m-4"},"Titles",-1),BSt={class:"z-0 flex flex-col flex-grow 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"},GSt=l("h2",{class:"text-xl font-bold m-4"},"Content",-1);function VSt(t,e,n,s,i,r){const o=tt("Discussion"),a=tt("MarkdownRenderer");return T(),x("div",{class:Ge([{hidden:!i.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[l("div",DSt,[l("div",LSt,[l("div",PSt,[P(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=c=>i.searchQuery=c),placeholder:"Search skills",class:"border border-gray-300 rounded px-2 py-1 mr-2"},null,512),[[pe,i.searchQuery]]),l("button",{onClick:e[1]||(e[1]=(...c)=>r.searchSkills&&r.searchSkills(...c)),class:"bg-blue-500 text-white rounded px-4 py-1"},"Search")]),l("div",FSt,[USt,i.titles.length>0?(T(),dt(ii,{key:0,name:"list"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(i.titles,c=>(T(),dt(o,{key:c.id,id:c.id,title:c.title,selected:r.fetchContent(c.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,onSelect:d=>r.fetchContent(c.id),onDelete:d=>r.deleteSkill(c.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):G("",!0)])]),l("div",BSt,[GSt,V(a,{host:n.host,"markdown-text":i.content,message_id:i.id,discussion_id:i.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),l("button",{onClick:e[2]||(e[2]=(...c)=>r.closeComponent&&r.closeComponent(...c)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const cN=ot(kSt,[["render",VSt]]),zSt={props:{htmlContent:{type:String,required:!0}}},HSt=["innerHTML"];function qSt(t,e,n,s,i,r){return T(),x("div",{class:"w-full h-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",innerHTML:n.htmlContent},null,8,HSt)}const $St=ot(zSt,[["render",qSt]]);const YSt={name:"JsonTreeView",props:{data:{type:[Object,Array],required:!0},depth:{type:Number,default:0}},data(){return{collapsedKeys:new Set}},methods:{isObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},isArray(t){return Array.isArray(t)},toggleCollapse(t){this.collapsedKeys.has(t)?this.collapsedKeys.delete(t):this.collapsedKeys.add(t)},isCollapsed(t){return this.collapsedKeys.has(t)},getValueType(t){return typeof t=="string"?"string":typeof t=="number"?"number":typeof t=="boolean"?"boolean":t===null?"null":""},formatValue(t){return typeof t=="string"?`"${t}"`:String(t)}}},WSt={class:"json-tree-view"},KSt=["onClick"],jSt={key:0,class:"toggle-icon"},QSt={class:"key"},XSt={key:0,class:"json-nested"};function ZSt(t,e,n,s,i,r){const o=tt("json-tree-view",!0);return T(),x("div",WSt,[(T(!0),x(Fe,null,Ke(n.data,(a,c)=>(T(),x("div",{key:c,class:"json-item"},[l("div",{class:"json-key",onClick:d=>r.toggleCollapse(c)},[r.isObject(a)||r.isArray(a)?(T(),x("span",jSt,[l("i",{class:Ge(r.isCollapsed(c)?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)])):G("",!0),l("span",QSt,K(c)+":",1),!r.isObject(a)&&!r.isArray(a)?(T(),x("span",{key:1,class:Ge(["value",r.getValueType(a)])},K(r.formatValue(a)),3)):G("",!0)],8,KSt),(r.isObject(a)||r.isArray(a))&&!r.isCollapsed(c)?(T(),x("div",XSt,[V(o,{data:a,depth:n.depth+1},null,8,["data","depth"])])):G("",!0)]))),128))])}const JSt=ot(YSt,[["render",ZSt],["__scopeId","data-v-40406ec6"]]);const e0t={components:{JsonTreeView:JSt},props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Viewer"}},data(){return{collapsed:!0}},computed:{isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")},parsedJsonData(){if(typeof this.jsonData=="string")try{return JSON.parse(this.jsonData)}catch(t){return console.error("Error parsing JSON string:",t),{error:"Invalid JSON string"}}return this.jsonData}},methods:{toggleCollapsible(){this.collapsed=!this.collapsed}}},t0t={key:0,class:"json-viewer"},n0t={class:"toggle-icon"},s0t={class:"json-content panels-color"};function i0t(t,e,n,s,i,r){const o=tt("json-tree-view");return r.isContentPresent?(T(),x("div",t0t,[l("div",{class:"collapsible-section",onClick:e[0]||(e[0]=(...a)=>r.toggleCollapsible&&r.toggleCollapsible(...a))},[l("span",n0t,[l("i",{class:Ge(i.collapsed?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)]),Je(" "+K(n.jsonFormText),1)]),P(l("div",s0t,[V(o,{data:r.parsedJsonData,depth:0},null,8,["data"])],512),[[wt,!i.collapsed]])])):G("",!0)}const r0t=ot(e0t,[["render",i0t],["__scopeId","data-v-83fc9727"]]);const o0t={props:{done:{type:Boolean,default:!1},text:{type:String,default:""},status:{type:Boolean,default:!1},step_type:{type:String,default:"start_end"},description:{type:String,default:""}},mounted(){this.amounted()},methods:{amounted(){console.log("Component mounted with the following properties:"),console.log("done:",this.done),console.log("text:",this.text),console.log("status:",this.status),console.log("step_type:",this.step_type),console.log("description:",this.description)}},watch:{done(t){typeof t!="boolean"&&console.error("Invalid type for done. Expected Boolean.")},status(t){typeof t!="boolean"&&console.error("Invalid type for status. Expected Boolean."),this.done&&!t&&console.error("Task completed with errors.")}}},Ju=t=>(vs("data-v-78f415f6"),t=t(),Ss(),t),a0t={class:"step-container"},l0t={class:"step-icon"},c0t={key:0},d0t={key:0},u0t=Ju(()=>l("i",{"data-feather":"circle",class:"feather-icon text-gray-600 dark:text-gray-300"},null,-1)),p0t=[u0t],_0t={key:1},h0t=Ju(()=>l("i",{"data-feather":"check-circle",class:"feather-icon text-green-600 dark:text-green-400"},null,-1)),f0t=[h0t],m0t={key:2},g0t=Ju(()=>l("i",{"data-feather":"x-circle",class:"feather-icon text-red-600 dark:text-red-400"},null,-1)),b0t=[g0t],E0t={key:1},y0t=Ju(()=>l("div",{class:"spinner"},null,-1)),v0t=[y0t],S0t={class:"step-content"},T0t={key:0,class:"step-description"};function x0t(t,e,n,s,i,r){return T(),x("div",a0t,[l("div",{class:Ge(["step-wrapper transition-all duration-300 ease-in-out",{"bg-green-100 dark:bg-green-900":n.done&&n.status,"bg-red-100 dark:bg-red-900":n.done&&!n.status,"bg-gray-100 dark:bg-gray-800":!n.done}])},[l("div",l0t,[n.step_type==="start_end"?(T(),x("div",c0t,[n.done?n.done&&n.status?(T(),x("div",_0t,f0t)):(T(),x("div",m0t,b0t)):(T(),x("div",d0t,p0t))])):G("",!0),n.done?G("",!0):(T(),x("div",E0t,v0t))]),l("div",S0t,[l("h3",{class:Ge(["step-text",{"text-green-600 dark:text-green-400":n.done&&n.status,"text-red-600 dark:text-red-400":n.done&&!n.status,"text-gray-800 dark:text-gray-200":!n.done}])},K(n.text||"No text provided"),3),n.description?(T(),x("p",T0t,K(n.description||"No description provided"),1)):G("",!0)])],2)])}const C0t=ot(o0t,[["render",x0t],["__scopeId","data-v-78f415f6"]]),w0t="/assets/process-61f7a21b.svg",R0t="/assets/ok-a0b56451.svg",A0t="/assets/failed-183609e7.svg",dN="/assets/send_globe-305330b9.svg";const N0t="/",O0t={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:Yu,Step:C0t,RenderHTMLJS:$St,JsonViewer:r0t,DynamicUIRenderer:oN,ToolbarButton:bE,DropdownMenu:rN},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:$2,html5_block:Y2,LaTeX_block:W2,json_block:q2,javascript_block:H2,process_svg:w0t,ok_svg:R0t,failed_svg:A0t,loading_svg:j2,sendGlobe:dN,code_block:V2,python_block:z2,bash_block:K2,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Le(()=>{ze.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const s=Math.floor(n/(1e3*60*60));n-=s*(1e3*60*60);const i=Math.floor(n/(1e3*60));n-=i*(1e3*60);const r=Math.floor(n/1e3);return n-=r*1e3,[s,i,r]},insertTab(t){const e=t.target,n=e.selectionStart,s=e.selectionEnd,i=t.shiftKey;if(n===s)if(i){if(e.value.substring(n-4,n)==" "){const r=e.value.substring(0,n-4),o=e.value.substring(s),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const r=e.value.substring(0,n),o=e.value.substring(s),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const o=e.value.substring(n,s).split(`
`).map(u=>u.trim()===""?u:i?u.startsWith(" ")?u.substring(4):u:" "+u),a=e.value.substring(0,n),c=e.value.substring(s),d=a+o.join(`
`)+c;this.message.content=d,this.$nextTick(()=>{e.selectionStart=n,e.selectionEnd=s+o.length*4})}t.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){this.isSynthesizingVoice?(this.isSynthesizingVoice=!1,this.$refs.audio_player.pause()):(this.isSynthesizingVoice=!0,ae.post("./text2wav",{text:this.message.content}).then(t=>{this.isSynthesizingVoice=!1;let e=t.data.url;console.log(e),this.audio_url=e,this.message.metadata||(this.message.metadata=[]);let n=!1;for(let s of this.message.metadata)Object.prototype.hasOwnProperty.call(s,"audio_url")&&(s.audio_url=this.audio_url,n=!0);n||this.message.metadata.push({audio_url:this.audio_url}),this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url)}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSynthesizingVoice=!1}))},async speak(){if(this.$store.state.config.active_tts_service!="browser"&&this.$store.state.config.active_tts_service!="None")this.isSpeaking?(this.isSpeaking=!0,ae.post("./stop",{text:this.message.content}).then(t=>{this.isSpeaking=!1}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSpeaking=!1})):(this.isSpeaking=!0,ae.post("./text2Audio",{client_id:this.$store.state.client_id,text:this.message.content}).then(t=>{this.isSpeaking=!1}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSpeaking=!1}));else{if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let t=0;console.log("voice on"),this.isSpeaking=!0;const e=200;this.message.content,this.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(i=>i.name===this.$store.state.config.audio_out_voice)[0]);const n=i=>{let r=this.message.content.substring(i,i+e);const o=[".","!","?",`
`];let a=-1;return o.forEach(c=>{const d=r.lastIndexOf(c);d>a&&(a=d)}),a==-1&&(a=r.length),console.log(a),a+i+1},s=()=>{if(this.message.status_message=="Done"||this.message.content.includes(".")||this.message.content.includes("?")||this.message.content.includes("!")){const i=n(t),r=this.message.content.substring(t,i);this.msg.text=r,t=i+1,this.msg.onend=o=>{t{s()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",i))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{s()},1)};console.log("Speaking chunk"),s()}},toggleModel(){this.expanded=!this.expanded},addBlock(t){let e=this.$refs.mdTextarea.selectionStart,n=this.$refs.mdTextarea.selectionEnd;e==n?speechSynthesis==0||this.message.content[e-1]==`
`?(this.message.content=this.message.content.slice(0,e)+"```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+3+t.length):speechSynthesis==0||this.message.content[e-1]==`
`?(this.message.content=this.message.content.slice(0,e)+"```"+t+`
`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+`
-`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.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(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?O0t+this.avatar:(console.log("No avatar found"),Bs)},defaultImg(t){t.target.src=Bs},parseDate(t){let e=new Date(Date.parse(t)),s=Math.floor((new Date-e)/1e3);return s<=1?"just now":s<20?s+" seconds ago":s<40?"half a minute ago":s<60?"less than a minute ago":s<=90?"one minute ago":s<=3540?Math.round(s/60)+" minutes ago":s<=5400?"1 hour ago":s<=86400?Math.round(s/3600)+" hours ago":s<=129600?"1 day ago":s<604800?Math.round(s/86400)+" days ago":s<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,s=Math.floor(n/86400);if(!(isNaN(s)||s<0||s>=31))return s==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||s==1&&"Yesterday"||s<7&&s+" days ago"||s<31&&Math.ceil(s/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){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(t){console.log("ui changed to",t),this.ui_componentKey++},showConfirmation(){Le(()=>{ze.replace()})},deleteMsgMode(){Le(()=>{ze.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,Le(()=>{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 t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[s,i,r]=this.computeTimeDiff(t,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},warmup_duration(){const t=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, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let s,i,r;[s,i,r]=this.computeTimeDiff(t,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let i=e.getTime()-t.getTime();const r=Math.floor(i/1e3),o=n/r;return Math.round(o)+" t/s"}}},I0t={class:"relative w-full group rounded-lg m-2 shadow-lg message 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"},k0t={class:"flex flex-row gap-2"},D0t={class:"flex-shrink-0"},L0t={class:"group/avatar"},P0t=["src","data-popover-target"],F0t={class:"flex flex-col w-full flex-grow-0"},U0t={class:"flex flex-row flex-grow items-start"},B0t={class:"flex flex-col mb-2"},G0t={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},V0t=["title"],z0t=l("div",{class:"flex-grow"},null,-1),H0t={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"},q0t={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"},$0t={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"},Y0t={class:"relative grid aspect-square place-content-center overflow-hidden rounded-full bg-gradient-to-br from-blue-400 to-purple-500"},W0t={key:0,class:"w-8 h-8 text-white animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},K0t=l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),j0t=l("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"},null,-1),Q0t=[K0t,j0t],X0t={key:1,class:"w-8 h-8 text-red-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Z0t=l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),J0t=[Z0t],eTt={key:2,class:"w-8 h-8 text-green-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},tTt=l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1),nTt=[tTt],sTt={class:"leading-5"},iTt=l("dd",{class:"text-lg font-semibold text-gray-800 dark:text-gray-200"},"Processing Info",-1),rTt={class:"flex items-center gap-1 truncate whitespace-nowrap text-sm text-gray-500 dark:text-gray-400"},oTt={class:"content px-5 pb-5 pt-4"},aTt={class:"list-none"},lTt=l("div",{class:"flex flex-col items-start w-full"},null,-1),cTt={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"},dTt={key:1},uTt=["src"],pTt={class:"flex-row justify-end mx-2"},_Tt={class:"invisible group-hover:visible flex flex-row"},hTt={key:0},fTt={key:1},mTt={key:2},gTt={key:3},bTt={key:4,class:"flex items-center duration-75"},ETt=l("i",{"data-feather":"x"},null,-1),yTt=[ETt],vTt=l("i",{"data-feather":"check"},null,-1),STt=[vTt],TTt=l("i",{"data-feather":"trash"},null,-1),xTt=[TTt],CTt=l("i",{"data-feather":"thumbs-up"},null,-1),wTt=[CTt],RTt={class:"flex flex-row items-center"},ATt=l("i",{"data-feather":"thumbs-down"},null,-1),NTt=[ATt],OTt={class:"flex flex-row items-center"},MTt=l("i",{"data-feather":"volume-2"},null,-1),ITt=[MTt],kTt={key:6,class:"flex flex-row items-center"},DTt=l("i",{"data-feather":"voicemail"},null,-1),LTt=[DTt],PTt=["src"],FTt={class:"text-sm text-gray-400 mt-2"},UTt={class:"flex flex-row items-center gap-2"},BTt={key:0},GTt={class:"font-thin"},VTt={key:1},zTt={class:"font-thin"},HTt={key:2},qTt={class:"font-thin"},$Tt={key:3},YTt=["title"],WTt={key:4},KTt=["title"],jTt={key:5},QTt=["title"],XTt={key:6},ZTt=["title"];function JTt(t,e,n,s,i,r){var _;const o=tt("Step"),a=tt("RenderHTMLJS"),c=tt("MarkdownRenderer"),d=tt("JsonViewer"),u=tt("DynamicUIRenderer"),h=tt("ToolbarButton"),f=tt("DropdownSubmenu"),m=tt("DropdownMenu");return T(),x("div",I0t,[l("div",k0t,[l("div",D0t,[l("div",L0t,[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=g=>r.defaultImg(g)),"data-popover-target":"avatar"+n.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,P0t)])]),l("div",F0t,[l("div",U0t,[l("div",B0t,[l("div",G0t,K(n.message.sender)+" ",1),n.message.created_at?(T(),x("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},K(r.created_at),9,V0t)):G("",!0)]),z0t]),l("div",H0t,[P(l("details",q0t,[l("summary",$0t,[l("div",Y0t,[n.message.status_message!=="Done"&&n.message.status_message!=="Generation canceled"?(T(),x("svg",W0t,Q0t)):G("",!0),n.message.status_message==="Generation canceled"?(T(),x("svg",X0t,J0t)):G("",!0),n.message.status_message==="Done"?(T(),x("svg",eTt,nTt)):G("",!0)]),l("dl",sTt,[iTt,l("dt",rTt,[l("span",{class:Ge(["inline-block w-2 h-2 rounded-full",{"bg-blue-500 animate-pulse":n.message.status_message!=="Done"&&n.message.status_message!=="Generation canceled","bg-red-500":n.message.status_message==="Generation canceled","bg-green-500":n.message.status_message==="Done"}])},null,2),et(" "+K(n.message===void 0?"":n.message.status_message),1)])])]),l("div",oTt,[l("ol",aTt,[(T(!0),x(Fe,null,Ke(n.message.steps,(g,b)=>(T(),x("div",{key:"step-"+n.message.id+"-"+b,class:"group border-l pb-6 last:!border-transparent last:pb-0 dark:border-gray-800",style:Ht({backgroundColor:g.done?"transparent":"inherit"})},[V(o,{done:g.done,text:g.text,status:g.status,step_type:g.step_type},null,8,["done","text","status","step_type"])],4))),128))])])],512),[[wt,n.message!=null&&n.message.steps!=null&&n.message.steps.length>0]]),lTt,l("div",cTt,[(T(!0),x(Fe,null,Ke(n.message.html_js_s,(g,b)=>(T(),x("div",{key:"htmljs-"+n.message.id+"-"+b,class:"htmljs font-bold",style:Ht({backgroundColor:t.step.done?"transparent":"inherit"})},[V(a,{htmlContent:g},null,8,["htmlContent"])],4))),128))]),r.editMsgMode?G("",!0):(T(),dt(c,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),l("div",null,[n.message.open?P((T(),x("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=zs(j((...g)=>r.insertTab&&r.insertTab(...g),["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]=g=>n.message.content=g)},`\r
- `,544)),[[pe,n.message.content]]):G("",!0)]),n.message.metadata!==null?(T(),x("div",dTt,[(T(!0),x(Fe,null,Ke(((_=n.message.metadata)==null?void 0:_.filter(g=>g!=null&&g.hasOwnProperty("title")&&g.hasOwnProperty("content")))||[],(g,b)=>(T(),x("div",{key:"json-"+n.message.id+"-"+b,class:"json font-bold"},[(T(),dt(d,{jsonFormText:g.title,jsonData:g.content,key:"msgjson-"+n.message.id},null,8,["jsonFormText","jsonData"]))]))),128))])):G("",!0),n.message.ui?(T(),dt(u,{ref:"ui",class:"w-full",ui:n.message.ui,key:"msgui-"+n.message.id},null,8,["ui"])):G("",!0),i.audio_url!=null?(T(),x("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,uTt),et(" Your browser does not support the audio element. ")])):G("",!0)]),l("div",pTt,[l("div",_Tt,[r.editMsgMode?(T(),x("div",hTt,[V(h,{onClick:e[3]||(e[3]=j(g=>r.editMsgMode=!1,["stop"])),title:"Cancel edit",icon:"x"}),V(h,{onClick:j(r.updateMessage,["stop"]),title:"Update message",icon:"check"},null,8,["onClick"]),V(m,{title:"Add Block"},{default:Ie(()=>[V(f,{title:"Programming Languages",icon:"code"},{default:Ie(()=>[V(h,{onClick:e[4]||(e[4]=j(g=>r.addBlock("python"),["stop"])),title:"Python",icon:"python"}),V(h,{onClick:e[5]||(e[5]=j(g=>r.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),V(h,{onClick:e[6]||(e[6]=j(g=>r.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),V(h,{onClick:e[7]||(e[7]=j(g=>r.addBlock("java"),["stop"])),title:"Java",icon:"java"}),V(h,{onClick:e[8]||(e[8]=j(g=>r.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),V(h,{onClick:e[9]||(e[9]=j(g=>r.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),V(h,{onClick:e[10]||(e[10]=j(g=>r.addBlock("go"),["stop"])),title:"Go",icon:"go"}),V(h,{onClick:e[11]||(e[11]=j(g=>r.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),V(h,{onClick:e[12]||(e[12]=j(g=>r.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),V(h,{onClick:e[13]||(e[13]=j(g=>r.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),V(h,{onClick:e[14]||(e[14]=j(g=>r.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),V(f,{title:"Web Technologies",icon:"web"},{default:Ie(()=>[V(h,{onClick:e[15]||(e[15]=j(g=>r.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),V(h,{onClick:e[16]||(e[16]=j(g=>r.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),V(h,{onClick:e[17]||(e[17]=j(g=>r.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),V(h,{onClick:e[18]||(e[18]=j(g=>r.addBlock("react"),["stop"])),title:"React",icon:"react"}),V(h,{onClick:e[19]||(e[19]=j(g=>r.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),V(f,{title:"Markup and Data",icon:"file-code"},{default:Ie(()=>[V(h,{onClick:e[20]||(e[20]=j(g=>r.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),V(h,{onClick:e[21]||(e[21]=j(g=>r.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),V(h,{onClick:e[22]||(e[22]=j(g=>r.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),V(h,{onClick:e[23]||(e[23]=j(g=>r.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),V(h,{onClick:e[24]||(e[24]=j(g=>r.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),V(f,{title:"Scripting and Shell",icon:"terminal"},{default:Ie(()=>[V(h,{onClick:e[25]||(e[25]=j(g=>r.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),V(h,{onClick:e[26]||(e[26]=j(g=>r.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),V(h,{onClick:e[27]||(e[27]=j(g=>r.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),V(f,{title:"Diagramming",icon:"sitemap"},{default:Ie(()=>[V(h,{onClick:e[28]||(e[28]=j(g=>r.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),V(h,{onClick:e[29]||(e[29]=j(g=>r.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),V(h,{onClick:e[30]||(e[30]=j(g=>r.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),V(f,{title:"Database",icon:"database"},{default:Ie(()=>[V(h,{onClick:e[31]||(e[31]=j(g=>r.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),V(h,{onClick:e[32]||(e[32]=j(g=>r.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),V(h,{onClick:e[33]||(e[33]=j(g=>r.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1})])):(T(),x("div",fTt,[V(h,{onClick:e[34]||(e[34]=j(g=>r.editMsgMode=!0,["stop"])),title:"Edit message",icon:"edit"})])),V(h,{onClick:r.copyContentToClipboard,title:"Copy message to clipboard",icon:"copy"},null,8,["onClick"]),!r.editMsgMode&&n.message.sender!==t.$store.state.mountedPers.name?(T(),x("div",mTt,[V(h,{onClick:e[35]||(e[35]=j(g=>r.resendMessage("full_context"),["stop"])),title:"Resend message with full context",icon:"send"}),V(h,{onClick:e[36]||(e[36]=j(g=>r.resendMessage("full_context_with_internet"),["stop"])),title:"Resend message with internet search",icon:"globe"}),V(h,{onClick:e[37]||(e[37]=j(g=>r.resendMessage("simple_question"),["stop"])),title:"Resend message without context",icon:"sendSimple"})])):G("",!0),!r.editMsgMode&&n.message.sender===t.$store.state.mountedPers.name?(T(),x("div",gTt,[V(h,{onClick:r.continueMessage,title:"Continue message",icon:"fastForward"},null,8,["onClick"])])):G("",!0),i.deleteMsgMode?(T(),x("div",bTt,[l("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(g=>i.deleteMsgMode=!1,["stop"]))},yTt),l("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(g=>r.deleteMsg(),["stop"]))},STt)])):G("",!0),!r.editMsgMode&&!i.deleteMsgMode?(T(),x("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]=g=>i.deleteMsgMode=!0)},xTt)):G("",!0),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[41]||(e[41]=j(g=>r.rankUp(),["stop"]))},wTt),l("div",RTt,[l("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(g=>r.rankDown(),["stop"]))},NTt),n.message.rank!=0?(T(),x("div",{key:0,class:Ge(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},K(n.message.rank),3)):G("",!0)]),l("div",OTt,[this.$store.state.config.active_tts_service!="None"?(T(),x("div",{key:0,class:Ge(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[43]||(e[43]=j(g=>r.speak(),["stop"]))},ITt,2)):G("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(T(),x("div",kTt,[i.isSynthesizingVoice?(T(),x("img",{key:1,src:i.loading_svg},null,8,PTt)):(T(),x("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(g=>r.read(),["stop"]))},LTt))])):G("",!0)])]),l("div",FTt,[l("div",UTt,[n.message.binding?(T(),x("p",BTt,[et("Binding: "),l("span",GTt,K(n.message.binding),1)])):G("",!0),n.message.model?(T(),x("p",VTt,[et("Model: "),l("span",zTt,K(n.message.model),1)])):G("",!0),n.message.seed?(T(),x("p",HTt,[et("Seed: "),l("span",qTt,K(n.message.seed),1)])):G("",!0),n.message.nb_tokens?(T(),x("p",$Tt,[et("Number of tokens: "),l("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},K(n.message.nb_tokens),9,YTt)])):G("",!0),r.warmup_duration?(T(),x("p",WTt,[et("Warmup duration: "),l("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},K(r.warmup_duration),9,KTt)])):G("",!0),r.time_spent?(T(),x("p",jTt,[et("Generation duration: "),l("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},K(r.time_spent),9,QTt)])):G("",!0),r.generation_rate?(T(),x("p",XTt,[et("Rate: "),l("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},K(r.generation_rate),9,ZTt)])):G("",!0)])])])])])}const uN=ot(M0t,[["render",JTt]]),ext="/";ae.defaults.baseURL="/";const txt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:Zl,UniversalForm:nc},data(){return{bUrl:ext,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(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await ae.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),s={client_id:this.$store.state.client_id,id:n};e=await ae.post("/select_personality",s),console.log("Generating message from ",e.data.status),qe.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await ae.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{ae.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 - "+t.name,"Save changes","Cancel").then(n=>{try{ae.post("/set_active_personality_settings",n).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses.
+`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.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(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?N0t+this.avatar:(console.log("No avatar found"),Bs)},defaultImg(t){t.target.src=Bs},parseDate(t){let e=new Date(Date.parse(t)),s=Math.floor((new Date-e)/1e3);return s<=1?"just now":s<20?s+" seconds ago":s<40?"half a minute ago":s<60?"less than a minute ago":s<=90?"one minute ago":s<=3540?Math.round(s/60)+" minutes ago":s<=5400?"1 hour ago":s<=86400?Math.round(s/3600)+" hours ago":s<=129600?"1 day ago":s<604800?Math.round(s/86400)+" days ago":s<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,s=Math.floor(n/86400);if(!(isNaN(s)||s<0||s>=31))return s==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||s==1&&"Yesterday"||s<7&&s+" days ago"||s<31&&Math.ceil(s/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){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(t){console.log("ui changed to",t),this.ui_componentKey++},showConfirmation(){Le(()=>{ze.replace()})},deleteMsgMode(){Le(()=>{ze.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,Le(()=>{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 t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[s,i,r]=this.computeTimeDiff(t,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},warmup_duration(){const t=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, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let s,i,r;[s,i,r]=this.computeTimeDiff(t,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let i=e.getTime()-t.getTime();const r=Math.floor(i/1e3),o=n/r;return Math.round(o)+" t/s"}}},M0t={class:"relative w-full group rounded-lg m-2 shadow-lg message 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"},I0t={class:"flex flex-row gap-2"},k0t={class:"flex-shrink-0"},D0t={class:"group/avatar"},L0t=["src","data-popover-target"],P0t={class:"flex flex-col w-full flex-grow-0"},F0t={class:"flex flex-row flex-grow items-start"},U0t={class:"flex flex-col mb-2"},B0t={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},G0t=["title"],V0t=l("div",{class:"flex-grow"},null,-1),z0t={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"},H0t={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"},q0t={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"},$0t={class:"relative grid aspect-square place-content-center overflow-hidden rounded-full bg-gradient-to-br from-blue-400 to-purple-500"},Y0t={key:0,class:"w-8 h-8 text-white animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},W0t=l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),K0t=l("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"},null,-1),j0t=[W0t,K0t],Q0t={key:1,class:"w-8 h-8 text-red-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},X0t=l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),Z0t=[X0t],J0t={key:2,class:"w-8 h-8 text-green-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},eTt=l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1),tTt=[eTt],nTt={class:"leading-5"},sTt=l("dd",{class:"text-lg font-semibold text-gray-800 dark:text-gray-200"},"Processing Info",-1),iTt={class:"flex items-center gap-1 truncate whitespace-nowrap text-sm text-gray-500 dark:text-gray-400"},rTt={class:"content px-5 pb-5 pt-4"},oTt={class:"list-none"},aTt=l("div",{class:"flex flex-col items-start w-full"},null,-1),lTt={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"},cTt={key:1},dTt=["src"],uTt={class:"flex-row justify-end mx-2"},pTt={class:"invisible group-hover:visible flex flex-row"},_Tt={key:0},hTt={key:1},fTt={key:2},mTt={key:3},gTt={key:4,class:"flex items-center duration-75"},bTt=l("i",{"data-feather":"x"},null,-1),ETt=[bTt],yTt=l("i",{"data-feather":"check"},null,-1),vTt=[yTt],STt=l("i",{"data-feather":"trash"},null,-1),TTt=[STt],xTt=l("i",{"data-feather":"thumbs-up"},null,-1),CTt=[xTt],wTt={class:"flex flex-row items-center"},RTt=l("i",{"data-feather":"thumbs-down"},null,-1),ATt=[RTt],NTt={class:"flex flex-row items-center"},OTt=l("i",{"data-feather":"volume-2"},null,-1),MTt=[OTt],ITt={key:6,class:"flex flex-row items-center"},kTt=l("i",{"data-feather":"voicemail"},null,-1),DTt=[kTt],LTt=["src"],PTt={class:"text-sm text-gray-400 mt-2"},FTt={class:"flex flex-row items-center gap-2"},UTt={key:0},BTt={class:"font-thin"},GTt={key:1},VTt={class:"font-thin"},zTt={key:2},HTt={class:"font-thin"},qTt={key:3},$Tt=["title"],YTt={key:4},WTt=["title"],KTt={key:5},jTt=["title"],QTt={key:6},XTt=["title"];function ZTt(t,e,n,s,i,r){var _;const o=tt("Step"),a=tt("RenderHTMLJS"),c=tt("MarkdownRenderer"),d=tt("JsonViewer"),u=tt("DynamicUIRenderer"),h=tt("ToolbarButton"),f=tt("DropdownSubmenu"),m=tt("DropdownMenu");return T(),x("div",M0t,[l("div",I0t,[l("div",k0t,[l("div",D0t,[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=g=>r.defaultImg(g)),"data-popover-target":"avatar"+n.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,L0t)])]),l("div",P0t,[l("div",F0t,[l("div",U0t,[l("div",B0t,K(n.message.sender)+" ",1),n.message.created_at?(T(),x("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},K(r.created_at),9,G0t)):G("",!0)]),V0t]),l("div",z0t,[P(l("details",H0t,[l("summary",q0t,[l("div",$0t,[n.message.status_message!=="Done"&&n.message.status_message!=="Generation canceled"?(T(),x("svg",Y0t,j0t)):G("",!0),n.message.status_message==="Generation canceled"?(T(),x("svg",Q0t,Z0t)):G("",!0),n.message.status_message==="Done"?(T(),x("svg",J0t,tTt)):G("",!0)]),l("dl",nTt,[sTt,l("dt",iTt,[l("span",{class:Ge(["inline-block w-2 h-2 rounded-full",{"bg-blue-500 animate-pulse":n.message.status_message!=="Done"&&n.message.status_message!=="Generation canceled","bg-red-500":n.message.status_message==="Generation canceled","bg-green-500":n.message.status_message==="Done"}])},null,2),Je(" "+K(n.message===void 0?"":n.message.status_message),1)])])]),l("div",rTt,[l("ol",oTt,[(T(!0),x(Fe,null,Ke(n.message.steps,(g,b)=>(T(),x("div",{key:"step-"+n.message.id+"-"+b,class:"group border-l pb-6 last:!border-transparent last:pb-0 dark:border-gray-800",style:Ht({backgroundColor:g.done?"transparent":"inherit"})},[V(o,{done:g.done,text:g.text,status:g.status,step_type:g.step_type},null,8,["done","text","status","step_type"])],4))),128))])])],512),[[wt,n.message!=null&&n.message.steps!=null&&n.message.steps.length>0]]),aTt,l("div",lTt,[(T(!0),x(Fe,null,Ke(n.message.html_js_s,(g,b)=>(T(),x("div",{key:"htmljs-"+n.message.id+"-"+b,class:"htmljs font-bold",style:Ht({backgroundColor:t.step.done?"transparent":"inherit"})},[V(a,{htmlContent:g},null,8,["htmlContent"])],4))),128))]),r.editMsgMode?G("",!0):(T(),dt(c,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),l("div",null,[n.message.open?P((T(),x("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=zs(j((...g)=>r.insertTab&&r.insertTab(...g),["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]=g=>n.message.content=g)},`\r
+ `,544)),[[pe,n.message.content]]):G("",!0)]),n.message.metadata!==null?(T(),x("div",cTt,[(T(!0),x(Fe,null,Ke(((_=n.message.metadata)==null?void 0:_.filter(g=>g!=null&&g.hasOwnProperty("title")&&g.hasOwnProperty("content")))||[],(g,b)=>(T(),x("div",{key:"json-"+n.message.id+"-"+b,class:"json font-bold"},[(T(),dt(d,{jsonFormText:g.title,jsonData:g.content,key:"msgjson-"+n.message.id},null,8,["jsonFormText","jsonData"]))]))),128))])):G("",!0),n.message.ui?(T(),dt(u,{ref:"ui",class:"w-full",ui:n.message.ui,key:"msgui-"+n.message.id},null,8,["ui"])):G("",!0),i.audio_url!=null?(T(),x("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,dTt),Je(" Your browser does not support the audio element. ")])):G("",!0)]),l("div",uTt,[l("div",pTt,[r.editMsgMode?(T(),x("div",_Tt,[V(h,{onClick:e[3]||(e[3]=j(g=>r.editMsgMode=!1,["stop"])),title:"Cancel edit",icon:"x"}),V(h,{onClick:j(r.updateMessage,["stop"]),title:"Update message",icon:"check"},null,8,["onClick"]),V(m,{title:"Add Block"},{default:Ie(()=>[V(f,{title:"Programming Languages",icon:"code"},{default:Ie(()=>[V(h,{onClick:e[4]||(e[4]=j(g=>r.addBlock("python"),["stop"])),title:"Python",icon:"python"}),V(h,{onClick:e[5]||(e[5]=j(g=>r.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),V(h,{onClick:e[6]||(e[6]=j(g=>r.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),V(h,{onClick:e[7]||(e[7]=j(g=>r.addBlock("java"),["stop"])),title:"Java",icon:"java"}),V(h,{onClick:e[8]||(e[8]=j(g=>r.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),V(h,{onClick:e[9]||(e[9]=j(g=>r.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),V(h,{onClick:e[10]||(e[10]=j(g=>r.addBlock("go"),["stop"])),title:"Go",icon:"go"}),V(h,{onClick:e[11]||(e[11]=j(g=>r.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),V(h,{onClick:e[12]||(e[12]=j(g=>r.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),V(h,{onClick:e[13]||(e[13]=j(g=>r.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),V(h,{onClick:e[14]||(e[14]=j(g=>r.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),V(f,{title:"Web Technologies",icon:"web"},{default:Ie(()=>[V(h,{onClick:e[15]||(e[15]=j(g=>r.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),V(h,{onClick:e[16]||(e[16]=j(g=>r.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),V(h,{onClick:e[17]||(e[17]=j(g=>r.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),V(h,{onClick:e[18]||(e[18]=j(g=>r.addBlock("react"),["stop"])),title:"React",icon:"react"}),V(h,{onClick:e[19]||(e[19]=j(g=>r.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),V(f,{title:"Markup and Data",icon:"file-code"},{default:Ie(()=>[V(h,{onClick:e[20]||(e[20]=j(g=>r.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),V(h,{onClick:e[21]||(e[21]=j(g=>r.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),V(h,{onClick:e[22]||(e[22]=j(g=>r.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),V(h,{onClick:e[23]||(e[23]=j(g=>r.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),V(h,{onClick:e[24]||(e[24]=j(g=>r.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),V(f,{title:"Scripting and Shell",icon:"terminal"},{default:Ie(()=>[V(h,{onClick:e[25]||(e[25]=j(g=>r.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),V(h,{onClick:e[26]||(e[26]=j(g=>r.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),V(h,{onClick:e[27]||(e[27]=j(g=>r.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),V(f,{title:"Diagramming",icon:"sitemap"},{default:Ie(()=>[V(h,{onClick:e[28]||(e[28]=j(g=>r.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),V(h,{onClick:e[29]||(e[29]=j(g=>r.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),V(h,{onClick:e[30]||(e[30]=j(g=>r.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),V(f,{title:"Database",icon:"database"},{default:Ie(()=>[V(h,{onClick:e[31]||(e[31]=j(g=>r.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),V(h,{onClick:e[32]||(e[32]=j(g=>r.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),V(h,{onClick:e[33]||(e[33]=j(g=>r.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1})])):(T(),x("div",hTt,[V(h,{onClick:e[34]||(e[34]=j(g=>r.editMsgMode=!0,["stop"])),title:"Edit message",icon:"edit"})])),V(h,{onClick:r.copyContentToClipboard,title:"Copy message to clipboard",icon:"copy"},null,8,["onClick"]),!r.editMsgMode&&n.message.sender!==t.$store.state.mountedPers.name?(T(),x("div",fTt,[V(h,{onClick:e[35]||(e[35]=j(g=>r.resendMessage("full_context"),["stop"])),title:"Resend message with full context",icon:"send"}),V(h,{onClick:e[36]||(e[36]=j(g=>r.resendMessage("full_context_with_internet"),["stop"])),title:"Resend message with internet search",icon:"globe"}),V(h,{onClick:e[37]||(e[37]=j(g=>r.resendMessage("simple_question"),["stop"])),title:"Resend message without context",icon:"sendSimple"})])):G("",!0),!r.editMsgMode&&n.message.sender===t.$store.state.mountedPers.name?(T(),x("div",mTt,[V(h,{onClick:r.continueMessage,title:"Continue message",icon:"fastForward"},null,8,["onClick"])])):G("",!0),i.deleteMsgMode?(T(),x("div",gTt,[l("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(g=>i.deleteMsgMode=!1,["stop"]))},ETt),l("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(g=>r.deleteMsg(),["stop"]))},vTt)])):G("",!0),!r.editMsgMode&&!i.deleteMsgMode?(T(),x("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]=g=>i.deleteMsgMode=!0)},TTt)):G("",!0),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[41]||(e[41]=j(g=>r.rankUp(),["stop"]))},CTt),l("div",wTt,[l("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(g=>r.rankDown(),["stop"]))},ATt),n.message.rank!=0?(T(),x("div",{key:0,class:Ge(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},K(n.message.rank),3)):G("",!0)]),l("div",NTt,[this.$store.state.config.active_tts_service!="None"?(T(),x("div",{key:0,class:Ge(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[43]||(e[43]=j(g=>r.speak(),["stop"]))},MTt,2)):G("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(T(),x("div",ITt,[i.isSynthesizingVoice?(T(),x("img",{key:1,src:i.loading_svg},null,8,LTt)):(T(),x("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(g=>r.read(),["stop"]))},DTt))])):G("",!0)])]),l("div",PTt,[l("div",FTt,[n.message.binding?(T(),x("p",UTt,[Je("Binding: "),l("span",BTt,K(n.message.binding),1)])):G("",!0),n.message.model?(T(),x("p",GTt,[Je("Model: "),l("span",VTt,K(n.message.model),1)])):G("",!0),n.message.seed?(T(),x("p",zTt,[Je("Seed: "),l("span",HTt,K(n.message.seed),1)])):G("",!0),n.message.nb_tokens?(T(),x("p",qTt,[Je("Number of tokens: "),l("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},K(n.message.nb_tokens),9,$Tt)])):G("",!0),r.warmup_duration?(T(),x("p",YTt,[Je("Warmup duration: "),l("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},K(r.warmup_duration),9,WTt)])):G("",!0),r.time_spent?(T(),x("p",KTt,[Je("Generation duration: "),l("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},K(r.time_spent),9,jTt)])):G("",!0),r.generation_rate?(T(),x("p",QTt,[Je("Rate: "),l("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},K(r.generation_rate),9,XTt)])):G("",!0)])])])])])}const uN=ot(O0t,[["render",ZTt]]),JTt="/";ae.defaults.baseURL="/";const ext={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:Zl,UniversalForm:nc},data(){return{bUrl:JTt,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(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await ae.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),s={client_id:this.$store.state.client_id,id:n};e=await ae.post("/select_personality",s),console.log("Generating message from ",e.data.status),qe.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await ae.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{ae.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 - "+t.name,"Save changes","Cancel").then(n=>{try{ae.post("/set_active_personality_settings",n).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses.
`+s,4,!1)})}catch(s){this.$refs.toast.showToast(`Did not get Personality settings responses.
- Endpoint error: `+s.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)}},toggleShowPersList(){this.onShowPersList()},async constructor(){for(Le(()=>{ze.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await ae.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Zu}}},nxt={class:"w-fit flex select-none"},sxt={class:"w-fit flex select-none"},ixt={class:"w-8 h-8 group relative"},rxt=["src","title"],oxt={class:"opacity-0 group-hover:opacity-100"},axt=l("span",{title:"Remount"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-0 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("g",{id:"surface1"},[l("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1),lxt=[axt],cxt=l("span",{title:"Talk"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),l("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1),dxt=[cxt];function uxt(t,e,n,s,i,r){const o=tt("UniversalForm");return T(),x(Fe,null,[l("div",nxt,[l("div",sxt,[l("div",ixt,[l("img",{src:i.bUrl+r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 hover:scale-150 active:scale-90 hover:z-50 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+r.mountedPers.name,onClick:e[1]||(e[1]=a=>r.onSettingsPersonality(r.mountedPers))},null,40,rxt),l("div",oxt,[t.personalityHoveredIndex===t.index?(T(),x("button",{key:0,class:"z-50 -top-1 group-hover:translate-x-5 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[2]||(e[2]=j(a=>r.remount_personality(),["prevent"]))},lxt)):G("",!0),t.personalityHoveredIndex===t.index?(T(),x("button",{key:1,class:"-top-1 group-hover:-translate-x-12 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[3]||(e[3]=j(a=>r.handleOnTalk(),["prevent"]))},dxt)):G("",!0),l("div",{class:"top-0 group-hover:-translate-x-8 group-hover:-translate-y-8 left-0 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-500 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[4]||(e[4]=j((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+K(r.mountedPersArr.length-1),1)])])])]),V(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const pxt=ot(txt,[["render",uxt]]);const _xt="/";ae.defaults.baseURL="/";const hxt={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:RE,Toast:Zl,UniversalForm:nc},name:"MountedPersonalitiesList",data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},bUrl:_xt,isMounted:!1,isLoading:!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(t){this.$store.commit("setConfig",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async onCopyToCustom(t){await ae.post("/copy_to_custom_personas",{client_id:this.$store.state.client_id,category:t.personality.category,name:t.personality.name})},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(t){try{const e=await ae.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Zu},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,ae.post("/reinstall_personality",{name:t.personality.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality
+ Endpoint error: `+s.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)}},toggleShowPersList(){this.onShowPersList()},async constructor(){for(Le(()=>{ze.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await ae.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Zu}}},txt={class:"w-fit flex select-none"},nxt={class:"w-fit flex select-none"},sxt={class:"w-8 h-8 group relative"},ixt=["src","title"],rxt={class:"opacity-0 group-hover:opacity-100"},oxt=l("span",{title:"Remount"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-0 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("g",{id:"surface1"},[l("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1),axt=[oxt],lxt=l("span",{title:"Talk"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),l("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1),cxt=[lxt];function dxt(t,e,n,s,i,r){const o=tt("UniversalForm");return T(),x(Fe,null,[l("div",txt,[l("div",nxt,[l("div",sxt,[l("img",{src:i.bUrl+r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 hover:scale-150 active:scale-90 hover:z-50 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+r.mountedPers.name,onClick:e[1]||(e[1]=a=>r.onSettingsPersonality(r.mountedPers))},null,40,ixt),l("div",rxt,[t.personalityHoveredIndex===t.index?(T(),x("button",{key:0,class:"z-50 -top-1 group-hover:translate-x-5 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[2]||(e[2]=j(a=>r.remount_personality(),["prevent"]))},axt)):G("",!0),t.personalityHoveredIndex===t.index?(T(),x("button",{key:1,class:"-top-1 group-hover:-translate-x-12 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[3]||(e[3]=j(a=>r.handleOnTalk(),["prevent"]))},cxt)):G("",!0),l("div",{class:"top-0 group-hover:-translate-x-8 group-hover:-translate-y-8 left-0 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-500 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[4]||(e[4]=j((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+K(r.mountedPersArr.length-1),1)])])])]),V(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const uxt=ot(ext,[["render",dxt]]);const pxt="/";ae.defaults.baseURL="/";const _xt={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:RE,Toast:Zl,UniversalForm:nc},name:"MountedPersonalitiesList",data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},bUrl:pxt,isMounted:!1,isLoading:!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(t){this.$store.commit("setConfig",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async onCopyToCustom(t){await ae.post("/copy_to_custom_personas",{client_id:this.$store.state.client_id,category:t.personality.category,name:t.personality.name})},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(t){try{const e=await ae.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Zu},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,ae.post("/reinstall_personality",{name:t.personality.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality
`+e.message,4,!1),{status:!1}))},editPersonality(t){t=t.personality,ae.post("/get_personality_config",{client_id:this.$store.state.client_id,category:t.category,name:t.folder}).then(e=>{const n=e.data;console.log("Done"),n.status?(this.$store.state.currentPersonConfig=n.config,this.$store.state.showPersonalityEditor=!0,this.$store.state.personality_editor.showPanel(),this.$store.state.selectedPersonality=t):console.error(n.error)}).catch(e=>{console.error(e)})},onPersonalityMounted(t){this.mountPersonality(t)},onPersonalityUnMounted(t){this.unmountPersonality(t)},onPersonalityRemount(t){this.reMountPersonality(t)},async handleOpenFolder(t){const e={client_id:this.$store.state.client_id,personality_folder:t.personality.category+"/"+t.personality.folder};console.log(e),await ae.post("/open_personality_folder",e)},async handleOnTalk(t){if(ze.replace(),console.log("ppa",t),t){if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality:
`+t.name,4,!0))}else this.onPersonalityMounted(t);this.onTalk(t)}},async onPersonalitySelected(t){if(ze.replace(),console.log("Selected personality : ",JSON.stringify(t.personality)),t){if(t.selected){this.$refs.toast.showToast("Personality already selected",4,!0);return}if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality:
`+t.name,4,!0))}else this.onPersonalityMounted(t)}},onSettingsPersonality(t){try{ae.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 - "+t.personality.name,"Save changes","Cancel").then(n=>{try{ae.post("/set_active_personality_settings",n).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses.
@@ -247,14 +247,14 @@ If You are using windows, this will install wsl so you need to activate it.
Error: `+e.error,4,!1))},async reMountPersonality(t){if(console.log("remount pers",t),!t)return;if(!this.configFile.personalities.includes(t.personality.full_path)){this.$refs.toast.showToast("Personality not mounted",4,!1);return}const e=await this.remount_personality(t.personality);console.log("remount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality remounted",4,!0),t.isMounted=!0,this.onMounted(this),(await this.select_personality(t.personality)).status&&this.$refs.toast.showToast(`Selected personality:
`+t.personality.name,4,!0),this.getMountedPersonalities()):(t.isMounted=!1,this.$refs.toast.showToast(`Could not mount personality
Error: `+e.error,4,!1))},async unmountPersonality(t){if(!t)return;console.log(`Unmounting ${JSON.stringify(t.personality)}`);const e=await this.unmount_personality(t.personality);if(e.status){console.log("unmount response",e),this.configFile.active_personality_id=e.active_personality_id,this.configFile.personalities=e.personalities;const n=this.configFile.personalities[this.configFile.active_personality_id],s=this.personalities.findIndex(a=>a.full_path==n),i=this.$refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path),r=this.personalities[s];r.isMounted=!1,r.selected=!0,this.$refs.personalitiesZoo[i].isMounted=!1,this.getMountedPersonalities(),(await this.select_personality(r)).status&&ze.replace(),this.$refs.toast.showToast("Personality unmounted",4,!0),this.onUnMounted(this)}else this.$refs.toast.showToast(`Could not unmount personality
-Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;er.full_path==n),i=this.personalities[s];if(i)console.log("adding from config"),t.push(i);else{console.log("adding default");const r=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),o=this.personalities[r];t.push(o)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;ei.full_path==n);if(console.log("discussionPersonalities -includes",s),console.log("discussionPersonalities -mounted list",this.mountedPersArr),s==-1){const i=this.personalities.findIndex(o=>o.full_path==n),r=this.personalities[i];console.log("adding discucc121",r,n),r&&(this.mountedPersArr.push(r),console.log("adding discucc",r))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},ME=t=>(vs("data-v-f44002af"),t=t(),Ss(),t),fxt={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-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"},mxt={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},gxt=ME(()=>l("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"},[l("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"}),l("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)),bxt=ME(()=>l("span",{class:"sr-only"},"Loading...",-1)),Ext=[gxt,bxt],yxt=ME(()=>l("i",{"data-feather":"chevron-down"},null,-1)),vxt=[yxt],Sxt={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},Txt={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function xxt(t,e,n,s,i,r){const o=tt("personality-entry"),a=tt("Toast"),c=tt("UniversalForm");return T(),x("div",fxt,[i.isLoading?(T(),x("div",mxt,Ext)):G("",!0),l("div",null,[r.mountedPersArr.length>0?(T(),x("div",{key:0,class:Ge(i.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[l("button",{class:"mt-0 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:"Close personality list",type:"button",onClick:e[0]||(e[0]=j((...d)=>r.toggleShowPersList&&r.toggleShowPersList(...d),["stop"]))},vxt),l("label",Sxt," Mounted Personalities: ("+K(r.mountedPersArr.length)+") ",1),l("div",Txt,[V(ii,{name:"bounce"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(this.$store.state.mountedPersArr,(d,u)=>(T(),dt(o,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+u+"-"+d.name,personality:d,full_path:d.full_path,select_language:!1,selected:r.configFile.personalities[r.configFile.active_personality_id]===d.full_path||r.configFile.personalities[r.configFile.active_personality_id]===d.full_path+":"+d.language,"on-selected":r.onPersonalitySelected,"on-mount":r.onPersonalityMounted,"on-edit":r.editPersonality,"on-un-mount":r.onPersonalityUnMounted,"on-remount":r.onPersonalityRemount,"on-settings":r.onSettingsPersonality,"on-reinstall":r.onPersonalityReinstall,"on-talk":r.handleOnTalk,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-edit","on-un-mount","on-remount","on-settings","on-reinstall","on-talk","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})])],2)):G("",!0)]),V(a,{ref:"toast"},null,512),V(c,{ref:"universalForm",class:"z-20"},null,512)])}const Cxt=ot(hxt,[["render",xxt],["__scopeId","data-v-f44002af"]]);const wxt={components:{InteractiveMenu:wE},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),Le(()=>{ze.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(s=>s.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=s=>{this.selectedFile=s.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};qe.on("file_received",s=>{s.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file
-`+s.error,4,!1),this.loading=!1,qe.off("file_received")}),qe.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){Le(()=>{ze.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},Rxt=t=>(vs("data-v-1a32c141"),t=t(),Ss(),t),Axt={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},Nxt=Rxt(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),Oxt=[Nxt];function Mxt(t,e,n,s,i,r){const o=tt("InteractiveMenu");return i.loading?(T(),x("div",Axt,Oxt)):(T(),dt(o,{key:1,commands:n.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const Ixt=ot(wxt,[["render",Mxt],["__scopeId","data-v-1a32c141"]]),kxt="/assets/loader_v0-16906488.svg";console.log("modelImgPlaceholder:",Is);const Dxt="/",Lxt={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{UniversalForm:nc,MountedPersonalities:pxt,MountedPersonalitiesList:Cxt,PersonalitiesCommands:Ixt,ChatBarButton:G2},setup(){},data(){return{is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:kxt,sendGlobe:dN,modelImgPlaceholder:Is,bUrl:Dxt,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{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 t=this.$store.state.config.rag_databases.map(e=>{console.log("entry",e);const n=e.split("::");console.log("extracted",n[0]);const i=e.endsWith("mounted")?"feather:check":"";return console.log("icon decision",i),{name:n[0],value:n[0]||"default_value",icon:i,help:"mounts the database"}});return console.log("formatted data sources",t),t},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},installedBindings(){return this.$store.state.installedBindings},installedModels(){return this.$store.state.installedModels},mountedPersonalities(){return this.$store.state.mountedPersArr},binding_name(){return this.$store.state.config.binding_name},model_name(){return this.$store.state.config.model_name},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let t=[];for(let e=0;e0&&this.addFiles(n)},toggleSwitch(){this.$store.state.config.activate_internet_search=!this.$store.state.config.activate_internet_search,this.isLoading=!0,ae.post("/apply_settings",{config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.config.activate_internet_search?this.$store.state.toast.showToast("Websearch activated.",4,!0):this.$store.state.toast.showToast("Websearch deactivated.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Le(()=>{ze.replace()})})},copyModelName(){navigator.clipboard.writeText(this.binding_name+"::"+this.model_name),this.$store.state.toast.showToast("Model name copyed to clipboard: "+this.binding_name+"::"+this.model_name,4,!0)},showModelConfig(){try{this.isLoading=!0,ae.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{ae.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:e}).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses.
+Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;er.full_path==n),i=this.personalities[s];if(i)console.log("adding from config"),t.push(i);else{console.log("adding default");const r=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),o=this.personalities[r];t.push(o)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;ei.full_path==n);if(console.log("discussionPersonalities -includes",s),console.log("discussionPersonalities -mounted list",this.mountedPersArr),s==-1){const i=this.personalities.findIndex(o=>o.full_path==n),r=this.personalities[i];console.log("adding discucc121",r,n),r&&(this.mountedPersArr.push(r),console.log("adding discucc",r))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},ME=t=>(vs("data-v-f44002af"),t=t(),Ss(),t),hxt={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-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"},fxt={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},mxt=ME(()=>l("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"},[l("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"}),l("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)),gxt=ME(()=>l("span",{class:"sr-only"},"Loading...",-1)),bxt=[mxt,gxt],Ext=ME(()=>l("i",{"data-feather":"chevron-down"},null,-1)),yxt=[Ext],vxt={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},Sxt={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function Txt(t,e,n,s,i,r){const o=tt("personality-entry"),a=tt("Toast"),c=tt("UniversalForm");return T(),x("div",hxt,[i.isLoading?(T(),x("div",fxt,bxt)):G("",!0),l("div",null,[r.mountedPersArr.length>0?(T(),x("div",{key:0,class:Ge(i.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[l("button",{class:"mt-0 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:"Close personality list",type:"button",onClick:e[0]||(e[0]=j((...d)=>r.toggleShowPersList&&r.toggleShowPersList(...d),["stop"]))},yxt),l("label",vxt," Mounted Personalities: ("+K(r.mountedPersArr.length)+") ",1),l("div",Sxt,[V(ii,{name:"bounce"},{default:Ie(()=>[(T(!0),x(Fe,null,Ke(this.$store.state.mountedPersArr,(d,u)=>(T(),dt(o,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+u+"-"+d.name,personality:d,full_path:d.full_path,select_language:!1,selected:r.configFile.personalities[r.configFile.active_personality_id]===d.full_path||r.configFile.personalities[r.configFile.active_personality_id]===d.full_path+":"+d.language,"on-selected":r.onPersonalitySelected,"on-mount":r.onPersonalityMounted,"on-edit":r.editPersonality,"on-un-mount":r.onPersonalityUnMounted,"on-remount":r.onPersonalityRemount,"on-settings":r.onSettingsPersonality,"on-reinstall":r.onPersonalityReinstall,"on-talk":r.handleOnTalk,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-edit","on-un-mount","on-remount","on-settings","on-reinstall","on-talk","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})])],2)):G("",!0)]),V(a,{ref:"toast"},null,512),V(c,{ref:"universalForm",class:"z-20"},null,512)])}const xxt=ot(_xt,[["render",Txt],["__scopeId","data-v-f44002af"]]);const Cxt={components:{InteractiveMenu:wE},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),Le(()=>{ze.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(s=>s.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=s=>{this.selectedFile=s.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};qe.on("file_received",s=>{s.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file
+`+s.error,4,!1),this.loading=!1,qe.off("file_received")}),qe.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){Le(()=>{ze.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},wxt=t=>(vs("data-v-1a32c141"),t=t(),Ss(),t),Rxt={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},Axt=wxt(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),Nxt=[Axt];function Oxt(t,e,n,s,i,r){const o=tt("InteractiveMenu");return i.loading?(T(),x("div",Rxt,Nxt)):(T(),dt(o,{key:1,commands:n.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const Mxt=ot(Cxt,[["render",Oxt],["__scopeId","data-v-1a32c141"]]),Ixt="/assets/loader_v0-16906488.svg";console.log("modelImgPlaceholder:",Is);const kxt="/",Dxt={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{UniversalForm:nc,MountedPersonalities:uxt,MountedPersonalitiesList:xxt,PersonalitiesCommands:Mxt,ChatBarButton:G2},setup(){},data(){return{is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:Ixt,sendGlobe:dN,modelImgPlaceholder:Is,bUrl:kxt,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{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 t=this.$store.state.config.rag_databases.map(e=>{console.log("entry",e);const n=e.split("::");console.log("extracted",n[0]);const i=e.endsWith("mounted")?"feather:check":"";return console.log("icon decision",i),{name:n[0],value:n[0]||"default_value",icon:i,help:"mounts the database"}});return console.log("formatted data sources",t),t},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},installedBindings(){return this.$store.state.installedBindings},installedModels(){return this.$store.state.installedModels},mountedPersonalities(){return this.$store.state.mountedPersArr},binding_name(){return this.$store.state.config.binding_name},model_name(){return this.$store.state.config.model_name},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let t=[];for(let e=0;e0&&this.addFiles(n)},toggleSwitch(){this.$store.state.config.activate_internet_search=!this.$store.state.config.activate_internet_search,this.isLoading=!0,ae.post("/apply_settings",{config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.config.activate_internet_search?this.$store.state.toast.showToast("Websearch activated.",4,!0):this.$store.state.toast.showToast("Websearch deactivated.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Le(()=>{ze.replace()})})},copyModelName(){navigator.clipboard.writeText(this.binding_name+"::"+this.model_name),this.$store.state.toast.showToast("Model name copyed to clipboard: "+this.binding_name+"::"+this.model_name,4,!0)},showModelConfig(){try{this.isLoading=!0,ae.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{ae.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:e}).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses.
`+n,4,!1),this.isLoading=!1)})}catch(n){this.$store.state.toast.showToast(`Did not get binding settings responses.
Endpoint error: `+n.message,4,!1),this.isLoading=!1}}):(this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(t){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},async remount_personality(t){if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await ae.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},async unmountPersonality(t){if(console.log("Unmounting personality:",t),!t)return;const e=await this.unmount_personality(t.personality||t);if(console.log(e),e.status){this.$store.state.config.personalities=e.personalities,this.$store.state.toast.showToast("Personality unmounted",4,!0),this.$store.dispatch("refreshMountedPersonalities");const n=this.$store.state.mountedPersArr[this.$store.state.mountedPersArr.length-1];console.log(n,this.$store.state.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this.$store.state.toast.showToast(`Selected personality:
`+n.name,4,!0)}else this.$store.state.toast.showToast(`Could not unmount personality
Error: `+e.error,4,!1)},async unmount_personality(t){if(!t)return{status:!1,error:"no personality - unmount_personality"};const e={client_id:this.$store.state.client_id,language:t.language,category:t.category,folder:t.folder};try{const n=await ae.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async showBindingHoveredIn(t){this.bindingHoveredIndex=t},async showBindingHoveredOut(){this.bindingHoveredIndex=null},async showModelHoveredIn(t){this.modelHoveredIndex=t},async showModelHoveredOut(){this.modelHoveredIndex=null},async showPersonalityHoveredIn(t){this.personalityHoveredIndex=t},async showPersonalityHoveredOut(){this.personalityHoveredIndex=null},async onPersonalitySelected(t){if(t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=t.language===null?t.full_path:t.full_path+":"+t.language;if(console.log("pers_path",e),console.log("this.$store.state.config.personalities",this.$store.state.config.personalities),this.$store.state.config.personalities.includes(e)){const n=await this.select_personality(t);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshMountedPersonalities"),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage"),await this.$store.dispatch("fetchisRTOn"),console.log("pers is mounted",n),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality:
`+t.name,4,!0):this.$store.state.toast.showToast(`Error on select personality:
-`+t.name,4,!1)}else console.log("mounting pers");this.$emit("personalitySelected"),Le(()=>{ze.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const e=t.language===null?t.full_path:t.full_path+":"+t.language;console.log("Selecting personality ",e);const n=this.$store.state.config.personalities.findIndex(i=>i===e),s={client_id:this.$store.state.client_id,id:n};try{const i=await ae.post("/select_personality",s);if(i)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),i.data}catch(i){console.log(i.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(t){t.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const n=new MouseEvent("click");e.dispatchEvent(n)},setBinding(t){console.log("Setting binding to "+t.name),this.selecting_binding=!0,this.selectedBinding=t,this.$store.state.messageBox.showBlockingMessage("Loading binding"),ae.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},setModel(t){console.log("Setting model to "+t.name),this.selecting_model=!0,this.selectedModel=t,this.$store.state.messageBox.showBlockingMessage("Loading model"),ae.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},download_files(){ae.get("/download_files")},remove_file(t){ae.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){ae.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.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(t,e){console.log("Send file triggered");const n=new FileReader,s=24*1024;let i=0,r=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,c=i+a.byteLength>=t.size;qe.emit("send_file_chunk",{filename:t.name,chunk:a,offset:i,isLastChunk:c,chunkIndex:r}),i+=a.byteLength,r++,c?(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=t.slice(i,i+s);n.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),qe.emit("start_bidirectional_audio_stream"),Le(()=>{ze.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),qe.emit("stop_bidirectional_audio_stream"),Le(()=>{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=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.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.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(t){this.showPersonalities=!this.showPersonalities},handleOnTalk(t){console.log("talking"),this.showPersonalities=!1,this.$store.state.toast.showToast(`Personality ${t.name} is Talking`,4,!0),this.onTalk(t)},onMountFun(t){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(t){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(t){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(t){return Le(()=>{ze.replace()}),si(t)},removeItem(t){console.log("Removing ",t.name),ae.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await ae.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){qe.emit("take_picture"),qe.on("picture_taken",()=>{ae.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.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(t){console.log("Adding files");const e=[...t];let n=0;const s=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[n];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{n++,s()})};s()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){Le(()=>{ze.replace()})},loading(t,e){Le(()=>{ze.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let s=0;s{ze.replace()}),console.log("Chatbar mounted"),qe.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.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(){Le(()=>{ze.replace()})}},Yt=t=>(vs("data-v-edbefc1f"),t=t(),Ss(),t),Pxt={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},Fxt={key:0,class:"items-center gap-2 panels-color shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},Uxt={class:"flex"},Bxt=["title"],Gxt=Yt(()=>l("i",{"data-feather":"list"},null,-1)),Vxt=[Gxt],zxt={key:0},Hxt={class:"flex flex-col max-h-64"},qxt=["title"],$xt={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"},Yxt={key:0,filesList:"",role:"status"},Wxt=Yt(()=>l("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"},[l("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"}),l("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)),Kxt=Yt(()=>l("span",{class:"sr-only"},"Loading...",-1)),jxt=[Wxt,Kxt],Qxt=Yt(()=>l("div",null,[l("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),Xxt=Yt(()=>l("div",{class:"grow"},null,-1)),Zxt={class:"flex flex-row items-center"},Jxt={class:"whitespace-nowrap"},e1t=["onClick"],t1t=Yt(()=>l("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),n1t=[t1t],s1t={key:1,class:"flex mx-1 w-500"},i1t={class:"whitespace-nowrap flex flex-row gap-2"},r1t=Yt(()=>l("p",{class:"font-bold"}," Total size: ",-1)),o1t=Yt(()=>l("div",{class:"grow"},null,-1)),a1t=Yt(()=>l("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),l1t=[a1t],c1t=Yt(()=>l("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)),d1t=[c1t],u1t={key:2,class:"mx-1"},p1t={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end panels-color"},_1t={role:"status"},h1t=["src"],f1t=Yt(()=>l("span",{class:"sr-only"},"Selecting model...",-1)),m1t={class:"flex w-fit relative grow w-full"},g1t={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"},b1t={key:0,title:"Waiting for reply"},E1t=["src"],y1t=Yt(()=>l("div",{role:"status"},[l("span",{class:"sr-only"},"Loading...")],-1)),v1t={key:1,class:"w-fit group relative"},S1t={class:"hide top-50 hide opacity-0 group-hover:bottom-0 opacity-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},T1t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},x1t=["onMouseover"],C1t={class:"relative"},w1t=["onClick"],R1t=["src","title"],A1t={class:"group items-center flex flex-row"},N1t=["src","title"],O1t={key:2,class:"w-fit group relative"},M1t={class:"hide top-50 hide opacity-0 group-hover:bottom-0 opacity-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},I1t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},k1t=["onMouseover"],D1t={class:"relative"},L1t=["onClick"],P1t=["src","title"],F1t={class:"group items-center flex flex-row"},U1t=["src","title"],B1t={key:3,class:"w-fit group relative"},G1t={class:"top-50 hide opacity-0 group-hover:bottom-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},V1t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},z1t=["onMouseover"],H1t={class:"relative"},q1t=["onClick"],$1t=["src","title"],Y1t=["onClick"],W1t=Yt(()=>l("span",{class:"-top-6 -right-6 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Unmount personality"},[l("svg",{"aria-hidden":"true",class:"top-1 left-1 relative w-5 h-5 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20","stroke-width":"1",xmlns:"http://www.w3.org/2000/svg"},[l("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)),K1t=[W1t],j1t=["onClick"],Q1t=Yt(()=>l("span",{class:"-top-9 left-2 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Remount"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("g",{id:"surface1"},[l("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1)),X1t=[Q1t],Z1t=["onClick"],J1t=Yt(()=>l("span",{class:"-top-6 -left-6 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Talk"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),l("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1)),eCt=[J1t],tCt={class:"w-fit"},nCt={class:"w-fit"},sCt={class:"relative grow"},iCt={class:"flex items-center space-x-3"},rCt=Yt(()=>l("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("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)),oCt=Yt(()=>l("span",null,"Stop",-1)),aCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})],-1)),lCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),cCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),dCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15.536a5 5 0 001.414 1.414m2.828-9.9a9 9 0 012.828-2.828"})],-1)),uCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),pCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),_Ct=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),hCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),fCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),mCt=Yt(()=>l("div",{class:"ml-auto gap-2"},null,-1));function gCt(t,e,n,s,i,r){const o=tt("MountedPersonalitiesList"),a=tt("MountedPersonalities"),c=tt("PersonalitiesCommands"),d=tt("ChatBarButton"),u=tt("UniversalForm");return T(),x(Fe,null,[l("div",Pxt,[i.filesList.length>0||i.showPersonalities?(T(),x("div",Fxt,[l("div",Uxt,[l("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(h=>i.showfilesList=!i.showfilesList,["stop"]))},Vxt,8,Bxt)]),i.filesList.length>0&&i.showfilesList==!0?(T(),x("div",zxt,[l("div",Hxt,[V(ii,{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:Ie(()=>[(T(!0),x(Fe,null,Ke(i.filesList,(h,f)=>(T(),x("div",{key:f+"-"+h.name},[l("div",{class:"m-1",title:h.name},[l("div",$xt,[i.isFileSentList[f]?G("",!0):(T(),x("div",Yxt,jxt)),Qxt,l("div",{class:Ge(["line-clamp-1 w-3/5",i.isFileSentList[f]?"text-green-500":"text-red-200"])},K(h.name),3),Xxt,l("div",Zxt,[l("p",Jxt,K(r.computedFileSize(h.size)),1),l("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:m=>r.removeItem(h)},n1t,8,e1t)])])],8,qxt)]))),128))]),_:1})])])):G("",!0),i.filesList.length>0?(T(),x("div",s1t,[l("div",i1t,[r1t,et(" "+K(i.totalSize)+" ("+K(i.filesList.length)+") ",1)]),o1t,l("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]=(...h)=>r.clear_files&&r.clear_files(...h))},l1t),l("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]=(...h)=>r.download_files&&r.download_files(...h))},d1t)])):G("",!0),i.showPersonalities?(T(),x("div",u1t,[V(o,{ref:"mountedPersList",onShowPersList:r.onShowPersListFun,"on-mounted":r.onMountFun,"on-un-mounted":r.onUnmountFun,"on-remounted":t.onRemountFun,"on-talk":r.handleOnTalk,discussionPersonalities:r.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):G("",!0)])):G("",!0),i.selecting_model||i.selecting_binding?(T(),x("div",p1t,[l("div",_1t,[l("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,h1t),f1t])])):G("",!0),l("div",m1t,[l("div",g1t,[n.loading?(T(),x("div",b1t,[l("img",{src:i.loader_v0},null,8,E1t),y1t])):G("",!0),n.loading?G("",!0):(T(),x("div",v1t,[l("div",S1t,[l("div",T1t,[(T(!0),x(Fe,null,Ke(r.installedBindings,(h,f)=>(T(),x("div",{class:"w-fit h-fit inset-0 opacity-100",key:f+"-"+h.name,ref_for:!0,ref:"installedBindings",onMouseover:m=>r.showBindingHoveredIn(f),onMouseleave:e[4]||(e[4]=m=>r.showBindingHoveredOut())},[f!=r.binding_name?(T(),x("div",{key:0,class:Ge(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.bindingHoveredIndex===f?"scale-150":""])},[l("div",C1t,[l("button",{onClick:j(m=>r.setBinding(h),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:h.icon?h.icon:i.modelImgPlaceholder,onError:e[3]||(e[3]=(...m)=>i.modelImgPlaceholder&&i.modelImgPlaceholder(...m)),class:Ge(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.bindingHoveredIndex===f?"scale-150 ":""+h.name==r.binding_name?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,R1t)],8,w1t)])],2)):G("",!0)],40,x1t))),128))])]),l("div",A1t,[l("button",{onClick:e[5]||(e[5]=j(h=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[l("img",{src:r.currentBindingIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-200",title:r.currentBinding?r.currentBinding.name:"unknown"},null,8,N1t)])])])),n.loading?G("",!0):(T(),x("div",O1t,[l("div",M1t,[l("div",I1t,[(T(!0),x(Fe,null,Ke(r.installedModels,(h,f)=>(T(),x("div",{class:"w-fit h-fit",key:f+"-"+h.name,ref_for:!0,ref:"installedModels",onMouseover:m=>r.showModelHoveredIn(f),onMouseleave:e[7]||(e[7]=m=>r.showModelHoveredOut())},[f!=r.model_name?(T(),x("div",{key:0,class:Ge(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.modelHoveredIndex===f?"scale-150":""])},[l("div",D1t,[l("button",{onClick:j(m=>r.setModel(h),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:h.icon?h.icon:i.modelImgPlaceholder,onError:e[6]||(e[6]=(...m)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...m)),class:Ge(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.modelHoveredIndex===f?"scale-150 ":""+h.name==r.model_name?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,P1t)],8,L1t)])],2)):G("",!0)],40,k1t))),128))])]),l("div",F1t,[l("button",{onClick:e[8]||(e[8]=j(h=>r.copyModelName(),["prevent"])),class:"w-8 h-8"},[l("img",{src:r.currentModelIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-400",title:r.currentModel?r.currentModel.name:"unknown"},null,8,U1t)])])])),n.loading?G("",!0):(T(),x("div",B1t,[l("div",G1t,[l("div",V1t,[(T(!0),x(Fe,null,Ke(r.mountedPersonalities,(h,f)=>(T(),x("div",{class:"w-fit h-fit inset-0 opacity-100",key:f+"-"+h.name,ref_for:!0,ref:"mountedPersonalities",onMouseover:m=>r.showPersonalityHoveredIn(f),onMouseleave:e[10]||(e[10]=m=>r.showPersonalityHoveredOut())},[f!=r.personality_name?(T(),x("div",{key:0,class:Ge(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.personalityHoveredIndex===f?"scale-150":""])},[l("div",H1t,[l("button",{onClick:j(m=>r.onPersonalitySelected(h),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:i.bUrl+h.avatar,onError:e[9]||(e[9]=(...m)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...m)),class:Ge(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.personalityHoveredIndex===f?"scale-150 ":""+this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(h.full_path)?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,$1t)],8,q1t),i.personalityHoveredIndex===f?(T(),x("button",{key:0,onClick:j(m=>r.unmountPersonality(h),["prevent"])},K1t,8,Y1t)):G("",!0),i.personalityHoveredIndex===f?(T(),x("button",{key:1,onClick:j(m=>r.remount_personality(h),["prevent"])},X1t,8,j1t)):G("",!0),i.personalityHoveredIndex===f?(T(),x("button",{key:2,onClick:j(m=>r.handleOnTalk(h),["prevent"])},eCt,8,Z1t)):G("",!0)])],2)):G("",!0)],40,z1t))),128))])]),V(a,{ref:"mountedPers",onShowPersList:r.onShowPersListFun,onReady:r.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])])),l("div",tCt,[i.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(T(),dt(c,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):G("",!0)]),l("div",nCt,[r.isDataSourceNamesValid?(T(),dt(c,{key:0,icon:"feather:book",commandsList:r.dataSourceNames,sendCommand:r.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):G("",!0)]),l("div",sCt,[l("form",null,[P(l("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[11]||(e[11]=h=>i.message=h),onPaste:e[12]||(e[12]=(...h)=>r.handlePaste&&r.handlePaste(...h)),onKeydown:e[13]||(e[13]=zs(j(h=>r.submitOnEnter(h),["exact"]),["enter"])),class:"w-full p-3 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),[[pe,i.message]])])]),l("div",iCt,[n.loading?(T(),dt(d,{key:0,onClick:r.stopGenerating,class:"bg-red-500 dark:bg-red-600 hover:bg-red-600 dark:hover:bg-red-700"},{icon:Ie(()=>[rCt]),default:Ie(()=>[oCt]),_:1},8,["onClick"])):(T(),dt(d,{key:1,onClick:r.submit,title:"Send"},{icon:Ie(()=>[aCt]),_:1},8,["onClick"])),V(d,{onClick:r.submitWithInternetSearch,title:"Send with internet search"},{icon:Ie(()=>[lCt]),_:1},8,["onClick"]),V(d,{onClick:r.startSpeechRecognition,class:Ge({"text-red-500":i.isListeningToVoice}),title:"Voice input"},{icon:Ie(()=>[cCt]),_:1},8,["onClick","class"]),t.$store.state.config.active_tts_service!="None"&&t.$store.state.config.active_tts_service!=null&&this.$store.state.config.active_stt_service!="None"&&this.$store.state.config.active_stt_service!=null?(T(),dt(d,{key:2,onClick:e[14]||(e[14]=h=>i.is_rt?r.stopRTCom:r.startRTCom),class:Ge(i.is_rt?"bg-red-500 dark:bg-red-600":"bg-green-500 dark:bg-green-600"),title:"Real-time audio mode"},{icon:Ie(()=>[dCt]),_:1},8,["class"])):G("",!0),V(d,{onClick:r.add_file,title:"Send file"},{icon:Ie(()=>[uCt]),_:1},8,["onClick"]),V(d,{onClick:r.takePicture,title:"Take picture"},{icon:Ie(()=>[pCt]),_:1},8,["onClick"]),V(d,{onClick:r.addWebLink,title:"Add web link"},{icon:Ie(()=>[_Ct]),_:1},8,["onClick"]),V(d,{onClick:r.makeAnEmptyUserMessage,title:"New user message",class:"text-gray-600 dark:text-gray-300"},{icon:Ie(()=>[hCt]),_:1},8,["onClick"]),V(d,{onClick:r.makeAnEmptyAIMessage,title:"New AI message",class:"text-red-400 dark:text-red-300"},{icon:Ie(()=>[fCt]),_:1},8,["onClick"])]),l("input",{type:"file",ref:"fileDialog",onChange:e[15]||(e[15]=(...h)=>r.addFiles&&r.addFiles(...h)),multiple:"",style:{display:"none"}},null,544)]),mCt])]),V(u,{ref:"universalForm",class:"z-20"},null,512)],64)}const pN=ot(Lxt,[["render",gCt],["__scopeId","data-v-edbefc1f"]]);const bCt={name:"WelcomeComponent",setup(){const t=$k();return{logoSrc:Je(()=>t.state.config&&t.state.config.app_custom_logo?`/user_infos/${t.state.config.app_custom_logo}`:Bs)}}},ECt=t=>(vs("data-v-b052c8c7"),t=t(),Ss(),t),yCt={class:"flex flex-col items-center justify-center w-full h-full min-h-screen bg-gradient-to-br from-indigo-100 to-purple-100 dark:from-indigo-900 dark:to-purple-900 p-8"},vCt={class:"text-center max-w-4xl"},SCt={class:"flex items-center justify-center gap-8 mb-12"},TCt={class:"relative w-24 h-24"},xCt=["src"],CCt=ECt(()=>l("div",{class:"flex flex-col items-start"},[l("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"}," LoLLMS "),l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic mt-2"}," Lord of Large Language And Multimodal Systems ")],-1)),wCt=Na(' Welcome to LoLLMS WebUI Embark on a journey through the realm of advanced AI with LoLLMS, 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 LoLLMS:
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);function RCt(t,e,n,s,i,r){return T(),x("div",yCt,[l("div",vCt,[l("div",SCt,[l("div",TCt,[l("img",{src:s.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,xCt)]),CCt]),wCt])])}const _N=ot(bCt,[["render",RCt],["__scopeId","data-v-b052c8c7"]]);var ACt=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),Wd=globalThis&&globalThis.__assign||function(){return Wd=Object.assign||function(t){for(var e,n=1,s=arguments.length;n(vs("data-v-e5bd988d"),t=t(),Ss(),t),LCt={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center bg-gradient-to-br from-blue-100 to-purple-100 dark:from-blue-900 dark:to-purple-900 overflow-hidden"},PCt={class:"absolute inset-0 pointer-events-none overflow-hidden"},FCt=Mt(()=>l("img",{src:aN,alt:"Falling Strawberry",class:"w-6 h-6"},null,-1)),UCt=[FCt],BCt={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},GCt={class:"mb-8 w-full"},VCt=Mt(()=>l("div",{class:"text-6xl md:text-7xl font-bold text-red-600 mb-2",style:{"text-shadow":"2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white"}}," L🍓LLMS ",-1)),zCt=Mt(()=>l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic"}," One tool to rule them all ",-1)),HCt=Mt(()=>l("p",{class:"text-xl text-gray-500 dark:text-gray-400 mb-6"}," by ParisNeo ",-1)),qCt={class:"bottom-0 text-2xl text-gray-600 dark:text-gray-300 italic"},$Ct={class:"w-full h-24 relative overflow-hidden bg-gradient-to-r from-blue-200 to-purple-200 dark:from-blue-800 dark:to-purple-800 rounded-full shadow-lg"},YCt={class:"w-full max-w-2xl"},WCt={role:"status",class:"w-full"},KCt={class:"text-xl text-gray-700 dark:text-gray-300"},jCt={class:"text-2xl font-bold text-blue-600 dark:text-blue-400 mt-2"},QCt=Mt(()=>l("i",{"data-feather":"chevron-right"},null,-1)),XCt=[QCt],ZCt=Mt(()=>l("i",{"data-feather":"chevron-left"},null,-1)),JCt=[ZCt],ewt=Na(' ',1),twt=[ewt],nwt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] unicolor-panels-color dark:bg-bg-dark-tone"},swt={class:"text-light-text-panel dark:text-dark-text-panel panels-color sticky z-10 top-0"},iwt={class:"flex-row p-4 flex items-center gap-3 flex-0"},rwt=Mt(()=>l("i",{"data-feather":"plus"},null,-1)),owt=[rwt],awt=Mt(()=>l("i",{"data-feather":"check-square"},null,-1)),lwt=[awt],cwt={class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},dwt=Mt(()=>l("i",{"data-feather":"database"},null,-1)),uwt=[dwt],pwt=Mt(()=>l("i",{"data-feather":"log-in"},null,-1)),_wt=[pwt],hwt=Mt(()=>l("i",{"data-feather":"folder"},null,-1)),fwt=[hwt],mwt={key:1,class:"dropdown"},gwt=Mt(()=>l("i",{"data-feather":"search"},null,-1)),bwt=[gwt],Ewt={key:2,class:"flex gap-3 flex-1 items-center duration-75"},ywt=Mt(()=>l("i",{"data-feather":"x"},null,-1)),vwt=[ywt],Swt=Mt(()=>l("i",{"data-feather":"check"},null,-1)),Twt=[Swt],xwt=Mt(()=>l("i",{"data-feather":"hard-drive"},null,-1)),Cwt=[xwt],wwt=Mt(()=>l("i",{"data-feather":"check-circle"},null,-1)),Rwt=[wwt],Awt=Mt(()=>l("i",{"data-feather":"x-octagon"},null,-1)),Nwt=[Awt],Owt=Mt(()=>l("i",{"data-feather":"book"},null,-1)),Mwt=[Owt],Iwt={key:7,title:"Loading..",class:"flex flex-row flex-grow justify-end"},kwt=Mt(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),Dwt=[kwt],Lwt={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},Pwt={class:"p-4 pt-2"},Fwt={class:"relative"},Uwt=Mt(()=>l("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[l("div",{class:"scale-75"},[l("i",{"data-feather":"search"})])],-1)),Bwt={class:"absolute inset-y-0 right-0 flex items-center pr-3"},Gwt=Mt(()=>l("i",{"data-feather":"x"},null,-1)),Vwt=[Gwt],zwt={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},Hwt={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},qwt={class:"flex flex-row flex-grow"},$wt={key:0},Ywt={class:"flex flex-row"},Wwt={key:0,class:"flex gap-3"},Kwt=Mt(()=>l("i",{"data-feather":"trash"},null,-1)),jwt=[Kwt],Qwt={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},Xwt=Mt(()=>l("i",{"data-feather":"check"},null,-1)),Zwt=[Xwt],Jwt=Mt(()=>l("i",{"data-feather":"x"},null,-1)),eRt=[Jwt],tRt={class:"flex gap-3"},nRt=Mt(()=>l("i",{"data-feather":"codepen"},null,-1)),sRt=[nRt],iRt=Mt(()=>l("i",{"data-feather":"folder"},null,-1)),rRt=[iRt],oRt=Mt(()=>l("i",{"data-feather":"bookmark"},null,-1)),aRt=[oRt],lRt=Mt(()=>l("i",{"data-feather":"list"},null,-1)),cRt=[lRt],dRt={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},uRt={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"},pRt=Mt(()=>l("p",{class:"px-3"},"No discussions are found",-1)),_Rt=[pRt],hRt=Mt(()=>l("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),fRt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},mRt={key:2,class:"relative flex flex-col flex-grow"},gRt={class:"container pt-4 pb-50 mb-50 w-full"},bRt={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 h-[600px]"},ERt=Mt(()=>l("h2",{class:"text-2xl font-bold mb-4"},"Prompt examples",-1)),yRt={key:0,class:"overflow-y-auto flex-grow pr-2 custom-scrollbar"},vRt={class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-2"},SRt=["onClick"],TRt=["title"],xRt={class:"absolute inset-0 overflow-hidden"},CRt=Mt(()=>l("div",{class:"absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-white dark:to-gray-800 group-hover:opacity-0 transition-opacity duration-300"},null,-1)),wRt=Mt(()=>l("div",{class:"mt-2 text-sm text-gray-500 dark:text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}," Click to select ",-1)),RRt=Mt(()=>l("div",null,[l("br"),l("br"),l("br"),l("br"),l("br"),l("br"),l("br")],-1)),ARt=Mt(()=>l("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1)),NRt={key:0,class:"flex flex-row items-center justify-center h-10"},ORt={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"},MRt={ref:"isolatedContent",class:"h-full"},IRt={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"},kRt={class:"text-2xl animate-pulse mt-2 text-light-text-panel dark:text-dark-text-panel"},DRt={setup(){},data(){return{lastMessageHtml:"",defaultMessageHtml:`
+`+t.name,4,!1)}else console.log("mounting pers");this.$emit("personalitySelected"),Le(()=>{ze.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const e=t.language===null?t.full_path:t.full_path+":"+t.language;console.log("Selecting personality ",e);const n=this.$store.state.config.personalities.findIndex(i=>i===e),s={client_id:this.$store.state.client_id,id:n};try{const i=await ae.post("/select_personality",s);if(i)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),i.data}catch(i){console.log(i.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(t){t.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const n=new MouseEvent("click");e.dispatchEvent(n)},setBinding(t){console.log("Setting binding to "+t.name),this.selecting_binding=!0,this.selectedBinding=t,this.$store.state.messageBox.showBlockingMessage("Loading binding"),ae.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},setModel(t){console.log("Setting model to "+t.name),this.selecting_model=!0,this.selectedModel=t,this.$store.state.messageBox.showBlockingMessage("Loading model"),ae.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},download_files(){ae.get("/download_files")},remove_file(t){ae.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){ae.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.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(t,e){console.log("Send file triggered");const n=new FileReader,s=24*1024;let i=0,r=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,c=i+a.byteLength>=t.size;qe.emit("send_file_chunk",{filename:t.name,chunk:a,offset:i,isLastChunk:c,chunkIndex:r}),i+=a.byteLength,r++,c?(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=t.slice(i,i+s);n.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),qe.emit("start_bidirectional_audio_stream"),Le(()=>{ze.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),qe.emit("stop_bidirectional_audio_stream"),Le(()=>{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=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.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.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(t){this.showPersonalities=!this.showPersonalities},handleOnTalk(t){console.log("talking"),this.showPersonalities=!1,this.$store.state.toast.showToast(`Personality ${t.name} is Talking`,4,!0),this.onTalk(t)},onMountFun(t){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(t){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(t){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(t){return Le(()=>{ze.replace()}),si(t)},removeItem(t){console.log("Removing ",t.name),ae.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await ae.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){qe.emit("take_picture"),qe.on("picture_taken",()=>{ae.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.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(t){console.log("Adding files");const e=[...t];let n=0;const s=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[n];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{n++,s()})};s()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){Le(()=>{ze.replace()})},loading(t,e){Le(()=>{ze.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let s=0;s{ze.replace()}),console.log("Chatbar mounted"),qe.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.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(){Le(()=>{ze.replace()})}},Yt=t=>(vs("data-v-cf2611fa"),t=t(),Ss(),t),Lxt={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},Pxt={key:0,class:"items-center gap-2 panels-color shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},Fxt={class:"flex"},Uxt=["title"],Bxt=Yt(()=>l("i",{"data-feather":"list"},null,-1)),Gxt=[Bxt],Vxt={key:0},zxt={class:"flex flex-col max-h-64"},Hxt=["title"],qxt={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"},$xt={key:0,filesList:"",role:"status"},Yxt=Yt(()=>l("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"},[l("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"}),l("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)),Wxt=Yt(()=>l("span",{class:"sr-only"},"Loading...",-1)),Kxt=[Yxt,Wxt],jxt=Yt(()=>l("div",null,[l("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),Qxt=Yt(()=>l("div",{class:"grow"},null,-1)),Xxt={class:"flex flex-row items-center"},Zxt={class:"whitespace-nowrap"},Jxt=["onClick"],e1t=Yt(()=>l("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),t1t=[e1t],n1t={key:1,class:"flex mx-1 w-500"},s1t={class:"whitespace-nowrap flex flex-row gap-2"},i1t=Yt(()=>l("p",{class:"font-bold"}," Total size: ",-1)),r1t=Yt(()=>l("div",{class:"grow"},null,-1)),o1t=Yt(()=>l("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),a1t=[o1t],l1t=Yt(()=>l("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)),c1t=[l1t],d1t={key:2,class:"mx-1"},u1t={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end panels-color"},p1t={role:"status"},_1t=["src"],h1t=Yt(()=>l("span",{class:"sr-only"},"Selecting model...",-1)),f1t={class:"flex w-fit relative grow w-full"},m1t={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"},g1t={key:0,title:"Waiting for reply"},b1t=["src"],E1t=Yt(()=>l("div",{role:"status"},[l("span",{class:"sr-only"},"Loading...")],-1)),y1t={key:1,class:"w-fit group relative"},v1t={class:"hide top-50 hide opacity-0 group-hover:bottom-0 opacity-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},S1t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},T1t=["onMouseover"],x1t={class:"relative"},C1t=["onClick"],w1t=["src","title"],R1t={class:"group items-center flex flex-row"},A1t=["src","title"],N1t={key:2,class:"w-fit group relative"},O1t={class:"hide top-50 hide opacity-0 group-hover:bottom-0 opacity-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},M1t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},I1t=["onMouseover"],k1t={class:"relative"},D1t=["onClick"],L1t=["src","title"],P1t={class:"group items-center flex flex-row"},F1t=["src","title"],U1t={key:3,class:"w-fit group relative"},B1t={class:"top-50 hide opacity-0 group-hover:bottom-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},G1t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},V1t=["onMouseover"],z1t={class:"relative"},H1t=["onClick"],q1t=["src","title"],$1t=["onClick"],Y1t=Yt(()=>l("span",{class:"-top-6 -right-6 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Unmount personality"},[l("svg",{"aria-hidden":"true",class:"top-1 left-1 relative w-5 h-5 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20","stroke-width":"1",xmlns:"http://www.w3.org/2000/svg"},[l("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)),W1t=[Y1t],K1t=["onClick"],j1t=Yt(()=>l("span",{class:"-top-9 left-2 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Remount"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("g",{id:"surface1"},[l("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1)),Q1t=[j1t],X1t=["onClick"],Z1t=Yt(()=>l("span",{class:"-top-6 -left-6 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Talk"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),l("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1)),J1t=[Z1t],eCt={class:"w-fit"},tCt={class:"w-fit"},nCt={class:"relative grow"},sCt={class:"flex items-center space-x-3"},iCt=Yt(()=>l("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("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)),rCt=Yt(()=>l("span",null,"Stop",-1)),oCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})],-1)),aCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),lCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),cCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),dCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),uCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),pCt=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),_Ct=Yt(()=>l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("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)),hCt=Yt(()=>l("div",{class:"ml-auto gap-2"},null,-1));function fCt(t,e,n,s,i,r){const o=tt("MountedPersonalitiesList"),a=tt("MountedPersonalities"),c=tt("PersonalitiesCommands"),d=tt("ChatBarButton"),u=tt("UniversalForm");return T(),x(Fe,null,[l("div",Lxt,[i.filesList.length>0||i.showPersonalities?(T(),x("div",Pxt,[l("div",Fxt,[l("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(h=>i.showfilesList=!i.showfilesList,["stop"]))},Gxt,8,Uxt)]),i.filesList.length>0&&i.showfilesList==!0?(T(),x("div",Vxt,[l("div",zxt,[V(ii,{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:Ie(()=>[(T(!0),x(Fe,null,Ke(i.filesList,(h,f)=>(T(),x("div",{key:f+"-"+h.name},[l("div",{class:"m-1",title:h.name},[l("div",qxt,[i.isFileSentList[f]?G("",!0):(T(),x("div",$xt,Kxt)),jxt,l("div",{class:Ge(["line-clamp-1 w-3/5",i.isFileSentList[f]?"text-green-500":"text-red-200"])},K(h.name),3),Qxt,l("div",Xxt,[l("p",Zxt,K(r.computedFileSize(h.size)),1),l("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:m=>r.removeItem(h)},t1t,8,Jxt)])])],8,Hxt)]))),128))]),_:1})])])):G("",!0),i.filesList.length>0?(T(),x("div",n1t,[l("div",s1t,[i1t,Je(" "+K(i.totalSize)+" ("+K(i.filesList.length)+") ",1)]),r1t,l("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]=(...h)=>r.clear_files&&r.clear_files(...h))},a1t),l("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]=(...h)=>r.download_files&&r.download_files(...h))},c1t)])):G("",!0),i.showPersonalities?(T(),x("div",d1t,[V(o,{ref:"mountedPersList",onShowPersList:r.onShowPersListFun,"on-mounted":r.onMountFun,"on-un-mounted":r.onUnmountFun,"on-remounted":t.onRemountFun,"on-talk":r.handleOnTalk,discussionPersonalities:r.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):G("",!0)])):G("",!0),i.selecting_model||i.selecting_binding?(T(),x("div",u1t,[l("div",p1t,[l("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,_1t),h1t])])):G("",!0),l("div",f1t,[l("div",m1t,[n.loading?(T(),x("div",g1t,[l("img",{src:i.loader_v0},null,8,b1t),E1t])):G("",!0),n.loading?G("",!0):(T(),x("div",y1t,[l("div",v1t,[l("div",S1t,[(T(!0),x(Fe,null,Ke(r.installedBindings,(h,f)=>(T(),x("div",{class:"w-fit h-fit inset-0 opacity-100",key:f+"-"+h.name,ref_for:!0,ref:"installedBindings",onMouseover:m=>r.showBindingHoveredIn(f),onMouseleave:e[4]||(e[4]=m=>r.showBindingHoveredOut())},[f!=r.binding_name?(T(),x("div",{key:0,class:Ge(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.bindingHoveredIndex===f?"scale-150":""])},[l("div",x1t,[l("button",{onClick:j(m=>r.setBinding(h),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:h.icon?h.icon:i.modelImgPlaceholder,onError:e[3]||(e[3]=(...m)=>i.modelImgPlaceholder&&i.modelImgPlaceholder(...m)),class:Ge(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.bindingHoveredIndex===f?"scale-150 ":""+h.name==r.binding_name?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,w1t)],8,C1t)])],2)):G("",!0)],40,T1t))),128))])]),l("div",R1t,[l("button",{onClick:e[5]||(e[5]=j(h=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[l("img",{src:r.currentBindingIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-200",title:r.currentBinding?r.currentBinding.name:"unknown"},null,8,A1t)])])])),n.loading?G("",!0):(T(),x("div",N1t,[l("div",O1t,[l("div",M1t,[(T(!0),x(Fe,null,Ke(r.installedModels,(h,f)=>(T(),x("div",{class:"w-fit h-fit",key:f+"-"+h.name,ref_for:!0,ref:"installedModels",onMouseover:m=>r.showModelHoveredIn(f),onMouseleave:e[7]||(e[7]=m=>r.showModelHoveredOut())},[f!=r.model_name?(T(),x("div",{key:0,class:Ge(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.modelHoveredIndex===f?"scale-150":""])},[l("div",k1t,[l("button",{onClick:j(m=>r.setModel(h),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:h.icon?h.icon:i.modelImgPlaceholder,onError:e[6]||(e[6]=(...m)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...m)),class:Ge(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.modelHoveredIndex===f?"scale-150 ":""+h.name==r.model_name?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,L1t)],8,D1t)])],2)):G("",!0)],40,I1t))),128))])]),l("div",P1t,[l("button",{onClick:e[8]||(e[8]=j(h=>r.copyModelName(),["prevent"])),class:"w-8 h-8"},[l("img",{src:r.currentModelIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-400",title:r.currentModel?r.currentModel.name:"unknown"},null,8,F1t)])])])),n.loading?G("",!0):(T(),x("div",U1t,[l("div",B1t,[l("div",G1t,[(T(!0),x(Fe,null,Ke(r.mountedPersonalities,(h,f)=>(T(),x("div",{class:"w-fit h-fit inset-0 opacity-100",key:f+"-"+h.name,ref_for:!0,ref:"mountedPersonalities",onMouseover:m=>r.showPersonalityHoveredIn(f),onMouseleave:e[10]||(e[10]=m=>r.showPersonalityHoveredOut())},[f!=r.personality_name?(T(),x("div",{key:0,class:Ge(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.personalityHoveredIndex===f?"scale-150":""])},[l("div",z1t,[l("button",{onClick:j(m=>r.onPersonalitySelected(h),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:i.bUrl+h.avatar,onError:e[9]||(e[9]=(...m)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...m)),class:Ge(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.personalityHoveredIndex===f?"scale-150 ":""+this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(h.full_path)?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,q1t)],8,H1t),i.personalityHoveredIndex===f?(T(),x("button",{key:0,onClick:j(m=>r.unmountPersonality(h),["prevent"])},W1t,8,$1t)):G("",!0),i.personalityHoveredIndex===f?(T(),x("button",{key:1,onClick:j(m=>r.remount_personality(h),["prevent"])},Q1t,8,K1t)):G("",!0),i.personalityHoveredIndex===f?(T(),x("button",{key:2,onClick:j(m=>r.handleOnTalk(h),["prevent"])},J1t,8,X1t)):G("",!0)])],2)):G("",!0)],40,V1t))),128))])]),V(a,{ref:"mountedPers",onShowPersList:r.onShowPersListFun,onReady:r.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])])),l("div",eCt,[i.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(T(),dt(c,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):G("",!0)]),l("div",tCt,[r.isDataSourceNamesValid?(T(),dt(c,{key:0,icon:"feather:book",commandsList:r.dataSourceNames,sendCommand:r.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):G("",!0)]),l("div",nCt,[l("form",null,[P(l("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[11]||(e[11]=h=>i.message=h),onPaste:e[12]||(e[12]=(...h)=>r.handlePaste&&r.handlePaste(...h)),onKeydown:e[13]||(e[13]=zs(j(h=>r.submitOnEnter(h),["exact"]),["enter"])),class:"w-full p-3 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),[[pe,i.message]])])]),l("div",sCt,[n.loading?(T(),dt(d,{key:0,onClick:r.stopGenerating,class:"bg-red-500 dark:bg-red-600 hover:bg-red-600 dark:hover:bg-red-700"},{icon:Ie(()=>[iCt]),default:Ie(()=>[rCt]),_:1},8,["onClick"])):(T(),dt(d,{key:1,onClick:r.submit,title:"Send"},{icon:Ie(()=>[oCt]),_:1},8,["onClick"])),V(d,{onClick:r.submitWithInternetSearch,title:"Send with internet search"},{icon:Ie(()=>[aCt]),_:1},8,["onClick"]),V(d,{onClick:r.startSpeechRecognition,class:Ge({"text-red-500":i.isListeningToVoice}),title:"Voice input"},{icon:Ie(()=>[lCt]),_:1},8,["onClick","class"]),t.$store.state.config.active_tts_service!="None"&&t.$store.state.config.active_tts_service!=null&&this.$store.state.config.active_stt_service!="None"&&this.$store.state.config.active_stt_service!=null?(T(),dt(d,{key:2,onClick:e[14]||(e[14]=h=>i.is_rt?r.stopRTCom:r.startRTCom),class:Ge(i.is_rt?"bg-red-500 dark:bg-red-600":"bg-green-500 dark:bg-green-600"),title:"Real-time audio mode"},{icon:Ie(()=>[Je(" 🍓 ")]),_:1},8,["class"])):G("",!0),V(d,{onClick:r.add_file,title:"Send file"},{icon:Ie(()=>[cCt]),_:1},8,["onClick"]),V(d,{onClick:r.takePicture,title:"Take picture"},{icon:Ie(()=>[dCt]),_:1},8,["onClick"]),V(d,{onClick:r.addWebLink,title:"Add web link"},{icon:Ie(()=>[uCt]),_:1},8,["onClick"]),V(d,{onClick:r.makeAnEmptyUserMessage,title:"New user message",class:"text-gray-600 dark:text-gray-300"},{icon:Ie(()=>[pCt]),_:1},8,["onClick"]),V(d,{onClick:r.makeAnEmptyAIMessage,title:"New AI message",class:"text-red-400 dark:text-red-300"},{icon:Ie(()=>[_Ct]),_:1},8,["onClick"])]),l("input",{type:"file",ref:"fileDialog",onChange:e[15]||(e[15]=(...h)=>r.addFiles&&r.addFiles(...h)),multiple:"",style:{display:"none"}},null,544)]),hCt])]),V(u,{ref:"universalForm",class:"z-20"},null,512)],64)}const pN=ot(Dxt,[["render",fCt],["__scopeId","data-v-cf2611fa"]]);const mCt={name:"WelcomeComponent",setup(){const t=$k();return{logoSrc:et(()=>t.state.config&&t.state.config.app_custom_logo?`/user_infos/${t.state.config.app_custom_logo}`:Bs)}}},gCt=t=>(vs("data-v-d62e699b"),t=t(),Ss(),t),bCt={class:"flex flex-col items-center justify-center w-full h-full min-h-screen bg-gradient-to-br from-indigo-100 to-purple-100 dark:from-indigo-900 dark:to-purple-900 p-8"},ECt={class:"text-center max-w-4xl"},yCt={class:"flex items-center justify-center gap-8 mb-12"},vCt={class:"relative w-24 h-24"},SCt=["src"],TCt=gCt(()=>l("div",{class:"flex flex-col items-start"},[l("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 "),l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic mt-2"}," Lord of Large Language And Multimodal Systems ")],-1)),xCt=Na(' 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);function CCt(t,e,n,s,i,r){return T(),x("div",bCt,[l("div",ECt,[l("div",yCt,[l("div",vCt,[l("img",{src:s.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,SCt)]),TCt]),xCt])])}const _N=ot(mCt,[["render",CCt],["__scopeId","data-v-d62e699b"]]);var wCt=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),Wd=globalThis&&globalThis.__assign||function(){return Wd=Object.assign||function(t){for(var e,n=1,s=arguments.length;n(vs("data-v-9e711246"),t=t(),Ss(),t),kCt={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center bg-gradient-to-br from-blue-100 to-purple-100 dark:from-blue-900 dark:to-purple-900 overflow-hidden"},DCt={class:"absolute inset-0 pointer-events-none overflow-hidden"},LCt=Mt(()=>l("img",{src:aN,alt:"Falling Strawberry",class:"w-6 h-6"},null,-1)),PCt=[LCt],FCt={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},UCt={class:"mb-8 w-full"},BCt=Mt(()=>l("div",{class:"text-6xl md:text-7xl font-bold text-red-600 mb-2",style:{"text-shadow":"2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white"}}," L🍓LLMS ",-1)),GCt=Mt(()=>l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic"}," One tool to rule them all ",-1)),VCt=Mt(()=>l("p",{class:"text-xl text-gray-500 dark:text-gray-400 mb-6"}," by ParisNeo ",-1)),zCt={class:"bottom-0 text-2xl text-gray-600 dark:text-gray-300 italic"},HCt={class:"w-full h-24 relative overflow-hidden bg-gradient-to-r from-blue-200 to-purple-200 dark:from-blue-800 dark:to-purple-800 rounded-full shadow-lg"},qCt={class:"w-full max-w-2xl"},$Ct={role:"status",class:"w-full"},YCt={class:"text-xl text-gray-700 dark:text-gray-300"},WCt={class:"text-2xl font-bold text-blue-600 dark:text-blue-400 mt-2"},KCt=Mt(()=>l("i",{"data-feather":"chevron-right"},null,-1)),jCt=[KCt],QCt=Mt(()=>l("i",{"data-feather":"chevron-left"},null,-1)),XCt=[QCt],ZCt=Na(' ',1),JCt=[ZCt],ewt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] unicolor-panels-color dark:bg-bg-dark-tone"},twt={class:"text-light-text-panel dark:text-dark-text-panel panels-color sticky z-10 top-0"},nwt={class:"flex-row p-4 flex items-center gap-3 flex-0"},swt=Mt(()=>l("i",{"data-feather":"plus"},null,-1)),iwt=[swt],rwt=Mt(()=>l("i",{"data-feather":"check-square"},null,-1)),owt=[rwt],awt={class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},lwt=Mt(()=>l("i",{"data-feather":"database"},null,-1)),cwt=[lwt],dwt=Mt(()=>l("i",{"data-feather":"log-in"},null,-1)),uwt=[dwt],pwt=Mt(()=>l("i",{"data-feather":"folder"},null,-1)),_wt=[pwt],hwt={key:1,class:"dropdown"},fwt=Mt(()=>l("i",{"data-feather":"search"},null,-1)),mwt=[fwt],gwt={key:2,class:"flex gap-3 flex-1 items-center duration-75"},bwt=Mt(()=>l("i",{"data-feather":"x"},null,-1)),Ewt=[bwt],ywt=Mt(()=>l("i",{"data-feather":"check"},null,-1)),vwt=[ywt],Swt=Mt(()=>l("i",{"data-feather":"hard-drive"},null,-1)),Twt=[Swt],xwt=Mt(()=>l("i",{"data-feather":"check-circle"},null,-1)),Cwt=[xwt],wwt=Mt(()=>l("i",{"data-feather":"x-octagon"},null,-1)),Rwt=[wwt],Awt=Mt(()=>l("i",{"data-feather":"book"},null,-1)),Nwt=[Awt],Owt={key:7,title:"Loading..",class:"flex flex-row flex-grow justify-end"},Mwt=Mt(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),Iwt=[Mwt],kwt={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},Dwt={class:"p-4 pt-2"},Lwt={class:"relative"},Pwt=Mt(()=>l("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[l("div",{class:"scale-75"},[l("i",{"data-feather":"search"})])],-1)),Fwt={class:"absolute inset-y-0 right-0 flex items-center pr-3"},Uwt=Mt(()=>l("i",{"data-feather":"x"},null,-1)),Bwt=[Uwt],Gwt={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},Vwt={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},zwt={class:"flex flex-row flex-grow"},Hwt={key:0},qwt={class:"flex flex-row"},$wt={key:0,class:"flex gap-3"},Ywt=Mt(()=>l("i",{"data-feather":"trash"},null,-1)),Wwt=[Ywt],Kwt={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},jwt=Mt(()=>l("i",{"data-feather":"check"},null,-1)),Qwt=[jwt],Xwt=Mt(()=>l("i",{"data-feather":"x"},null,-1)),Zwt=[Xwt],Jwt={class:"flex gap-3"},eRt=Mt(()=>l("i",{"data-feather":"codepen"},null,-1)),tRt=[eRt],nRt=Mt(()=>l("i",{"data-feather":"folder"},null,-1)),sRt=[nRt],iRt=Mt(()=>l("i",{"data-feather":"bookmark"},null,-1)),rRt=[iRt],oRt=Mt(()=>l("i",{"data-feather":"list"},null,-1)),aRt=[oRt],lRt={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},cRt={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"},dRt=Mt(()=>l("p",{class:"px-3"},"No discussions are found",-1)),uRt=[dRt],pRt=Mt(()=>l("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),_Rt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},hRt={key:2,class:"relative flex flex-col flex-grow"},fRt={class:"container pt-4 pb-50 mb-50 w-full"},mRt={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 h-[600px]"},gRt=Mt(()=>l("h2",{class:"text-2xl font-bold mb-4"},"Prompt examples",-1)),bRt={key:0,class:"overflow-y-auto flex-grow pr-2 custom-scrollbar"},ERt={class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-2"},yRt=["onClick"],vRt=["title"],SRt={class:"absolute inset-0 overflow-hidden"},TRt=Mt(()=>l("div",{class:"absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-white dark:to-gray-800 group-hover:opacity-0 transition-opacity duration-300"},null,-1)),xRt=Mt(()=>l("div",{class:"mt-2 text-sm text-gray-500 dark:text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}," Click to select ",-1)),CRt=Mt(()=>l("div",null,[l("br"),l("br"),l("br"),l("br"),l("br"),l("br"),l("br")],-1)),wRt=Mt(()=>l("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1)),RRt={key:0,class:"flex flex-row items-center justify-center h-10"},ARt={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"},NRt={ref:"isolatedContent",class:"h-full"},ORt={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"},MRt={class:"text-2xl animate-pulse mt-2 text-light-text-panel dark:text-dark-text-panel"},IRt={setup(){},data(){return{lastMessageHtml:"",defaultMessageHtml:`
@@ -315,11 +315,11 @@ Error: `+e.error,4,!1)},async unmount_personality(t){if(!t)return{status:!1,erro
- `,memory_icon:OCt,active_skills:MCt,inactive_skills:ICt,skillsRegistry:kCt,robot:DCt,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CONTENT:1,MSG_TYPE_CONTENT_INVISIBLE_TO_AI:2,MSG_TYPE_CONTENT_INVISIBLE_TO_USER:3},operationTypes:{MSG_OPERATION_TYPE_ADD_CHUNK:0,MSG_OPERATION_TYPE_SET_CONTENT:1,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:2,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_USER:3,MSG_OPERATION_TYPE_EXCEPTION:4,MSG_OPERATION_TYPE_WARNING:5,MSG_OPERATION_TYPE_INFO:6,MSG_OPERATION_TYPE_STEP:7,MSG_OPERATION_TYPE_STEP_START:8,MSG_OPERATION_TYPE_STEP_PROGRESS:9,MSG_OPERATION_TYPE_STEP_END_SUCCESS:10,MSG_OPERATION_TYPE_STEP_END_FAILURE:11,MSG_OPERATION_TYPE_JSON_INFOS:12,MSG_OPERATION_TYPE_REF:13,MSG_OPERATION_TYPE_CODE:14,MSG_OPERATION_TYPE_UI:15,MSG_OPERATION_TYPE_NEW_MESSAGE:16,MSG_OPERATION_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,leftPanelCollapsed:!1,rightPanelCollapsed:!0,isOpen:!1,discussion_id:0}},methods:{getRandomEdgePosition(){switch(Math.floor(Math.random()*4)){case 0:return 0;case 1:return 100;case 2:return Math.random()*100;case 3:return Math.random()*100}},selectPrompt(t){this.$refs.chatBox.message=t},extractHtml(){if(this.discussionArr.length>0){const t=this.discussionArr[this.discussionArr.length-1].content,e="```html",n="```";let s=t.indexOf(e);if(s===-1)return this.lastMessageHtml=this.defaultMessageHtml,this.renderIsolatedContent(),this.defaultMessageHtml;s+=e.length;let i=t.indexOf(n,s);i===-1?this.lastMessageHtml=t.slice(s).trim():this.lastMessageHtml=t.slice(s,i).trim()}else this.lastMessageHtml=this.defaultMessageHtml;this.renderIsolatedContent()},renderIsolatedContent(){const t=document.createElement("iframe");if(t.style.border="none",t.style.width="100%",t.style.height="100%",this.$refs.isolatedContent){this.$refs.isolatedContent.innerHTML="",this.$refs.isolatedContent.appendChild(t);const e=t.contentDocument||t.contentWindow.document;e.open(),e.write(`
+ `,memory_icon:ACt,active_skills:NCt,inactive_skills:OCt,skillsRegistry:MCt,robot:ICt,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CONTENT:1,MSG_TYPE_CONTENT_INVISIBLE_TO_AI:2,MSG_TYPE_CONTENT_INVISIBLE_TO_USER:3},operationTypes:{MSG_OPERATION_TYPE_ADD_CHUNK:0,MSG_OPERATION_TYPE_SET_CONTENT:1,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:2,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_USER:3,MSG_OPERATION_TYPE_EXCEPTION:4,MSG_OPERATION_TYPE_WARNING:5,MSG_OPERATION_TYPE_INFO:6,MSG_OPERATION_TYPE_STEP:7,MSG_OPERATION_TYPE_STEP_START:8,MSG_OPERATION_TYPE_STEP_PROGRESS:9,MSG_OPERATION_TYPE_STEP_END_SUCCESS:10,MSG_OPERATION_TYPE_STEP_END_FAILURE:11,MSG_OPERATION_TYPE_JSON_INFOS:12,MSG_OPERATION_TYPE_REF:13,MSG_OPERATION_TYPE_CODE:14,MSG_OPERATION_TYPE_UI:15,MSG_OPERATION_TYPE_NEW_MESSAGE:16,MSG_OPERATION_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,leftPanelCollapsed:!1,rightPanelCollapsed:!0,isOpen:!1,discussion_id:0}},methods:{getRandomEdgePosition(){switch(Math.floor(Math.random()*4)){case 0:return 0;case 1:return 100;case 2:return Math.random()*100;case 3:return Math.random()*100}},selectPrompt(t){this.$refs.chatBox.message=t},extractHtml(){if(this.discussionArr.length>0){const t=this.discussionArr[this.discussionArr.length-1].content,e="```html",n="```";let s=t.indexOf(e);if(s===-1)return this.lastMessageHtml=this.defaultMessageHtml,this.renderIsolatedContent(),this.defaultMessageHtml;s+=e.length;let i=t.indexOf(n,s);i===-1?this.lastMessageHtml=t.slice(s).trim():this.lastMessageHtml=t.slice(s,i).trim()}else this.lastMessageHtml=this.defaultMessageHtml;this.renderIsolatedContent()},renderIsolatedContent(){const t=document.createElement("iframe");if(t.style.border="none",t.style.width="100%",t.style.height="100%",this.$refs.isolatedContent){this.$refs.isolatedContent.innerHTML="",this.$refs.isolatedContent.appendChild(t);const e=t.contentDocument||t.contentWindow.document;e.open(),e.write(`
${this.lastMessageHtml}
`),e.close()}},async triggerRobotAction(){this.rightPanelCollapsed=!this.rightPanelCollapsed,this.rightPanelCollapsed||(this.leftPanelCollapsed=!0,this.$nextTick(()=>{this.extractHtml()})),console.log(this.rightPanelCollapsed)},add_webpage(){console.log("addWebLink received"),this.$refs.web_url_input_box.showPanel()},addWebpage(){ae.post("/add_webpage",{client_id:this.client_id,url:this.$refs.web_url_input_box.inputText},{headers:this.posts_headers}).then(t=>{t&&t.status&&(console.log("Done"),this.recoverFiles())})},show_progress(t){this.progress_visibility_val=!0},hide_progress(t){this.progress_visibility_val=!1},update_progress(t){console.log("Progress update"),this.progress_value=t.value},onSettingsBinding(){try{this.isLoading=!0,ae.get("/get_active_binding_settings").then(t=>{if(this.isLoading=!1,t)if(t.data&&Object.keys(t.data).length>0){const e=this.$store.state.bindingsZoo.find(n=>n.name==this.state.config.binding_name);this.$store.state.universalForm.showForm(t.data,"Binding settings - "+e.binding.name,"Save changes","Cancel").then(n=>{try{ae.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:n}).then(s=>{s&&s.data?(console.log("binding set with new settings",s.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses.
`+s,4,!1),this.isLoading=!1)})}catch(s){this.$store.state.toast.showToast(`Did not get binding settings responses.
- Endpoint error: `+s.message,4,!1),this.isLoading=!1}})}else this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1})}catch(t){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},showDatabaseSelector(){this.database_selectorDialogVisible=!0},async ondatabase_selectorDialogRemoved(t){console.log("Deleted:",t)},async ondatabase_selectorDialogSelected(t){console.log("Selected:",t)},onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=!1},async onvalidatedatabase_selectorChoice(t){if(this.database_selectorDialogVisible=!1,(await ae.post("/select_database",{client_id:this.client_id,name:t},{headers:this.posts_headers})).status){console.log("Selected database"),this.$store.state.config=await ae.post("/get_config",{client_id:this.client_id}),console.log("new config loaded :",this.$store.state.config);let n=await ae.get("/list_databases").data;console.log("New list of database: ",n),this.$store.state.databases=n,console.log("New list of database: ",this.$store.state.databases),location.reload()}},async addDiscussion2SkillsLibrary(){(await ae.post("/add_discussion_to_skills_library",{client_id:this.client_id},{headers:this.posts_headers})).status&&console.log("done")},async toggleSkillsLib(){this.$store.state.config.activate_skills_lib=!this.$store.state.config.activate_skills_lib,await this.applyConfiguration()},async showSkillsLib(){this.$refs.skills_lib.showSkillsLibrary()},async applyConfiguration(){this.loading=!0;const t=await ae.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config});this.loading=!1,t.data.status?this.$store.state.toast.showToast("Configuration changed successfully.",4,!0):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Le(()=>{ze.replace()})},save_configuration(){this.showConfirmation=!1,ae.post("/save_settings",{}).then(t=>{if(t)return t.status?this.$store.state.toast.showToast("Settings saved!",4,!0):this.$store.state.messageBox.showMessage("Error: Couldn't save settings!"),t.data}).catch(t=>(console.log(t.message,"save_configuration"),this.$store.state.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},showToastMessage(t,e,n){console.log("sending",t),this.$store.state.toast.showToast(t,e,n)},togglePanel(){this.leftPanelCollapsed=!this.leftPanelCollapsed,this.leftPanelCollapsed||(this.rightPanelCollapsed=!0)},toggleDropdown(){this.isOpen=!this.isOpen},importChatGPT(){},async api_get_req(t){try{const e=await ae.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req");return}},async list_discussions(){try{const t=await ae.get("/list_discussions");if(t)return this.createDiscussionList(t.data),t.data}catch(t){return console.log("Error: Could not list discussions",t.message),[]}},load_discussion(t,e){t&&(console.log("Loading discussion",t),this.loading=!0,this.discussionArr=[],this.setDiscussionLoading(t,this.loading),qe.on("discussion",n=>{console.log("Discussion recovered"),this.loading=!1,this.setDiscussionLoading(t,this.loading),n&&(this.discussionArr=n.filter(s=>s.message_type==this.msgTypes.MSG_TYPE_CONTENT||s.message_type==this.msgTypes.MSG_TYPE_CONTENT_INVISIBLE_TO_AI),this.discussionArr.forEach(s=>{s.status_message="Done"}),console.log("this.discussionArr"),console.log(this.discussionArr),e&&e()),qe.off("discussion"),this.extractHtml()}),qe.emit("load_discussion",{id:t}))},recoverFiles(){console.log("Recovering files"),ae.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.$refs.chatBox.filesList=t.data.files,this.$refs.chatBox.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.$refs.chatBox.filesList}`)})},new_discussion(t){try{this.loading=!0,qe.on("discussion_created",e=>{qe.off("discussion_created"),this.list_discussions().then(()=>{const n=this.list.findIndex(i=>i.id==e.id),s=this.list[n];this.selectDiscussion(s),this.load_discussion(e.id,()=>{this.loading=!1,this.recoverFiles(),Le(()=>{const i=document.getElementById("dis-"+e.id);this.scrollToElement(i),console.log("Scrolling tp "+i)})})})}),console.log("new_discussion ",t),qe.emit("new_discussion",{title:t})}catch(e){return console.log("Error: Could not create new discussion",e.message),{}}},async delete_discussion(t){try{t&&(this.loading=!0,this.setDiscussionLoading(t,this.loading),await ae.post("/delete_discussion",{client_id:this.client_id,id:t},{headers:this.posts_headers}),this.loading=!1,this.setDiscussionLoading(t,this.loading))}catch(e){console.log("Error: Could not delete discussion",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async edit_title(t,e){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const n=await ae.post("/edit_title",{client_id:this.client_id,id:t,title:e},{headers:this.posts_headers});if(this.loading=!1,this.setDiscussionLoading(t,this.loading),n.status==200){const s=this.list.findIndex(r=>r.id==t),i=this.list[s];i.title=e,this.tempList=this.list}}}catch(n){console.log("Error: Could not edit title",n.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async make_title(t){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const e=await ae.post("/make_title",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(console.log("Making title:",e),this.loading=!1,this.setDiscussionLoading(t,this.loading),e.status==200){const n=this.list.findIndex(i=>i.id==t),s=this.list[n];s.title=e.data.title,this.tempList=this.list}}}catch(e){console.log("Error: Could not edit title",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async delete_message(t){try{console.log(typeof t),console.log(typeof this.client_id),console.log(t),console.log(this.client_id);const e=await ae.post("/delete_message",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could delete message",e.message),{}}},async stop_gen(){try{if(this.discussionArr.length>0){const t=this.discussionArr[this.discussionArr.length-1];t.status_message="Generation canceled"}if(qe.emit("cancel_generation"),res)return res.data}catch(t){return console.log("Error: Could not stop generating",t.message),{}}},async message_rank_up(t){try{const e=await ae.post("/message_rank_up",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank up message",e.message),{}}},async message_rank_down(t){try{const e=await ae.post("/message_rank_down",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank down message",e.message),{}}},async edit_message(t,e,n){try{console.log(typeof this.client_id),console.log(typeof t),console.log(typeof e),console.log(typeof{audio_url:n});const s=await ae.post("/edit_message",{client_id:this.client_id,id:t,message:e,metadata:[{audio_url:n}]},{headers:this.posts_headers});if(s)return s.data}catch(s){return console.log("Error: Could not update message",s.message),{}}},async export_multiple_discussions(t,e){try{if(t.length>0){const n=await ae.post("/export_multiple_discussions",{client_id:this.$store.state.client_id,discussion_ids:t,export_format:e},{headers:this.posts_headers});if(n)return n.data}}catch(n){return console.log("Error: Could not export multiple discussions",n.message),{}}},async import_multiple_discussions(t){try{if(t.length>0){console.log("sending import",t);const e=await ae.post("/import_multiple_discussions",{client_id:this.$store.state.client_id,jArray:t},{headers:this.posts_headers});if(e)return console.log("import response",e.data),e.data}}catch(e){console.log("Error: Could not import multiple discussions",e.message);return}},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.filterTitle?this.list=this.tempList.filter(t=>t.title&&t.title.includes(this.filterTitle)):this.list=this.tempList,this.filterInProgress=!1},100))},async selectDiscussion(t){if(this.isGenerating){this.$store.state.toast.showToast("You are currently generating a text. Please wait for text generation to finish or stop it before trying to select another discussion",4,!1);return}t&&(this.currentDiscussion===void 0?(this.currentDiscussion=t,this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&((this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content),this.recoverFiles())})):this.currentDiscussion.id!=t.id&&(console.log("item",t),console.log("this.currentDiscussion",this.currentDiscussion),this.currentDiscussion=t,console.log("this.currentDiscussion",this.currentDiscussion),this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content),this.recoverFiles()})),Le(()=>{const e=document.getElementById("dis-"+this.currentDiscussion.id);this.scrollToElementInContainer(e,"leftPanel");const n=document.getElementById("messages-list");this.scrollBottom(n)}))},scrollToElement(t){t?t.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):console.log("Error: scrollToElement")},scrollToElementInContainer(t,e){try{const n=t.offsetTop;document.getElementById(e).scrollTo({top:n,behavior:"smooth"})}catch{console.log("error")}},scrollBottom(t){t?t.scrollTo({top:t.scrollHeight,behavior:"smooth"}):console.log("Error: scrollBottom")},scrollTop(t){t?t.scrollTo({top:0,behavior:"smooth"}):console.log("Error: scrollTop")},createUserMsg(t){let e={content:t.message,id:t.id,rank:0,sender:t.user,created_at:t.created_at,steps:[],html_js_s:[],status_message:"Warming up"};this.discussionArr.push(e),Le(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},updateLastUserMsg(t){const e=this.discussionArr.indexOf(s=>s.id=t.user_id),n={binding:t.binding,content:t.message,created_at:t.created_at,type:t.type,finished_generating_at:t.finished_generating_at,id:t.user_id,model:t.model,personality:t.personality,sender:t.user,steps:[]};e!==-1&&(this.discussionArr[e]=n)},async socketIOConnected(){console.log("socketIOConnected")},socketIODisconnected(){return console.log("socketIOConnected"),this.currentDiscussion=null,this.$store.dispatch("refreshModels"),this.$store.state.isConnected=!1,!0},new_message(t){t.sender_type==this.SENDER_TYPES_AI&&(this.isGenerating=!0),console.log("Making a new message"),console.log("New message",t);let e={sender:t.sender,message_type:t.message_type,sender_type:t.sender_type,content:t.content,id:t.id,discussion_id:t.discussion_id,parent_id:t.parent_id,binding:t.binding,model:t.model,personality:t.personality,created_at:t.created_at,finished_generating_at:t.finished_generating_at,rank:0,ui:t.ui,steps:[],parameters:t.parameters,metadata:t.metadata,open:t.open};e.status_message="Warming up",console.log(e),this.discussionArr.push(e),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,t.message),console.log("infos",t)},async talk(t){this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await ae.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),s={client_id:this.$store.state.client_id,id:n};e=await ae.post("/select_personality",s),console.log("Generating message from ",e.data.status),qe.emit("generate_msg_from",{id:-1})}},createEmptyUserMessage(t){qe.emit("create_empty_message",{type:0,message:t})},createEmptyAIMessage(){qe.emit("create_empty_message",{type:1})},sendMsg(t,e){if(!t){this.$store.state.toast.showToast("Message contains no content!",4,!1);return}this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),ae.get("/get_generation_status",{}).then(n=>{if(n)if(n.data.status)console.log("Already generating");else{e=="internet"?qe.emit("generate_msg_with_internet",{prompt:t}):qe.emit("generate_msg",{prompt:t});let s=0;this.discussionArr.length>0&&(s=Number(this.discussionArr[this.discussionArr.length-1].id)+1);let i={message:t,id:s,rank:0,user:this.$store.state.config.user_name,created_at:new Date().toLocaleString(),sender:this.$store.state.config.user_name,message_type:this.operationTypes.MSG_TYPE_CONTENT,sender_type:this.senderTypes.SENDER_TYPES_USER,content:t,id:s,discussion_id:this.discussion_id,parent_id:s,binding:"",model:"",personality:"",created_at:new Date().toLocaleString(),finished_generating_at:new Date().toLocaleString(),rank:0,steps:[],parameters:null,metadata:[],ui:null};this.createUserMsg(i)}}).catch(n=>{console.log("Error: Could not get generation status",n)})},sendCmd(t){this.isGenerating=!0,qe.emit("execute_command",{command:t,parameters:[]})},notify(t){self.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Le(()=>{const e=document.getElementById("messages-list");this.scrollBottom(e)}),t.display_type==0?this.$store.state.toast.showToast(t.content,t.duration,t.notification_type):t.display_type==1?this.$store.state.messageBox.showMessage(t.content):t.display_type==2?(this.$store.state.messageBox.hideMessage(),this.$store.state.yesNoDialog.askQuestion(t.content,"Yes","No").then(e=>{qe.emit("yesNoRes",{yesRes:e})})):t.display_type==3?this.$store.state.messageBox.showBlockingMessage(t.content):t.display_type==4&&this.$store.state.messageBox.hideMessage(),this.chime.play()},update_message(t){if(console.log("update_message trigged"),console.log(t),this.discussion_id=t.discussion_id,this.setDiscussionLoading(this.discussion_id,!0),this.currentDiscussion.id==this.discussion_id){console.log("discussion ok");const e=this.discussionArr.findIndex(s=>s.id==t.id),n=this.discussionArr[e];if(n&&(t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI))console.log("Content triggered"),this.isGenerating=!0,n.content=t.content,n.created_at=t.created_at,n.started_generating_at=t.started_generating_at,n.nb_tokens=t.nb_tokens,n.finished_generating_at=t.finished_generating_at,this.extractHtml();else if(n&&t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_ADD_CHUNK)this.isGenerating=!0,n.content+=t.content,console.log("Chunk triggered"),n.created_at=t.created_at,n.started_generating_at=t.started_generating_at,n.nb_tokens=t.nb_tokens,n.finished_generating_at=t.finished_generating_at,this.extractHtml();else if(t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP_START||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP_END_SUCCESS||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP_END_FAILURE)Array.isArray(t.steps)?(n.status_message=t.steps[t.steps.length-1].text,console.log("step Content: ",n.status_message),n.steps=t.steps,console.log("steps: ",t.steps)):console.error("Invalid steps data:",t.steps);else if(t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_JSON_INFOS)if(console.log("metadata triggered",t.operation_type),console.log("metadata",t.metadata),typeof t.metadata=="string")try{n.metadata=JSON.parse(t.metadata)}catch(s){console.error("Error parsing metadata string:",s),n.metadata={raw:t.metadata}}else Array.isArray(t.metadata)||typeof t.metadata=="object"?n.metadata=t.metadata:n.metadata={value:t.metadata};else t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_UI?(console.log("UI triggered",t.operation_type),console.log("UI",t.ui),n.ui=t.ui):t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_EXCEPTION&&this.$store.state.toast.showToast(t.content,5,!1)}this.$nextTick(()=>{ze.replace()})},async changeTitleUsingUserMSG(t,e){const n=this.list.findIndex(i=>i.id==t),s=this.list[n];e&&(s.title=e,this.tempList=this.list,await this.edit_title(t,e))},async createNewDiscussion(){this.new_discussion(null)},loadLastUsedDiscussion(){console.log("Loading last discussion");const t=localStorage.getItem("selected_discussion");if(console.log("Last discussion id: ",t),t){const e=this.list.findIndex(s=>s.id==t),n=this.list[e];n&&this.selectDiscussion(n)}},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},async deleteDiscussion(t){await this.delete_discussion(t),this.currentDiscussion.id==t&&(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle()),this.list.splice(this.list.findIndex(e=>e.id==t),1),this.createDiscussionList(this.list)},async deleteDiscussionMulti(){const t=this.selectedDiscussions;for(let e=0;e