diff --git a/scripts/wsl/lollms-installer-with-petals.iss b/scripts/wsl/lollms-installer-with-petals.iss index 0e249177..d54e83f3 100644 --- a/scripts/wsl/lollms-installer-with-petals.iss +++ b/scripts/wsl/lollms-installer-with-petals.iss @@ -52,6 +52,8 @@ Source: "run_script.sh"; DestDir: "{app}"; Flags: ignoreversion Source: "ubuntu.bat"; DestDir: "{app}"; Flags: ignoreversion Source: "petals_server.bat"; DestDir: "{app}"; Flags: ignoreversion Source: "petals_server.sh"; DestDir: "{app}"; Flags: ignoreversion +Source: "uninstall.bat"; DestDir: "{app}"; Flags: ignoreversion + Source: "../../assets\logo.ico"; DestDir: "{app}"; Flags: ignoreversion Source: "../../assets\ubuntu.ico"; DestDir: "{app}"; Flags: ignoreversion Source: "../../assets\petals.ico"; DestDir: "{app}"; Flags: ignoreversion @@ -64,6 +66,9 @@ Filename: "{app}\requirements_installer.bat"; Flags: shellexec waituntiltermina Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent +[UninstallRun] +Filename: "{app}\uninstall.bat"; Flags: shellexec; RunOnceId: 1 + [Icons] Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\logo.ico" Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{app}\logo.ico" diff --git a/web/dist/assets/index-e5ee3294.js b/web/dist/assets/index-74b12ab0.js similarity index 98% rename from web/dist/assets/index-e5ee3294.js rename to web/dist/assets/index-74b12ab0.js index d6b8363b..f6ecead8 100644 --- a/web/dist/assets/index-e5ee3294.js +++ b/web/dist/assets/index-74b12ab0.js @@ -115,7 +115,7 @@ License: MIT `:"\r"}(ee,w)),I=!1,y.delimiter)D(y.delimiter)&&(y.delimiter=y.delimiter(ee),te.meta.delimiter=y.delimiter);else{var A=function($,z,oe,le,j){var re,q,Y,ce;j=j||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var pe=0;pe=P)return We(!0)}else for(fe=T,T++;;){if((fe=G.indexOf(C,fe+1))===-1)return _e||ne.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:V.length,index:T}),Me();if(fe===te-1)return Me(G.substring(T,fe).replace(pe,C));if(C!==Z||G[fe+1]!==Z){if(C===Z||fe===0||G[fe-1]!==Z){Y!==-1&&Y=P)return We(!0);break}ne.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:V.length,index:T}),fe++}}else fe++}return Me();function ie(nt){V.push(nt),ge=T}function me(nt){var ot=0;if(nt!==-1){var ct=G.substring(fe+1,nt);ct&&ct.trim()===""&&(ot=ct.length)}return ot}function Me(nt){return _e||(nt===void 0&&(nt=G.substring(T)),ee.push(nt),T=te,ie(ee),Q&&Fe()),We()}function $e(nt){T=nt,ie(ee),ee=[],ce=G.indexOf(I,T)}function We(nt){return{data:V,errors:ne,meta:{delimiter:M,linebreak:I,aborted:H,truncated:!!nt,cursor:ge+(we||0)}}}function Fe(){J(We()),V=[],ne=[]}},this.abort=function(){H=!0},this.getCharIndex=function(){return T}}function b(y){var C=y.data,M=i[C.workerId],I=!1;if(C.error)M.userError(C.error,C.file);else if(C.results&&C.results.data){var B={abort:function(){I=!0,x(C.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:S,resume:S};if(D(M.userStep)){for(var J=0;Jt.text()).then(t=>{const{data:e}=AMe.parse(t,{header:!0});console.log("Recovered data"),console.log(e),this.faqs=e}).catch(t=>{console.error("Error loading FAQs:",t)})},parseMultiline(t){return t.replace(/\n/g,"
")}}},mn=t=>(is("data-v-c8c43118"),t=t(),as(),t),TMe={class:"container mx-auto p-4 bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},MMe=mn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"About Lord of large Language Models",-1)),OMe={class:"mb-4"},RMe=mn(()=>c("p",null,[xe("Discord link: "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:"https://discord.gg/C73K7hjy"},"https://discord.gg/C73K7hjy")],-1)),NMe=mn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Frequently Asked Questions",-1)),DMe={class:"list-disc pl-4"},LMe={class:"text-xl font-bold mb-1"},IMe=["innerHTML"],PMe=mn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Contact Us",-1)),FMe=mn(()=>c("p",{class:"mb-4"},"If you have any further questions or need assistance, feel free to reach out to me.",-1)),BMe=mn(()=>c("p",null,[xe("Discord link: "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:"https://discord.gg/C73K7hjy"},"https://discord.gg/C73K7hjy")],-1)),$Me=mn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Credits",-1)),zMe=mn(()=>c("p",{class:"mb-4"},[xe("This project is developed by "),c("span",{class:"font-bold"},"ParisNeo"),xe(" With help from the community.")],-1)),jMe=mn(()=>c("p",{class:"mb-4"},[c("span",{class:"font-bold"},[c("a",{href:"https://github.com/ParisNeo/lollms-webui/graphs/contributors"},"Check out the full list of developers here and show them some love.")])],-1)),UMe=["href"];function qMe(t,e,n,s,o,r){const i=Pe("Card");return k(),E("div",TMe,[ae(i,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[MMe,c("p",OMe," Lollms version "+U(r.version),1),RMe]),_:1}),ae(i,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[NMe,c("ul",DMe,[(k(!0),E(Oe,null,Ve(o.faqs,(a,l)=>(k(),E("li",{key:l},[c("h3",LMe,U(a.question),1),c("p",{class:"mb-4",innerHTML:r.parseMultiline(a.answer)},null,8,IMe)]))),128))])]),_:1}),ae(i,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[PMe,FMe,BMe]),_:1}),ae(i,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[$Me,zMe,jMe,c("p",null,[xe("Check out the project on "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:o.githubLink,target:"_blank",rel:"noopener noreferrer"},"GitHub",8,UMe),xe(".")])]),_:1})])}const HMe=ze(SMe,[["render",qMe],["__scopeId","data-v-c8c43118"]]);function Gt(t,e=!0,n=1){const s=e?1e3:1024;if(Math.abs(t)=s&&rr.hide&&r.hide(...i)),class:"bg-primary hover:bg-primary-light active:scale-95 duration-150 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-secondary-dark"}," OK ")])])])):L("",!0)}const zg=ze(VMe,[["render",YMe]]),JMe={data(){return{show:!1,message:"",resolve:null,ConfirmButtonText:"Yes, I'm sure",DenyButtonText:"No, cancel"}},methods:{hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},askQuestion(t,e,n){return this.ConfirmButtonText=e||this.ConfirmButtonText,this.DenyButtonText=n||this.DenyButtonText,new Promise(s=>{this.message=t,this.show=!0,this.resolve=s})}}},QMe={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},XMe={class:"relative w-full max-w-md max-h-full"},eOe={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},tOe=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),nOe=c("span",{class:"sr-only"},"Close modal",-1),sOe=[tOe,nOe],oOe={class:"p-4 text-center"},rOe=c("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),iOe={class:"mb-5 text-lg font-normal text-gray-500 dark:text-gray-400 select-none break-all"};function aOe(t,e,n,s,o,r){return o.show?(k(),E("div",QMe,[c("div",XMe,[c("div",eOe,[c("button",{type:"button",onClick:e[0]||(e[0]=i=>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"},sOe),c("div",oOe,[rOe,c("h3",iOe,U(o.message),1),c("button",{onClick:e[1]||(e[1]=i=>r.hide(!0)),type:"button",class:"text-white bg-red-600 hover:bg-red-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"},U(o.ConfirmButtonText),1),c("button",{onClick:e[2]||(e[2]=i=>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"},U(o.DenyButtonText),1)])])])])):L("",!0)}const lOe=ze(JMe,[["render",aOe]]),mo="/assets/default_model-9e24e852.png";const cOe={props:{title:{type:String,required:!1,value:"menu"},icon:{type:String,required:!1,value:"feather:menu"},commands:{type:Array,required:!0},force_position:{required:!1,value:0},execute_cmd:{type:Function,required:!1},selected_entry:{type:String,required:!1}},data(){return{isMenuOpen:!1,menuPosition:{bottom:"auto",top:"calc(100% + 10px)"}}},methods:{handleClickOutside(t){const e=this.$refs.menu,n=this.$refs.menuButton;e&&!e.contains(t.target)&&!n.contains(t.target)&&(this.isMenuOpen=!1,window.removeEventListener("click",this.handleClickOutside))},toggleMenu(){this.positionMenu(),this.isMenuOpen=!this.isMenuOpen,this.isMenuOpen?window.addEventListener("click",this.handleClickOutside):window.removeEventListener("click",this.handleClickOutside),be(()=>{ve.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected"),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(),be(()=>{ve.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},dOe={class:"menu-container"},uOe=["title"],hOe=["src"],fOe=["data-feather"],pOe={key:2,class:"w-5 h-5"},gOe={key:3,"data-feather":"menu"},mOe={class:"flex-grow menu-ul"},_Oe=["onClick"],bOe={key:0,"data-feather":"check"},yOe=["src","alt"],vOe=["data-feather"],wOe={key:3,class:"menu-icon"};function xOe(t,e,n,s,o,r){return k(),E("div",dOe,[c("button",{onClick:e[0]||(e[0]=de((...i)=>r.toggleMenu&&r.toggleMenu(...i),["prevent"])),title:n.title,class:"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")?(k(),E("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,hOe)):n.icon&&n.icon.includes("feather")?(k(),E("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,fOe)):n.icon&&n.icon.includes("#")?(k(),E("p",pOe,U(n.icon.split("#")[1]),1)):(k(),E("i",gOe))],8,uOe),ae(Os,{name:"slide"},{default:Ne(()=>[o.isMenuOpen?(k(),E("div",{key:0,class:"menu-list flex-grow",style:yt(o.menuPosition),ref:"menu"},[c("ul",mOe,[(k(!0),E(Oe,null,Ve(n.commands,(i,a)=>(k(),E("li",{key:a,onClick:de(l=>r.executeCommand(i),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==i.name?(k(),E("i",bOe)):i.icon&&!i.icon.includes("feather")&&!i.is_file?(k(),E("img",{key:1,src:i.icon,alt:i.name,class:"menu-icon"},null,8,yOe)):L("",!0),i.icon&&i.icon.includes("feather")&&!i.is_file?(k(),E("i",{key:2,"data-feather":i.icon.split(":")[1],class:"mr-2"},null,8,vOe)):(k(),E("span",wOe)),c("span",null,U(i.name),1)],8,_Oe))),128))])],4)):L("",!0)]),_:1})])}const xi=ze(cOe,[["render",xOe]]),kOe={components:{InteractiveMenu:xi},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(){be(()=>{ve.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 Gt(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?mo:this.model.icon},defaultImg(t){t.target.src=mo},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t=!1){this.onSelected(this,t)},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this)},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":"border-0 border-primary bg-primary":"border-transparent"},commandsList(){let t=[{name:this.model.isInstalled?"Uninstall":"Install",icon:"feather:settings",is_file:!1,value:this.toggleInstall},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return 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 Gt(this.speed)},total_size_computed(){return Gt(this.total_size)},downloaded_size_computed(){return Gt(this.downloaded_size)}},watch:{linkNotValid(){be(()=>{ve.replace()})}}},EOe=["title"],COe={key:0,class:"flex flex-row"},AOe={class:"max-w-[300px] overflow-x-auto"},SOe={class:"flex gap-3 items-center grow"},TOe=["href"],MOe=["src"],OOe={class:"flex-1 overflow-hidden"},ROe={class:"font-bold font-large text-lg truncate"},NOe={key:1,class:"flex items-center flex-row gap-2 my-1"},DOe={class:"flex grow items-center"},LOe=c("i",{"data-feather":"box",class:"w-5"},null,-1),IOe=c("span",{class:"sr-only"},"Custom model / local model",-1),POe=[LOe,IOe],FOe=c("span",{class:"sr-only"},"Select",-1),BOe=c("span",{class:"sr-only"},"Remove",-1),$Oe={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"},zOe={class:"relative flex flex-col items-center justify-center flex-grow h-full"},jOe=c("div",{role:"status",class:"justify-center"},[c("svg",{"aria-hidden":"true",class:"w-24 h-24 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),c("span",{class:"sr-only"},"Loading...")],-1),UOe={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},qOe={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},HOe={class:"flex justify-between mb-1"},VOe=c("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1),GOe={class:"text-sm font-medium text-blue-700 dark:text-white"},KOe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},WOe={class:"flex justify-between mb-1"},ZOe={class:"text-base font-medium text-blue-700 dark:text-white"},YOe={class:"text-sm font-medium text-blue-700 dark:text-white"},JOe={class:"flex flex-grow"},QOe={class:"flex flex-row flex-grow gap-3"},XOe={class:"p-2 text-center grow"},eRe={key:3},tRe={class:"flex flex-row items-center gap-3"},nRe=["src"],sRe={class:"font-bold font-large text-lg truncate"},oRe=c("div",{class:"grow"},null,-1),rRe=c("span",{class:"sr-only"},"Select",-1),iRe={class:"flex items-center flex-row-reverse gap-2 my-1"},aRe={class:"flex flex-row items-center"},lRe={key:0,class:"text-base text-red-600 flex items-center mt-1"},cRe=c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),dRe=["title"],uRe={class:""},hRe={class:"flex flex-row items-center"},fRe=c("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1),pRe=c("b",null,"Card: ",-1),gRe=["href","title"],mRe=c("div",{class:"grow"},null,-1),_Re=c("i",{"data-feather":"clipboard",class:"w-5"},null,-1),bRe=[_Re],yRe={class:"flex items-center"},vRe=c("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),wRe=c("b",null,"File size: ",-1),xRe={class:"flex items-center"},kRe=c("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),ERe=c("b",null,"License: ",-1),CRe={class:"flex items-center"},ARe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),SRe=c("b",null,"quantizer: ",-1),TRe=["href"],MRe={class:"flex items-center"},ORe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),RRe=c("b",null,"Model creator: ",-1),NRe=["href"],DRe={class:"flex items-center"},LRe=c("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1),IRe=c("b",null,"Release date: ",-1),PRe={class:"flex items-center"},FRe=c("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1),BRe=c("b",null,"Category: ",-1),$Re=["href"],zRe={class:"flex items-center"},jRe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),URe=c("b",null,"Hugging face rank: ",-1);function qRe(t,e,n,s,o,r){const i=Pe("InteractiveMenu");return k(),E("div",{class:Ce(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",r.computed_classes]),title:n.model.name},[n.model.isCustomModel?(k(),E("div",COe,[c("div",AOe,[c("div",SOe,[c("a",{href:n.model.model_creator_link,target:"_blank"},[c("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,MOe)],8,TOe),c("div",OOe,[c("h3",ROe,U(n.model.name),1)])])])])):L("",!0),n.model.isCustomModel?(k(),E("div",NOe,[c("div",DOe,[c("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=de(()=>{},["stop"]))},POe),xe(" Custom model ")]),n.model.isInstalled?(k(),E("button",{key:0,type:"button",title:"Select",onClick:[e[2]||(e[2]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),e[3]||(e[3]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},[c("i",{"data-feather":"check",class:Ce(n.selected?"border-2 border-blue-300 rounded bg-green-300 w-5":"border-2 border-blue-300 rounded bg-gray-100 w-5")},null,2),FOe])):L("",!0),c("div",null,[n.model.isInstalled?(k(),E("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[4]||(e[4]=de((...a)=>r.toggleInstall&&r.toggleInstall(...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"},[xe(" Uninstall "),BOe])):L("",!0)])])):L("",!0),o.installing?(k(),E("div",$Oe,[c("div",zOe,[jOe,c("div",UOe,[c("div",qOe,[c("div",HOe,[VOe,c("span",GOe,U(Math.floor(o.progress))+"%",1)]),c("div",KOe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:yt({width:o.progress+"%"})},null,4)]),c("div",WOe,[c("span",ZOe,"Download speed: "+U(r.speed_computed)+"/s",1),c("span",YOe,U(r.downloaded_size_computed)+"/"+U(r.total_size_computed),1)])])]),c("div",JOe,[c("div",QOe,[c("div",XOe,[c("button",{onClick:e[5]||(e[5]=de((...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 ")])])])])])):L("",!0),n.model.isCustomModel?L("",!0):(k(),E("div",eRe,[c("div",tRe,[c("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[6]||(e[6]=a=>r.defaultImg(a)),class:Ce(["w-10 h-10 rounded-lg object-fill",o.linkNotValid?"grayscale":""])},null,42,nRe),c("h3",sRe,U(n.model.name),1),oRe,n.model.isInstalled?(k(),E("button",{key:0,type:"button",title:"Select",onClick:[e[7]||(e[7]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),e[8]||(e[8]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},[c("i",{"data-feather":"check",class:Ce(n.selected?"border-2 border-blue-300 rounded bg-green-300 w-5":"border-2 border-blue-300 rounded bg-gray-100 w-5")},null,2),rRe])):L("",!0),ae(i,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),c("div",iRe,[c("div",aRe,[o.linkNotValid?(k(),E("div",lRe,[cRe,xe(" Link is not valid ")])):L("",!0)])]),c("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[c("div",uRe,[c("div",hRe,[fRe,pRe,c("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[9]||(e[9]=de(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:o.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,gRe),mRe,c("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[10]||(e[10]=de(a=>r.toggleCopyLink(),["stop"]))},bRe)]),c("div",yRe,[c("div",{class:Ce(["flex flex-shrink-0 items-center",o.linkNotValid?"text-red-600":""])},[vRe,wRe,xe(" "+U(r.fileSize),1)],2)]),c("div",xRe,[kRe,ERe,xe(" "+U(n.model.license),1)]),c("div",CRe,[ARe,SRe,c("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[11]||(e[11]=de(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},U(n.model.quantizer),9,TRe)]),c("div",MRe,[ORe,RRe,c("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[12]||(e[12]=de(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},U(n.model.model_creator),9,NRe)]),c("div",DRe,[LRe,IRe,xe(" "+U(n.model.last_commit_time),1)]),c("div",PRe,[FRe,BRe,c("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[13]||(e[13]=de(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},U(n.model.category),9,$Re)]),c("div",zRe,[jRe,URe,c("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",rel:"noopener noreferrer",onClick:e[14]||(e[14]=de(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},U(n.model.rank),1)])])],8,dRe)]))],10,EOe)}const HRe=ze(kOe,[["render",qRe]]),VRe={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}}},GRe={class:"p-4"},KRe={class:"flex items-center mb-4"},WRe=["src"],ZRe={class:"text-lg font-semibold"},YRe=c("strong",null,"Author:",-1),JRe=c("strong",null,"Description:",-1),QRe=c("strong",null,"Category:",-1),XRe={key:0},eNe=c("strong",null,"Disclaimer:",-1),tNe=c("strong",null,"Conditioning Text:",-1),nNe=c("strong",null,"AI Prefix:",-1),sNe=c("strong",null,"User Prefix:",-1),oNe=c("strong",null,"Antiprompts:",-1);function rNe(t,e,n,s,o,r){return k(),E("div",GRe,[c("div",KRe,[c("img",{src:o.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,WRe),c("h2",ZRe,U(o.personalityName),1)]),c("p",null,[YRe,xe(" "+U(o.personalityAuthor),1)]),c("p",null,[JRe,xe(" "+U(o.personalityDescription),1)]),c("p",null,[QRe,xe(" "+U(o.personalityCategory),1)]),o.disclaimer?(k(),E("p",XRe,[eNe,xe(" "+U(o.disclaimer),1)])):L("",!0),c("p",null,[tNe,xe(" "+U(o.conditioningText),1)]),c("p",null,[nNe,xe(" "+U(o.aiPrefix),1)]),c("p",null,[sNe,xe(" "+U(o.userPrefix),1)]),c("div",null,[oNe,c("ul",null,[(k(!0),E(Oe,null,Ve(o.antipromptsList,i=>(k(),E("li",{key:i.id},U(i.text),1))),128))])]),c("button",{onClick:e[0]||(e[0]=i=>o.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),o.editMode?(k(),E("button",{key:1,onClick:e[1]||(e[1]=(...i)=>r.commitChanges&&r.commitChanges(...i)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):L("",!0)])}const iNe=ze(VRe,[["render",rNe]]),ss="/assets/logo-9d653710.svg",aNe="/",lNe={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onReinstall:Function,onSettings:Function},components:{InteractiveMenu:xi},data(){return{isMounted:!1,name:this.personality.name}},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 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,be(()=>{ve.replace()})},methods:{getImgUrl(){return aNe+this.personality.avatar},defaultImg(t){t.target.src=ss},toggleTalk(){this.onTalk(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this)},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){be(()=>{ve.replace()})}}},cNe=["title"],dNe={class:"flex flex-row items-center flex-shrink-0 gap-3"},uNe=["src"],hNe={class:""},fNe={class:""},pNe={class:"flex items-center"},gNe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),mNe=c("b",null,"Author: ",-1),_Ne={key:0,class:"flex items-center"},bNe=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),yNe=c("b",null,"Languages: ",-1),vNe=["selected"],wNe={key:1,class:"flex items-center"},xNe=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),kNe=c("b",null,"Languages: ",-1),ENe={class:"flex items-center"},CNe=c("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),ANe=c("b",null,"Category: ",-1),SNe=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),TNe=["title"],MNe={class:"rounded bg-blue-300"},ONe=c("i",{"data-feather":"check"},null,-1),RNe=c("span",{class:"sr-only"},"Select",-1),NNe=[ONe,RNe],DNe=c("i",{"data-feather":"send",class:"w-5"},null,-1),LNe=c("span",{class:"sr-only"},"Talk",-1),INe=[DNe,LNe];function PNe(t,e,n,s,o,r){const i=Pe("InteractiveMenu");return k(),E("div",{class:Ce(["min-w-96 items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",r.selected_computed?"border-2 border-primary-light":"border-transparent",o.isMounted?"bg-blue-200 dark:bg-blue-700":""]),tabindex:"-1",title:n.personality.installed?"":"Not installed"},[c("div",{class:Ce(n.personality.installed?"":"opacity-50")},[c("div",dNe,[c("img",{onClick:e[0]||(e[0]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),ref:"imgElement",src:r.getImgUrl(),onError:e[1]||(e[1]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer"},null,40,uNe),c("h3",{onClick:e[2]||(e[2]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),class:"font-bold font-large text-lg line-clamp-3 cursor-pointer"},U(n.personality.name),1)]),c("div",hNe,[c("div",fNe,[c("div",pNe,[gNe,mNe,xe(" "+U(n.personality.author),1)]),n.personality.languages&&n.select_language?(k(),E("div",_Ne,[bNe,yNe,se(c("select",{id:"languages","onUpdate:modelValue":e[3]||(e[3]=a=>n.personality.language=a),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"},[(k(!0),E(Oe,null,Ve(n.personality.languages,(a,l)=>(k(),E("option",{key:l,selected:a==n.personality.languages[0]},U(a),9,vNe))),128))],512),[[an,n.personality.language]])])):L("",!0),n.personality.language?(k(),E("div",wNe,[xNe,kNe,xe(" "+U(n.personality.language),1)])):L("",!0),c("div",ENe,[CNe,ANe,xe(" "+U(n.personality.category),1)])]),SNe,c("p",{class:"mx-1 opacity-80 h-20 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",title:n.personality.description},U(n.personality.description),9,TNe)]),c("div",MNe,[o.isMounted?(k(),E("button",{key:0,type:"button",title:"Select",onClick:[e[4]||(e[4]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),e[5]||(e[5]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},NNe)):L("",!0),o.isMounted?(k(),E("button",{key:1,type:"button",title:"Talk",onClick:[e[6]||(e[6]=(...a)=>r.toggleTalk&&r.toggleTalk(...a)),e[7]||(e[7]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},INe)):L("",!0),ae(i,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])])],2)],10,cNe)}const jg=ze(lNe,[["render",PNe]]);const FNe={props:{code:String},data(){return{evaluatedCode:""}},watch:{code:{handler(t){this.evaluateScriptTags(t)},immediate:!0}},methods:{evaluateScriptTags(t){const e=document.createElement("div");e.innerHTML=t,e.querySelectorAll("script").forEach(s=>{const o=document.createElement("script");o.textContent=s.textContent,document.body.appendChild(o),document.body.removeChild(o)}),this.evaluatedCode=e.innerHTML}}},BNe=["innerHTML"];function $Ne(t,e,n,s,o,r){return k(),E("div",{innerHTML:o.evaluatedCode},null,8,BNe)}const Ug=ze(FNe,[["render",$Ne]]),zNe="/",jNe={components:{DynamicUIRenderer:Ug},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){be(()=>{ve.replace()})},methods:{getImgUrl(){return zNe+this.binding.icon},defaultImg(t){t.target.src=ss},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(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(){be(()=>{ve.replace()})}}},UNe=["title"],qNe={class:"flex flex-row items-center gap-3"},HNe=["src"],VNe={class:"font-bold font-large text-lg truncate"},GNe=c("div",{class:"grow"},null,-1),KNe={class:"flex-none gap-1"},WNe=c("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),ZNe=c("span",{class:"sr-only"},"Help",-1),YNe=[WNe,ZNe],JNe={class:"flex items-center flex-row-reverse gap-2 my-1"},QNe=c("span",{class:"sr-only"},"Click to install",-1),XNe=c("span",{class:"sr-only"},"Reinstall binding",-1),eDe=c("span",{class:"sr-only"},"Settings",-1),tDe={class:""},nDe={class:""},sDe={class:"flex items-center"},oDe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),rDe=c("b",null,"Author: ",-1),iDe={class:"flex items-center"},aDe=c("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),lDe=c("b",null,"Folder: ",-1),cDe={class:"flex items-center"},dDe=c("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),uDe=c("b",null,"Version: ",-1),hDe={class:"flex items-center"},fDe=c("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),pDe=c("b",null,"Link: ",-1),gDe=["href"],mDe=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),_De=["title"];function bDe(t,e,n,s,o,r){const i=Pe("DynamicUIRenderer");return k(),E("div",{class:Ce(["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[6]||(e[6]=de((...a)=>r.toggleSelected&&r.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[c("div",null,[c("div",qNe,[c("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,HNe),c("h3",VNe,U(n.binding.name),1),GNe,c("div",KNe,[n.selected?(k(),E("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>r.toggleReloadBinding&&r.toggleReloadBinding(...a)),e[2]||(e[2]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},YNe)):L("",!0)])]),c("div",JNe,[n.binding.ui?(k(),et(i,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):L("",!0),n.binding.installed?L("",!0):(k(),E("button",{key:1,title:"Click to install",type:"button",onClick:e[3]||(e[3]=de((...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"},[xe(" Install "),QNe])),n.binding.installed?(k(),E("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=de((...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-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"},[xe(" Reinstall binding "),XNe])):L("",!0),n.selected?(k(),E("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[5]||(e[5]=de((...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"},[xe(" Settings "),eDe])):L("",!0)]),c("div",tDe,[c("div",nDe,[c("div",sDe,[oDe,rDe,xe(" "+U(n.binding.author),1)]),c("div",iDe,[aDe,lDe,xe(" "+U(n.binding.folder),1)]),c("div",cDe,[dDe,uDe,xe(" "+U(n.binding.version),1)]),c("div",hDe,[fDe,pDe,c("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},U(n.binding.link),9,gDe)])]),mDe,c("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description},U(n.binding.description),9,_De)])])],10,UNe)}const yDe=ze(jNe,[["render",bDe]]),vDe={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})}}},wDe={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},xDe={class:"relative w-full max-w-md max-h-full"},kDe={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},EDe=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),CDe=c("span",{class:"sr-only"},"Close modal",-1),ADe=[EDe,CDe],SDe={class:"p-4 text-center"},TDe=c("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),MDe={class:"p-4 text-center mx-auto mb-4"},ODe=c("label",{class:"mr-2"},"Model path",-1);function RDe(t,e,n,s,o,r){return o.show?(k(),E("div",wDe,[c("div",xDe,[c("div",kDe,[c("button",{type:"button",onClick:e[0]||(e[0]=i=>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"},ADe),c("div",SDe,[TDe,c("div",MDe,[ODe,se(c("input",{"onUpdate:modelValue":e[1]||(e[1]=i=>o.model_path=i),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[Re,o.model_path]])]),c("button",{onClick:e[2]||(e[2]=i=>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 "),c("button",{onClick:e[3]||(e[3]=i=>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")])])])])):L("",!0)}const NDe=ze(vDe,[["render",RDe]]),DDe={setup(){return{}},name:"UniversalForm",data(){return{show:!1,resolve:null,controls_array:[],title:"Universal form",ConfirmButtonText:"Submit",DenyButtonText:"Cancel"}},mounted(){be(()=>{ve.replace()})},methods:{hide(t){this.show=!1,this.resolve&&t&&(this.resolve(this.controls_array),this.resolve=null)},showForm(t,e,n,s){this.ConfirmButtonText=n||this.ConfirmButtonText,this.DenyButtonText=s||this.DenyButtonText;for(let o=0;o{this.controls_array=t,this.show=!0,this.title=e||this.title,this.resolve=o,console.log("show foam",this.controls_array)})}},watch:{show(){be(()=>{ve.replace()})}}},LDe={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 p-4"},IDe={class:"relative w-full max-w-md"},PDe={class:"flex flex-col rounded-lg bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel duration-150 shadow-lg max-h-screen"},FDe={class:"flex flex-row flex-grow items-center m-2 p-1"},BDe={class:"grow flex items-center"},$De=c("i",{"data-feather":"sliders",class:"mr-2 flex-shrink-0"},null,-1),zDe={class:"text-lg font-semibold select-none mr-2"},jDe={class:"items-end"},UDe=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),qDe=c("span",{class:"sr-only"},"Close form modal",-1),HDe=[UDe,qDe],VDe={class:"flex flex-col relative no-scrollbar overflow-y-scroll p-2"},GDe={class:"px-2"},KDe={key:0},WDe={key:0},ZDe={class:"text-base font-semibold"},YDe={key:0,class:"relative inline-flex"},JDe=["onUpdate:modelValue"],QDe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),XDe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},eLe=["onUpdate:modelValue"],tLe={key:1},nLe={class:"text-base font-semibold"},sLe={key:0,class:"relative inline-flex"},oLe=["onUpdate:modelValue"],rLe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),iLe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},aLe=["onUpdate:modelValue"],lLe=["value","selected"],cLe={key:1},dLe={class:"text-base font-semibold"},uLe={key:0,class:"relative inline-flex"},hLe=["onUpdate:modelValue"],fLe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),pLe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},gLe=["onUpdate:modelValue"],mLe=["onUpdate:modelValue","min","max"],_Le={key:2},bLe={class:"mb-2 relative flex items-center gap-2"},yLe={for:"default-checkbox",class:"text-base font-semibold"},vLe=["onUpdate:modelValue"],wLe={key:0,class:"relative inline-flex"},xLe=["onUpdate:modelValue"],kLe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),ELe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},CLe={key:3},ALe={class:"text-base font-semibold"},SLe={key:0,class:"relative inline-flex"},TLe=["onUpdate:modelValue"],MLe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),OLe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},RLe=["onUpdate:modelValue"],NLe=c("hr",{class:"h-px my-4 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),DLe={class:"flex flex-row flex-grow gap-3"},LLe={class:"p-2 text-center grow"};function ILe(t,e,n,s,o,r){return o.show?(k(),E("div",LDe,[c("div",IDe,[c("div",PDe,[c("div",FDe,[c("div",BDe,[$De,c("h3",zDe,U(o.title),1)]),c("div",jDe,[c("button",{type:"button",onClick:e[0]||(e[0]=de(i=>r.hide(!1),["stop"])),title:"Close",class:"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"},HDe)])]),c("div",VDe,[(k(!0),E(Oe,null,Ve(o.controls_array,(i,a)=>(k(),E("div",GDe,[i.type=="str"?(k(),E("div",KDe,[i.options?L("",!0):(k(),E("div",WDe,[c("label",{class:Ce(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",ZDe,U(i.name)+": ",1),i.help?(k(),E("label",YDe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,JDe),[[Xe,i.isHelp]]),QDe])):L("",!0)],2),i.isHelp?(k(),E("p",XDe,U(i.help),1)):L("",!0),se(c("input",{type:"text","onUpdate:modelValue":l=>i.value=l,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 string"},null,8,eLe),[[Re,i.value]])])),i.options?(k(),E("div",tLe,[c("label",{class:Ce(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",nLe,U(i.name)+": ",1),i.help?(k(),E("label",sLe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,oLe),[[Xe,i.isHelp]]),rLe])):L("",!0)],2),i.isHelp?(k(),E("p",iLe,U(i.help),1)):L("",!0),se(c("select",{"onUpdate:modelValue":l=>i.value=l,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"},[(k(!0),E(Oe,null,Ve(i.options,l=>(k(),E("option",{value:l,selected:i.value===l},U(l),9,lLe))),256))],8,aLe),[[an,i.value]])])):L("",!0)])):L("",!0),i.type=="int"||i.type=="float"?(k(),E("div",cLe,[c("label",{class:Ce(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",dLe,U(i.name)+": ",1),i.help?(k(),E("label",uLe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,hLe),[[Xe,i.isHelp]]),fLe])):L("",!0)],2),i.isHelp?(k(),E("p",pLe,U(i.help),1)):L("",!0),se(c("input",{type:"number","onUpdate:modelValue":l=>i.value=l,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 number"},null,8,gLe),[[Re,i.value]]),i.min!=null&&i.max!=null?se((k(),E("input",{key:1,type:"range","onUpdate:modelValue":l=>i.value=l,min:i.min,max:i.max,step:"0.1",class:"flex-none h-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,8,mLe)),[[Re,i.value]]):L("",!0)])):L("",!0),i.type=="bool"?(k(),E("div",_Le,[c("div",bLe,[c("label",yLe,U(i.name)+": ",1),se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.value=l,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-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"},null,8,vLe),[[Xe,i.value]]),i.help?(k(),E("label",wLe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,xLe),[[Xe,i.isHelp]]),kLe])):L("",!0)]),i.isHelp?(k(),E("p",ELe,U(i.help),1)):L("",!0)])):L("",!0),i.type=="list"?(k(),E("div",CLe,[c("label",{class:Ce(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",ALe,U(i.name)+": ",1),i.help?(k(),E("label",SLe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,TLe),[[Xe,i.isHelp]]),MLe])):L("",!0)],2),i.isHelp?(k(),E("p",OLe,U(i.help),1)):L("",!0),se(c("input",{type:"text","onUpdate:modelValue":l=>i.value=l,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 comma separated values"},null,8,RLe),[[Re,i.value]])])):L("",!0),NLe]))),256)),c("div",DLe,[c("div",LLe,[c("button",{onClick:e[1]||(e[1]=de(i=>r.hide(!0),["stop"])),type:"button",class:"mr-2 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 sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},U(o.ConfirmButtonText),1),c("button",{onClick:e[2]||(e[2]=de(i=>r.hide(!1),["stop"])),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-11 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"},U(o.DenyButtonText),1)])])])])])])):L("",!0)}const xc=ze(DDe,[["render",ILe]]);const PLe={props:{show:{type:Boolean,required:!0},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null}},methods:{selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated")},formatSize(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"}}},FLe={key:0,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50"},BLe={class:"bg-white dark:bg-gray-800 rounded-lg p-6 w-96"},$Le={class:"text-xl font-semibold mb-4"},zLe={class:"h-48 overflow-y-auto"},jLe=["onClick"],ULe={class:"font-bold"},qLe=c("br",null,null,-1),HLe={class:"text-xs text-gray-500"},VLe={class:"flex justify-end mt-4"},GLe=["disabled"];function KLe(t,e,n,s,o,r){return k(),et(Os,{name:"fade"},{default:Ne(()=>[n.show?(k(),E("div",FLe,[c("div",BLe,[c("h2",$Le,U(n.title),1),c("div",zLe,[c("ul",null,[(k(!0),E(Oe,null,Ve(n.choices,(i,a)=>(k(),E("li",{key:a,onClick:l=>r.selectChoice(i),class:Ce([{"selected-choice":i===o.selectedChoice},"py-2 px-4 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700"])},[c("span",ULe,U(i.name),1),qLe,c("span",HLe,U(this.formatSize(i.size)),1)],10,jLe))),128))])]),c("div",VLe,[c("button",{onClick:e[0]||(e[0]=(...i)=>r.closeDialog&&r.closeDialog(...i)),class:"py-2 px-4 mr-2 bg-red-500 hover:bg-red-600 text-white rounded-lg transition duration-300"}," Cancel "),c("button",{onClick:e[1]||(e[1]=(...i)=>r.validateChoice&&r.validateChoice(...i)),class:Ce([{"bg-gray-400 cursor-not-allowed":!o.selectedChoice,"bg-blue-500 hover:bg-blue-600":o.selectedChoice,"text-white":o.selectedChoice,"text-gray-500":!o.selectedChoice},"py-2 px-4 rounded-lg transition duration-300"]),disabled:!o.selectedChoice}," Validate ",10,GLe)])])])):L("",!0)]),_:1})}const WLe=ze(PLe,[["render",KLe]]),ZLe={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:0}},data(){return{selectedValue:this.defaultValue}},methods:{handleRadioChange(t){this.selectedValue!==null&&this.$emit("radio-selected",this.selectedValue,t)}}},YLe={class:"flex space-x-4"},JLe=["value","onChange"],QLe={class:"text-gray-700"};function XLe(t,e,n,s,o,r){return k(),E("div",YLe,[(k(!0),E(Oe,null,Ve(n.radioOptions,(i,a)=>(k(),E("label",{key:i.value,class:"flex items-center space-x-2"},[se(c("input",{type:"radio",value:i.value,"onUpdate:modelValue":e[0]||(e[0]=l=>o.selectedValue=l),onChange:l=>r.handleRadioChange(a),class:"text-blue-500 focus:ring-2 focus:ring-blue-200"},null,40,JLe),[[Y1,o.selectedValue]]),c("span",QLe,U(i.label),1)]))),128))])}const eIe=ze(ZLe,[["render",XLe]]);const tIe="/";ye.defaults.baseURL="/";const nIe={components:{AddModelDialog:NDe,MessageBox:zg,YesNoDialog:lOe,ModelEntry:HRe,PersonalityViewer:iNe,Toast:Ys,PersonalityEntry:jg,BindingEntry:yDe,UniversalForm:xc,ChoiceDialog:WLe,Card:jo,RadioOptions:eIe},data(){return{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}],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,minconf_collapsed:!0,bec_collapsed:!0,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,bzl_collapsed:!1,persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:tIe,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){Ee.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{async selectSortOption(t){this.$store.state.sort_type=t,this.$store.dispatch("refreshModelsZoo"),this.modelsFiltered=this.models,console.log(`Selected sorting:${t}`)},handleRadioSelected(t){this.isLoading=!0,this.selectSortOption(t).then(()=>{this.isLoading=!1})},filter_installed(t){return console.log("filtering"),t.filter(e=>e.isInstalled===!0)},getVoices(){"speechSynthesis"in window&&(this.audioVoices=speechSynthesis.getVoices(),!this.audio_out_voice&&this.audioVoices.length>0&&(this.audio_out_voice=this.audioVoices[0].name),speechSynthesis.onvoiceschanged=()=>{})},async updateHasUpdates(){let t=await this.api_get_req("check_update");this.has_updates=t.update_availability,console.log("has_updates",this.has_updates)},onVariantChoiceSelected(t){this.selected_variant=t},oncloseVariantChoiceDialog(){this.variantSelectionDialogVisible=!1},onvalidateVariantChoice(){this.variantSelectionDialogVisible=!1,this.currenModelToInstall.installing=!0;let t=this.currenModelToInstall;if(t.linkNotValid){t.installing=!1,this.$refs.toast.showToast("Link is not valid, file does not exist",4,!1);return}let e="https://huggingface.co/"+t.model.quantizer+"/"+t.model.name+"/resolve/main/"+this.selected_variant.name;this.showProgress=!0,this.progress=0,this.addModel={model_name:this.selected_variant.name,binding_folder:this.configFile.binding_name,model_url:e},console.log("installing...",this.addModel);const n=s=>{if(console.log("received something"),s.status&&s.progress<=100){if(this.addModel=s,console.log("Progress",s),t.progress=s.progress,t.speed=s.speed,t.total_size=s.total_size,t.downloaded_size=s.downloaded_size,t.start_time=s.start_time,t.installing=!0,t.progress==100){const o=this.models.findIndex(r=>r.name===t.model.name);this.models[o].isInstalled=!0,this.showProgress=!1,t.installing=!1,console.log("Received succeeded"),Ee.off("install_progress",n),console.log("Installed successfully"),this.$refs.toast.showToast(`Model: +`);var T=0,H=!1;this.parse=function(G,we,_e){if(typeof G!="string")throw new Error("Input must be a string");var te=G.length,ke=M.length,Te=I.length,N=B.length,Q=D(J),V=[],ne=[],ee=[],ge=T=0;if(!G)return We();if(y.header&&!we){var he=G.split(I)[0].split(M),w=[],A={},F=!1;for(var $ in he){var z=he[$];D(y.transformHeader)&&(z=y.transformHeader(z,$));var oe=z,le=A[z]||0;for(0=P)return We(!0)}else for(fe=T,T++;;){if((fe=G.indexOf(C,fe+1))===-1)return _e||ne.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:V.length,index:T}),Me();if(fe===te-1)return Me(G.substring(T,fe).replace(pe,C));if(C!==Z||G[fe+1]!==Z){if(C===Z||fe===0||G[fe-1]!==Z){Y!==-1&&Y=P)return We(!0);break}ne.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:V.length,index:T}),fe++}}else fe++}return Me();function ie(nt){V.push(nt),ge=T}function me(nt){var ot=0;if(nt!==-1){var ct=G.substring(fe+1,nt);ct&&ct.trim()===""&&(ot=ct.length)}return ot}function Me(nt){return _e||(nt===void 0&&(nt=G.substring(T)),ee.push(nt),T=te,ie(ee),Q&&Fe()),We()}function $e(nt){T=nt,ie(ee),ee=[],ce=G.indexOf(I,T)}function We(nt){return{data:V,errors:ne,meta:{delimiter:M,linebreak:I,aborted:H,truncated:!!nt,cursor:ge+(we||0)}}}function Fe(){J(We()),V=[],ne=[]}},this.abort=function(){H=!0},this.getCharIndex=function(){return T}}function b(y){var C=y.data,M=i[C.workerId],I=!1;if(C.error)M.userError(C.error,C.file);else if(C.results&&C.results.data){var B={abort:function(){I=!0,x(C.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:S,resume:S};if(D(M.userStep)){for(var J=0;Jt.text()).then(t=>{const{data:e}=AMe.parse(t,{header:!0});console.log("Recovered data"),console.log(e),this.faqs=e}).catch(t=>{console.error("Error loading FAQs:",t)})},parseMultiline(t){return t.replace(/\n/g,"
")}}},mn=t=>(is("data-v-c8c43118"),t=t(),as(),t),TMe={class:"container mx-auto p-4 bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},MMe=mn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"About Lord of large Language Models",-1)),OMe={class:"mb-4"},RMe=mn(()=>c("p",null,[xe("Discord link: "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:"https://discord.gg/C73K7hjy"},"https://discord.gg/C73K7hjy")],-1)),NMe=mn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Frequently Asked Questions",-1)),DMe={class:"list-disc pl-4"},LMe={class:"text-xl font-bold mb-1"},IMe=["innerHTML"],PMe=mn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Contact Us",-1)),FMe=mn(()=>c("p",{class:"mb-4"},"If you have any further questions or need assistance, feel free to reach out to me.",-1)),BMe=mn(()=>c("p",null,[xe("Discord link: "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:"https://discord.gg/C73K7hjy"},"https://discord.gg/C73K7hjy")],-1)),$Me=mn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Credits",-1)),zMe=mn(()=>c("p",{class:"mb-4"},[xe("This project is developed by "),c("span",{class:"font-bold"},"ParisNeo"),xe(" With help from the community.")],-1)),jMe=mn(()=>c("p",{class:"mb-4"},[c("span",{class:"font-bold"},[c("a",{href:"https://github.com/ParisNeo/lollms-webui/graphs/contributors"},"Check out the full list of developers here and show them some love.")])],-1)),UMe=["href"];function qMe(t,e,n,s,o,r){const i=Pe("Card");return k(),E("div",TMe,[ae(i,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[MMe,c("p",OMe," Lollms version "+U(r.version),1),RMe]),_:1}),ae(i,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[NMe,c("ul",DMe,[(k(!0),E(Oe,null,Ve(o.faqs,(a,l)=>(k(),E("li",{key:l},[c("h3",LMe,U(a.question),1),c("p",{class:"mb-4",innerHTML:r.parseMultiline(a.answer)},null,8,IMe)]))),128))])]),_:1}),ae(i,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[PMe,FMe,BMe]),_:1}),ae(i,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[$Me,zMe,jMe,c("p",null,[xe("Check out the project on "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:o.githubLink,target:"_blank",rel:"noopener noreferrer"},"GitHub",8,UMe),xe(".")])]),_:1})])}const HMe=ze(SMe,[["render",qMe],["__scopeId","data-v-c8c43118"]]);function Gt(t,e=!0,n=1){const s=e?1e3:1024;if(Math.abs(t)=s&&rr.hide&&r.hide(...i)),class:"bg-primary hover:bg-primary-light active:scale-95 duration-150 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-secondary-dark"}," OK ")])])])):L("",!0)}const zg=ze(VMe,[["render",YMe]]),JMe={data(){return{show:!1,message:"",resolve:null,ConfirmButtonText:"Yes, I'm sure",DenyButtonText:"No, cancel"}},methods:{hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},askQuestion(t,e,n){return this.ConfirmButtonText=e||this.ConfirmButtonText,this.DenyButtonText=n||this.DenyButtonText,new Promise(s=>{this.message=t,this.show=!0,this.resolve=s})}}},QMe={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},XMe={class:"relative w-full max-w-md max-h-full"},eOe={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},tOe=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),nOe=c("span",{class:"sr-only"},"Close modal",-1),sOe=[tOe,nOe],oOe={class:"p-4 text-center"},rOe=c("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),iOe={class:"mb-5 text-lg font-normal text-gray-500 dark:text-gray-400 select-none break-all"};function aOe(t,e,n,s,o,r){return o.show?(k(),E("div",QMe,[c("div",XMe,[c("div",eOe,[c("button",{type:"button",onClick:e[0]||(e[0]=i=>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"},sOe),c("div",oOe,[rOe,c("h3",iOe,U(o.message),1),c("button",{onClick:e[1]||(e[1]=i=>r.hide(!0)),type:"button",class:"text-white bg-red-600 hover:bg-red-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"},U(o.ConfirmButtonText),1),c("button",{onClick:e[2]||(e[2]=i=>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"},U(o.DenyButtonText),1)])])])])):L("",!0)}const lOe=ze(JMe,[["render",aOe]]),mo="/assets/default_model-9e24e852.png";const cOe={props:{title:{type:String,required:!1,value:"menu"},icon:{type:String,required:!1,value:"feather:menu"},commands:{type:Array,required:!0},force_position:{required:!1,value:0},execute_cmd:{type:Function,required:!1},selected_entry:{type:String,required:!1}},data(){return{isMenuOpen:!1,menuPosition:{bottom:"auto",top:"calc(100% + 10px)"}}},methods:{handleClickOutside(t){const e=this.$refs.menu,n=this.$refs.menuButton;e&&!e.contains(t.target)&&!n.contains(t.target)&&(this.isMenuOpen=!1,window.removeEventListener("click",this.handleClickOutside))},toggleMenu(){this.positionMenu(),this.isMenuOpen=!this.isMenuOpen,this.isMenuOpen?window.addEventListener("click",this.handleClickOutside):window.removeEventListener("click",this.handleClickOutside),be(()=>{ve.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected"),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(),be(()=>{ve.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},dOe={class:"menu-container"},uOe=["title"],hOe=["src"],fOe=["data-feather"],pOe={key:2,class:"w-5 h-5"},gOe={key:3,"data-feather":"menu"},mOe={class:"flex-grow menu-ul"},_Oe=["onClick"],bOe={key:0,"data-feather":"check"},yOe=["src","alt"],vOe=["data-feather"],wOe={key:3,class:"menu-icon"};function xOe(t,e,n,s,o,r){return k(),E("div",dOe,[c("button",{onClick:e[0]||(e[0]=de((...i)=>r.toggleMenu&&r.toggleMenu(...i),["prevent"])),title:n.title,class:"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")?(k(),E("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,hOe)):n.icon&&n.icon.includes("feather")?(k(),E("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,fOe)):n.icon&&n.icon.includes("#")?(k(),E("p",pOe,U(n.icon.split("#")[1]),1)):(k(),E("i",gOe))],8,uOe),ae(Os,{name:"slide"},{default:Ne(()=>[o.isMenuOpen?(k(),E("div",{key:0,class:"menu-list flex-grow",style:yt(o.menuPosition),ref:"menu"},[c("ul",mOe,[(k(!0),E(Oe,null,Ve(n.commands,(i,a)=>(k(),E("li",{key:a,onClick:de(l=>r.executeCommand(i),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==i.name?(k(),E("i",bOe)):i.icon&&!i.icon.includes("feather")&&!i.is_file?(k(),E("img",{key:1,src:i.icon,alt:i.name,class:"menu-icon"},null,8,yOe)):L("",!0),i.icon&&i.icon.includes("feather")&&!i.is_file?(k(),E("i",{key:2,"data-feather":i.icon.split(":")[1],class:"mr-2"},null,8,vOe)):(k(),E("span",wOe)),c("span",null,U(i.name),1)],8,_Oe))),128))])],4)):L("",!0)]),_:1})])}const xi=ze(cOe,[["render",xOe]]),kOe={components:{InteractiveMenu:xi},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(){be(()=>{ve.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 Gt(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?mo:this.model.icon},defaultImg(t){t.target.src=mo},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t=!1){this.onSelected(this,t)},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this)},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":"border-0 border-primary bg-primary":"border-transparent"},commandsList(){let t=[{name:this.model.isInstalled?"Uninstall":"Install",icon:"feather:settings",is_file:!1,value:this.toggleInstall},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return 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 Gt(this.speed)},total_size_computed(){return Gt(this.total_size)},downloaded_size_computed(){return Gt(this.downloaded_size)}},watch:{linkNotValid(){be(()=>{ve.replace()})}}},EOe=["title"],COe={key:0,class:"flex flex-row"},AOe={class:"max-w-[300px] overflow-x-auto"},SOe={class:"flex gap-3 items-center grow"},TOe=["href"],MOe=["src"],OOe={class:"flex-1 overflow-hidden"},ROe={class:"font-bold font-large text-lg truncate"},NOe={key:1,class:"flex items-center flex-row gap-2 my-1"},DOe={class:"flex grow items-center"},LOe=c("i",{"data-feather":"box",class:"w-5"},null,-1),IOe=c("span",{class:"sr-only"},"Custom model / local model",-1),POe=[LOe,IOe],FOe=c("span",{class:"sr-only"},"Select",-1),BOe=c("span",{class:"sr-only"},"Remove",-1),$Oe={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"},zOe={class:"relative flex flex-col items-center justify-center flex-grow h-full"},jOe=c("div",{role:"status",class:"justify-center"},[c("svg",{"aria-hidden":"true",class:"w-24 h-24 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),c("span",{class:"sr-only"},"Loading...")],-1),UOe={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},qOe={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},HOe={class:"flex justify-between mb-1"},VOe=c("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1),GOe={class:"text-sm font-medium text-blue-700 dark:text-white"},KOe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},WOe={class:"flex justify-between mb-1"},ZOe={class:"text-base font-medium text-blue-700 dark:text-white"},YOe={class:"text-sm font-medium text-blue-700 dark:text-white"},JOe={class:"flex flex-grow"},QOe={class:"flex flex-row flex-grow gap-3"},XOe={class:"p-2 text-center grow"},eRe={key:3},tRe={class:"flex flex-row items-center gap-3"},nRe=["src"],sRe={class:"font-bold font-large text-lg truncate"},oRe=c("div",{class:"grow"},null,-1),rRe=c("span",{class:"sr-only"},"Select",-1),iRe={class:"flex items-center flex-row-reverse gap-2 my-1"},aRe={class:"flex flex-row items-center"},lRe={key:0,class:"text-base text-red-600 flex items-center mt-1"},cRe=c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),dRe=["title"],uRe={class:""},hRe={class:"flex flex-row items-center"},fRe=c("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1),pRe=c("b",null,"Card: ",-1),gRe=["href","title"],mRe=c("div",{class:"grow"},null,-1),_Re=c("i",{"data-feather":"clipboard",class:"w-5"},null,-1),bRe=[_Re],yRe={class:"flex items-center"},vRe=c("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),wRe=c("b",null,"File size: ",-1),xRe={class:"flex items-center"},kRe=c("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),ERe=c("b",null,"License: ",-1),CRe={class:"flex items-center"},ARe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),SRe=c("b",null,"quantizer: ",-1),TRe=["href"],MRe={class:"flex items-center"},ORe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),RRe=c("b",null,"Model creator: ",-1),NRe=["href"],DRe={class:"flex items-center"},LRe=c("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1),IRe=c("b",null,"Release date: ",-1),PRe={class:"flex items-center"},FRe=c("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1),BRe=c("b",null,"Category: ",-1),$Re=["href"],zRe={class:"flex items-center"},jRe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),URe=c("b",null,"Hugging face rank: ",-1);function qRe(t,e,n,s,o,r){const i=Pe("InteractiveMenu");return k(),E("div",{class:Ce(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",r.computed_classes]),title:n.model.name},[n.model.isCustomModel?(k(),E("div",COe,[c("div",AOe,[c("div",SOe,[c("a",{href:n.model.model_creator_link,target:"_blank"},[c("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,MOe)],8,TOe),c("div",OOe,[c("h3",ROe,U(n.model.name),1)])])])])):L("",!0),n.model.isCustomModel?(k(),E("div",NOe,[c("div",DOe,[c("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=de(()=>{},["stop"]))},POe),xe(" Custom model ")]),n.model.isInstalled?(k(),E("button",{key:0,type:"button",title:"Select",onClick:[e[2]||(e[2]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),e[3]||(e[3]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},[c("i",{"data-feather":"check",class:Ce(n.selected?"border-2 border-blue-300 rounded bg-green-300 w-5":"border-2 border-blue-300 rounded bg-gray-100 w-5")},null,2),FOe])):L("",!0),c("div",null,[n.model.isInstalled?(k(),E("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[4]||(e[4]=de((...a)=>r.toggleInstall&&r.toggleInstall(...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"},[xe(" Uninstall "),BOe])):L("",!0)])])):L("",!0),o.installing?(k(),E("div",$Oe,[c("div",zOe,[jOe,c("div",UOe,[c("div",qOe,[c("div",HOe,[VOe,c("span",GOe,U(Math.floor(o.progress))+"%",1)]),c("div",KOe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:yt({width:o.progress+"%"})},null,4)]),c("div",WOe,[c("span",ZOe,"Download speed: "+U(r.speed_computed)+"/s",1),c("span",YOe,U(r.downloaded_size_computed)+"/"+U(r.total_size_computed),1)])])]),c("div",JOe,[c("div",QOe,[c("div",XOe,[c("button",{onClick:e[5]||(e[5]=de((...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 ")])])])])])):L("",!0),n.model.isCustomModel?L("",!0):(k(),E("div",eRe,[c("div",tRe,[c("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[6]||(e[6]=a=>r.defaultImg(a)),class:Ce(["w-10 h-10 rounded-lg object-fill",o.linkNotValid?"grayscale":""])},null,42,nRe),c("h3",sRe,U(n.model.name),1),oRe,n.model.isInstalled?(k(),E("button",{key:0,type:"button",title:"Select",onClick:[e[7]||(e[7]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),e[8]||(e[8]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},[c("i",{"data-feather":"check",class:Ce(n.selected?"border-2 border-blue-300 rounded bg-green-300 w-5":"border-2 border-blue-300 rounded bg-gray-100 w-5")},null,2),rRe])):L("",!0),ae(i,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),c("div",iRe,[c("div",aRe,[o.linkNotValid?(k(),E("div",lRe,[cRe,xe(" Link is not valid ")])):L("",!0)])]),c("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[c("div",uRe,[c("div",hRe,[fRe,pRe,c("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[9]||(e[9]=de(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:o.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,gRe),mRe,c("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[10]||(e[10]=de(a=>r.toggleCopyLink(),["stop"]))},bRe)]),c("div",yRe,[c("div",{class:Ce(["flex flex-shrink-0 items-center",o.linkNotValid?"text-red-600":""])},[vRe,wRe,xe(" "+U(r.fileSize),1)],2)]),c("div",xRe,[kRe,ERe,xe(" "+U(n.model.license),1)]),c("div",CRe,[ARe,SRe,c("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[11]||(e[11]=de(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},U(n.model.quantizer),9,TRe)]),c("div",MRe,[ORe,RRe,c("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[12]||(e[12]=de(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},U(n.model.model_creator),9,NRe)]),c("div",DRe,[LRe,IRe,xe(" "+U(n.model.last_commit_time),1)]),c("div",PRe,[FRe,BRe,c("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[13]||(e[13]=de(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},U(n.model.category),9,$Re)]),c("div",zRe,[jRe,URe,c("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",rel:"noopener noreferrer",onClick:e[14]||(e[14]=de(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},U(n.model.rank),1)])])],8,dRe)]))],10,EOe)}const HRe=ze(kOe,[["render",qRe]]),VRe={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}}},GRe={class:"p-4"},KRe={class:"flex items-center mb-4"},WRe=["src"],ZRe={class:"text-lg font-semibold"},YRe=c("strong",null,"Author:",-1),JRe=c("strong",null,"Description:",-1),QRe=c("strong",null,"Category:",-1),XRe={key:0},eNe=c("strong",null,"Disclaimer:",-1),tNe=c("strong",null,"Conditioning Text:",-1),nNe=c("strong",null,"AI Prefix:",-1),sNe=c("strong",null,"User Prefix:",-1),oNe=c("strong",null,"Antiprompts:",-1);function rNe(t,e,n,s,o,r){return k(),E("div",GRe,[c("div",KRe,[c("img",{src:o.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,WRe),c("h2",ZRe,U(o.personalityName),1)]),c("p",null,[YRe,xe(" "+U(o.personalityAuthor),1)]),c("p",null,[JRe,xe(" "+U(o.personalityDescription),1)]),c("p",null,[QRe,xe(" "+U(o.personalityCategory),1)]),o.disclaimer?(k(),E("p",XRe,[eNe,xe(" "+U(o.disclaimer),1)])):L("",!0),c("p",null,[tNe,xe(" "+U(o.conditioningText),1)]),c("p",null,[nNe,xe(" "+U(o.aiPrefix),1)]),c("p",null,[sNe,xe(" "+U(o.userPrefix),1)]),c("div",null,[oNe,c("ul",null,[(k(!0),E(Oe,null,Ve(o.antipromptsList,i=>(k(),E("li",{key:i.id},U(i.text),1))),128))])]),c("button",{onClick:e[0]||(e[0]=i=>o.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),o.editMode?(k(),E("button",{key:1,onClick:e[1]||(e[1]=(...i)=>r.commitChanges&&r.commitChanges(...i)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):L("",!0)])}const iNe=ze(VRe,[["render",rNe]]),ss="/assets/logo-9d653710.svg",aNe="/",lNe={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onReinstall:Function,onSettings:Function},components:{InteractiveMenu:xi},data(){return{isMounted:!1,name:this.personality.name}},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 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,be(()=>{ve.replace()})},methods:{getImgUrl(){return aNe+this.personality.avatar},defaultImg(t){t.target.src=ss},toggleTalk(){this.onTalk(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this)},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){be(()=>{ve.replace()})}}},cNe=["title"],dNe={class:"flex flex-row items-center flex-shrink-0 gap-3"},uNe=["src"],hNe={class:""},fNe={class:""},pNe={class:"flex items-center"},gNe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),mNe=c("b",null,"Author: ",-1),_Ne={key:0,class:"flex items-center"},bNe=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),yNe=c("b",null,"Languages: ",-1),vNe=["selected"],wNe={key:1,class:"flex items-center"},xNe=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),kNe=c("b",null,"Languages: ",-1),ENe={class:"flex items-center"},CNe=c("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),ANe=c("b",null,"Category: ",-1),SNe=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),TNe=["title"],MNe={class:"rounded bg-blue-300"},ONe=c("i",{"data-feather":"check"},null,-1),RNe=c("span",{class:"sr-only"},"Select",-1),NNe=[ONe,RNe],DNe=c("i",{"data-feather":"send",class:"w-5"},null,-1),LNe=c("span",{class:"sr-only"},"Talk",-1),INe=[DNe,LNe];function PNe(t,e,n,s,o,r){const i=Pe("InteractiveMenu");return k(),E("div",{class:Ce(["min-w-96 items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",r.selected_computed?"border-2 border-primary-light":"border-transparent",o.isMounted?"bg-blue-200 dark:bg-blue-700":""]),tabindex:"-1",title:n.personality.installed?"":"Not installed"},[c("div",{class:Ce(n.personality.installed?"":"opacity-50")},[c("div",dNe,[c("img",{onClick:e[0]||(e[0]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),ref:"imgElement",src:r.getImgUrl(),onError:e[1]||(e[1]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer"},null,40,uNe),c("h3",{onClick:e[2]||(e[2]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),class:"font-bold font-large text-lg line-clamp-3 cursor-pointer"},U(n.personality.name),1)]),c("div",hNe,[c("div",fNe,[c("div",pNe,[gNe,mNe,xe(" "+U(n.personality.author),1)]),n.personality.languages&&n.select_language?(k(),E("div",_Ne,[bNe,yNe,se(c("select",{id:"languages","onUpdate:modelValue":e[3]||(e[3]=a=>n.personality.language=a),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"},[(k(!0),E(Oe,null,Ve(n.personality.languages,(a,l)=>(k(),E("option",{key:l,selected:a==n.personality.languages[0]},U(a),9,vNe))),128))],512),[[an,n.personality.language]])])):L("",!0),n.personality.language?(k(),E("div",wNe,[xNe,kNe,xe(" "+U(n.personality.language),1)])):L("",!0),c("div",ENe,[CNe,ANe,xe(" "+U(n.personality.category),1)])]),SNe,c("p",{class:"mx-1 opacity-80 h-20 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",title:n.personality.description},U(n.personality.description),9,TNe)]),c("div",MNe,[o.isMounted?(k(),E("button",{key:0,type:"button",title:"Select",onClick:[e[4]||(e[4]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),e[5]||(e[5]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},NNe)):L("",!0),o.isMounted?(k(),E("button",{key:1,type:"button",title:"Talk",onClick:[e[6]||(e[6]=(...a)=>r.toggleTalk&&r.toggleTalk(...a)),e[7]||(e[7]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},INe)):L("",!0),ae(i,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])])],2)],10,cNe)}const jg=ze(lNe,[["render",PNe]]);const FNe={props:{code:String},data(){return{evaluatedCode:""}},watch:{code:{handler(t){this.evaluateScriptTags(t)},immediate:!0}},methods:{evaluateScriptTags(t){const e=document.createElement("div");e.innerHTML=t,e.querySelectorAll("script").forEach(s=>{const o=document.createElement("script");o.textContent=s.textContent,document.body.appendChild(o),document.body.removeChild(o)}),this.evaluatedCode=e.innerHTML}}},BNe=["innerHTML"];function $Ne(t,e,n,s,o,r){return k(),E("div",{innerHTML:o.evaluatedCode},null,8,BNe)}const Ug=ze(FNe,[["render",$Ne]]),zNe="/",jNe={components:{DynamicUIRenderer:Ug},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){be(()=>{ve.replace()})},methods:{getImgUrl(){return zNe+this.binding.icon},defaultImg(t){t.target.src=ss},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(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(){be(()=>{ve.replace()})}}},UNe=["title"],qNe={class:"flex flex-row items-center gap-3"},HNe=["src"],VNe={class:"font-bold font-large text-lg truncate"},GNe=c("div",{class:"grow"},null,-1),KNe={class:"flex-none gap-1"},WNe=c("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),ZNe=c("span",{class:"sr-only"},"Help",-1),YNe=[WNe,ZNe],JNe={class:"flex items-center flex-row-reverse gap-2 my-1"},QNe=c("span",{class:"sr-only"},"Click to install",-1),XNe=c("span",{class:"sr-only"},"Reinstall binding",-1),eDe=c("span",{class:"sr-only"},"Settings",-1),tDe={class:""},nDe={class:""},sDe={class:"flex items-center"},oDe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),rDe=c("b",null,"Author: ",-1),iDe={class:"flex items-center"},aDe=c("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),lDe=c("b",null,"Folder: ",-1),cDe={class:"flex items-center"},dDe=c("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),uDe=c("b",null,"Version: ",-1),hDe={class:"flex items-center"},fDe=c("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),pDe=c("b",null,"Link: ",-1),gDe=["href"],mDe=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),_De=["title"];function bDe(t,e,n,s,o,r){const i=Pe("DynamicUIRenderer");return k(),E("div",{class:Ce(["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[6]||(e[6]=de((...a)=>r.toggleSelected&&r.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[c("div",null,[c("div",qNe,[c("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,HNe),c("h3",VNe,U(n.binding.name),1),GNe,c("div",KNe,[n.selected?(k(),E("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>r.toggleReloadBinding&&r.toggleReloadBinding(...a)),e[2]||(e[2]=de(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},YNe)):L("",!0)])]),c("div",JNe,[n.binding.installed?L("",!0):(k(),E("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=de((...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"},[xe(" Install "),QNe])),n.binding.installed?(k(),E("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=de((...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-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"},[xe(" Reinstall binding "),XNe])):L("",!0),n.selected?(k(),E("button",{key:2,title:"Click to open Settings",type:"button",onClick:e[5]||(e[5]=de((...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"},[xe(" Settings "),eDe])):L("",!0)]),n.binding.ui?(k(),et(i,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):L("",!0),c("div",tDe,[c("div",nDe,[c("div",sDe,[oDe,rDe,xe(" "+U(n.binding.author),1)]),c("div",iDe,[aDe,lDe,xe(" "+U(n.binding.folder),1)]),c("div",cDe,[dDe,uDe,xe(" "+U(n.binding.version),1)]),c("div",hDe,[fDe,pDe,c("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},U(n.binding.link),9,gDe)])]),mDe,c("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description},U(n.binding.description),9,_De)])])],10,UNe)}const yDe=ze(jNe,[["render",bDe]]),vDe={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})}}},wDe={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},xDe={class:"relative w-full max-w-md max-h-full"},kDe={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},EDe=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),CDe=c("span",{class:"sr-only"},"Close modal",-1),ADe=[EDe,CDe],SDe={class:"p-4 text-center"},TDe=c("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),MDe={class:"p-4 text-center mx-auto mb-4"},ODe=c("label",{class:"mr-2"},"Model path",-1);function RDe(t,e,n,s,o,r){return o.show?(k(),E("div",wDe,[c("div",xDe,[c("div",kDe,[c("button",{type:"button",onClick:e[0]||(e[0]=i=>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"},ADe),c("div",SDe,[TDe,c("div",MDe,[ODe,se(c("input",{"onUpdate:modelValue":e[1]||(e[1]=i=>o.model_path=i),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[Re,o.model_path]])]),c("button",{onClick:e[2]||(e[2]=i=>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 "),c("button",{onClick:e[3]||(e[3]=i=>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")])])])])):L("",!0)}const NDe=ze(vDe,[["render",RDe]]),DDe={setup(){return{}},name:"UniversalForm",data(){return{show:!1,resolve:null,controls_array:[],title:"Universal form",ConfirmButtonText:"Submit",DenyButtonText:"Cancel"}},mounted(){be(()=>{ve.replace()})},methods:{hide(t){this.show=!1,this.resolve&&t&&(this.resolve(this.controls_array),this.resolve=null)},showForm(t,e,n,s){this.ConfirmButtonText=n||this.ConfirmButtonText,this.DenyButtonText=s||this.DenyButtonText;for(let o=0;o{this.controls_array=t,this.show=!0,this.title=e||this.title,this.resolve=o,console.log("show foam",this.controls_array)})}},watch:{show(){be(()=>{ve.replace()})}}},LDe={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 p-4"},IDe={class:"relative w-full max-w-md"},PDe={class:"flex flex-col rounded-lg bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel duration-150 shadow-lg max-h-screen"},FDe={class:"flex flex-row flex-grow items-center m-2 p-1"},BDe={class:"grow flex items-center"},$De=c("i",{"data-feather":"sliders",class:"mr-2 flex-shrink-0"},null,-1),zDe={class:"text-lg font-semibold select-none mr-2"},jDe={class:"items-end"},UDe=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),qDe=c("span",{class:"sr-only"},"Close form modal",-1),HDe=[UDe,qDe],VDe={class:"flex flex-col relative no-scrollbar overflow-y-scroll p-2"},GDe={class:"px-2"},KDe={key:0},WDe={key:0},ZDe={class:"text-base font-semibold"},YDe={key:0,class:"relative inline-flex"},JDe=["onUpdate:modelValue"],QDe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),XDe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},eLe=["onUpdate:modelValue"],tLe={key:1},nLe={class:"text-base font-semibold"},sLe={key:0,class:"relative inline-flex"},oLe=["onUpdate:modelValue"],rLe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),iLe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},aLe=["onUpdate:modelValue"],lLe=["value","selected"],cLe={key:1},dLe={class:"text-base font-semibold"},uLe={key:0,class:"relative inline-flex"},hLe=["onUpdate:modelValue"],fLe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),pLe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},gLe=["onUpdate:modelValue"],mLe=["onUpdate:modelValue","min","max"],_Le={key:2},bLe={class:"mb-2 relative flex items-center gap-2"},yLe={for:"default-checkbox",class:"text-base font-semibold"},vLe=["onUpdate:modelValue"],wLe={key:0,class:"relative inline-flex"},xLe=["onUpdate:modelValue"],kLe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),ELe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},CLe={key:3},ALe={class:"text-base font-semibold"},SLe={key:0,class:"relative inline-flex"},TLe=["onUpdate:modelValue"],MLe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),OLe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},RLe=["onUpdate:modelValue"],NLe=c("hr",{class:"h-px my-4 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),DLe={class:"flex flex-row flex-grow gap-3"},LLe={class:"p-2 text-center grow"};function ILe(t,e,n,s,o,r){return o.show?(k(),E("div",LDe,[c("div",IDe,[c("div",PDe,[c("div",FDe,[c("div",BDe,[$De,c("h3",zDe,U(o.title),1)]),c("div",jDe,[c("button",{type:"button",onClick:e[0]||(e[0]=de(i=>r.hide(!1),["stop"])),title:"Close",class:"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"},HDe)])]),c("div",VDe,[(k(!0),E(Oe,null,Ve(o.controls_array,(i,a)=>(k(),E("div",GDe,[i.type=="str"?(k(),E("div",KDe,[i.options?L("",!0):(k(),E("div",WDe,[c("label",{class:Ce(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",ZDe,U(i.name)+": ",1),i.help?(k(),E("label",YDe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,JDe),[[Xe,i.isHelp]]),QDe])):L("",!0)],2),i.isHelp?(k(),E("p",XDe,U(i.help),1)):L("",!0),se(c("input",{type:"text","onUpdate:modelValue":l=>i.value=l,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 string"},null,8,eLe),[[Re,i.value]])])),i.options?(k(),E("div",tLe,[c("label",{class:Ce(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",nLe,U(i.name)+": ",1),i.help?(k(),E("label",sLe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,oLe),[[Xe,i.isHelp]]),rLe])):L("",!0)],2),i.isHelp?(k(),E("p",iLe,U(i.help),1)):L("",!0),se(c("select",{"onUpdate:modelValue":l=>i.value=l,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"},[(k(!0),E(Oe,null,Ve(i.options,l=>(k(),E("option",{value:l,selected:i.value===l},U(l),9,lLe))),256))],8,aLe),[[an,i.value]])])):L("",!0)])):L("",!0),i.type=="int"||i.type=="float"?(k(),E("div",cLe,[c("label",{class:Ce(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",dLe,U(i.name)+": ",1),i.help?(k(),E("label",uLe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,hLe),[[Xe,i.isHelp]]),fLe])):L("",!0)],2),i.isHelp?(k(),E("p",pLe,U(i.help),1)):L("",!0),se(c("input",{type:"number","onUpdate:modelValue":l=>i.value=l,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 number"},null,8,gLe),[[Re,i.value]]),i.min!=null&&i.max!=null?se((k(),E("input",{key:1,type:"range","onUpdate:modelValue":l=>i.value=l,min:i.min,max:i.max,step:"0.1",class:"flex-none h-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,8,mLe)),[[Re,i.value]]):L("",!0)])):L("",!0),i.type=="bool"?(k(),E("div",_Le,[c("div",bLe,[c("label",yLe,U(i.name)+": ",1),se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.value=l,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-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"},null,8,vLe),[[Xe,i.value]]),i.help?(k(),E("label",wLe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,xLe),[[Xe,i.isHelp]]),kLe])):L("",!0)]),i.isHelp?(k(),E("p",ELe,U(i.help),1)):L("",!0)])):L("",!0),i.type=="list"?(k(),E("div",CLe,[c("label",{class:Ce(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",ALe,U(i.name)+": ",1),i.help?(k(),E("label",SLe,[se(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,TLe),[[Xe,i.isHelp]]),MLe])):L("",!0)],2),i.isHelp?(k(),E("p",OLe,U(i.help),1)):L("",!0),se(c("input",{type:"text","onUpdate:modelValue":l=>i.value=l,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 comma separated values"},null,8,RLe),[[Re,i.value]])])):L("",!0),NLe]))),256)),c("div",DLe,[c("div",LLe,[c("button",{onClick:e[1]||(e[1]=de(i=>r.hide(!0),["stop"])),type:"button",class:"mr-2 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 sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},U(o.ConfirmButtonText),1),c("button",{onClick:e[2]||(e[2]=de(i=>r.hide(!1),["stop"])),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-11 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"},U(o.DenyButtonText),1)])])])])])])):L("",!0)}const xc=ze(DDe,[["render",ILe]]);const PLe={props:{show:{type:Boolean,required:!0},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null}},methods:{selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated")},formatSize(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"}}},FLe={key:0,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50"},BLe={class:"bg-white dark:bg-gray-800 rounded-lg p-6 w-96"},$Le={class:"text-xl font-semibold mb-4"},zLe={class:"h-48 overflow-y-auto"},jLe=["onClick"],ULe={class:"font-bold"},qLe=c("br",null,null,-1),HLe={class:"text-xs text-gray-500"},VLe={class:"flex justify-end mt-4"},GLe=["disabled"];function KLe(t,e,n,s,o,r){return k(),et(Os,{name:"fade"},{default:Ne(()=>[n.show?(k(),E("div",FLe,[c("div",BLe,[c("h2",$Le,U(n.title),1),c("div",zLe,[c("ul",null,[(k(!0),E(Oe,null,Ve(n.choices,(i,a)=>(k(),E("li",{key:a,onClick:l=>r.selectChoice(i),class:Ce([{"selected-choice":i===o.selectedChoice},"py-2 px-4 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700"])},[c("span",ULe,U(i.name),1),qLe,c("span",HLe,U(this.formatSize(i.size)),1)],10,jLe))),128))])]),c("div",VLe,[c("button",{onClick:e[0]||(e[0]=(...i)=>r.closeDialog&&r.closeDialog(...i)),class:"py-2 px-4 mr-2 bg-red-500 hover:bg-red-600 text-white rounded-lg transition duration-300"}," Cancel "),c("button",{onClick:e[1]||(e[1]=(...i)=>r.validateChoice&&r.validateChoice(...i)),class:Ce([{"bg-gray-400 cursor-not-allowed":!o.selectedChoice,"bg-blue-500 hover:bg-blue-600":o.selectedChoice,"text-white":o.selectedChoice,"text-gray-500":!o.selectedChoice},"py-2 px-4 rounded-lg transition duration-300"]),disabled:!o.selectedChoice}," Validate ",10,GLe)])])])):L("",!0)]),_:1})}const WLe=ze(PLe,[["render",KLe]]),ZLe={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:0}},data(){return{selectedValue:this.defaultValue}},methods:{handleRadioChange(t){this.selectedValue!==null&&this.$emit("radio-selected",this.selectedValue,t)}}},YLe={class:"flex space-x-4"},JLe=["value","onChange"],QLe={class:"text-gray-700"};function XLe(t,e,n,s,o,r){return k(),E("div",YLe,[(k(!0),E(Oe,null,Ve(n.radioOptions,(i,a)=>(k(),E("label",{key:i.value,class:"flex items-center space-x-2"},[se(c("input",{type:"radio",value:i.value,"onUpdate:modelValue":e[0]||(e[0]=l=>o.selectedValue=l),onChange:l=>r.handleRadioChange(a),class:"text-blue-500 focus:ring-2 focus:ring-blue-200"},null,40,JLe),[[Y1,o.selectedValue]]),c("span",QLe,U(i.label),1)]))),128))])}const eIe=ze(ZLe,[["render",XLe]]);const tIe="/";ye.defaults.baseURL="/";const nIe={components:{AddModelDialog:NDe,MessageBox:zg,YesNoDialog:lOe,ModelEntry:HRe,PersonalityViewer:iNe,Toast:Ys,PersonalityEntry:jg,BindingEntry:yDe,UniversalForm:xc,ChoiceDialog:WLe,Card:jo,RadioOptions:eIe},data(){return{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}],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,minconf_collapsed:!0,bec_collapsed:!0,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,bzl_collapsed:!1,persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:tIe,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){Ee.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{async selectSortOption(t){this.$store.state.sort_type=t,this.$store.dispatch("refreshModelsZoo"),this.modelsFiltered=this.models,console.log(`Selected sorting:${t}`)},handleRadioSelected(t){this.isLoading=!0,this.selectSortOption(t).then(()=>{this.isLoading=!1})},filter_installed(t){return console.log("filtering"),t.filter(e=>e.isInstalled===!0)},getVoices(){"speechSynthesis"in window&&(this.audioVoices=speechSynthesis.getVoices(),!this.audio_out_voice&&this.audioVoices.length>0&&(this.audio_out_voice=this.audioVoices[0].name),speechSynthesis.onvoiceschanged=()=>{})},async updateHasUpdates(){let t=await this.api_get_req("check_update");this.has_updates=t.update_availability,console.log("has_updates",this.has_updates)},onVariantChoiceSelected(t){this.selected_variant=t},oncloseVariantChoiceDialog(){this.variantSelectionDialogVisible=!1},onvalidateVariantChoice(){this.variantSelectionDialogVisible=!1,this.currenModelToInstall.installing=!0;let t=this.currenModelToInstall;if(t.linkNotValid){t.installing=!1,this.$refs.toast.showToast("Link is not valid, file does not exist",4,!1);return}let e="https://huggingface.co/"+t.model.quantizer+"/"+t.model.name+"/resolve/main/"+this.selected_variant.name;this.showProgress=!0,this.progress=0,this.addModel={model_name:this.selected_variant.name,binding_folder:this.configFile.binding_name,model_url:e},console.log("installing...",this.addModel);const n=s=>{if(console.log("received something"),s.status&&s.progress<=100){if(this.addModel=s,console.log("Progress",s),t.progress=s.progress,t.speed=s.speed,t.total_size=s.total_size,t.downloaded_size=s.downloaded_size,t.start_time=s.start_time,t.installing=!0,t.progress==100){const o=this.models.findIndex(r=>r.name===t.model.name);this.models[o].isInstalled=!0,this.showProgress=!1,t.installing=!1,console.log("Received succeeded"),Ee.off("install_progress",n),console.log("Installed successfully"),this.$refs.toast.showToast(`Model: `+t.model.name+` installed!`,4,!0),this.$store.dispatch("refreshDiskUsage")}}else Ee.off("install_progress",n),console.log("Install failed"),t.installing=!1,this.showProgress=!1,console.error("Installation failed:",s.error),this.$refs.toast.showToast(`Model: `+t.model.name+` @@ -171,7 +171,7 @@ Error: `+e.error,4,!1);this.isLoading=!1},async remountPersonality(t){await this `+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(t){t.target.src=ss},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){clearTimeout(this.searchModelTimer),this.searchModel&&(this.searchModelInProgress=!0,setTimeout(this.filterModels,this.searchModelTimer))}},async mounted(){this.constructor(),console.log("Getting voices"),this.getVoices()},activated(){this.isMounted&&this.constructor()},computed:{isModelsLoading:{get(){return this.$store.state.isModelsLoading},set(t){this.$store.state.isModelsLoading=t}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(t){this.$store.state.config.audio_out_voice=t}},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"/user_infos/"+this.$store.state.config.user_avatar},set(t){this.$store.state.config.user_avatar=t}},enable_gpu:{get(){return this.$store.state.config.enable_gpu},set(t){this.$store.state.config.enable_gpu=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}},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}},db_path:{get(){return this.$store.state.config.db_path},set(t){this.$store.state.config.db_path=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)}},bindingsArr:{get(){return this.$store.state.bindingsArr},set(t){this.$store.commit("setBindingsArr",t)}},modelsArr:{get(){return this.$store.state.modelsArr},set(t){this.$store.commit("setModelsArr",t)}},models:{get(){return this.$store.state.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},installed_models:{get(){return this.$store.state.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)},imgBinding(){if(this.isMounted)try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return mo}},imgModel(){if(this.isMounted)try{let t=this.$refs.modelZoo.findIndex(e=>e.model.name==this.configFile.model_name);if(t==-1)for(let e of this.$refs.modelZoo){let n=e.model.variants;if(console.log(e.model),n!=null&&(t=n.findIndex(s=>s.name==this.configFile.model_name),t!=-1))break}return this.$refs.modelZoo[t].$refs.imgElement.src}catch{return mo}},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return;const t=this.bindingsArr.findIndex(e=>e.folder===this.configFile.binding_name);if(t>-1)return this.bindingsArr[t].name},active_pesonality(){if(!this.isMounted)return;const t=this.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);if(t>-1)return this.personalities[t].name},speed_computed(){return Gt(this.addModel.speed)},total_size_computed(){return Gt(this.addModel.total_size)},downloaded_size_computed(){return Gt(this.addModel.downloaded_size)}},watch:{bec_collapsed(){be(()=>{ve.replace()})},pc_collapsed(){be(()=>{ve.replace()})},mc_collapsed(){be(()=>{ve.replace()})},sc_collapsed(){be(()=>{ve.replace()})},showConfirmation(){be(()=>{ve.replace()})},mzl_collapsed(){be(()=>{ve.replace()})},pzl_collapsed(){be(()=>{ve.replace()})},bzl_collapsed(){be(()=>{ve.replace()})},all_collapsed(t){this.collapseAll(t),be(()=>{ve.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,be(()=>{ve.replace()})},isLoading(){be(()=>{ve.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},searchModel(t){t==""&&this.filterModels()},mzdc_collapsed(){be(()=>{ve.replace()})}},async beforeRouteLeave(t){if(await this.$router.isReady(),this.settingsChanged)return await this.$refs.yesNoDialog.askQuestion(`Did You forget to apply changes? You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1;if(!this.isModelSelected)return await this.$refs.yesNoDialog.askQuestion(`Did You forgot to select model? You need to select model before you leave, or else.`,"Ok","Cancel"),!1}},X=t=>(is("data-v-3eed25d8"),t=t(),as(),t),sIe={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"},oIe={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},rIe={key:0,class:"flex gap-3 flex-1 items-center duration-75"},iIe=X(()=>c("i",{"data-feather":"x"},null,-1)),aIe=[iIe],lIe=X(()=>c("i",{"data-feather":"check"},null,-1)),cIe=[lIe],dIe={key:1,class:"flex gap-3 flex-1 items-center"},uIe=X(()=>c("i",{"data-feather":"save"},null,-1)),hIe=[uIe],fIe=X(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),pIe=[fIe],gIe=X(()=>c("i",{"data-feather":"list"},null,-1)),mIe=[gIe],_Ie={class:"flex gap-3 flex-1 items-center justify-end"},bIe=X(()=>c("i",{"data-feather":"trash-2"},null,-1)),yIe=[bIe],vIe=X(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),wIe=[vIe],xIe=X(()=>c("i",{"data-feather":"arrow-up-circle"},null,-1)),kIe={key:0},EIe=X(()=>c("i",{"data-feather":"alert-circle"},null,-1)),CIe=[EIe],AIe={class:"flex gap-3 items-center"},SIe={key:0,class:"flex gap-3 items-center"},TIe=X(()=>c("i",{"data-feather":"check"},null,-1)),MIe=[TIe],OIe={key:1,role:"status"},RIe=X(()=>c("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),NIe=X(()=>c("span",{class:"sr-only"},"Loading...",-1)),DIe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},LIe={class:"flex flex-row p-3"},IIe=X(()=>c("i",{"data-feather":"chevron-right"},null,-1)),PIe=[IIe],FIe=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),BIe=[FIe],$Ie=X(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),zIe=X(()=>c("div",{class:"mr-2"},"|",-1)),jIe={class:"text-base font-semibold cursor-pointer select-none items-center"},UIe={class:"flex gap-2 items-center"},qIe={key:0},HIe={class:"flex gap-2 items-center"},VIe=["title"],GIe=Gs('',34),KIe=[GIe],WIe={class:"font-bold font-large text-lg"},ZIe={key:1},YIe={class:"flex gap-2 items-center"},JIe=Gs('',1),QIe={class:"font-bold font-large text-lg"},XIe=X(()=>c("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),ePe={class:"font-bold font-large text-lg"},tPe=X(()=>c("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),nPe={class:"font-bold font-large text-lg"},sPe={class:"mb-2"},oPe=X(()=>c("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[c("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"})]),xe(" CPU Ram usage: ")],-1)),rPe={class:"flex flex-col mx-2"},iPe=X(()=>c("b",null,"Avaliable ram: ",-1)),aPe=X(()=>c("b",null,"Ram usage: ",-1)),lPe={class:"p-2"},cPe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},dPe={class:"mb-2"},uPe=X(()=>c("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[c("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),xe(" Disk usage: ")],-1)),hPe={class:"flex flex-col mx-2"},fPe=X(()=>c("b",null,"Avaliable disk space: ",-1)),pPe=X(()=>c("b",null,"Disk usage: ",-1)),gPe={class:"p-2"},mPe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},_Pe={class:"mb-2"},bPe=Gs('',1),yPe={class:"flex flex-col mx-2"},vPe=X(()=>c("b",null,"Model: ",-1)),wPe=X(()=>c("b",null,"Avaliable vram: ",-1)),xPe=X(()=>c("b",null,"GPU usage: ",-1)),kPe={class:"p-2"},EPe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},CPe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},APe={class:"flex flex-row p-3"},SPe=X(()=>c("i",{"data-feather":"chevron-right"},null,-1)),TPe=[SPe],MPe=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),OPe=[MPe],RPe=X(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),NPe={class:"flex flex-col mb-2 px-3 pb-2"},DPe={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"},LPe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),IPe={style:{width:"100%"}},PPe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),FPe={style:{width:"100%"}},BPe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),$Pe={style:{width:"100%"}},zPe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),jPe={class:"flex flex-row"},UPe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_gpu",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable GPU:")],-1)),qPe={class:"text-center items-center"},HPe={class:"flex flex-row"},VPe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),GPe={class:"flex flex-row"},KPe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),WPe={class:"flex flex-row"},ZPe={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"},YPe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),JPe={style:{width:"100%"}},QPe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),XPe={style:{width:"100%"}},eFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),tFe={style:{width:"100%"}},nFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),sFe={style:{width:"100%"}},oFe={for:"avatar-upload"},rFe=["src"],iFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),aFe={class:"flex flex-row"},lFe={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"},cFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_files",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate files support:")],-1)),dFe={class:"flex flex-row"},uFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate files vectorization:")],-1)),hFe={class:"flex flex-row"},fFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Build keywords when querying the vectorized database:")],-1)),pFe={class:"flex flex-row"},gFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),mFe=X(()=>c("option",{value:"ftidf_vectorizer"},"ftidf Vectorizer",-1)),_Fe=X(()=>c("option",{value:"model_embedding"},"Model Embedding",-1)),bFe=[mFe,_Fe],yFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),vFe=X(()=>c("option",{value:"PCA"},"PCA",-1)),wFe=X(()=>c("option",{value:"TSNE"},"TSNE",-1)),xFe=[vFe,wFe],kFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("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)),EFe={class:"flex flex-row"},CFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),AFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),SFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),TFe={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"},MFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),OFe={class:"flex flex-row"},RFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),NFe={class:"flex flex-row"},DFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),LFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),IFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),PFe=["value"],FFe=X(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),BFe=["value"],$Fe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},zFe={class:"flex flex-row p-3"},jFe=X(()=>c("i",{"data-feather":"chevron-right"},null,-1)),UFe=[jFe],qFe=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),HFe=[qFe],VFe=X(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),GFe={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},KFe=X(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),WFe={key:1,class:"mr-2"},ZFe={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},YFe={class:"flex gap-1 items-center"},JFe=["src"],QFe={class:"font-bold font-large text-lg line-clamp-1"},XFe={key:0,class:"mb-2"},eBe={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},tBe=X(()=>c("i",{"data-feather":"chevron-up"},null,-1)),nBe=[tBe],sBe=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),oBe=[sBe],rBe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},iBe={class:"flex flex-row p-3"},aBe=X(()=>c("i",{"data-feather":"chevron-right"},null,-1)),lBe=[aBe],cBe=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),dBe=[cBe],uBe=X(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),hBe={class:"flex flex-row items-center"},fBe={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},pBe=X(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),gBe={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},mBe=X(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),_Be={key:2,class:"mr-2"},bBe={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},yBe={class:"flex gap-1 items-center"},vBe=["src"],wBe={class:"font-bold font-large text-lg line-clamp-1"},xBe={key:4,role:"status"},kBe=X(()=>c("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),EBe=X(()=>c("span",{class:"sr-only"},"Loading...",-1)),CBe={class:"mx-2 mb-4"},ABe={class:"relative"},SBe={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},TBe={key:0},MBe=X(()=>c("div",{role:"status"},[c("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"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),c("span",{class:"sr-only"},"Loading...")],-1)),OBe=[MBe],RBe={key:1},NBe=X(()=>c("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"},[c("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)),DBe=[NBe],LBe=X(()=>c("label",{for:"only_installed"},"Show only installed models",-1)),IBe=X(()=>c("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)),PBe={key:0},FBe={key:0,class:"mb-2"},BBe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},$Be={key:1},zBe={key:0,class:"mb-2"},jBe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},UBe=X(()=>c("i",{"data-feather":"chevron-up"},null,-1)),qBe=[UBe],HBe=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),VBe=[HBe],GBe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},KBe={class:"flex flex-row p-3"},WBe=X(()=>c("i",{"data-feather":"chevron-right"},null,-1)),ZBe=[WBe],YBe=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),JBe=[YBe],QBe=X(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Add models for binding",-1)),XBe={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},e$e=X(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),t$e={key:1,class:"mr-2"},n$e={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},s$e={class:"flex gap-1 items-center"},o$e=["src"],r$e={class:"font-bold font-large text-lg line-clamp-1"},i$e={class:"mb-2"},a$e={class:"p-2"},l$e={class:"mb-3"},c$e=X(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),d$e={key:0},u$e={class:"mb-3"},h$e=X(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),f$e={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},p$e=X(()=>c("div",{role:"status",class:"justify-center"},null,-1)),g$e={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},m$e={class:"w-full p-2"},_$e={class:"flex justify-between mb-1"},b$e=Gs(' Downloading Loading...',1),y$e={class:"text-sm font-medium text-blue-700 dark:text-white"},v$e=["title"],w$e={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},x$e={class:"flex justify-between mb-1"},k$e={class:"text-base font-medium text-blue-700 dark:text-white"},E$e={class:"text-sm font-medium text-blue-700 dark:text-white"},C$e={class:"flex flex-grow"},A$e={class:"flex flex-row flex-grow gap-3"},S$e={class:"p-2 text-center grow"},T$e={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},M$e={class:"flex flex-row p-3 items-center"},O$e=X(()=>c("i",{"data-feather":"chevron-right"},null,-1)),R$e=[O$e],N$e=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),D$e=[N$e],L$e=X(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),I$e={key:0,class:"mr-2"},P$e={class:"mr-2 font-bold font-large text-lg line-clamp-1"},F$e={key:1,class:"mr-2"},B$e={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},$$e={key:0,class:"flex -space-x-4 items-center"},z$e={class:"group items-center flex flex-row"},j$e=["onClick"],U$e=["src","title"],q$e=["onClick"],H$e=X(()=>c("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[c("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"},[c("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),V$e=[H$e],G$e={class:"mx-2 mb-4"},K$e=X(()=>c("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),W$e={class:"relative"},Z$e={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Y$e={key:0},J$e=X(()=>c("div",{role:"status"},[c("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"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),c("span",{class:"sr-only"},"Loading...")],-1)),Q$e=[J$e],X$e={key:1},eze=X(()=>c("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"},[c("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)),tze=[eze],nze={key:0,class:"mx-2 mb-4"},sze={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},oze=["selected"],rze={key:0,class:"mb-2"},ize={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},aze=X(()=>c("i",{"data-feather":"chevron-up"},null,-1)),lze=[aze],cze=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),dze=[cze],uze={class:"flex flex-col mb-2 p-3 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},hze={class:"flex flex-row"},fze=X(()=>c("i",{"data-feather":"chevron-right"},null,-1)),pze=[fze],gze=X(()=>c("i",{"data-feather":"chevron-down"},null,-1)),mze=[gze],_ze=X(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),bze={class:"m-2"},yze={class:"flex flex-row gap-2 items-center"},vze=X(()=>c("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),wze={class:"m-2"},xze=X(()=>c("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),kze={class:"m-2"},Eze={class:"flex flex-col align-bottom"},Cze={class:"relative"},Aze=X(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),Sze={class:"absolute right-0"},Tze={class:"m-2"},Mze={class:"flex flex-col align-bottom"},Oze={class:"relative"},Rze=X(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),Nze={class:"absolute right-0"},Dze={class:"m-2"},Lze={class:"flex flex-col align-bottom"},Ize={class:"relative"},Pze=X(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),Fze={class:"absolute right-0"},Bze={class:"m-2"},$ze={class:"flex flex-col align-bottom"},zze={class:"relative"},jze=X(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),Uze={class:"absolute right-0"},qze={class:"m-2"},Hze={class:"flex flex-col align-bottom"},Vze={class:"relative"},Gze=X(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),Kze={class:"absolute right-0"},Wze={class:"m-2"},Zze={class:"flex flex-col align-bottom"},Yze={class:"relative"},Jze=X(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),Qze={class:"absolute right-0"};function Xze(t,e,n,s,o,r){const i=Pe("Card"),a=Pe("BindingEntry"),l=Pe("RadioOptions"),d=Pe("model-entry"),u=Pe("personality-entry"),h=Pe("Toast"),f=Pe("YesNoDialog"),g=Pe("AddModelDialog"),m=Pe("MessageBox"),_=Pe("UniversalForm"),v=Pe("ChoiceDialog");return k(),E(Oe,null,[c("div",sIe,[c("div",oIe,[o.showConfirmation?(k(),E("div",rIe,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=de(p=>o.showConfirmation=!1,["stop"]))},aIe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=de(p=>r.save_configuration(),["stop"]))},cIe)])):L("",!0),o.showConfirmation?L("",!0):(k(),E("div",dIe,[c("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=p=>o.showConfirmation=!0)},hIe),c("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=p=>r.reset_configuration())},pIe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[4]||(e[4]=de(p=>o.all_collapsed=!o.all_collapsed,["stop"]))},mIe)])),c("div",_Ie,[c("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=p=>r.api_get_req("clear_uploads").then(b=>{b.status?this.$refs.toast.showToast("Success!",4,!0):this.$refs.toast.showToast(["failed!"],4,!1)}))},yIe),c("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=p=>r.api_get_req("restart_program").then(b=>{b.status?this.$refs.toast.showToast("Success!",4,!0):this.$refs.toast.showToast(["failed!"],4,!1)}))},wIe),c("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=p=>r.api_get_req("update_software").then(b=>{b.status?this.$refs.toast.showToast("Success!",4,!0):this.$refs.toast.showToast("Success!",4,!0)}))},[xIe,o.has_updates?(k(),E("div",kIe,CIe)):L("",!0)]),c("div",AIe,[o.settingsChanged?(k(),E("div",SIe,[xe(" Apply changes: "),o.isLoading?L("",!0):(k(),E("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=de(p=>r.applyConfiguration(),["stop"]))},MIe))])):L("",!0),o.isLoading?(k(),E("div",OIe,[c("p",null,U(o.loading_text),1),RIe,NIe])):L("",!0)])])]),c("div",{class:Ce(o.isLoading?"pointer-events-none opacity-30":"")},[c("div",DIe,[c("div",LIe,[c("button",{onClick:e[9]||(e[9]=de(p=>o.sc_collapsed=!o.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[se(c("div",null,PIe,512),[[Ye,o.sc_collapsed]]),se(c("div",null,BIe,512),[[Ye,!o.sc_collapsed]]),$Ie,zIe,c("div",jIe,[c("div",UIe,[c("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(k(),E("div",qIe,[(k(!0),E(Oe,null,Ve(r.vramUsage.gpus,p=>(k(),E("div",HIe,[(k(),E("svg",{title:p.gpu_model,"aria-hidden":"true",class:"w-10 h-10 fill-secondary",viewBox:"0 -3 82 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},KIe,8,VIe)),c("h3",WIe,[c("div",null,U(r.computedFileSize(p.used_vram))+" / "+U(r.computedFileSize(p.total_vram))+" ("+U(p.percentage)+"%) ",1)])]))),256))])):L("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(k(),E("div",ZIe,[c("div",YIe,[JIe,c("h3",QIe,[c("div",null,U(r.vramUsage.gpus.length)+"x ",1)])])])):L("",!0)]),XIe,c("h3",ePe,[c("div",null,U(r.ram_usage)+" / "+U(r.ram_total_space)+" ("+U(r.ram_percent_usage)+"%)",1)]),tPe,c("h3",nPe,[c("div",null,U(r.disk_binding_models_usage)+" / "+U(r.disk_total_space)+" ("+U(r.disk_percent_usage)+"%)",1)])])])])]),c("div",{class:Ce([{hidden:o.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",sPe,[oPe,c("div",rPe,[c("div",null,[iPe,xe(U(r.ram_available_space),1)]),c("div",null,[aPe,xe(" "+U(r.ram_usage)+" / "+U(r.ram_total_space)+" ("+U(r.ram_percent_usage)+")% ",1)])]),c("div",lPe,[c("div",cPe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:yt("width: "+r.ram_percent_usage+"%;")},null,4)])])]),c("div",dPe,[uPe,c("div",hPe,[c("div",null,[fPe,xe(U(r.disk_available_space),1)]),c("div",null,[pPe,xe(" "+U(r.disk_binding_models_usage)+" / "+U(r.disk_total_space)+" ("+U(r.disk_percent_usage)+"%)",1)])]),c("div",gPe,[c("div",mPe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:yt("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(k(!0),E(Oe,null,Ve(r.vramUsage.gpus,p=>(k(),E("div",_Pe,[bPe,c("div",yPe,[c("div",null,[vPe,xe(U(p.gpu_model),1)]),c("div",null,[wPe,xe(U(this.computedFileSize(p.available_space)),1)]),c("div",null,[xPe,xe(" "+U(this.computedFileSize(p.used_vram))+" / "+U(this.computedFileSize(p.total_vram))+" ("+U(p.percentage)+"%)",1)])]),c("div",kPe,[c("div",EPe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:yt("width: "+p.percentage+"%;")},null,4)])])]))),256))],2)]),c("div",CPe,[c("div",APe,[c("button",{onClick:e[10]||(e[10]=de(p=>o.minconf_collapsed=!o.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[se(c("div",null,TPe,512),[[Ye,o.minconf_collapsed]]),se(c("div",null,OPe,512),[[Ye,!o.minconf_collapsed]]),RPe])]),c("div",{class:Ce([{hidden:o.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",NPe,[ae(i,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[c("table",DPe,[c("tr",null,[LPe,c("td",IPe,[se(c("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[11]||(e[11]=p=>r.configFile.host=p),onChange:e[12]||(e[12]=p=>o.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),[[Re,r.configFile.host]])])]),c("tr",null,[PPe,c("td",FPe,[se(c("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[13]||(e[13]=p=>r.configFile.port=p),onChange:e[14]||(e[14]=p=>o.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),[[Re,r.configFile.port]])])]),c("tr",null,[BPe,c("td",$Pe,[se(c("input",{type:"text",id:"db_path",required:"","onUpdate:modelValue":e[15]||(e[15]=p=>r.configFile.db_path=p),onChange:e[16]||(e[16]=p=>o.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),[[Re,r.configFile.db_path]])])]),c("tr",null,[zPe,c("td",null,[c("div",jPe,[se(c("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[17]||(e[17]=p=>r.configFile.auto_show_browser=p),onChange:e[18]||(e[18]=p=>o.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.auto_show_browser]])])])]),c("tr",null,[UPe,c("td",qPe,[c("div",HPe,[se(c("input",{type:"checkbox",id:"enable_gpu",required:"","onUpdate:modelValue":e[19]||(e[19]=p=>r.configFile.enable_gpu=p),onChange:e[20]||(e[20]=p=>o.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.enable_gpu]]),r.configFile.enable_gpu?L("",!0):(k(),E("button",{key:0,onClick:e[21]||(e[21]=de((...p)=>r.upgrade2GPU&&r.upgrade2GPU(...p),["prevent"])),class:"w-100 text-center rounded m-2 bg-blue-300 hover:bg-blue-200 text-l hover:text-primary p-2 m-2 text-left flex flex-row"}," Upgrade from CPU to GPU "))])])]),c("tr",null,[VPe,c("td",null,[c("div",GPe,[se(c("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[22]||(e[22]=p=>r.configFile.auto_save=p),onChange:e[23]||(e[23]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.auto_save]])])])]),c("tr",null,[KPe,c("td",null,[c("div",WPe,[se(c("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[24]||(e[24]=p=>r.configFile.auto_update=p),onChange:e[25]||(e[25]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.auto_update]])])])])])]),_:1}),ae(i,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[c("table",ZPe,[c("tr",null,[YPe,c("td",JPe,[se(c("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[26]||(e[26]=p=>r.configFile.user_name=p),onChange:e[27]||(e[27]=p=>o.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Re,r.configFile.user_name]])])]),c("tr",null,[QPe,c("td",XPe,[se(c("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[28]||(e[28]=p=>r.configFile.user_description=p),onChange:e[29]||(e[29]=p=>o.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Re,r.configFile.user_description]])])]),c("tr",null,[eFe,c("td",tFe,[se(c("input",{type:"checkbox",id:"override_personality_model_parameters",required:"","onUpdate:modelValue":e[30]||(e[30]=p=>r.configFile.override_personality_model_parameters=p),onChange:e[31]||(e[31]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.override_personality_model_parameters]])])]),c("tr",null,[nFe,c("td",sFe,[c("label",oFe,[c("img",{src:"/user_infos/"+r.configFile.user_avatar,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,rFe)]),c("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[32]||(e[32]=(...p)=>r.uploadAvatar&&r.uploadAvatar(...p))},null,32)])]),c("tr",null,[iFe,c("td",null,[c("div",aFe,[se(c("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[33]||(e[33]=p=>r.configFile.use_user_name_in_discussions=p),onChange:e[34]||(e[34]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.use_user_name_in_discussions]])])])])])]),_:1}),ae(i,{title:"Files Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[c("table",lFe,[c("tr",null,[cFe,c("td",null,[c("div",dFe,[se(c("input",{type:"checkbox",id:"use_files",required:"","onUpdate:modelValue":e[35]||(e[35]=p=>r.configFile.use_files=p),onChange:e[36]||(e[36]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.use_files]])])])]),c("tr",null,[uFe,c("td",null,[c("div",hFe,[se(c("input",{type:"checkbox",id:"data_vectorization_activate",required:"","onUpdate:modelValue":e[37]||(e[37]=p=>r.configFile.data_vectorization_activate=p),onChange:e[38]||(e[38]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.data_vectorization_activate]])])])]),c("tr",null,[fFe,c("td",null,[c("div",pFe,[se(c("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[39]||(e[39]=p=>r.configFile.data_vectorization_build_keys_words=p),onChange:e[40]||(e[40]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.data_vectorization_build_keys_words]])])])]),c("tr",null,[gFe,c("td",null,[se(c("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[41]||(e[41]=p=>r.configFile.data_vectorization_method=p),onChange:e[42]||(e[42]=p=>o.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},bFe,544),[[an,r.configFile.data_vectorization_method]])])]),c("tr",null,[yFe,c("td",null,[se(c("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[43]||(e[43]=p=>r.configFile.data_visualization_method=p),onChange:e[44]||(e[44]=p=>o.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},xFe,544),[[an,r.configFile.data_visualization_method]])])]),c("tr",null,[kFe,c("td",null,[c("div",EFe,[se(c("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[45]||(e[45]=p=>r.configFile.data_vectorization_save_db=p),onChange:e[46]||(e[46]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.data_vectorization_save_db]])])])]),c("tr",null,[CFe,c("td",null,[se(c("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[47]||(e[47]=p=>r.configFile.data_vectorization_chunk_size=p),onChange:e[48]||(e[48]=p=>o.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),[[Re,r.configFile.data_vectorization_chunk_size]]),se(c("input",{"onUpdate:modelValue":e[49]||(e[49]=p=>r.configFile.data_vectorization_chunk_size=p),type:"number",onChange:e[50]||(e[50]=p=>o.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Re,r.configFile.data_vectorization_chunk_size]])])]),c("tr",null,[AFe,c("td",null,[se(c("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[51]||(e[51]=p=>r.configFile.data_vectorization_overlap_size=p),onChange:e[52]||(e[52]=p=>o.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),[[Re,r.configFile.data_vectorization_overlap_size]]),se(c("input",{"onUpdate:modelValue":e[53]||(e[53]=p=>r.configFile.data_vectorization_overlap_size=p),type:"number",onChange:e[54]||(e[54]=p=>o.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Re,r.configFile.data_vectorization_overlap_size]])])]),c("tr",null,[SFe,c("td",null,[se(c("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[55]||(e[55]=p=>r.configFile.data_vectorization_nb_chunks=p),onChange:e[56]||(e[56]=p=>o.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),[[Re,r.configFile.data_vectorization_nb_chunks]]),se(c("input",{"onUpdate:modelValue":e[57]||(e[57]=p=>r.configFile.data_vectorization_nb_chunks=p),type:"number",onChange:e[58]||(e[58]=p=>o.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Re,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1}),ae(i,{title:"Audio",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[c("table",TFe,[c("tr",null,[MFe,c("td",null,[c("div",OFe,[se(c("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[59]||(e[59]=p=>r.configFile.audio_auto_send_input=p),onChange:e[60]||(e[60]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.audio_auto_send_input]])])])]),c("tr",null,[RFe,c("td",null,[c("div",NFe,[se(c("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[61]||(e[61]=p=>r.configFile.auto_speak=p),onChange:e[62]||(e[62]=p=>o.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Xe,r.configFile.auto_speak]])])])]),c("tr",null,[DFe,c("td",null,[se(c("input",{id:"audio_pitch","onUpdate:modelValue":e[63]||(e[63]=p=>r.configFile.audio_pitch=p),onChange:e[64]||(e[64]=p=>o.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),[[Re,r.configFile.audio_pitch]]),se(c("input",{"onUpdate:modelValue":e[65]||(e[65]=p=>r.configFile.audio_pitch=p),onChange:e[66]||(e[66]=p=>o.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Re,r.configFile.audio_pitch]])])]),c("tr",null,[LFe,c("td",null,[se(c("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[67]||(e[67]=p=>r.configFile.audio_silenceTimer=p),onChange:e[68]||(e[68]=p=>o.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),[[Re,r.configFile.audio_silenceTimer]]),se(c("input",{"onUpdate:modelValue":e[69]||(e[69]=p=>r.configFile.audio_silenceTimer=p),onChange:e[70]||(e[70]=p=>o.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Re,r.configFile.audio_silenceTimer]])])]),c("tr",null,[IFe,c("td",null,[se(c("select",{id:"audio_in_language","onUpdate:modelValue":e[71]||(e[71]=p=>r.configFile.audio_in_language=p),onChange:e[72]||(e[72]=p=>o.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),E(Oe,null,Ve(r.audioLanguages,p=>(k(),E("option",{key:p.code,value:p.code},U(p.name),9,PFe))),128))],544),[[an,r.configFile.audio_in_language]])])]),c("tr",null,[FFe,c("td",null,[se(c("select",{id:"audio_out_voice","onUpdate:modelValue":e[73]||(e[73]=p=>r.configFile.audio_out_voice=p),onChange:e[74]||(e[74]=p=>o.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),E(Oe,null,Ve(o.audioVoices,p=>(k(),E("option",{key:p.name,value:p.name},U(p.name),9,BFe))),128))],544),[[an,r.configFile.audio_out_voice]])])])])]),_:1})])],2)]),c("div",$Fe,[c("div",zFe,[c("button",{onClick:e[75]||(e[75]=de(p=>o.bzc_collapsed=!o.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[se(c("div",null,UFe,512),[[Ye,o.bzc_collapsed]]),se(c("div",null,HFe,512),[[Ye,!o.bzc_collapsed]]),VFe,r.configFile.binding_name?L("",!0):(k(),E("div",GFe,[KFe,xe(" No binding selected! ")])),r.configFile.binding_name?(k(),E("div",WFe,"|")):L("",!0),r.configFile.binding_name?(k(),E("div",ZFe,[c("div",YFe,[c("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,JFe),c("h3",QFe,U(r.binding_name),1)])])):L("",!0)])]),c("div",{class:Ce([{hidden:o.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsArr&&r.bindingsArr.length>0?(k(),E("div",XFe,[c("label",eBe," Bindings: ("+U(r.bindingsArr.length)+") ",1),c("div",{class:Ce(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",o.bzl_collapsed?"":"max-h-96"])},[ae(Ut,{name:"list"},{default:Ne(()=>[(k(!0),E(Oe,null,Ve(r.bindingsArr,(p,b)=>(k(),et(a,{ref_for:!0,ref:"bindingZoo",key:"index-"+b+"-"+p.folder,binding:p,"on-selected":r.onSelectedBinding,"on-reinstall":r.onReinstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:p.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):L("",!0),o.bzl_collapsed?(k(),E("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[76]||(e[76]=p=>o.bzl_collapsed=!o.bzl_collapsed)},nBe)):(k(),E("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[77]||(e[77]=p=>o.bzl_collapsed=!o.bzl_collapsed)},oBe))],2)]),c("div",rBe,[c("div",iBe,[c("button",{onClick:e[78]||(e[78]=de(p=>o.mzc_collapsed=!o.mzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[se(c("div",null,lBe,512),[[Ye,o.mzc_collapsed]]),se(c("div",null,dBe,512),[[Ye,!o.mzc_collapsed]]),uBe,c("div",hBe,[r.configFile.binding_name?L("",!0):(k(),E("div",fBe,[pBe,xe(" Select binding first! ")])),!o.isModelSelected&&r.configFile.binding_name?(k(),E("div",gBe,[mBe,xe(" No model selected! ")])):L("",!0),r.configFile.model_name?(k(),E("div",_Be,"|")):L("",!0),r.configFile.model_name?(k(),E("div",bBe,[c("div",yBe,[c("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,vBe),c("h3",wBe,U(r.model_name),1)])])):L("",!0),r.isModelsLoading?(k(),E("div",xBe,[c("p",null,U(o.loading_text),1),kBe,EBe])):L("",!0)])])]),c("div",{class:Ce([{hidden:o.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",CBe,[c("div",ABe,[c("div",SBe,[o.searchModelInProgress?(k(),E("div",TBe,OBe)):L("",!0),o.searchModelInProgress?L("",!0):(k(),E("div",RBe,DBe))]),se(c("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[79]||(e[79]=p=>o.searchModel=p),onKeyup:e[80]||(e[80]=de((...p)=>r.searchModel_func&&r.searchModel_func(...p),["stop"]))},null,544),[[Re,o.searchModel]]),o.searchModel?(k(),E("button",{key:0,onClick:e[81]||(e[81]=de(p=>o.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")):L("",!0)])]),c("div",null,[se(c("input",{"onUpdate:modelValue":e[82]||(e[82]=p=>o.show_only_installed_models=p),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[Xe,o.show_only_installed_models]]),LBe]),c("div",null,[ae(l,{radioOptions:o.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),IBe,o.searchModel?(k(),E("div",PBe,[o.modelsFiltered.length>0?(k(),E("div",FBe,[c("label",BBe," Search results: ("+U(o.modelsFiltered.length)+") ",1),c("div",{class:Ce(["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",o.mzl_collapsed?"":"max-h-96"])},[ae(Ut,{name:"list"},{default:Ne(()=>[(k(!0),E(Oe,null,Ve(o.show_only_installed_models?r.filter_installed(o.modelsFiltered):o.modelsFiltered,(p,b)=>(k(),et(d,{ref_for:!0,ref:"modelZoo",key:"index-"+b+"-"+p.name,model:p,"is-installed":p.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onSelected,selected:p.name===r.configFile.model_name,model_type:p.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))]),_:1})],2)])):L("",!0)])):L("",!0),o.searchModel?L("",!0):(k(),E("div",$Be,[r.models&&r.models.length>0?(k(),E("div",zBe,[c("label",jBe," Models: ("+U(r.models.length)+") ",1),c("div",{class:Ce(["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",o.mzl_collapsed?"":"max-h-96"])},[ae(Ut,{name:"list"},{default:Ne(()=>[(k(!0),E(Oe,null,Ve(o.show_only_installed_models?r.filter_installed(r.models):r.models,(p,b)=>(k(),et(d,{ref_for:!0,ref:"modelZoo",key:"index-"+b+"-"+p.name,model:p,"is-installed":p.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onSelected,selected:p.name===r.configFile.model_name,model_type:p.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))]),_:1})],2)])):L("",!0)])),o.mzl_collapsed?(k(),E("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[83]||(e[83]=(...p)=>r.open_mzl&&r.open_mzl(...p))},qBe)):(k(),E("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[84]||(e[84]=(...p)=>r.open_mzl&&r.open_mzl(...p))},VBe))],2)]),c("div",GBe,[c("div",KBe,[c("button",{onClick:e[85]||(e[85]=de(p=>o.mzdc_collapsed=!o.mzdc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[se(c("div",null,ZBe,512),[[Ye,o.mzdc_collapsed]]),se(c("div",null,JBe,512),[[Ye,!o.mzdc_collapsed]]),QBe,r.binding_name?L("",!0):(k(),E("div",XBe,[e$e,xe(" No binding selected! ")])),r.configFile.binding_name?(k(),E("div",t$e,"|")):L("",!0),r.configFile.binding_name?(k(),E("div",n$e,[c("div",s$e,[c("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,o$e),c("h3",r$e,U(r.binding_name),1)])])):L("",!0)])]),c("div",{class:Ce([{hidden:o.mzdc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",i$e,[c("div",a$e,[c("div",null,[c("div",l$e,[c$e,se(c("input",{type:"text","onUpdate:modelValue":e[86]||(e[86]=p=>o.reference_path=p),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),[[Re,o.reference_path]])]),c("button",{type:"button",onClick:e[87]||(e[87]=de(p=>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")]),o.modelDownlaodInProgress?L("",!0):(k(),E("div",d$e,[c("div",u$e,[h$e,se(c("input",{type:"text","onUpdate:modelValue":e[88]||(e[88]=p=>o.addModel.url=p),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),[[Re,o.addModel.url]])]),c("button",{type:"button",onClick:e[89]||(e[89]=de(p=>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")])),o.modelDownlaodInProgress?(k(),E("div",f$e,[p$e,c("div",g$e,[c("div",m$e,[c("div",_$e,[b$e,c("span",y$e,U(Math.floor(o.addModel.progress))+"%",1)]),c("div",{class:"mx-1 opacity-80 line-clamp-1",title:o.addModel.url},U(o.addModel.url),9,v$e),c("div",w$e,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:yt({width:o.addModel.progress+"%"})},null,4)]),c("div",x$e,[c("span",k$e,"Download speed: "+U(r.speed_computed)+"/s",1),c("span",E$e,U(r.downloaded_size_computed)+"/"+U(r.total_size_computed),1)])])]),c("div",C$e,[c("div",A$e,[c("div",S$e,[c("button",{onClick:e[90]||(e[90]=de((...p)=>r.onCancelInstall&&r.onCancelInstall(...p),["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 ")])])])])):L("",!0)])])],2)]),c("div",T$e,[c("div",M$e,[c("button",{onClick:e[92]||(e[92]=de(p=>o.pzc_collapsed=!o.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[se(c("div",null,R$e,512),[[Ye,o.pzc_collapsed]]),se(c("div",null,D$e,512),[[Ye,!o.pzc_collapsed]]),L$e,r.configFile.personalities?(k(),E("div",I$e,"|")):L("",!0),c("div",P$e,U(r.active_pesonality),1),r.configFile.personalities?(k(),E("div",F$e,"|")):L("",!0),r.configFile.personalities?(k(),E("div",B$e,[r.mountedPersArr.length>0?(k(),E("div",$$e,[(k(!0),E(Oe,null,Ve(r.mountedPersArr,(p,b)=>(k(),E("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:b+"-"+p.name,ref_for:!0,ref:"mountedPersonalities"},[c("div",z$e,[c("button",{onClick:de(x=>r.onPersonalitySelected(p),["stop"])},[c("img",{src:o.bUrl+p.avatar,onError:e[91]||(e[91]=(...x)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...x)),class:Ce(["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(p.full_path)?"border-secondary":"border-transparent z-0"]),title:p.name},null,42,U$e)],8,j$e),c("button",{onClick:de(x=>t.onPersonalityMount(p),["stop"])},V$e,8,q$e)])]))),128))])):L("",!0)])):L("",!0)])]),c("div",{class:Ce([{hidden:o.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",G$e,[K$e,c("div",W$e,[c("div",Z$e,[o.searchPersonalityInProgress?(k(),E("div",Y$e,Q$e)):L("",!0),o.searchPersonalityInProgress?L("",!0):(k(),E("div",X$e,tze))]),se(c("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[93]||(e[93]=p=>o.searchPersonality=p),onKeyup:e[94]||(e[94]=de((...p)=>r.searchPersonality_func&&r.searchPersonality_func(...p),["stop"]))},null,544),[[Re,o.searchPersonality]]),o.searchPersonality?(k(),E("button",{key:0,onClick:e[95]||(e[95]=de(p=>o.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")):L("",!0)])]),o.searchPersonality?L("",!0):(k(),E("div",nze,[c("label",sze," Personalities Category: ("+U(o.persCatgArr.length)+") ",1),c("select",{id:"persCat",onChange:e[96]||(e[96]=p=>r.update_personality_category(p.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"},[(k(!0),E(Oe,null,Ve(o.persCatgArr,(p,b)=>(k(),E("option",{key:b,selected:p==this.configFile.personality_category},U(p),9,oze))),128))],32)])),c("div",null,[o.personalitiesFiltered.length>0?(k(),E("div",rze,[c("label",ize,U(o.searchPersonality?"Search results":"Personalities")+": ("+U(o.personalitiesFiltered.length)+") ",1),c("div",{class:Ce(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",o.pzl_collapsed?"":"max-h-96"])},[ae(Ut,{name:"bounce"},{default:Ne(()=>[(k(!0),E(Oe,null,Ve(o.personalitiesFiltered,(p,b)=>(k(),et(u,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+b+"-"+p.name,personality:p,select_language:!0,full_path:p.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(x=>x===p.full_path||x===p.full_path+":"+p.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-reinstall","on-settings"]))),128))]),_:1})],2)])):L("",!0)]),o.pzl_collapsed?(k(),E("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[97]||(e[97]=p=>o.pzl_collapsed=!o.pzl_collapsed)},lze)):(k(),E("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[98]||(e[98]=p=>o.pzl_collapsed=!o.pzl_collapsed)},dze))],2)]),c("div",uze,[c("div",hze,[c("button",{onClick:e[99]||(e[99]=de(p=>o.mc_collapsed=!o.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[se(c("div",null,pze,512),[[Ye,o.mc_collapsed]]),se(c("div",null,mze,512),[[Ye,!o.mc_collapsed]]),_ze])]),c("div",{class:Ce([{hidden:o.mc_collapsed},"flex flex-col mb-2 p-2"])},[c("div",bze,[c("div",yze,[se(c("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[100]||(e[100]=de(()=>{},["stop"])),"onUpdate:modelValue":e[101]||(e[101]=p=>r.configFile.override_personality_model_parameters=p),onChange:e[102]||(e[102]=p=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[Xe,r.configFile.override_personality_model_parameters]]),vze])]),c("div",{class:Ce(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[c("div",wze,[xze,se(c("input",{type:"text",id:"seed","onUpdate:modelValue":e[103]||(e[103]=p=>r.configFile.seed=p),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),[[Re,r.configFile.seed]])]),c("div",kze,[c("div",Eze,[c("div",Cze,[Aze,c("p",Sze,[se(c("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[104]||(e[104]=p=>r.configFile.temperature=p),onChange:e[105]||(e[105]=p=>o.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),[[Re,r.configFile.temperature]])])]),se(c("input",{id:"temperature",onChange:e[106]||(e[106]=p=>o.settingsChanged=!0),type:"range","onUpdate:modelValue":e[107]||(e[107]=p=>r.configFile.temperature=p),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),[[Re,r.configFile.temperature]])])]),c("div",Tze,[c("div",Mze,[c("div",Oze,[Rze,c("p",Nze,[se(c("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[108]||(e[108]=p=>r.configFile.n_predict=p),onChange:e[109]||(e[109]=p=>o.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),[[Re,r.configFile.n_predict]])])]),se(c("input",{id:"predict",type:"range",onChange:e[110]||(e[110]=p=>o.settingsChanged=!0),"onUpdate:modelValue":e[111]||(e[111]=p=>r.configFile.n_predict=p),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),[[Re,r.configFile.n_predict]])])]),c("div",Dze,[c("div",Lze,[c("div",Ize,[Pze,c("p",Fze,[se(c("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[112]||(e[112]=p=>r.configFile.top_k=p),onChange:e[113]||(e[113]=p=>o.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),[[Re,r.configFile.top_k]])])]),se(c("input",{id:"top_k",type:"range",onChange:e[114]||(e[114]=p=>o.settingsChanged=!0),"onUpdate:modelValue":e[115]||(e[115]=p=>r.configFile.top_k=p),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),[[Re,r.configFile.top_k]])])]),c("div",Bze,[c("div",$ze,[c("div",zze,[jze,c("p",Uze,[se(c("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[116]||(e[116]=p=>r.configFile.top_p=p),onChange:e[117]||(e[117]=p=>o.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),[[Re,r.configFile.top_p]])])]),se(c("input",{id:"top_p",type:"range","onUpdate:modelValue":e[118]||(e[118]=p=>r.configFile.top_p=p),min:"0",max:"1",step:"0.01",onChange:e[119]||(e[119]=p=>o.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),[[Re,r.configFile.top_p]])])]),c("div",qze,[c("div",Hze,[c("div",Vze,[Gze,c("p",Kze,[se(c("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[120]||(e[120]=p=>r.configFile.repeat_penalty=p),onChange:e[121]||(e[121]=p=>o.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),[[Re,r.configFile.repeat_penalty]])])]),se(c("input",{id:"repeat_penalty",onChange:e[122]||(e[122]=p=>o.settingsChanged=!0),type:"range","onUpdate:modelValue":e[123]||(e[123]=p=>r.configFile.repeat_penalty=p),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),[[Re,r.configFile.repeat_penalty]])])]),c("div",Wze,[c("div",Zze,[c("div",Yze,[Jze,c("p",Qze,[se(c("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[124]||(e[124]=p=>r.configFile.repeat_last_n=p),onChange:e[125]||(e[125]=p=>o.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),[[Re,r.configFile.repeat_last_n]])])]),se(c("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[126]||(e[126]=p=>r.configFile.repeat_last_n=p),min:"0",max:"100",step:"1",onChange:e[127]||(e[127]=p=>o.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),[[Re,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),ae(h,{ref:"toast"},null,512),ae(f,{ref:"yesNoDialog",class:"z-20"},null,512),ae(g,{ref:"addmodeldialog"},null,512),ae(m,{ref:"messageBox"},null,512),ae(_,{ref:"universalForm",class:"z-20"},null,512),ae(v,{class:"z-20",show:o.variantSelectionDialogVisible,choices:o.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const eje=ze(nIe,[["render",Xze],["__scopeId","data-v-3eed25d8"]]),tje={components:{ClipBoardTextInput:wc,Card:jo},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};ye.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}}},nje={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"},sje={class:"mb-4"},oje=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),rje=["value"],ije={class:"mb-4"},aje=c("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),lje={class:"mb-4"},cje=c("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),dje={class:"mb-4"},uje=c("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),hje={class:"mb-4"},fje=c("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),pje={class:"mb-4"},gje=c("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),mje={class:"mb-4"},_je=c("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),bje=c("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),yje={key:1};function vje(t,e,n,s,o,r){const i=Pe("Card"),a=Pe("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(k(),E("div",nje,[c("form",{onSubmit:e[2]||(e[2]=de((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:""},[ae(i,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[ae(i,{title:"Model",class:"",isHorizontal:!1},{default:Ne(()=>[c("div",sje,[oje,se(c("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>r.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>t.setModel&&t.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(k(!0),E(Oe,null,Ve(r.models,l=>(k(),E("option",{key:l,value:l},U(l),9,rje))),128))],544),[[an,r.selectedModel]])])]),_:1}),ae(i,{title:"Data",isHorizontal:!1},{default:Ne(()=>[c("div",ije,[aje,ae(a,{id:"model_path",inputType:"file",value:o.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),ae(i,{title:"Training",isHorizontal:!1},{default:Ne(()=>[c("div",lje,[cje,ae(a,{id:"model_path",inputType:"integer",value:o.lr},null,8,["value"])]),c("div",dje,[uje,ae(a,{id:"model_path",inputType:"integer",value:o.num_epochs},null,8,["value"])]),c("div",hje,[fje,ae(a,{id:"model_path",inputType:"integer",value:o.max_length},null,8,["value"])]),c("div",pje,[gje,ae(a,{id:"model_path",inputType:"integer",value:o.batch_size},null,8,["value"])])]),_:1}),ae(i,{title:"Output",isHorizontal:!1},{default:Ne(()=>[c("div",mje,[_je,ae(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),ae(i,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[bje]),_:1})],32)])):(k(),E("div",yje,[ae(i,{title:"Info",class:"",isHorizontal:!1},{default:Ne(()=>[xe(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const wje=ze(tje,[["render",vje]]),xje={components:{ClipBoardTextInput:wc,Card:jo},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)}}},kje={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"},Eje={class:"mb-4"},Cje=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),Aje={class:"mb-4"},Sje=c("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),Tje=c("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function Mje(t,e,n,s,o,r){const i=Pe("ClipBoardTextInput"),a=Pe("Card");return k(),E("div",kje,[c("form",{onSubmit:e[0]||(e[0]=de((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[ae(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[ae(a,{title:"Model",class:"",isHorizontal:!1},{default:Ne(()=>[c("div",Eje,[Cje,ae(i,{id:"model_path",inputType:"text",value:o.model_name},null,8,["value"])]),c("div",Aje,[Sje,ae(i,{id:"model_path",inputType:"text",value:o.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),ae(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[Tje]),_:1})],32)])}const Oje=ze(xje,[["render",Mje]]),Rje={name:"Discussion",emits:["delete","select","editTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,be(()=>{ve.replace()})},watch:{showConfirmation(){be(()=>{ve.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&be(()=>{this.$refs.titleBox.focus()})},checkBoxValue(t,e){this.checkBoxValue_local=t}}},Nje=["id"],Dje={class:"flex flex-row items-center gap-2"},Lje={key:0},Ije=["title"],Pje=["value"],Fje={class:"flex items-center flex-1 max-h-6"},Bje={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},$je=c("i",{"data-feather":"check"},null,-1),zje=[$je],jje=c("i",{"data-feather":"x"},null,-1),Uje=[jje],qje={key:1,class:"flex gap-3 flex-1 items-center justify-end duration-75"},Hje=c("i",{"data-feather":"x"},null,-1),Vje=[Hje],Gje=c("i",{"data-feather":"check"},null,-1),Kje=[Gje],Wje={key:2,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},Zje=c("i",{"data-feather":"edit-2"},null,-1),Yje=[Zje],Jje=c("i",{"data-feather":"trash"},null,-1),Qje=[Jje];function Xje(t,e,n,s,o,r){return k(),E("div",{class:Ce([n.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md min-w-[23rem] max-w-[23rem]":" min-w-[23rem] max-w-[23rem]","flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm 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"]),id:"dis-"+n.id,onClick:e[13]||(e[13]=de(i=>r.selectEvent(),["stop"]))},[c("div",Dje,[n.isCheckbox?(k(),E("div",Lje,[se(c("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]=de(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=i=>o.checkBoxValue_local=i),onInput:e[2]||(e[2]=i=>r.checkedChangeEvent(i,n.id))},null,544),[[Xe,o.checkBoxValue_local]])])):L("",!0),n.selected?(k(),E("div",{key:1,class:Ce(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):L("",!0),n.selected?L("",!0):(k(),E("div",{key:2,class:Ce(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),o.editTitle?L("",!0):(k(),E("p",{key:0,title:n.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},U(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,Ije)),o.editTitle?(k(),E("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]=Qa(de(i=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Qa(de(i=>o.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=i=>r.chnageTitle(i.target.value)),onClick:e[6]||(e[6]=de(()=>{},["stop"]))},null,40,Pje)):L("",!0),c("div",Fje,[o.showConfirmation&&!o.editTitleMode?(k(),E("div",Bje,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:e[7]||(e[7]=de(i=>r.deleteEvent(),["stop"]))},zje),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:e[8]||(e[8]=de(i=>o.showConfirmation=!1,["stop"]))},Uje)])):L("",!0),o.showConfirmation&&o.editTitleMode?(k(),E("div",qje,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[9]||(e[9]=de(i=>o.editTitleMode=!1,["stop"]))},Vje),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[10]||(e[10]=de(i=>r.editTitleEvent(),["stop"]))},Kje)])):L("",!0),o.showConfirmation?L("",!0):(k(),E("div",Wje,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=de(i=>o.editTitleMode=!0,["stop"]))},Yje),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=de(i=>o.showConfirmation=!0,["stop"]))},Qje)]))])],10,Nje)}const qg=ze(Rje,[["render",Xje]]),eUe={props:{htmlContent:{type:String,required:!0}}},tUe=["innerHTML"];function nUe(t,e,n,s,o,r){return k(),E("div",null,[c("div",{innerHTML:n.htmlContent},null,8,tUe)])}const sUe=ze(eUe,[["render",nUe]]);const oUe={props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Form"}},data(){return{collapsed:!0}},computed:{formattedJson(){if(console.log(typeof this.jsonData),typeof this.jsonData=="string"){let t=JSON.stringify(JSON.parse(this.jsonData),null," ").replace(/\n/g,"
");return console.log(t),console.log(this.jsonFormText),t}else{let t=JSON.stringify(this.jsonData,null," ").replace(/\n/g,"
");return console.log(t),console.log(this.jsonFormText),t}},isObject(){return console.log(typeof this.jsonData),console.log(this.jsonData),typeof this.jsonData=="object"&&this.jsonData!==null},isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")}},methods:{toggleCollapsed(){this.collapsed=!this.collapsed},toggleCollapsible(){this.collapsed=!this.collapsed}}},rUe={key:0},iUe={class:"toggle-icon mr-1"},aUe={key:0,class:"fas fa-plus-circle text-gray-600"},lUe={key:1,class:"fas fa-minus-circle text-gray-600"},cUe={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},dUe={key:0,class:"fas fa-plus-circle text-gray-600"},uUe={key:1,class:"fas fa-minus-circle text-gray-600"},hUe=["innerHTML"];function fUe(t,e,n,s,o,r){return r.isContentPresent?(k(),E("div",rUe,[c("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...i)=>r.toggleCollapsible&&r.toggleCollapsible(...i))},[c("span",iUe,[o.collapsed?(k(),E("i",aUe)):(k(),E("i",lUe))]),xe(" "+U(n.jsonFormText),1)]),se(c("div",null,[c("div",cUe,[r.isObject?(k(),E("span",{key:0,onClick:e[1]||(e[1]=(...i)=>r.toggleCollapsed&&r.toggleCollapsed(...i)),class:"toggle-icon cursor-pointer mr-1"},[o.collapsed?(k(),E("i",dUe)):(k(),E("i",uUe))])):L("",!0),c("pre",{innerHTML:r.formattedJson},null,8,hUe)])],512),[[Ye,!o.collapsed]])])):L("",!0)}const pUe=ze(oUe,[["render",fUe]]),gUe={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0}}},mUe={class:"step flex items-center mb-4"},_Ue={class:"flex items-center justify-center w-6 h-6 mr-2"},bUe={key:0},yUe=c("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),vUe=[yUe],wUe={key:1},xUe=c("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),kUe=[xUe],EUe={key:2},CUe=c("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),AUe=[CUe],SUe={key:0,role:"status"},TUe=c("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),MUe=[TUe];function OUe(t,e,n,s,o,r){return k(),E("div",mUe,[c("div",_Ue,[n.done?L("",!0):(k(),E("div",bUe,vUe)),n.done&&n.status?(k(),E("div",wUe,kUe)):L("",!0),n.done&&!n.status?(k(),E("div",EUe,AUe)):L("",!0)]),n.done?L("",!0):(k(),E("div",SUe,MUe)),c("div",{class:Ce(["content flex-1 px-2",{"text-green-500":n.done,"text-yellow-500":!n.done}])},U(n.message),3)])}const RUe=ze(gUe,[["render",OUe]]);const NUe="/",DUe={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:Bg,Step:RUe,RenderHTMLJS:sUe,JsonViewer:pUe,DynamicUIRenderer:Ug},props:{message:Object,avatar:""},data(){return{msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){"speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0&&this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged)):console.error("Speech synthesis is not supported in this browser."),be(()=>{ve.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight})},methods:{onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},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.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(o=>o.name===this.$store.state.config.audio_out_voice)[0]);const n=o=>{let r=this.message.content.substring(o,o+e);const i=[".","!","?",` -`];let a=-1;return i.forEach(l=>{const d=r.lastIndexOf(l);d>a&&(a=d)}),a==-1&&(a=r.length),console.log(a),a+o+1},s=()=>{if(this.message.content.includes(".")){const o=n(t),r=this.message.content.substring(t,o);this.msg.text=r,t=o+1,this.msg.onend=i=>{t{s()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",o))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{s()},1)};s()},toggleModel(){this.expanded=!this.expanded},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.editMsgMode=!1},resendMessage(){this.$emit("resendMessage",this.message.id,this.message.content)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?NUe+this.avatar:ss},defaultImg(t){t.target.src=ss},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:{"message.content":function(t){this.$store.state.config.auto_speak&&(this.isSpeaking||this.checkForFullSentence())},showConfirmation(){be(()=>{ve.replace()})},editMsgMode(t){be(()=>{ve.replace()})},deleteMsgMode(){be(()=>{ve.replace()})}},computed:{message_ui:{get(){return this.message.ui}},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.created_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!e.getTime())return;let s=e.getTime()-t.getTime();const o=Math.floor(s/(1e3*60*60));s-=o*(1e3*60*60);const r=Math.floor(s/(1e3*60));s-=r*(1e3*60);const i=Math.floor(s/1e3);s-=i*1e3;function a(d){return d<10&&(d="0"+d),d}return a(o)+"h:"+a(r)+"m:"+a(i)+"s"}}},LUe={class:"relative group 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 flex-grow flex-wrap overflow-visible p-4 pb-2"},IUe={class:"flex flex-row gap-2"},PUe={class:"flex-shrink-0"},FUe={class:"group/avatar"},BUe=["src","data-popover-target"],$Ue={class:"flex flex-col w-full flex-grow-0"},zUe={class:"flex flex-row flex-grow items-start"},jUe={class:"flex flex-col mb-2"},UUe={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},qUe=["title"],HUe=c("div",{class:"flex-grow"},null,-1),VUe={class:"flex-row justify-end mx-2"},GUe={class:"invisible group-hover:visible flex flex-row"},KUe={key:0,class:"flex items-center duration-75"},WUe=c("i",{"data-feather":"x"},null,-1),ZUe=[WUe],YUe=c("i",{"data-feather":"check"},null,-1),JUe=[YUe],QUe=c("i",{"data-feather":"edit"},null,-1),XUe=[QUe],eqe=c("i",{"data-feather":"copy"},null,-1),tqe=[eqe],nqe=c("i",{"data-feather":"refresh-cw"},null,-1),sqe=[nqe],oqe=c("i",{"data-feather":"fast-forward"},null,-1),rqe=[oqe],iqe={key:4,class:"flex items-center duration-75"},aqe=c("i",{"data-feather":"x"},null,-1),lqe=[aqe],cqe=c("i",{"data-feather":"check"},null,-1),dqe=[cqe],uqe=c("i",{"data-feather":"trash"},null,-1),hqe=[uqe],fqe=c("i",{"data-feather":"thumbs-up"},null,-1),pqe=[fqe],gqe={class:"flex flex-row items-center"},mqe=c("i",{"data-feather":"thumbs-down"},null,-1),_qe=[mqe],bqe={class:"flex flex-row items-center"},yqe=c("i",{"data-feather":"volume-2"},null,-1),vqe=[yqe],wqe={class:"overflow-x-auto w-full"},xqe={class:"flex flex-col items-start w-full"},kqe={class:"flex flex-col items-start w-full"},Eqe={key:2},Cqe={class:"text-sm text-gray-400 mt-2"},Aqe={class:"flex flex-row items-center gap-2"},Sqe={key:0},Tqe={class:"font-thin"},Mqe={key:1},Oqe={class:"font-thin"},Rqe={key:2},Nqe={class:"font-thin"},Dqe={key:3},Lqe=["title"];function Iqe(t,e,n,s,o,r){const i=Pe("Step"),a=Pe("RenderHTMLJS"),l=Pe("MarkdownRenderer"),d=Pe("JsonViewer"),u=Pe("DynamicUIRenderer");return k(),E("div",LUe,[c("div",IUe,[c("div",PUe,[c("div",FUe,[c("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=h=>r.defaultImg(h)),"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,BUe)])]),c("div",$Ue,[c("div",zUe,[c("div",jUe,[c("div",UUe,U(n.message.sender)+" ",1),n.message.created_at?(k(),E("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},U(r.created_at),9,qUe)):L("",!0)]),HUe,c("div",VUe,[c("div",GUe,[o.editMsgMode?(k(),E("div",KUe,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[1]||(e[1]=de(h=>o.editMsgMode=!1,["stop"]))},ZUe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[2]||(e[2]=de((...h)=>r.updateMessage&&r.updateMessage(...h),["stop"]))},JUe)])):L("",!0),o.editMsgMode?L("",!0):(k(),E("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Edit message",onClick:e[3]||(e[3]=de(h=>o.editMsgMode=!0,["stop"]))},XUe)),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Copy message to clipboard",onClick:e[4]||(e[4]=de(h=>r.copyContentToClipboard(),["stop"]))},tqe),n.message.sender!=this.$store.state.mountedPers.name?(k(),E("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Resend message",onClick:e[5]||(e[5]=de(h=>r.resendMessage(),["stop"]))},sqe)):L("",!0),n.message.sender==this.$store.state.mountedPers.name?(k(),E("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Resend message",onClick:e[6]||(e[6]=de(h=>r.continueMessage(),["stop"]))},rqe)):L("",!0),o.deleteMsgMode?(k(),E("div",iqe,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel removal",type:"button",onClick:e[7]||(e[7]=de(h=>o.deleteMsgMode=!1,["stop"]))},lqe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Confirm removal",type:"button",onClick:e[8]||(e[8]=de(h=>r.deleteMsg(),["stop"]))},dqe)])):L("",!0),o.deleteMsgMode?L("",!0):(k(),E("div",{key:5,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Remove message",onClick:e[9]||(e[9]=h=>o.deleteMsgMode=!0)},hqe)),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Upvote",onClick:e[10]||(e[10]=de(h=>r.rankUp(),["stop"]))},pqe),c("div",gqe,[c("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Downvote",onClick:e[11]||(e[11]=de(h=>r.rankDown(),["stop"]))},_qe),n.message.rank!=0?(k(),E("div",{key:0,class:Ce(["rounded-full px-2 text-sm flex items-center justify-center font-bold",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},U(n.message.rank),3)):L("",!0)]),c("div",bqe,[c("div",{class:Ce(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[12]||(e[12]=de(h=>r.speak(),["stop"]))},vqe,2)])])])]),c("div",wqe,[c("div",xqe,[(k(!0),E(Oe,null,Ve(n.message.steps,(h,f)=>(k(),E("div",{key:"step-"+n.message.id+"-"+f,class:"step font-bold",style:yt({backgroundColor:h.done?"transparent":"inherit"})},[ae(i,{done:h.done,message:h.message,status:h.status},null,8,["done","message","status"])],4))),128))]),c("div",kqe,[(k(!0),E(Oe,null,Ve(n.message.html_js_s,(h,f)=>(k(),E("div",{key:"htmljs-"+n.message.id+"-"+f,class:"htmljs font-bold",style:yt({backgroundColor:t.step.done?"transparent":"inherit"})},[ae(a,{htmlContent:h},null,8,["htmlContent"])],4))),128))]),o.editMsgMode?L("",!0):(k(),et(l,{key:0,ref:"mdRender","markdown-text":n.message.content},null,8,["markdown-text"])),o.editMsgMode?se((k(),E("textarea",{key:1,ref:"mdTextarea",rows:4,class:"block p-2.5 w-full text-sm 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",style:yt({minHeight:o.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[13]||(e[13]=h=>n.message.content=h)},null,4)),[[Re,n.message.content]]):L("",!0),n.message.metadata!==null?(k(),E("div",Eqe,[(k(!0),E(Oe,null,Ve(n.message.metadata,(h,f)=>(k(),E("div",{key:"json-"+n.message.id+"-"+f,class:"json font-bold"},[ae(d,{jsonFormText:h.title,jsonData:h.content},null,8,["jsonFormText","jsonData"])]))),128))])):L("",!0),n.message.ui!==null&&n.message.ui!==void 0&&n.message.ui!==""?(k(),et(u,{key:3,class:"w-full h-full",code:r.message_ui},null,8,["code"])):L("",!0)]),c("div",Cqe,[c("div",Aqe,[n.message.binding?(k(),E("p",Sqe,[xe("Binding: "),c("span",Tqe,U(n.message.binding),1)])):L("",!0),n.message.model?(k(),E("p",Mqe,[xe("Model: "),c("span",Oqe,U(n.message.model),1)])):L("",!0),n.message.seed?(k(),E("p",Rqe,[xe("Seed: "),c("span",Nqe,U(n.message.seed),1)])):L("",!0),r.time_spent?(k(),E("p",Dqe,[xe("Time spent: "),c("span",{class:"font-thin",title:"Finished generating: "+r.finished_generating_at_parsed},U(r.time_spent),9,Lqe)])):L("",!0)])])])])])}const Hg=ze(DUe,[["render",Iqe]]),Pqe="/";ye.defaults.baseURL="/";const Fqe={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{UniversalForm:xc},data(){return{bUrl:Pqe,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:{onSettingsPersonality(t){try{ye.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{ye.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. +`];let a=-1;return i.forEach(l=>{const d=r.lastIndexOf(l);d>a&&(a=d)}),a==-1&&(a=r.length),console.log(a),a+o+1},s=()=>{if(this.message.content.includes(".")){const o=n(t),r=this.message.content.substring(t,o);this.msg.text=r,t=o+1,this.msg.onend=i=>{t{s()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",o))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{s()},1)};s()},toggleModel(){this.expanded=!this.expanded},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.editMsgMode=!1},resendMessage(){this.$emit("resendMessage",this.message.id,this.message.content)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?NUe+this.avatar:ss},defaultImg(t){t.target.src=ss},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:{"message.content":function(t){this.$store.state.config.auto_speak&&(this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed"),console.log(this.message_ui)},showConfirmation(){be(()=>{ve.replace()})},editMsgMode(t){be(()=>{ve.replace()})},deleteMsgMode(){be(()=>{ve.replace()})}},computed:{message_ui:{get(){return this.message.ui}},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.created_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!e.getTime())return;let s=e.getTime()-t.getTime();const o=Math.floor(s/(1e3*60*60));s-=o*(1e3*60*60);const r=Math.floor(s/(1e3*60));s-=r*(1e3*60);const i=Math.floor(s/1e3);s-=i*1e3;function a(d){return d<10&&(d="0"+d),d}return a(o)+"h:"+a(r)+"m:"+a(i)+"s"}}},LUe={class:"relative group 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 flex-grow flex-wrap overflow-visible p-4 pb-2"},IUe={class:"flex flex-row gap-2"},PUe={class:"flex-shrink-0"},FUe={class:"group/avatar"},BUe=["src","data-popover-target"],$Ue={class:"flex flex-col w-full flex-grow-0"},zUe={class:"flex flex-row flex-grow items-start"},jUe={class:"flex flex-col mb-2"},UUe={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},qUe=["title"],HUe=c("div",{class:"flex-grow"},null,-1),VUe={class:"flex-row justify-end mx-2"},GUe={class:"invisible group-hover:visible flex flex-row"},KUe={key:0,class:"flex items-center duration-75"},WUe=c("i",{"data-feather":"x"},null,-1),ZUe=[WUe],YUe=c("i",{"data-feather":"check"},null,-1),JUe=[YUe],QUe=c("i",{"data-feather":"edit"},null,-1),XUe=[QUe],eqe=c("i",{"data-feather":"copy"},null,-1),tqe=[eqe],nqe=c("i",{"data-feather":"refresh-cw"},null,-1),sqe=[nqe],oqe=c("i",{"data-feather":"fast-forward"},null,-1),rqe=[oqe],iqe={key:4,class:"flex items-center duration-75"},aqe=c("i",{"data-feather":"x"},null,-1),lqe=[aqe],cqe=c("i",{"data-feather":"check"},null,-1),dqe=[cqe],uqe=c("i",{"data-feather":"trash"},null,-1),hqe=[uqe],fqe=c("i",{"data-feather":"thumbs-up"},null,-1),pqe=[fqe],gqe={class:"flex flex-row items-center"},mqe=c("i",{"data-feather":"thumbs-down"},null,-1),_qe=[mqe],bqe={class:"flex flex-row items-center"},yqe=c("i",{"data-feather":"volume-2"},null,-1),vqe=[yqe],wqe={class:"overflow-x-auto w-full"},xqe={class:"flex flex-col items-start w-full"},kqe={class:"flex flex-col items-start w-full"},Eqe={key:2},Cqe={class:"text-sm text-gray-400 mt-2"},Aqe={class:"flex flex-row items-center gap-2"},Sqe={key:0},Tqe={class:"font-thin"},Mqe={key:1},Oqe={class:"font-thin"},Rqe={key:2},Nqe={class:"font-thin"},Dqe={key:3},Lqe=["title"];function Iqe(t,e,n,s,o,r){const i=Pe("Step"),a=Pe("RenderHTMLJS"),l=Pe("MarkdownRenderer"),d=Pe("JsonViewer"),u=Pe("DynamicUIRenderer");return k(),E("div",LUe,[c("div",IUe,[c("div",PUe,[c("div",FUe,[c("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=h=>r.defaultImg(h)),"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,BUe)])]),c("div",$Ue,[c("div",zUe,[c("div",jUe,[c("div",UUe,U(n.message.sender)+" ",1),n.message.created_at?(k(),E("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},U(r.created_at),9,qUe)):L("",!0)]),HUe,c("div",VUe,[c("div",GUe,[o.editMsgMode?(k(),E("div",KUe,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[1]||(e[1]=de(h=>o.editMsgMode=!1,["stop"]))},ZUe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[2]||(e[2]=de((...h)=>r.updateMessage&&r.updateMessage(...h),["stop"]))},JUe)])):L("",!0),o.editMsgMode?L("",!0):(k(),E("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Edit message",onClick:e[3]||(e[3]=de(h=>o.editMsgMode=!0,["stop"]))},XUe)),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Copy message to clipboard",onClick:e[4]||(e[4]=de(h=>r.copyContentToClipboard(),["stop"]))},tqe),n.message.sender!=this.$store.state.mountedPers.name?(k(),E("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Resend message",onClick:e[5]||(e[5]=de(h=>r.resendMessage(),["stop"]))},sqe)):L("",!0),n.message.sender==this.$store.state.mountedPers.name?(k(),E("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Resend message",onClick:e[6]||(e[6]=de(h=>r.continueMessage(),["stop"]))},rqe)):L("",!0),o.deleteMsgMode?(k(),E("div",iqe,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel removal",type:"button",onClick:e[7]||(e[7]=de(h=>o.deleteMsgMode=!1,["stop"]))},lqe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Confirm removal",type:"button",onClick:e[8]||(e[8]=de(h=>r.deleteMsg(),["stop"]))},dqe)])):L("",!0),o.deleteMsgMode?L("",!0):(k(),E("div",{key:5,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Remove message",onClick:e[9]||(e[9]=h=>o.deleteMsgMode=!0)},hqe)),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Upvote",onClick:e[10]||(e[10]=de(h=>r.rankUp(),["stop"]))},pqe),c("div",gqe,[c("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Downvote",onClick:e[11]||(e[11]=de(h=>r.rankDown(),["stop"]))},_qe),n.message.rank!=0?(k(),E("div",{key:0,class:Ce(["rounded-full px-2 text-sm flex items-center justify-center font-bold",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},U(n.message.rank),3)):L("",!0)]),c("div",bqe,[c("div",{class:Ce(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[12]||(e[12]=de(h=>r.speak(),["stop"]))},vqe,2)])])])]),c("div",wqe,[c("div",xqe,[(k(!0),E(Oe,null,Ve(n.message.steps,(h,f)=>(k(),E("div",{key:"step-"+n.message.id+"-"+f,class:"step font-bold",style:yt({backgroundColor:h.done?"transparent":"inherit"})},[ae(i,{done:h.done,message:h.message,status:h.status},null,8,["done","message","status"])],4))),128))]),c("div",kqe,[(k(!0),E(Oe,null,Ve(n.message.html_js_s,(h,f)=>(k(),E("div",{key:"htmljs-"+n.message.id+"-"+f,class:"htmljs font-bold",style:yt({backgroundColor:t.step.done?"transparent":"inherit"})},[ae(a,{htmlContent:h},null,8,["htmlContent"])],4))),128))]),o.editMsgMode?L("",!0):(k(),et(l,{key:0,ref:"mdRender","markdown-text":n.message.content},null,8,["markdown-text"])),o.editMsgMode?se((k(),E("textarea",{key:1,ref:"mdTextarea",rows:4,class:"block p-2.5 w-full text-sm 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",style:yt({minHeight:o.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[13]||(e[13]=h=>n.message.content=h)},null,4)),[[Re,n.message.content]]):L("",!0),n.message.metadata!==null?(k(),E("div",Eqe,[(k(!0),E(Oe,null,Ve(n.message.metadata,(h,f)=>(k(),E("div",{key:"json-"+n.message.id+"-"+f,class:"json font-bold"},[ae(d,{jsonFormText:h.title,jsonData:h.content},null,8,["jsonFormText","jsonData"])]))),128))])):L("",!0),n.message.ui!==null&&n.message.ui!==void 0&&n.message.ui!==""?(k(),et(u,{key:3,class:"w-full h-full",code:r.message_ui},null,8,["code"])):L("",!0)]),c("div",Cqe,[c("div",Aqe,[n.message.binding?(k(),E("p",Sqe,[xe("Binding: "),c("span",Tqe,U(n.message.binding),1)])):L("",!0),n.message.model?(k(),E("p",Mqe,[xe("Model: "),c("span",Oqe,U(n.message.model),1)])):L("",!0),n.message.seed?(k(),E("p",Rqe,[xe("Seed: "),c("span",Nqe,U(n.message.seed),1)])):L("",!0),r.time_spent?(k(),E("p",Dqe,[xe("Time spent: "),c("span",{class:"font-thin",title:"Finished generating: "+r.finished_generating_at_parsed},U(r.time_spent),9,Lqe)])):L("",!0)])])])])])}const Hg=ze(DUe,[["render",Iqe]]),Pqe="/";ye.defaults.baseURL="/";const Fqe={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{UniversalForm:xc},data(){return{bUrl:Pqe,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:{onSettingsPersonality(t){try{ye.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{ye.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(be(()=>{ve.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await ye.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ss}}},Bqe={class:"w-fit select-none"},$qe={key:0,class:"flex -space-x-4"},zqe=["src","title"],jqe={key:1,class:"flex -space-x-4"},Uqe=["src","title"],qqe={key:2,title:"Loading personalities"},Hqe=c("div",{role:"status"},[c("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),c("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),c("span",{class:"sr-only"},"Loading...")],-1),Vqe=[Hqe];function Gqe(t,e,n,s,o,r){const i=Pe("UniversalForm");return k(),E(Oe,null,[c("div",Bqe,[r.mountedPersArr.length>1?(k(),E("div",$qe,[c("img",{src:o.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 border-2 active:scale-90 hover:z-20 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,zqe),c("div",{class:"flex items-center justify-center w-8 h-8 cursor-pointer text-xs font-medium bg-bg-light dark:bg-bg-dark border-2 hover:border-secondary rounded-full hover:bg-bg-light-tone dark:hover:bg-bg-dark-tone dark:border-gray-800 hover:z-20 hover:-translate-y-2 duration-150 active:scale-90",onClick:e[2]||(e[2]=de((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+U(r.mountedPersArr.length-1),1)])):L("",!0),r.mountedPersArr.length==1?(k(),E("div",jqe,[c("img",{src:o.bUrl+this.$store.state.mountedPers.avatar,onError:e[3]||(e[3]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 cursor-pointer border-secondary",title:"Active personality: "+this.$store.state.mountedPers.name,onClick:e[4]||(e[4]=de((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"]))},null,40,Uqe)])):L("",!0),r.mountedPersArr.length==0?(k(),E("div",qqe,Vqe)):L("",!0)]),ae(i,{ref:"universalForm",class:"z-20"},null,512)],64)}const Kqe=ze(Fqe,[["render",Gqe]]);const Wqe="/";ye.defaults.baseURL="/";const Zqe={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:jg,Toast:Ys,UniversalForm:xc},name:"MountedPersonalitiesList",data(){return{bUrl:Wqe,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:{toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(t){try{const e=await ye.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ss},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,ye.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}))},onPersonalityMounted(t){this.mountPersonality(t)},onPersonalityUnMounted(t){this.unmountPersonality(t)},onPersonalityRemount(t){this.reMountPersonality(t)},async handleOnTalk(t){if(ve.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: diff --git a/web/dist/index.html b/web/dist/index.html index 80a40b53..b1268540 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -6,7 +6,7 @@ LoLLMS WebUI - Welcome - + diff --git a/web/src/components/BindingEntry.vue b/web/src/components/BindingEntry.vue index a1e89c62..3f79b32f 100644 --- a/web/src/components/BindingEntry.vue +++ b/web/src/components/BindingEntry.vue @@ -49,7 +49,6 @@
-
+