diff --git a/web/dist/assets/index-7439e9f8.js b/web/dist/assets/index-47e3b80e.js similarity index 92% rename from web/dist/assets/index-7439e9f8.js rename to web/dist/assets/index-47e3b80e.js index 0ff6b557..02dae01f 100644 --- a/web/dist/assets/index-7439e9f8.js +++ b/web/dist/assets/index-47e3b80e.js @@ -164,25 +164,25 @@ Verify that the personality is not already copied there.`,4,!1)}).catch(e=>{this `,4,!1),console.error(e)})},async remountPersonality(t){await this.unmountPersonality(t),await this.mountPersonality(t)},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,console.log("Personality path:",t.personality.path),Ce.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:t.personality.path},{headers:this.posts_headers}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$store.state.toast.showToast("Personality reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(t){t.target.src=Ti},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){this.filterModels()}},async mounted(){console.log("Getting voices"),this.getVoices(),console.log("Constructing"),this.load_everything(),this.getSeviceVoices();try{console.log("Loading input devices list");const t=await Ce.get("/get_snd_input_devices");this.snd_input_devices=t.data.device_names,this.snd_input_devices_indexes=t.data.device_indexes}catch{console.log("Couldin't list input devices")}try{console.log("Loading output devices list");const t=await Ce.get("/get_snd_output_devices");this.snd_output_devices=t.data.device_names,this.snd_output_devices_indexes=t.data.device_indexes}catch{console.log("Couldin't list output devices")}},activated(){},computed:{full_template:{get(){return(this.configFile.start_header_id_template+this.configFile.system_message_template+this.configFile.end_header_id_template+" system message"+this.configFile.separator_template+this.configFile.start_user_header_id_template+"user name"+this.configFile.end_user_header_id_template+" User prompt"+this.configFile.separator_template+this.configFile.end_user_message_id_template+this.configFile.separator_template+this.configFile.start_ai_header_id_template+"ai personality"+this.configFile.end_ai_header_id_template+"ai response"+this.configFile.end_ai_message_id_template).replace(` `,"
")}},rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(t=>t.isInstalled===!0):this.modelsFiltered.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)):(console.log("this.models_zoo"),console.log(this.models_zoo),console.log(this.models_zoo_initialLoadCount),this.show_only_installed_models?this.models_zoo.filter(t=>t.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return Pi;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Pi}}},imgModel:{get(){try{let t=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return t>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[t].icon}`),this.$store.state.modelsZoo[t].icon):Pi}catch{console.log("error")}if(!this.isMounted)return Pi;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Pi}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(t){this.$store.state.config.audio_out_voice=t}},openaiWhisperModels(){return["whisper-1"]},whisperModels(){return["tiny.en","tiny","base.en","base","small.en","small","medium.en","medium","large-v1","large-v2","large-v3","large"]},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},userName:{get(){return this.$store.state.config.user_name},set(t){this.$store.state.config.user_name=t}},user_avatar:{get(){return this.$store.state.config.user_avatar!=""?"/user_infos/"+this.$store.state.config.user_avatar:Ti},set(t){this.$store.state.config.user_avatar=t}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(t){this.$store.state.config.hardware_mode=t}},auto_update:{get(){return this.$store.state.config.auto_update},set(t){this.$store.state.config.auto_update=t}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(t){this.$store.state.config.auto_speak=t}},auto_read:{get(){return this.$store.state.config.auto_read},set(t){this.$store.state.config.auto_read=t}},xtts_enable:{get(){return this.$store.state.config.xtts_enable},set(t){this.$store.state.config.xtts_enable=t}},xtts_current_language:{get(){return this.$store.state.config.xtts_current_language},set(t){console.log("Current xtts voice set to ",t),this.$store.state.config.xtts_current_language=t}},xtts_current_voice:{get(){return this.$store.state.config.xtts_current_voice===null||this.$store.state.config.xtts_current_voice===void 0?(console.log("current voice",this.$store.state.config.xtts_current_voice),"main_voice"):this.$store.state.config.xtts_current_voice},set(t){t=="main_voice"||t===void 0?(console.log("Current voice set to None"),this.$store.state.config.xtts_current_voice=null):(console.log("Current voice set to ",t),this.$store.state.config.xtts_current_voice=t)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(t){this.$store.state.config.audio_pitch=t}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(t){this.$store.state.config.audio_in_language=t}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(t){this.$store.state.config.use_user_name_in_discussions=t}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(t){this.$store.state.config.discussion_db_name=t}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(t){this.$store.commit("setbindingsZoo",t)}},modelsArr:{get(){return this.$store.state.modelsArr},set(t){this.$store.commit("setModelsArr",t)}},models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},installed_models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},diskUsage:{get(){return this.$store.state.diskUsage},set(t){this.$store.commit("setDiskUsage",t)}},ramUsage:{get(){return this.$store.state.ramUsage},set(t){this.$store.commit("setRamUsage",t)}},vramUsage:{get(){return this.$store.state.vramUsage},set(t){this.$store.commit("setVramUsage",t)}},disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return console.log(`this.diskUsage : ${this.diskUsage}`),this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return;const t=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);if(t>-1)return this.bindingsZoo[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 rs(this.addModel.speed)},total_size_computed(){return rs(this.addModel.total_size)},downloaded_size_computed(){return rs(this.addModel.downloaded_size)}},watch:{xtts_enable(t){t||(this.configFile.auto_read=!1)},bec_collapsed(){Ge(()=>{He.replace()})},pc_collapsed(){Ge(()=>{He.replace()})},mc_collapsed(){Ge(()=>{He.replace()})},sc_collapsed(){Ge(()=>{He.replace()})},showConfirmation(){Ge(()=>{He.replace()})},mzl_collapsed(){Ge(()=>{He.replace()})},pzl_collapsed(){Ge(()=>{He.replace()})},ezl_collapsed(){Ge(()=>{He.replace()})},bzl_collapsed(){Ge(()=>{He.replace()})},all_collapsed(t){this.collapseAll(t),Ge(()=>{He.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,Ge(()=>{He.replace()})},isLoading(){Ge(()=>{He.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},mzdc_collapsed(){Ge(()=>{He.replace()})}},async beforeRouteLeave(t){if(await this.$router.isReady(),this.settingsChanged)return await this.$store.state.yesNoDialog.askQuestion(`Did You forget to apply changes? -You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},B=t=>(Or("data-v-e25208c0"),t=t(),Ir(),t),lot={class:"container overflow-y-scroll flex flex-row 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"},cot={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"},dot={key:0,class:"flex gap-3 flex-1 items-center duration-75"},uot=B(()=>c("i",{"data-feather":"x"},null,-1)),pot=[uot],_ot=B(()=>c("i",{"data-feather":"check"},null,-1)),hot=[_ot],fot={key:1,class:"flex gap-3 flex-1 items-center"},mot=B(()=>c("i",{"data-feather":"save"},null,-1)),got=[mot],bot=B(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),Eot=[bot],yot=B(()=>c("i",{"data-feather":"list"},null,-1)),vot=[yot],Sot={class:"flex gap-3 flex-1 items-center justify-end"},Tot=B(()=>c("i",{"data-feather":"trash-2"},null,-1)),xot=[Tot],Cot=B(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),wot=[Cot],Rot=B(()=>c("i",{"data-feather":"arrow-up-circle"},null,-1)),Aot={key:0},Not=B(()=>c("i",{"data-feather":"alert-circle"},null,-1)),Oot=[Not],Iot={class:"flex gap-3 items-center"},Mot={key:0,class:"flex gap-3 items-center"},Dot=B(()=>c("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),kot=B(()=>c("i",{"data-feather":"check"},null,-1)),Lot=[kot],Pot={key:1,role:"status"},Uot=B(()=>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)),Fot=B(()=>c("span",{class:"sr-only"},"Loading...",-1)),Bot={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"},Got={class:"flex flex-row p-3"},Vot=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),zot=[Vot],Hot=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),qot=[Hot],Yot=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),$ot=B(()=>c("div",{class:"mr-2"},"|",-1)),Wot={class:"text-base font-semibold cursor-pointer select-none items-center"},Kot={class:"flex gap-2 items-center"},jot={key:0},Qot=["src"],Xot={class:"font-bold font-large text-lg"},Zot={key:1},Jot={class:"flex gap-2 items-center"},eat=["src"],tat={class:"font-bold font-large text-lg"},nat=B(()=>c("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),iat={class:"font-bold font-large text-lg"},sat=B(()=>c("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),rat={class:"font-bold font-large text-lg"},oat={class:"mb-2"},aat=B(()=>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"})]),Je(" CPU Ram usage: ")],-1)),lat={class:"flex flex-col mx-2"},cat=B(()=>c("b",null,"Avaliable ram: ",-1)),dat=B(()=>c("b",null,"Ram usage: ",-1)),uat={class:"p-2"},pat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},_at={class:"mb-2"},hat=B(()=>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"}),Je(" Disk usage: ")],-1)),fat={class:"flex flex-col mx-2"},mat=B(()=>c("b",null,"Avaliable disk space: ",-1)),gat=B(()=>c("b",null,"Disk usage: ",-1)),bat={class:"p-2"},Eat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},yat={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},vat=["src"],Sat={class:"flex flex-col mx-2"},Tat=B(()=>c("b",null,"Model: ",-1)),xat=B(()=>c("b",null,"Avaliable vram: ",-1)),Cat=B(()=>c("b",null,"GPU usage: ",-1)),wat={class:"p-2"},Rat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Aat={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"},Nat={class:"flex flex-row p-3"},Oat=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),Iat=[Oat],Mat=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Dat=[Mat],kat=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),Lat={class:"flex flex-col mb-2 px-3 pb-2"},Pat={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"},Uat=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),Fat={for:"logo-upload"},Bat=["src"],Gat={style:{width:"10%"}},Vat=B(()=>c("i",{"data-feather":"x"},null,-1)),zat=[Vat],Hat=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),qat={class:"text-center items-center"},Yat={class:"flex flex-row"},$at=B(()=>c("option",{value:"cpu"},"CPU",-1)),Wat=B(()=>c("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),Kat=B(()=>c("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),jat=B(()=>c("option",{value:"nvidia"},"NVIDIA",-1)),Qat=B(()=>c("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),Xat=B(()=>c("option",{value:"amd"},"AMD",-1)),Zat=B(()=>c("option",{value:"apple-intel"},"Apple Intel",-1)),Jat=B(()=>c("option",{value:"apple-silicon"},"Apple Silicon",-1)),elt=[$at,Wat,Kat,jat,Qat,Xat,Zat,Jat],tlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),nlt={style:{width:"100%"}},ilt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),slt={class:"flex flex-row"},rlt=B(()=>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)),olt={class:"flex flex-row"},alt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),llt={class:"flex flex-row"},clt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),dlt={class:"flex flex-row"},ult=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),plt={class:"flex flex-row"},_lt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),hlt={class:"flex flex-row"},flt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),mlt={class:"flex flex-row"},glt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),blt={class:"flex flex-row"},Elt={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"},ylt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),vlt=B(()=>c("option",{value:"lollms"},"Lollms communication template",-1)),Slt=B(()=>c("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1)),Tlt=B(()=>c("option",{value:"llama3"},"LLama3 communication template",-1)),xlt=B(()=>c("option",{value:"mistral"},"Mistral communication template",-1)),Clt=[vlt,Slt,Tlt,xlt],wlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),Rlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),Alt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),Nlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),Olt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),Ilt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),Mlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),Dlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),klt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),Llt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),Plt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),Ult=["innerHTML"],Flt={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"},Blt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),Glt={style:{width:"100%"}},Vlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),zlt={style:{width:"100%"}},Hlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),qlt={style:{width:"100%"}},Ylt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),$lt={style:{width:"100%"}},Wlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),Klt={for:"avatar-upload"},jlt=["src"],Qlt={style:{width:"10%"}},Xlt=B(()=>c("i",{"data-feather":"x"},null,-1)),Zlt=[Xlt],Jlt=B(()=>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)),ect={class:"flex flex-row"},tct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),nct={style:{width:"100%"}},ict=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),sct={style:{width:"100%"}},rct={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"},oct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),act={style:{width:"100%"}},lct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),cct={style:{width:"100%"}},dct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),uct={style:{width:"100%"}},pct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),_ct={style:{width:"100%"}},hct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),fct={style:{width:"100%"}},mct={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"},gct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),bct={class:"flex flex-row"},Ect=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),yct={style:{width:"100%"}},vct={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"},Sct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),Tct={class:"flex flex-row"},xct={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"},Cct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),wct={class:"flex flex-row"},Rct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),Act={class:"flex flex-row"},Nct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),Oct={class:"flex flex-row"},Ict={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"},Mct={class:"flex flex-row p-3"},Dct=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),kct=[Dct],Lct=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Pct=[Lct],Uct=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1)),Fct={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"},Bct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),Gct={style:{width:"100%"}},Vct=["onUpdate:modelValue"],zct=["onClick"],Hct=["onClick"],qct=["onClick"],Yct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),$ct=B(()=>c("option",{value:"bert"},"Bert Vectorizer",-1)),Wct=B(()=>c("option",{value:"tfidf"},"TFIDF Vectorizer",-1)),Kct=B(()=>c("option",{value:"word2vec"},"Word2Vec Vectorizer",-1)),jct=[$ct,Wct,Kct],Qct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),Xct=B(()=>c("option",{value:"bert-large-uncased"},"bert-large-uncased",-1)),Zct=B(()=>c("option",{value:"bert-base-uncased"},"bert-base-uncased",-1)),Jct=B(()=>c("option",{value:"word2vec"},"Word2Vec Vectorizer",-1)),edt=[Xct,Zct,Jct],tdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),ndt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),idt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),sdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),rdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),odt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),adt={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"},ldt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save vectorized database:")],-1)),cdt={class:"flex flex-row"},ddt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),udt={class:"flex flex-row"},pdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),_dt={class:"flex flex-row"},hdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_force_first_chunk",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force adding the first chunk of the file to the context:")],-1)),fdt={class:"flex flex-row"},mdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),gdt={class:"flex flex-row"},bdt=B(()=>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)),Edt=B(()=>c("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),ydt=B(()=>c("option",{value:"bm25_vectorizer"},"bm25 Vectorizer",-1)),vdt=B(()=>c("option",{value:"model_embedding"},"Model Embedding",-1)),Sdt=B(()=>c("option",{value:"sentense_transformer"},"Sentense Transformer",-1)),Tdt=[Edt,ydt,vdt,Sdt],xdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_sentense_transformer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization model (for Sentense Transformer):")],-1)),Cdt={style:{width:"100%"}},wdt=B(()=>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)),Rdt=B(()=>c("option",{value:"PCA"},"PCA",-1)),Adt=B(()=>c("option",{value:"TSNE"},"TSNE",-1)),Ndt=[Rdt,Adt],Odt=B(()=>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)),Idt={class:"flex flex-row"},Mdt=B(()=>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)),Ddt=B(()=>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)),kdt=B(()=>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)),Ldt={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"},Pdt={class:"flex flex-row p-3"},Udt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),Fdt=[Udt],Bdt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Gdt=[Bdt],Vdt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1)),zdt={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"},Hdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),qdt={class:"flex flex-row"},Ydt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),$dt={class:"flex flex-row"},Wdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),Kdt={class:"flex flex-row"},jdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),Qdt={class:"flex flex-row"},Xdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),Zdt={class:"flex flex-col"},Jdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),eut={class:"flex flex-col"},tut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),nut={class:"flex flex-col"},iut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),sut={class:"flex flex-col"},rut={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"},out={class:"flex flex-row p-3"},aut=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),lut=[aut],cut=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),dut=[cut],uut=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1)),put={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"},_ut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),hut={style:{width:"100%"}},fut=B(()=>c("option",{value:"None"},"None",-1)),mut=B(()=>c("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1)),gut=B(()=>c("option",{value:"xtts"},"XTTS",-1)),but=B(()=>c("option",{value:"openai_tts"},"Open AI TTS",-1)),Eut=[fut,mut,gut,but],yut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),vut={style:{width:"100%"}},Sut=B(()=>c("option",{value:"None"},"None",-1)),Tut=B(()=>c("option",{value:"whisper"},"Whisper",-1)),xut=B(()=>c("option",{value:"openai_whisper"},"Open AI Whisper",-1)),Cut=[Sut,Tut,xut],wut=B(()=>c("tr",null,null,-1)),Rut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),Aut={style:{width:"100%"}},Nut=B(()=>c("option",{value:"None"},"None",-1)),Out=B(()=>c("option",{value:"diffusers"},"Diffusers",-1)),Iut=B(()=>c("option",{value:"autosd"},"AUTO1111's SD",-1)),Mut=B(()=>c("option",{value:"dall-e"},"Open AI DALL-E",-1)),Dut=B(()=>c("option",{value:"midjourney"},"Midjourney",-1)),kut=B(()=>c("option",{value:"comfyui"},"Comfyui",-1)),Lut=B(()=>c("option",{value:"fooocus"},"Fooocus",-1)),Put=[Nut,Out,Iut,Mut,Dut,kut,Lut],Uut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),Fut={style:{width:"100%"}},But=B(()=>c("option",{value:"None"},"None",-1)),Gut=B(()=>c("option",{value:"musicgen"},"Music Gen",-1)),Vut=[But,Gut],zut={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"},Hut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),qut={class:"flex flex-row"},Yut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),$ut={class:"flex flex-row"},Wut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),Kut={class:"flex flex-row"},jut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),Qut={class:"flex flex-row"},Xut={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"},Zut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),Jut={style:{width:"100%"}},ept=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),tpt={style:{width:"100%"}},npt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),ipt={style:{width:"100%"}},spt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),rpt={style:{width:"100%"}},opt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),apt={style:{width:"100%"}},lpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),cpt={style:{width:"100%"}},dpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),upt={style:{width:"100%"}},ppt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),_pt={class:"flex flex-row"},hpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),fpt={class:"flex flex-row"},mpt={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"},gpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),bpt={style:{width:"100%"}},Ept=["value"],ypt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),vpt={style:{width:"100%"}},Spt=["value"],Tpt={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"},xpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Cpt={style:{width:"100%"}},wpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys (coma separated, if empty, anyone can use the server without authentication):")],-1)),Rpt={style:{width:"100%"}},Apt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),Npt={style:{width:"100%"}},Opt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode (deactivates all code exectuion to protect the PC from attacks):")],-1)),Ipt={style:{width:"100%"}},Mpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),Dpt={style:{width:"100%"}},kpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),Lpt={style:{width:"100%"}},Ppt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),Upt={style:{width:"100%"}},Fpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),Bpt={style:{width:"100%"}},Gpt={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"},Vpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),zpt={class:"flex flex-row"},Hpt=B(()=>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)),qpt={class:"flex flex-row"},Ypt=B(()=>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)),$pt=B(()=>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)),Wpt=["value"],Kpt={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"},jpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),Qpt={class:"flex flex-row"},Xpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),Zpt={class:"flex flex-row"},Jpt=["value"],e_t={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},t_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),n_t={class:"flex flex-row"},i_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),s_t={class:"flex flex-row"},r_t=["value"],o_t={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},a_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),l_t={class:"flex flex-row"},c_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),d_t=B(()=>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)),u_t=["value"],p_t={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},__t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_enable",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable voice service:")],-1)),h_t={class:"flex flex-row"},f_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_xtts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xTTS service:")],-1)),m_t={class:"flex flex-row"},g_t=["href"],b_t=B(()=>c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/xtts-api-server/blob/main/LICENSE",target:"_blank"},"licence",-1)),E_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts base url:")],-1)),y_t={class:"flex flex-row"},v_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),S_t={class:"flex flex-row"},T_t=["disabled"],x_t=["value"],C_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),w_t={class:"flex flex-row"},R_t=["disabled"],A_t=["value"],N_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_use_deepspeed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable deepspeed:")],-1)),O_t={class:"flex flex-row"},I_t=["disabled"],M_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_use_streaming_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable streaming mode:")],-1)),D_t={class:"flex flex-row"},k_t=["disabled"],L_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),P_t={class:"flex flex-row"},U_t=["disabled"],F_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),B_t={class:"flex flex-row"},G_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),V_t={class:"flex flex-row"},z_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),H_t={class:"flex flex-row"},q_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),Y_t={class:"flex flex-row"},$_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),W_t={class:"flex flex-row"},K_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),j_t={class:"flex flex-row"},Q_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),X_t={class:"flex flex-row"},Z_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),J_t={class:"flex flex-row"},eht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},tht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),nht={class:"flex flex-row"},iht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),sht={class:"flex flex-row"},rht=B(()=>c("option",null," tts-1 ",-1)),oht=B(()=>c("option",null," tts-2 ",-1)),aht=[rht,oht],lht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),cht={class:"flex flex-row"},dht=B(()=>c("option",null," alloy ",-1)),uht=B(()=>c("option",null," echo ",-1)),pht=B(()=>c("option",null," fable ",-1)),_ht=B(()=>c("option",null," nova ",-1)),hht=B(()=>c("option",null," shimmer ",-1)),fht=[dht,uht,pht,_ht,hht],mht={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"},ght=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),bht={class:"flex flex-row"},Eht=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),yht=[Eht],vht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),Sht={class:"flex flex-row"},Tht=B(()=>c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1)),xht={class:"flex flex-row"},Cht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),wht={class:"flex flex-row"},Rht={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"},Aht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),Nht={class:"flex flex-row"},Oht=B(()=>c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1)),Iht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),Mht={class:"flex flex-row"},Dht=B(()=>c("td",null,null,-1)),kht={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"},Lht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),Pht={class:"flex flex-row"},Uht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Fht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),Bht={class:"flex flex-row"},Ght=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),Vht={class:"flex flex-row"},zht=B(()=>c("option",null," dall-e-2 ",-1)),Hht=B(()=>c("option",null," dall-e-3 ",-1)),qht=[zht,Hht],Yht={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"},$ht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),Wht={class:"flex flex-row"},Kht=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),jht=[Kht],Qht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),Xht={class:"flex flex-row"},Zht=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Jht=[Zht],eft=B(()=>c("td",{style:{"min-width":"200px"}},null,-1)),tft={class:"flex flex-row"},nft=B(()=>c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1)),ift=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),sft={class:"flex flex-row"},rft={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"},oft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),aft={class:"flex flex-row"},lft=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),cft=[lft],dft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),uft={class:"flex flex-row"},pft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),_ft={class:"flex flex-row"},hft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},fft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),mft={class:"flex flex-row"},gft=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),bft=[gft],Eft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),yft={class:"flex flex-row"},vft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),Sft={class:"flex flex-row"},Tft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),xft={class:"flex flex-col align-bottom"},Cft={class:"relative"},wft=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),Rft={class:"absolute right-0"},Aft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),Nft={class:"flex flex-row"},Oft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),Ift={class:"flex flex-row"},Mft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),Dft={class:"flex flex-row"},kft={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"},Lft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),Pft={class:"flex flex-row"},Uft=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Fft=[Uft],Bft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),Gft={class:"flex flex-row"},Vft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),zft={class:"flex flex-row"},Hft={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"},qft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Motion Ctrl service:")],-1)),Yft={class:"flex flex-row"},$ft=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Wft=[$ft],Kft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Motion Ctrl service:")],-1)),jft={class:"flex flex-row"},Qft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),Xft={class:"flex flex-row"},Zft={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"},Jft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_enable",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),emt={class:"flex flex-row"},tmt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),nmt={class:"flex flex-row"},imt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),smt={class:"flex flex-row"},rmt={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"},omt={class:"flex flex-row p-3"},amt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),lmt=[amt],cmt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),dmt=[cmt],umt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),pmt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},_mt=B(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),hmt={key:1,class:"mr-2"},fmt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},mmt={class:"flex gap-1 items-center"},gmt=["src"],bmt={class:"font-bold font-large text-lg line-clamp-1"},Emt={key:0,class:"mb-2"},ymt={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},vmt=B(()=>c("i",{"data-feather":"chevron-up"},null,-1)),Smt=[vmt],Tmt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),xmt=[Tmt],Cmt={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"},wmt={class:"flex flex-row p-3"},Rmt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),Amt=[Rmt],Nmt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Omt=[Nmt],Imt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),Mmt={class:"flex flex-row items-center"},Dmt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},kmt=B(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Lmt={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Pmt=B(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Umt={key:2,class:"mr-2"},Fmt={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},Bmt={class:"flex gap-1 items-center"},Gmt=["src"],Vmt={class:"font-bold font-large text-lg line-clamp-1"},zmt={class:"mx-2 mb-4"},Hmt={class:"relative"},qmt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Ymt={key:0},$mt=B(()=>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)),Wmt=[$mt],Kmt={key:1},jmt=B(()=>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)),Qmt=[jmt],Xmt=B(()=>c("label",{for:"only_installed"},"Show only installed models",-1)),Zmt=B(()=>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)),Jmt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},egt=B(()=>c("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[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)),tgt=B(()=>c("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),ngt=[egt,tgt],igt={key:1,class:"mb-2"},sgt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},rgt=B(()=>c("i",{"data-feather":"chevron-up"},null,-1)),ogt=[rgt],agt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),lgt=[agt],cgt={class:"mb-2"},dgt={class:"p-2"},ugt={class:"mb-3"},pgt=B(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),_gt={key:0},hgt={class:"mb-3"},fgt=B(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),mgt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},ggt=B(()=>c("div",{role:"status",class:"justify-center"},null,-1)),bgt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Egt={class:"w-full p-2"},ygt={class:"flex justify-between mb-1"},vgt=zb(' Downloading Loading...',1),Sgt={class:"text-sm font-medium text-blue-700 dark:text-white"},Tgt=["title"],xgt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Cgt={class:"flex justify-between mb-1"},wgt={class:"text-base font-medium text-blue-700 dark:text-white"},Rgt={class:"text-sm font-medium text-blue-700 dark:text-white"},Agt={class:"flex flex-grow"},Ngt={class:"flex flex-row flex-grow gap-3"},Ogt={class:"p-2 text-center grow"},Igt={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"},Mgt={class:"flex flex-row p-3 items-center"},Dgt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),kgt=[Dgt],Lgt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Pgt=[Lgt],Ugt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),Fgt={key:0,class:"mr-2"},Bgt={class:"mr-2 font-bold font-large text-lg line-clamp-1"},Ggt={key:1,class:"mr-2"},Vgt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},zgt={key:0,class:"flex -space-x-4 items-center"},Hgt={class:"group items-center flex flex-row"},qgt=["onClick"],Ygt=["src","title"],$gt=["onClick"],Wgt=B(()=>c("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[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)),Kgt=[Wgt],jgt=B(()=>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)),Qgt=[jgt],Xgt={class:"mx-2 mb-4"},Zgt=B(()=>c("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Jgt={class:"relative"},ebt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},tbt={key:0},nbt=B(()=>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)),ibt=[nbt],sbt={key:1},rbt=B(()=>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)),obt=[rbt],abt={key:0,class:"mx-2 mb-4"},lbt={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},cbt=["selected"],dbt={key:0,class:"mb-2"},ubt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},pbt=B(()=>c("i",{"data-feather":"chevron-up"},null,-1)),_bt=[pbt],hbt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),fbt=[hbt],mbt={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"},gbt={class:"flex flex-row"},bbt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),Ebt=[bbt],ybt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),vbt=[ybt],Sbt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),Tbt={class:"m-2"},xbt={class:"flex flex-row gap-2 items-center"},Cbt=B(()=>c("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),wbt={class:"m-2"},Rbt=B(()=>c("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),Abt={class:"m-2"},Nbt={class:"flex flex-col align-bottom"},Obt={class:"relative"},Ibt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),Mbt={class:"absolute right-0"},Dbt={class:"m-2"},kbt={class:"flex flex-col align-bottom"},Lbt={class:"relative"},Pbt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),Ubt={class:"absolute right-0"},Fbt={class:"m-2"},Bbt={class:"flex flex-col align-bottom"},Gbt={class:"relative"},Vbt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),zbt={class:"absolute right-0"},Hbt={class:"m-2"},qbt={class:"flex flex-col align-bottom"},Ybt={class:"relative"},$bt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),Wbt={class:"absolute right-0"},Kbt={class:"m-2"},jbt={class:"flex flex-col align-bottom"},Qbt={class:"relative"},Xbt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),Zbt={class:"absolute right-0"},Jbt={class:"m-2"},eEt={class:"flex flex-col align-bottom"},tEt={class:"relative"},nEt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),iEt={class:"absolute right-0"};function sEt(t,e,n,i,s,r){const o=ft("Card"),a=ft("BindingEntry"),l=ft("RadioOptions"),u=ft("model-entry"),d=ft("personality-entry"),h=ft("AddModelDialog"),f=ft("ChoiceDialog");return A(),M(We,null,[c("div",lot,[c("div",cot,[s.showConfirmation?(A(),M("div",dot,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=Te(_=>s.showConfirmation=!1,["stop"]))},pot),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=Te(_=>r.save_configuration(),["stop"]))},hot)])):$("",!0),s.showConfirmation?$("",!0):(A(),M("div",fot,[c("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=_=>s.showConfirmation=!0)},got),c("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=_=>r.reset_configuration())},Eot),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]=Te(_=>s.all_collapsed=!s.all_collapsed,["stop"]))},vot)])),c("div",Sot,[c("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=_=>r.api_get_req("clear_uploads").then(m=>{m.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},xot),c("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=_=>r.api_post_req("restart_program").then(m=>{m.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},wot),c("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=_=>r.api_post_req("update_software").then(m=>{m.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},[Rot,s.has_updates?(A(),M("div",Aot,Oot)):$("",!0)]),c("div",Iot,[s.settingsChanged?(A(),M("div",Mot,[Dot,s.isLoading?$("",!0):(A(),M("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=Te(_=>r.applyConfiguration(),["stop"]))},Lot))])):$("",!0),s.isLoading?(A(),M("div",Pot,[c("p",null,ge(s.loading_text),1),Uot,Fot])):$("",!0)])])]),c("div",{class:qe(s.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[c("div",Bot,[c("div",Got,[c("button",{onClick:e[9]||(e[9]=Te(_=>s.sc_collapsed=!s.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,zot,512),[[Mt,s.sc_collapsed]]),z(c("div",null,qot,512),[[Mt,!s.sc_collapsed]]),Yot,$ot,c("div",Wot,[c("div",Kot,[c("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(A(),M("div",jot,[(A(!0),M(We,null,ct(r.vramUsage.gpus,_=>(A(),M("div",{class:"flex gap-2 items-center",key:_},[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,Qot),c("h3",Xot,[c("div",null,ge(r.computedFileSize(_.used_vram))+" / "+ge(r.computedFileSize(_.total_vram))+" ("+ge(_.percentage)+"%) ",1)])]))),128))])):$("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(A(),M("div",Zot,[c("div",Jot,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,eat),c("h3",tat,[c("div",null,ge(r.vramUsage.gpus.length)+"x ",1)])])])):$("",!0)]),nat,c("h3",iat,[c("div",null,ge(r.ram_usage)+" / "+ge(r.ram_total_space)+" ("+ge(r.ram_percent_usage)+"%)",1)]),sat,c("h3",rat,[c("div",null,ge(r.disk_binding_models_usage)+" / "+ge(r.disk_total_space)+" ("+ge(r.disk_percent_usage)+"%)",1)])])])])]),c("div",{class:qe([{hidden:s.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",oat,[aat,c("div",lat,[c("div",null,[cat,Je(ge(r.ram_available_space),1)]),c("div",null,[dat,Je(" "+ge(r.ram_usage)+" / "+ge(r.ram_total_space)+" ("+ge(r.ram_percent_usage)+")% ",1)])]),c("div",uat,[c("div",pat,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+r.ram_percent_usage+"%;")},null,4)])])]),c("div",_at,[hat,c("div",fat,[c("div",null,[mat,Je(ge(r.disk_available_space),1)]),c("div",null,[gat,Je(" "+ge(r.disk_binding_models_usage)+" / "+ge(r.disk_total_space)+" ("+ge(r.disk_percent_usage)+"%)",1)])]),c("div",bat,[c("div",Eat,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(A(!0),M(We,null,ct(r.vramUsage.gpus,_=>(A(),M("div",{class:"mb-2",key:_},[c("label",yat,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,vat),Je(" GPU usage: ")]),c("div",Sat,[c("div",null,[Tat,Je(ge(_.gpu_model),1)]),c("div",null,[xat,Je(ge(this.computedFileSize(_.available_space)),1)]),c("div",null,[Cat,Je(" "+ge(this.computedFileSize(_.used_vram))+" / "+ge(this.computedFileSize(_.total_vram))+" ("+ge(_.percentage)+"%)",1)])]),c("div",wat,[c("div",Rat,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+_.percentage+"%;")},null,4)])])]))),128))],2)]),c("div",Aat,[c("div",Nat,[c("button",{onClick:e[10]||(e[10]=Te(_=>s.minconf_collapsed=!s.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,Iat,512),[[Mt,s.minconf_collapsed]]),z(c("div",null,Dat,512),[[Mt,!s.minconf_collapsed]]),kat])]),c("div",{class:qe([{hidden:s.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",Lat,[Re(o,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Pat,[c("tr",null,[Uat,c("td",null,[c("label",Fat,[c("img",{src:r.configFile.app_custom_logo!=null&&r.configFile.app_custom_logo!=""?"/user_infos/"+r.configFile.app_custom_logo:s.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,Bat)]),c("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[11]||(e[11]=(..._)=>r.uploadLogo&&r.uploadLogo(..._))},null,32)]),c("td",Gat,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[12]||(e[12]=Te(_=>r.resetLogo(),["stop"]))},zat)])]),c("tr",null,[Hat,c("td",qat,[c("div",Yat,[z(c("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[13]||(e[13]=_=>r.configFile.hardware_mode=_),onChange:e[14]||(e[14]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},elt,544),[[jt,r.configFile.hardware_mode]])])])]),c("tr",null,[tlt,c("td",nlt,[z(c("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[15]||(e[15]=_=>r.configFile.discussion_db_name=_),onChange:e[16]||(e[16]=_=>s.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),[[Oe,r.configFile.discussion_db_name]])])]),c("tr",null,[ilt,c("td",null,[c("div",slt,[z(c("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[17]||(e[17]=_=>r.configFile.copy_to_clipboard_add_all_details=_),onChange:e[18]||(e[18]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.copy_to_clipboard_add_all_details]])])])]),c("tr",null,[rlt,c("td",null,[c("div",olt,[z(c("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[19]||(e[19]=_=>r.configFile.auto_show_browser=_),onChange:e[20]||(e[20]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_show_browser]])])])]),c("tr",null,[alt,c("td",null,[c("div",llt,[z(c("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[21]||(e[21]=_=>r.configFile.debug=_),onChange:e[22]||(e[22]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.debug]])])])]),c("tr",null,[clt,c("td",null,[c("div",dlt,[z(c("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[23]||(e[23]=_=>r.configFile.debug_log_file_path=_),onChange:e[24]||(e[24]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.debug_log_file_path]])])])]),c("tr",null,[ult,c("td",null,[c("div",plt,[z(c("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[25]||(e[25]=_=>r.configFile.show_news_panel=_),onChange:e[26]||(e[26]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.show_news_panel]])])])]),c("tr",null,[_lt,c("td",null,[c("div",hlt,[z(c("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[27]||(e[27]=_=>r.configFile.auto_save=_),onChange:e[28]||(e[28]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_save]])])])]),c("tr",null,[flt,c("td",null,[c("div",mlt,[z(c("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[29]||(e[29]=_=>r.configFile.auto_update=_),onChange:e[30]||(e[30]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_update]])])])]),c("tr",null,[glt,c("td",null,[c("div",blt,[z(c("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[31]||(e[31]=_=>r.configFile.auto_title=_),onChange:e[32]||(e[32]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_title]])])])])])]),_:1}),Re(o,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Elt,[c("tr",null,[ylt,c("td",null,[c("select",{onChange:e[33]||(e[33]=(..._)=>r.handleTemplateSelection&&r.handleTemplateSelection(..._))},Clt,32)])]),c("tr",null,[wlt,c("td",null,[z(c("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[34]||(e[34]=_=>r.configFile.start_header_id_template=_),onChange:e[35]||(e[35]=_=>s.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),[[Oe,r.configFile.start_header_id_template]])])]),c("tr",null,[Rlt,c("td",null,[z(c("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[36]||(e[36]=_=>r.configFile.end_header_id_template=_),onChange:e[37]||(e[37]=_=>s.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),[[Oe,r.configFile.end_header_id_template]])])]),c("tr",null,[Alt,c("td",null,[z(c("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[38]||(e[38]=_=>r.configFile.start_user_header_id_template=_),onChange:e[39]||(e[39]=_=>s.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),[[Oe,r.configFile.start_user_header_id_template]])])]),c("tr",null,[Nlt,c("td",null,[z(c("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[40]||(e[40]=_=>r.configFile.end_user_header_id_template=_),onChange:e[41]||(e[41]=_=>s.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),[[Oe,r.configFile.end_user_header_id_template]])])]),c("tr",null,[Olt,c("td",null,[z(c("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[42]||(e[42]=_=>r.configFile.end_user_message_id_template=_),onChange:e[43]||(e[43]=_=>s.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),[[Oe,r.configFile.end_user_message_id_template]])])]),c("tr",null,[Ilt,c("td",null,[z(c("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[44]||(e[44]=_=>r.configFile.start_ai_header_id_template=_),onChange:e[45]||(e[45]=_=>s.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),[[Oe,r.configFile.start_ai_header_id_template]])])]),c("tr",null,[Mlt,c("td",null,[z(c("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[46]||(e[46]=_=>r.configFile.end_ai_header_id_template=_),onChange:e[47]||(e[47]=_=>s.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),[[Oe,r.configFile.end_ai_header_id_template]])])]),c("tr",null,[Dlt,c("td",null,[z(c("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[48]||(e[48]=_=>r.configFile.end_ai_message_id_template=_),onChange:e[49]||(e[49]=_=>s.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),[[Oe,r.configFile.end_ai_message_id_template]])])]),c("tr",null,[klt,c("td",null,[z(c("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[50]||(e[50]=_=>r.configFile.separator_template=_),onChange:e[51]||(e[51]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.separator_template]])])]),c("tr",null,[Llt,c("td",null,[z(c("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[52]||(e[52]=_=>r.configFile.system_message_template=_),onChange:e[53]||(e[53]=_=>s.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),[[Oe,r.configFile.system_message_template]])])]),c("tr",null,[Plt,c("td",null,[c("div",{innerHTML:r.full_template},null,8,Ult)])])])]),_:1}),Re(o,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Flt,[c("tr",null,[Blt,c("td",Glt,[z(c("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[54]||(e[54]=_=>r.configFile.user_name=_),onChange:e[55]||(e[55]=_=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.user_name]])])]),c("tr",null,[Vlt,c("td",zlt,[z(c("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[56]||(e[56]=_=>r.configFile.user_description=_),onChange:e[57]||(e[57]=_=>s.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.user_description]])])]),c("tr",null,[Hlt,c("td",qlt,[z(c("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[58]||(e[58]=_=>r.configFile.use_user_informations_in_discussion=_),onChange:e[59]||(e[59]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_user_informations_in_discussion]])])]),c("tr",null,[Ylt,c("td",$lt,[z(c("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[60]||(e[60]=_=>r.configFile.use_model_name_in_discussions=_),onChange:e[61]||(e[61]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_model_name_in_discussions]])])]),c("tr",null,[Wlt,c("td",null,[c("label",Klt,[c("img",{src:r.configFile.user_avatar!=null&&r.configFile.user_avatar!=""?"/user_infos/"+r.configFile.user_avatar:s.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,jlt)]),c("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[62]||(e[62]=(..._)=>r.uploadAvatar&&r.uploadAvatar(..._))},null,32)]),c("td",Qlt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[63]||(e[63]=Te(_=>r.resetAvatar(),["stop"]))},Zlt)])]),c("tr",null,[Jlt,c("td",null,[c("div",ect,[z(c("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[64]||(e[64]=_=>r.configFile.use_user_name_in_discussions=_),onChange:e[65]||(e[65]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_user_name_in_discussions]])])])]),c("tr",null,[tct,c("td",nct,[z(c("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[66]||(e[66]=_=>r.configFile.max_n_predict=_),onChange:e[67]||(e[67]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.max_n_predict]])])]),c("tr",null,[ict,c("td",sct,[z(c("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[68]||(e[68]=_=>r.configFile.max_n_predict=_),onChange:e[69]||(e[69]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.max_n_predict]])])])])]),_:1}),Re(o,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",rct,[c("tr",null,[oct,c("td",act,[z(c("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[70]||(e[70]=_=>r.configFile.turn_on_code_execution=_),onChange:e[71]||(e[71]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_code_execution]])])]),c("tr",null,[lct,c("td",cct,[z(c("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[72]||(e[72]=_=>r.configFile.turn_on_code_validation=_),onChange:e[73]||(e[73]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_code_validation]])])]),c("tr",null,[dct,c("td",uct,[z(c("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[74]||(e[74]=_=>r.configFile.turn_on_setting_update_validation=_),onChange:e[75]||(e[75]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_setting_update_validation]])])]),c("tr",null,[pct,c("td",_ct,[z(c("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[76]||(e[76]=_=>r.configFile.turn_on_open_file_validation=_),onChange:e[77]||(e[77]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_open_file_validation]])])]),c("tr",null,[hct,c("td",fct,[z(c("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[78]||(e[78]=_=>r.configFile.turn_on_send_file_validation=_),onChange:e[79]||(e[79]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),Re(o,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",mct,[c("tr",null,[gct,c("td",null,[c("div",bct,[z(c("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[80]||(e[80]=_=>r.configFile.activate_skills_lib=_),onChange:e[81]||(e[81]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.activate_skills_lib]])])])]),c("tr",null,[Ect,c("td",yct,[z(c("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[82]||(e[82]=_=>r.configFile.skills_lib_database_name=_),onChange:e[83]||(e[83]=_=>s.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),[[Oe,r.configFile.skills_lib_database_name]])])])])]),_:1}),Re(o,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",vct,[c("tr",null,[Sct,c("td",null,[c("div",Tct,[z(c("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[84]||(e[84]=_=>r.configFile.pdf_latex_path=_),onChange:e[85]||(e[85]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.pdf_latex_path]])])])])])]),_:1}),Re(o,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",xct,[c("tr",null,[Cct,c("td",null,[c("div",wct,[z(c("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[86]||(e[86]=_=>r.configFile.positive_boost=_),onChange:e[87]||(e[87]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.positive_boost]])])])]),c("tr",null,[Rct,c("td",null,[c("div",Act,[z(c("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[88]||(e[88]=_=>r.configFile.negative_boost=_),onChange:e[89]||(e[89]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.negative_boost]])])])]),c("tr",null,[Nct,c("td",null,[c("div",Oct,[z(c("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[90]||(e[90]=_=>r.configFile.fun_mode=_),onChange:e[91]||(e[91]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.fun_mode]])])])])])]),_:1})])],2)]),c("div",Ict,[c("div",Mct,[c("button",{onClick:e[92]||(e[92]=Te(_=>s.data_conf_collapsed=!s.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,kct,512),[[Mt,s.data_conf_collapsed]]),z(c("div",null,Pct,512),[[Mt,!s.data_conf_collapsed]]),Uct])]),c("div",{class:qe([{hidden:s.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Re(o,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Fct,[c("tr",null,[Bct,c("td",Gct,[(A(!0),M(We,null,ct(r.configFile.rag_databases,(_,m)=>(A(),M("div",{key:m,class:"flex items-center mb-2"},[z(c("input",{type:"text","onUpdate:modelValue":E=>r.configFile.rag_databases[m]=E,onChange:e[93]||(e[93]=E=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,40,Vct),[[Oe,r.configFile.rag_databases[m]]]),c("button",{onClick:E=>r.vectorize_folder(m),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded"},"(Re)Vectorize",8,zct),c("button",{onClick:E=>r.select_folder(m),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-green-300 rounded"},"Select Folder",8,Hct),c("button",{onClick:E=>r.removeDataSource(m),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-green-300 rounded"},"Remove",8,qct)]))),128)),c("button",{onClick:e[94]||(e[94]=(..._)=>r.addDataSource&&r.addDataSource(..._)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),c("tr",null,[Yct,c("td",null,[z(c("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[95]||(e[95]=_=>r.configFile.rag_vectorizer=_),onChange:e[96]||(e[96]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},jct,544),[[jt,r.configFile.rag_vectorizer]])])]),c("tr",null,[Qct,c("td",null,[z(c("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[97]||(e[97]=_=>r.configFile.rag_vectorizer_model=_),onChange:e[98]||(e[98]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},edt,544),[[jt,r.configFile.rag_vectorizer_model]])])]),c("tr",null,[tdt,c("td",null,[z(c("input",{id:"rag_chunk_size","onUpdate:modelValue":e[99]||(e[99]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[100]||(e[100]=_=>s.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.data_vectorization_chunk_size]]),z(c("input",{"onUpdate:modelValue":e[101]||(e[101]=_=>r.configFile.rag_chunk_size=_),type:"number",onChange:e[102]||(e[102]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.rag_chunk_size]])])]),c("tr",null,[ndt,c("td",null,[z(c("input",{id:"rag_n_chunks","onUpdate:modelValue":e[103]||(e[103]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[104]||(e[104]=_=>s.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.data_vectorization_chunk_size]]),z(c("input",{"onUpdate:modelValue":e[105]||(e[105]=_=>r.configFile.rag_n_chunks=_),type:"number",onChange:e[106]||(e[106]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.rag_n_chunks]])])]),c("tr",null,[idt,c("td",null,[z(c("input",{"onUpdate:modelValue":e[107]||(e[107]=_=>r.configFile.rag_clean_chunks=_),type:"checkbox",onChange:e[108]||(e[108]=_=>s.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.rag_clean_chunks]])])]),c("tr",null,[sdt,c("td",null,[z(c("input",{"onUpdate:modelValue":e[109]||(e[109]=_=>r.configFile.rag_follow_subfolders=_),type:"checkbox",onChange:e[110]||(e[110]=_=>s.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.rag_follow_subfolders]])])]),c("tr",null,[rdt,c("td",null,[z(c("input",{"onUpdate:modelValue":e[111]||(e[111]=_=>r.configFile.rag_check_new_files_at_startup=_),type:"checkbox",onChange:e[112]||(e[112]=_=>s.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.rag_check_new_files_at_startup]])])]),c("tr",null,[odt,c("td",null,[z(c("input",{"onUpdate:modelValue":e[113]||(e[113]=_=>r.configFile.rag_preprocess_chunks=_),type:"checkbox",onChange:e[114]||(e[114]=_=>s.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.rag_preprocess_chunks]])])])])]),_:1}),Re(o,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",adt,[c("tr",null,[ldt,c("td",null,[c("div",cdt,[z(c("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[115]||(e[115]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[116]||(e[116]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_save_db]])])])]),c("tr",null,[ddt,c("td",null,[c("div",udt,[z(c("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[117]||(e[117]=_=>r.configFile.data_vectorization_visualize_on_vectorization=_),onChange:e[118]||(e[118]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),c("tr",null,[pdt,c("td",null,[c("div",_dt,[z(c("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[119]||(e[119]=_=>r.configFile.data_vectorization_build_keys_words=_),onChange:e[120]||(e[120]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_build_keys_words]])])])]),c("tr",null,[hdt,c("td",null,[c("div",fdt,[z(c("input",{type:"checkbox",id:"data_vectorization_force_first_chunk",required:"","onUpdate:modelValue":e[121]||(e[121]=_=>r.configFile.data_vectorization_force_first_chunk=_),onChange:e[122]||(e[122]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_force_first_chunk]])])])]),c("tr",null,[mdt,c("td",null,[c("div",gdt,[z(c("input",{type:"checkbox",id:"data_vectorization_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[123]||(e[123]=_=>r.configFile.data_vectorization_put_chunk_informations_into_context=_),onChange:e[124]||(e[124]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_put_chunk_informations_into_context]])])])]),c("tr",null,[bdt,c("td",null,[z(c("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[125]||(e[125]=_=>r.configFile.data_vectorization_method=_),onChange:e[126]||(e[126]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Tdt,544),[[jt,r.configFile.data_vectorization_method]])])]),c("tr",null,[xdt,c("td",Cdt,[z(c("input",{type:"text",id:"data_vectorization_sentense_transformer_model",required:"","onUpdate:modelValue":e[127]||(e[127]=_=>r.configFile.data_vectorization_sentense_transformer_model=_),onChange:e[128]||(e[128]=_=>s.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),[[Oe,r.configFile.data_vectorization_sentense_transformer_model]])])]),c("tr",null,[wdt,c("td",null,[z(c("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[129]||(e[129]=_=>r.configFile.data_visualization_method=_),onChange:e[130]||(e[130]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Ndt,544),[[jt,r.configFile.data_visualization_method]])])]),c("tr",null,[Odt,c("td",null,[c("div",Idt,[z(c("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[131]||(e[131]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[132]||(e[132]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_save_db]])])])]),c("tr",null,[Mdt,c("td",null,[z(c("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[133]||(e[133]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[134]||(e[134]=_=>s.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),[[Oe,r.configFile.data_vectorization_chunk_size]]),z(c("input",{"onUpdate:modelValue":e[135]||(e[135]=_=>r.configFile.data_vectorization_chunk_size=_),type:"number",onChange:e[136]||(e[136]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.data_vectorization_chunk_size]])])]),c("tr",null,[Ddt,c("td",null,[z(c("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[137]||(e[137]=_=>r.configFile.data_vectorization_overlap_size=_),onChange:e[138]||(e[138]=_=>s.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),[[Oe,r.configFile.data_vectorization_overlap_size]]),z(c("input",{"onUpdate:modelValue":e[139]||(e[139]=_=>r.configFile.data_vectorization_overlap_size=_),type:"number",onChange:e[140]||(e[140]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.data_vectorization_overlap_size]])])]),c("tr",null,[kdt,c("td",null,[z(c("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[141]||(e[141]=_=>r.configFile.data_vectorization_nb_chunks=_),onChange:e[142]||(e[142]=_=>s.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),[[Oe,r.configFile.data_vectorization_nb_chunks]]),z(c("input",{"onUpdate:modelValue":e[143]||(e[143]=_=>r.configFile.data_vectorization_nb_chunks=_),type:"number",onChange:e[144]||(e[144]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1})],2)]),c("div",Ldt,[c("div",Pdt,[c("button",{onClick:e[145]||(e[145]=Te(_=>s.internet_conf_collapsed=!s.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,Fdt,512),[[Mt,s.internet_conf_collapsed]]),z(c("div",null,Gdt,512),[[Mt,!s.internet_conf_collapsed]]),Vdt])]),c("div",{class:qe([{hidden:s.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Re(o,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",zdt,[c("tr",null,[Hdt,c("td",null,[c("div",qdt,[z(c("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[146]||(e[146]=_=>r.configFile.activate_internet_search=_),onChange:e[147]||(e[147]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.activate_internet_search]])])])]),c("tr",null,[Ydt,c("td",null,[c("div",$dt,[z(c("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[148]||(e[148]=_=>r.configFile.activate_internet_pages_judgement=_),onChange:e[149]||(e[149]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.activate_internet_pages_judgement]])])])]),c("tr",null,[Wdt,c("td",null,[c("div",Kdt,[z(c("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[150]||(e[150]=_=>r.configFile.internet_quick_search=_),onChange:e[151]||(e[151]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.internet_quick_search]])])])]),c("tr",null,[jdt,c("td",null,[c("div",Qdt,[z(c("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[152]||(e[152]=_=>r.configFile.internet_activate_search_decision=_),onChange:e[153]||(e[153]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.internet_activate_search_decision]])])])]),c("tr",null,[Xdt,c("td",null,[c("div",Zdt,[z(c("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[154]||(e[154]=_=>r.configFile.internet_vectorization_chunk_size=_),onChange:e[155]||(e[155]=_=>s.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),[[Oe,r.configFile.internet_vectorization_chunk_size]]),z(c("input",{"onUpdate:modelValue":e[156]||(e[156]=_=>r.configFile.internet_vectorization_chunk_size=_),type:"number",onChange:e[157]||(e[157]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.internet_vectorization_chunk_size]])])])]),c("tr",null,[Jdt,c("td",null,[c("div",eut,[z(c("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[158]||(e[158]=_=>r.configFile.internet_vectorization_overlap_size=_),onChange:e[159]||(e[159]=_=>s.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),[[Oe,r.configFile.internet_vectorization_overlap_size]]),z(c("input",{"onUpdate:modelValue":e[160]||(e[160]=_=>r.configFile.internet_vectorization_overlap_size=_),type:"number",onChange:e[161]||(e[161]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.internet_vectorization_overlap_size]])])])]),c("tr",null,[tut,c("td",null,[c("div",nut,[z(c("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[162]||(e[162]=_=>r.configFile.internet_vectorization_nb_chunks=_),onChange:e[163]||(e[163]=_=>s.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.internet_vectorization_nb_chunks]]),z(c("input",{"onUpdate:modelValue":e[164]||(e[164]=_=>r.configFile.internet_vectorization_nb_chunks=_),type:"number",onChange:e[165]||(e[165]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.internet_vectorization_nb_chunks]])])])]),c("tr",null,[iut,c("td",null,[c("div",sut,[z(c("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[166]||(e[166]=_=>r.configFile.internet_nb_search_pages=_),onChange:e[167]||(e[167]=_=>s.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.internet_nb_search_pages]]),z(c("input",{"onUpdate:modelValue":e[168]||(e[168]=_=>r.configFile.internet_nb_search_pages=_),type:"number",onChange:e[169]||(e[169]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),c("div",rut,[c("div",out,[c("button",{onClick:e[170]||(e[170]=Te(_=>s.servers_conf_collapsed=!s.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,lut,512),[[Mt,s.servers_conf_collapsed]]),z(c("div",null,dut,512),[[Mt,!s.servers_conf_collapsed]]),uut])]),c("div",{class:qe([{hidden:s.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Re(o,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",put,[c("tr",null,[_ut,c("td",hut,[z(c("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[171]||(e[171]=_=>r.configFile.active_tts_service=_),onChange:e[172]||(e[172]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Eut,544),[[jt,r.configFile.active_tts_service]])])]),c("tr",null,[yut,c("td",vut,[z(c("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[173]||(e[173]=_=>r.configFile.active_stt_service=_),onChange:e[174]||(e[174]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Cut,544),[[jt,r.configFile.active_stt_service]])])]),wut,c("tr",null,[Rut,c("td",Aut,[z(c("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[175]||(e[175]=_=>r.configFile.active_tti_service=_),onChange:e[176]||(e[176]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Put,544),[[jt,r.configFile.active_tti_service]])])]),c("tr",null,[Uut,c("td",Fut,[z(c("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[177]||(e[177]=_=>r.configFile.active_ttm_service=_),onChange:e[178]||(e[178]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Vut,544),[[jt,r.configFile.active_ttm_service]])])])])]),_:1}),Re(o,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",zut,[c("tr",null,[Hut,c("td",null,[c("div",qut,[z(c("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[179]||(e[179]=_=>r.configFile.use_negative_prompt=_),onChange:e[180]||(e[180]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_negative_prompt]])])])]),c("tr",null,[Yut,c("td",null,[c("div",$ut,[z(c("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[181]||(e[181]=_=>r.configFile.use_ai_generated_negative_prompt=_),onChange:e[182]||(e[182]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_ai_generated_negative_prompt]])])])]),c("tr",null,[Wut,c("td",null,[c("div",Kut,[z(c("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[183]||(e[183]=_=>r.configFile.negative_prompt_generation_prompt=_),onChange:e[184]||(e[184]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.negative_prompt_generation_prompt]])])])]),c("tr",null,[jut,c("td",null,[c("div",Qut,[z(c("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[185]||(e[185]=_=>r.configFile.default_negative_prompt=_),onChange:e[186]||(e[186]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.default_negative_prompt]])])])])])]),_:1}),Re(o,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Xut,[c("tr",null,[Zut,c("td",Jut,[z(c("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[187]||(e[187]=_=>r.configFile.stt_listening_threshold=_),onChange:e[188]||(e[188]=_=>s.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),[[Oe,r.configFile.stt_listening_threshold]])])]),c("tr",null,[ept,c("td",tpt,[z(c("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[189]||(e[189]=_=>r.configFile.stt_silence_duration=_),onChange:e[190]||(e[190]=_=>s.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),[[Oe,r.configFile.stt_silence_duration]])])]),c("tr",null,[npt,c("td",ipt,[z(c("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[191]||(e[191]=_=>r.configFile.stt_sound_threshold_percentage=_),onChange:e[192]||(e[192]=_=>s.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),[[Oe,r.configFile.stt_sound_threshold_percentage]])])]),c("tr",null,[spt,c("td",rpt,[z(c("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[193]||(e[193]=_=>r.configFile.stt_gain=_),onChange:e[194]||(e[194]=_=>s.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),[[Oe,r.configFile.stt_gain]])])]),c("tr",null,[opt,c("td",apt,[z(c("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[195]||(e[195]=_=>r.configFile.stt_rate=_),onChange:e[196]||(e[196]=_=>s.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),[[Oe,r.configFile.stt_rate]])])]),c("tr",null,[lpt,c("td",cpt,[z(c("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[197]||(e[197]=_=>r.configFile.stt_channels=_),onChange:e[198]||(e[198]=_=>s.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),[[Oe,r.configFile.stt_channels]])])]),c("tr",null,[dpt,c("td",upt,[z(c("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[199]||(e[199]=_=>r.configFile.stt_buffer_size=_),onChange:e[200]||(e[200]=_=>s.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),[[Oe,r.configFile.stt_buffer_size]])])]),c("tr",null,[ppt,c("td",null,[c("div",_pt,[z(c("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[201]||(e[201]=_=>r.configFile.stt_activate_word_detection=_),onChange:e[202]||(e[202]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.stt_activate_word_detection]])])])]),c("tr",null,[hpt,c("td",null,[c("div",fpt,[z(c("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[203]||(e[203]=_=>r.configFile.stt_word_detection_file=_),onChange:e[204]||(e[204]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.stt_word_detection_file]])])])])])]),_:1}),Re(o,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",mpt,[c("tr",null,[gpt,c("td",bpt,[z(c("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[205]||(e[205]=_=>r.configFile.stt_input_device=_),onChange:e[206]||(e[206]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(s.snd_input_devices,(_,m)=>(A(),M("option",{key:_,value:s.snd_input_devices_indexes[m]},ge(_),9,Ept))),128))],544),[[jt,r.configFile.stt_input_device]])])]),c("tr",null,[ypt,c("td",vpt,[z(c("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[207]||(e[207]=_=>r.configFile.tts_output_device=_),onChange:e[208]||(e[208]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(s.snd_output_devices,(_,m)=>(A(),M("option",{key:_,value:s.snd_output_devices_indexes[m]},ge(_),9,Spt))),128))],544),[[jt,r.configFile.tts_output_device]])])])])]),_:1}),Re(o,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Tpt,[c("tr",null,[xpt,c("td",Cpt,[z(c("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[209]||(e[209]=_=>r.configFile.host=_),onChange:e[210]||(e[210]=_=>s.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),[[Oe,r.configFile.host]])])]),c("tr",null,[wpt,c("td",Rpt,[z(c("input",{type:"text",id:"lollms_access_keys",required:"","onUpdate:modelValue":e[211]||(e[211]=_=>r.configFile.lollms_access_keys=_),onChange:e[212]||(e[212]=_=>s.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),[[Oe,r.configFile.lollms_access_keys]])])]),c("tr",null,[Apt,c("td",Npt,[z(c("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[213]||(e[213]=_=>r.configFile.port=_),onChange:e[214]||(e[214]=_=>s.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),[[Oe,r.configFile.port]])])]),c("tr",null,[Opt,c("td",Ipt,[z(c("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[215]||(e[215]=_=>r.configFile.headless_server_mode=_),onChange:e[216]||(e[216]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.headless_server_mode]])])]),c("tr",null,[Mpt,c("td",Dpt,[z(c("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[217]||(e[217]=_=>r.configFile.activate_lollms_server=_),onChange:e[218]||(e[218]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.activate_lollms_server]])])]),c("tr",null,[kpt,c("td",Lpt,[z(c("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[219]||(e[219]=_=>r.configFile.activate_ollama_emulator=_),onChange:e[220]||(e[220]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.activate_ollama_emulator]])])]),c("tr",null,[Ppt,c("td",Upt,[z(c("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[221]||(e[221]=_=>r.configFile.activate_openai_emulator=_),onChange:e[222]||(e[222]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.activate_openai_emulator]])])]),c("tr",null,[Fpt,c("td",Bpt,[z(c("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[223]||(e[223]=_=>r.configFile.activate_mistralai_emulator=_),onChange:e[224]||(e[224]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),Re(o,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Gpt,[c("tr",null,[Vpt,c("td",null,[c("div",zpt,[z(c("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[225]||(e[225]=_=>r.configFile.activate_audio_infos=_),onChange:e[226]||(e[226]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.activate_audio_infos]])])])]),c("tr",null,[Hpt,c("td",null,[c("div",qpt,[z(c("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[227]||(e[227]=_=>r.configFile.audio_auto_send_input=_),onChange:e[228]||(e[228]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.audio_auto_send_input]])])])]),c("tr",null,[Ypt,c("td",null,[z(c("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[229]||(e[229]=_=>r.configFile.audio_silenceTimer=_),onChange:e[230]||(e[230]=_=>s.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),[[Oe,r.configFile.audio_silenceTimer]]),z(c("input",{"onUpdate:modelValue":e[231]||(e[231]=_=>r.configFile.audio_silenceTimer=_),onChange:e[232]||(e[232]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.audio_silenceTimer]])])]),c("tr",null,[$pt,c("td",null,[z(c("select",{id:"audio_in_language","onUpdate:modelValue":e[233]||(e[233]=_=>r.configFile.audio_in_language=_),onChange:e[234]||(e[234]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(r.audioLanguages,_=>(A(),M("option",{key:_.code,value:_.code},ge(_.name),9,Wpt))),128))],544),[[jt,r.configFile.audio_in_language]])])])])]),_:1}),Re(o,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Kpt,[c("tr",null,[jpt,c("td",null,[c("div",Qpt,[z(c("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[235]||(e[235]=_=>r.configFile.whisper_activate=_),onChange:e[236]||(e[236]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.whisper_activate]])])])]),c("tr",null,[Xpt,c("td",null,[c("div",Zpt,[z(c("select",{id:"whisper_model","onUpdate:modelValue":e[237]||(e[237]=_=>r.configFile.whisper_model=_),onChange:e[238]||(e[238]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(r.whisperModels,_=>(A(),M("option",{key:_,value:_},ge(_),9,Jpt))),128))],544),[[jt,r.configFile.whisper_model]])])])])])]),_:1}),Re(o,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",e_t,[c("tr",null,[t_t,c("td",null,[c("div",n_t,[z(c("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[239]||(e[239]=_=>r.configFile.openai_whisper_key=_),onChange:e[240]||(e[240]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.openai_whisper_key]])])])]),c("tr",null,[i_t,c("td",null,[c("div",s_t,[z(c("select",{id:"openai_whisper_model","onUpdate:modelValue":e[241]||(e[241]=_=>r.configFile.openai_whisper_model=_),onChange:e[242]||(e[242]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(r.openaiWhisperModels,_=>(A(),M("option",{key:_,value:_},ge(_),9,r_t))),128))],544),[[jt,r.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),Re(o,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",o_t,[c("tr",null,[a_t,c("td",null,[c("div",l_t,[z(c("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[243]||(e[243]=_=>r.configFile.auto_speak=_),onChange:e[244]||(e[244]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_speak]])])])]),c("tr",null,[c_t,c("td",null,[z(c("input",{id:"audio_pitch","onUpdate:modelValue":e[245]||(e[245]=_=>r.configFile.audio_pitch=_),onChange:e[246]||(e[246]=_=>s.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),[[Oe,r.configFile.audio_pitch]]),z(c("input",{"onUpdate:modelValue":e[247]||(e[247]=_=>r.configFile.audio_pitch=_),onChange:e[248]||(e[248]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.audio_pitch]])])]),c("tr",null,[d_t,c("td",null,[z(c("select",{id:"audio_out_voice","onUpdate:modelValue":e[249]||(e[249]=_=>r.configFile.audio_out_voice=_),onChange:e[250]||(e[250]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(s.audioVoices,_=>(A(),M("option",{key:_.name,value:_.name},ge(_.name),9,u_t))),128))],544),[[jt,r.configFile.audio_out_voice]])])])])]),_:1}),Re(o,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",p_t,[c("tr",null,[__t,c("td",null,[c("div",h_t,[z(c("input",{type:"checkbox",id:"xtts_enable",required:"","onUpdate:modelValue":e[251]||(e[251]=_=>r.configFile.xtts_enable=_),onChange:e[252]||(e[252]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.xtts_enable]])])])]),c("tr",null,[f_t,c("td",null,[c("div",m_t,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[253]||(e[253]=(..._)=>r.reinstallAudioService&&r.reinstallAudioService(..._))},"install xtts service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[254]||(e[254]=(..._)=>r.startAudioService&&r.startAudioService(..._))},"start xtts service"),c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:this.$store.state.config.xtts_base_url+"/docs",target:"_blank"},"show xtts service entries",8,g_t),b_t])])]),c("tr",null,[E_t,c("td",null,[c("div",y_t,[z(c("input",{type:"text",id:"xtts_base_url",required:"","onUpdate:modelValue":e[255]||(e[255]=_=>r.configFile.xtts_base_url=_),onChange:e[256]||(e[256]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.xtts_base_url]])])])]),c("tr",null,[v_t,c("td",null,[c("div",S_t,[z(c("select",{"onUpdate:modelValue":e[257]||(e[257]=_=>r.xtts_current_language=_),onChange:e[258]||(e[258]=_=>s.settingsChanged=!0),disabled:!r.xtts_enable},[(A(!0),M(We,null,ct(s.voice_languages,(_,m)=>(A(),M("option",{key:m,value:_},ge(m),9,x_t))),128))],40,T_t),[[jt,r.xtts_current_language]])])])]),c("tr",null,[C_t,c("td",null,[c("div",w_t,[z(c("select",{"onUpdate:modelValue":e[259]||(e[259]=_=>r.xtts_current_voice=_),onChange:e[260]||(e[260]=_=>s.settingsChanged=!0),disabled:!r.xtts_enable},[(A(!0),M(We,null,ct(s.voices,_=>(A(),M("option",{key:_,value:_},ge(_),9,A_t))),128))],40,R_t),[[jt,r.xtts_current_voice]])])])]),c("tr",null,[N_t,c("td",null,[c("div",O_t,[z(c("input",{type:"checkbox",id:"xtts_use_deepspeed",required:"","onUpdate:modelValue":e[261]||(e[261]=_=>r.configFile.xtts_use_deepspeed=_),onChange:e[262]||(e[262]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.xtts_enable},null,40,I_t),[[et,r.configFile.xtts_use_deepspeed]])])])]),c("tr",null,[M_t,c("td",null,[c("div",D_t,[z(c("input",{type:"checkbox",id:"xtts_use_streaming_mode",required:"","onUpdate:modelValue":e[263]||(e[263]=_=>r.configFile.xtts_use_streaming_mode=_),onChange:e[264]||(e[264]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.xtts_enable},null,40,k_t),[[et,r.configFile.xtts_use_streaming_mode]])])])]),c("tr",null,[L_t,c("td",null,[c("div",P_t,[z(c("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[265]||(e[265]=_=>r.configFile.auto_read=_),onChange:e[266]||(e[266]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.xtts_enable},null,40,U_t),[[et,r.configFile.auto_read]])])])]),c("tr",null,[F_t,c("td",null,[c("div",B_t,[z(c("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[267]||(e[267]=_=>r.configFile.xtts_stream_chunk_size=_),onChange:e[268]||(e[268]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.xtts_stream_chunk_size]])])])]),c("tr",null,[G_t,c("td",null,[c("div",V_t,[z(c("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[269]||(e[269]=_=>r.configFile.xtts_temperature=_),onChange:e[270]||(e[270]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[Oe,r.configFile.xtts_temperature,void 0,{number:!0}]])])])]),c("tr",null,[z_t,c("td",null,[c("div",H_t,[z(c("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[271]||(e[271]=_=>r.configFile.xtts_length_penalty=_),onChange:e[272]||(e[272]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[Oe,r.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),c("tr",null,[q_t,c("td",null,[c("div",Y_t,[z(c("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[273]||(e[273]=_=>r.configFile.xtts_repetition_penalty=_),onChange:e[274]||(e[274]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[Oe,r.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),c("tr",null,[$_t,c("td",null,[c("div",W_t,[z(c("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[275]||(e[275]=_=>r.configFile.xtts_top_k=_),onChange:e[276]||(e[276]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.xtts_top_k,void 0,{number:!0}]])])])]),c("tr",null,[K_t,c("td",null,[c("div",j_t,[z(c("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[277]||(e[277]=_=>r.configFile.xtts_top_p=_),onChange:e[278]||(e[278]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.xtts_top_p,void 0,{number:!0}]])])])]),c("tr",null,[Q_t,c("td",null,[c("div",X_t,[z(c("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[279]||(e[279]=_=>r.configFile.xtts_speed=_),onChange:e[280]||(e[280]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[Oe,r.configFile.xtts_speed,void 0,{number:!0}]])])])]),c("tr",null,[Z_t,c("td",null,[c("div",J_t,[z(c("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[281]||(e[281]=_=>r.configFile.enable_text_splitting=_),onChange:e[282]||(e[282]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_text_splitting]])])])])])]),_:1}),Re(o,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",eht,[c("tr",null,[tht,c("td",null,[c("div",nht,[z(c("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[283]||(e[283]=_=>r.configFile.openai_tts_key=_),onChange:e[284]||(e[284]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.openai_tts_key]])])])]),c("tr",null,[iht,c("td",null,[c("div",sht,[z(c("select",{"onUpdate:modelValue":e[285]||(e[285]=_=>r.configFile.openai_tts_model=_),onChange:e[286]||(e[286]=_=>s.settingsChanged=!0)},aht,544),[[jt,r.configFile.openai_tts_model]])])])]),c("tr",null,[lht,c("td",null,[c("div",cht,[z(c("select",{"onUpdate:modelValue":e[287]||(e[287]=_=>r.configFile.openai_tts_voice=_),onChange:e[288]||(e[288]=_=>s.settingsChanged=!0)},fht,544),[[jt,r.configFile.openai_tts_voice]])])])])])]),_:1})]),_:1}),Re(o,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",mht,[c("tr",null,[ght,c("td",null,[c("div",bht,[z(c("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[289]||(e[289]=_=>r.configFile.enable_sd_service=_),onChange:e[290]||(e[290]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_sd_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[291]||(e[291]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},yht)])]),c("tr",null,[vht,c("td",null,[c("div",Sht,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[292]||(e[292]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[293]||(e[293]=(..._)=>r.upgradeSDService&&r.upgradeSDService(..._))},"upgrade sd service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[294]||(e[294]=(..._)=>r.startSDService&&r.startSDService(..._))},"start sd service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[295]||(e[295]=(..._)=>r.showSD&&r.showSD(..._))},"show sd ui"),Tht])]),c("td",null,[c("div",xht,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[296]||(e[296]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service")])])]),c("tr",null,[Cht,c("td",null,[c("div",wht,[z(c("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[297]||(e[297]=_=>r.configFile.sd_base_url=_),onChange:e[298]||(e[298]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.sd_base_url]])])])])])]),_:1}),Re(o,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Rht,[c("tr",null,[Aht,c("td",null,[c("div",Nht,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[299]||(e[299]=(..._)=>r.reinstallDiffusersService&&r.reinstallDiffusersService(..._))},"install diffusers service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[300]||(e[300]=(..._)=>r.upgradeDiffusersService&&r.upgradeDiffusersService(..._))},"upgrade diffusers service"),Oht])])]),c("tr",null,[Iht,c("td",null,[c("div",Mht,[z(c("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[301]||(e[301]=_=>r.configFile.diffusers_model=_),onChange:e[302]||(e[302]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.diffusers_model]])])]),Dht])])]),_:1}),Re(o,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",kht,[c("tr",null,[Lht,c("td",null,[c("div",Pht,[z(c("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[303]||(e[303]=_=>r.configFile.midjourney_key=_),onChange:e[304]||(e[304]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.midjourney_key]])])])])])]),_:1}),Re(o,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Uht,[c("tr",null,[Fht,c("td",null,[c("div",Bht,[z(c("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[305]||(e[305]=_=>r.configFile.dall_e_key=_),onChange:e[306]||(e[306]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.dall_e_key]])])])]),c("tr",null,[Ght,c("td",null,[c("div",Vht,[z(c("select",{"onUpdate:modelValue":e[307]||(e[307]=_=>r.configFile.dall_e_generation_engine=_),onChange:e[308]||(e[308]=_=>s.settingsChanged=!0)},qht,544),[[jt,r.configFile.dall_e_generation_engine]])])])])])]),_:1}),Re(o,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Yht,[c("tr",null,[$ht,c("td",null,[c("div",Wht,[z(c("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[309]||(e[309]=_=>r.configFile.enable_comfyui_service=_),onChange:e[310]||(e[310]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_comfyui_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[311]||(e[311]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},jht)])]),c("tr",null,[Qht,c("td",null,[c("div",Xht,[z(c("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[312]||(e[312]=_=>r.configFile.comfyui_model=_),onChange:e[313]||(e[313]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.comfyui_model]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[314]||(e[314]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Jht)])]),c("tr",null,[eft,c("td",null,[c("div",tft,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[315]||(e[315]=(..._)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(..._))},"install comfyui service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[316]||(e[316]=(..._)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(..._))},"upgrade comfyui service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[317]||(e[317]=(..._)=>r.startComfyUIService&&r.startComfyUIService(..._))},"start comfyui service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[318]||(e[318]=(..._)=>r.showComfyui&&r.showComfyui(..._))},"show comfyui"),nft])])]),c("tr",null,[ift,c("td",null,[c("div",sft,[z(c("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[319]||(e[319]=_=>r.configFile.comfyui_base_url=_),onChange:e[320]||(e[320]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),Re(o,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",rft,[c("tr",null,[oft,c("td",null,[c("div",aft,[z(c("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[321]||(e[321]=_=>r.configFile.enable_ollama_service=_),onChange:e[322]||(e[322]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_ollama_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[323]||(e[323]=_=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. +You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},B=t=>(Or("data-v-cb71036e"),t=t(),Ir(),t),lot={class:"container overflow-y-scroll flex flex-row 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"},cot={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"},dot={key:0,class:"flex gap-3 flex-1 items-center duration-75"},uot=B(()=>c("i",{"data-feather":"x"},null,-1)),pot=[uot],_ot=B(()=>c("i",{"data-feather":"check"},null,-1)),hot=[_ot],fot={key:1,class:"flex gap-3 flex-1 items-center"},mot=B(()=>c("i",{"data-feather":"save"},null,-1)),got=[mot],bot=B(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),Eot=[bot],yot=B(()=>c("i",{"data-feather":"list"},null,-1)),vot=[yot],Sot={class:"flex gap-3 flex-1 items-center justify-end"},Tot=B(()=>c("i",{"data-feather":"trash-2"},null,-1)),xot=[Tot],Cot=B(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),wot=[Cot],Rot=B(()=>c("i",{"data-feather":"arrow-up-circle"},null,-1)),Aot={key:0},Not=B(()=>c("i",{"data-feather":"alert-circle"},null,-1)),Oot=[Not],Iot={class:"flex gap-3 items-center"},Mot={key:0,class:"flex gap-3 items-center"},Dot=B(()=>c("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),kot=B(()=>c("i",{"data-feather":"check"},null,-1)),Lot=[kot],Pot={key:1,role:"status"},Uot=B(()=>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)),Fot=B(()=>c("span",{class:"sr-only"},"Loading...",-1)),Bot={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"},Got={class:"flex flex-row p-3"},Vot=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),zot=[Vot],Hot=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),qot=[Hot],Yot=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),$ot=B(()=>c("div",{class:"mr-2"},"|",-1)),Wot={class:"text-base font-semibold cursor-pointer select-none items-center"},Kot={class:"flex gap-2 items-center"},jot={key:0},Qot=["src"],Xot={class:"font-bold font-large text-lg"},Zot={key:1},Jot={class:"flex gap-2 items-center"},eat=["src"],tat={class:"font-bold font-large text-lg"},nat=B(()=>c("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),iat={class:"font-bold font-large text-lg"},sat=B(()=>c("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),rat={class:"font-bold font-large text-lg"},oat={class:"mb-2"},aat=B(()=>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"})]),Je(" CPU Ram usage: ")],-1)),lat={class:"flex flex-col mx-2"},cat=B(()=>c("b",null,"Avaliable ram: ",-1)),dat=B(()=>c("b",null,"Ram usage: ",-1)),uat={class:"p-2"},pat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},_at={class:"mb-2"},hat=B(()=>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"}),Je(" Disk usage: ")],-1)),fat={class:"flex flex-col mx-2"},mat=B(()=>c("b",null,"Avaliable disk space: ",-1)),gat=B(()=>c("b",null,"Disk usage: ",-1)),bat={class:"p-2"},Eat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},yat={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},vat=["src"],Sat={class:"flex flex-col mx-2"},Tat=B(()=>c("b",null,"Model: ",-1)),xat=B(()=>c("b",null,"Avaliable vram: ",-1)),Cat=B(()=>c("b",null,"GPU usage: ",-1)),wat={class:"p-2"},Rat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Aat={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"},Nat={class:"flex flex-row p-3"},Oat=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),Iat=[Oat],Mat=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Dat=[Mat],kat=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),Lat={class:"flex flex-col mb-2 px-3 pb-2"},Pat={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"},Uat=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),Fat={for:"logo-upload"},Bat=["src"],Gat={style:{width:"10%"}},Vat=B(()=>c("i",{"data-feather":"x"},null,-1)),zat=[Vat],Hat=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),qat={class:"text-center items-center"},Yat={class:"flex flex-row"},$at=B(()=>c("option",{value:"cpu"},"CPU",-1)),Wat=B(()=>c("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),Kat=B(()=>c("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),jat=B(()=>c("option",{value:"nvidia"},"NVIDIA",-1)),Qat=B(()=>c("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),Xat=B(()=>c("option",{value:"amd"},"AMD",-1)),Zat=B(()=>c("option",{value:"apple-intel"},"Apple Intel",-1)),Jat=B(()=>c("option",{value:"apple-silicon"},"Apple Silicon",-1)),elt=[$at,Wat,Kat,jat,Qat,Xat,Zat,Jat],tlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),nlt={style:{width:"100%"}},ilt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),slt={class:"flex flex-row"},rlt=B(()=>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)),olt={class:"flex flex-row"},alt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),llt={class:"flex flex-row"},clt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),dlt={class:"flex flex-row"},ult=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),plt={class:"flex flex-row"},_lt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),hlt={class:"flex flex-row"},flt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),mlt={class:"flex flex-row"},glt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),blt={class:"flex flex-row"},Elt={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"},ylt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),vlt=B(()=>c("option",{value:"lollms"},"Lollms communication template",-1)),Slt=B(()=>c("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1)),Tlt=B(()=>c("option",{value:"llama3"},"LLama3 communication template",-1)),xlt=B(()=>c("option",{value:"mistral"},"Mistral communication template",-1)),Clt=[vlt,Slt,Tlt,xlt],wlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),Rlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),Alt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),Nlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),Olt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),Ilt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),Mlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),Dlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),klt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),Llt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),Plt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),Ult=["innerHTML"],Flt={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"},Blt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),Glt={style:{width:"100%"}},Vlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),zlt={style:{width:"100%"}},Hlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),qlt={style:{width:"100%"}},Ylt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),$lt={style:{width:"100%"}},Wlt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),Klt={for:"avatar-upload"},jlt=["src"],Qlt={style:{width:"10%"}},Xlt=B(()=>c("i",{"data-feather":"x"},null,-1)),Zlt=[Xlt],Jlt=B(()=>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)),ect={class:"flex flex-row"},tct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),nct={style:{width:"100%"}},ict=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),sct={style:{width:"100%"}},rct={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"},oct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),act={style:{width:"100%"}},lct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),cct={style:{width:"100%"}},dct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),uct={style:{width:"100%"}},pct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),_ct={style:{width:"100%"}},hct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),fct={style:{width:"100%"}},mct={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"},gct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),bct={class:"flex flex-row"},Ect=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),yct={style:{width:"100%"}},vct={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"},Sct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),Tct={class:"flex flex-row"},xct={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"},Cct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),wct={class:"flex flex-row"},Rct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),Act={class:"flex flex-row"},Nct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),Oct={class:"flex flex-row"},Ict={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"},Mct={class:"flex flex-row p-3"},Dct=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),kct=[Dct],Lct=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Pct=[Lct],Uct=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1)),Fct={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"},Bct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),Gct={style:{width:"100%"}},Vct=["onUpdate:modelValue"],zct=["onClick"],Hct=["onClick"],qct=["onClick"],Yct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),$ct=B(()=>c("option",{value:"bert"},"Bert Vectorizer",-1)),Wct=B(()=>c("option",{value:"tfidf"},"TFIDF Vectorizer",-1)),Kct=B(()=>c("option",{value:"word2vec"},"Word2Vec Vectorizer",-1)),jct=[$ct,Wct,Kct],Qct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),Xct=B(()=>c("option",{value:"bert-base-nli-mean-tokens"},"bert-base-nli-mean-tokens",-1)),Zct=[Xct],Jct=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),edt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),tdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),ndt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),idt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),sdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),rdt={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"},odt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save vectorized database:")],-1)),adt={class:"flex flex-row"},ldt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),cdt={class:"flex flex-row"},ddt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),udt={class:"flex flex-row"},pdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_force_first_chunk",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force adding the first chunk of the file to the context:")],-1)),_dt={class:"flex flex-row"},hdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),fdt={class:"flex flex-row"},mdt=B(()=>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)),gdt=B(()=>c("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),bdt=B(()=>c("option",{value:"bm25_vectorizer"},"bm25 Vectorizer",-1)),Edt=B(()=>c("option",{value:"model_embedding"},"Model Embedding",-1)),ydt=B(()=>c("option",{value:"sentense_transformer"},"Sentense Transformer",-1)),vdt=[gdt,bdt,Edt,ydt],Sdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_sentense_transformer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization model (for Sentense Transformer):")],-1)),Tdt={style:{width:"100%"}},xdt=B(()=>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)),Cdt=B(()=>c("option",{value:"PCA"},"PCA",-1)),wdt=B(()=>c("option",{value:"TSNE"},"TSNE",-1)),Rdt=[Cdt,wdt],Adt=B(()=>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)),Ndt={class:"flex flex-row"},Odt=B(()=>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)),Idt=B(()=>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)),Mdt=B(()=>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)),Ddt={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"},kdt={class:"flex flex-row p-3"},Ldt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),Pdt=[Ldt],Udt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Fdt=[Udt],Bdt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1)),Gdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Vdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),zdt={class:"flex flex-row"},Hdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),qdt={class:"flex flex-row"},Ydt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),$dt={class:"flex flex-row"},Wdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),Kdt={class:"flex flex-row"},jdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),Qdt={class:"flex flex-col"},Xdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),Zdt={class:"flex flex-col"},Jdt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),eut={class:"flex flex-col"},tut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),nut={class:"flex flex-col"},iut={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"},sut={class:"flex flex-row p-3"},rut=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),out=[rut],aut=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),lut=[aut],cut=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1)),dut={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"},uut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),put={style:{width:"100%"}},_ut=B(()=>c("option",{value:"None"},"None",-1)),hut=B(()=>c("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1)),fut=B(()=>c("option",{value:"xtts"},"XTTS",-1)),mut=B(()=>c("option",{value:"openai_tts"},"Open AI TTS",-1)),gut=[_ut,hut,fut,mut],but=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),Eut={style:{width:"100%"}},yut=B(()=>c("option",{value:"None"},"None",-1)),vut=B(()=>c("option",{value:"whisper"},"Whisper",-1)),Sut=B(()=>c("option",{value:"openai_whisper"},"Open AI Whisper",-1)),Tut=[yut,vut,Sut],xut=B(()=>c("tr",null,null,-1)),Cut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),wut={style:{width:"100%"}},Rut=B(()=>c("option",{value:"None"},"None",-1)),Aut=B(()=>c("option",{value:"diffusers"},"Diffusers",-1)),Nut=B(()=>c("option",{value:"autosd"},"AUTO1111's SD",-1)),Out=B(()=>c("option",{value:"dall-e"},"Open AI DALL-E",-1)),Iut=B(()=>c("option",{value:"midjourney"},"Midjourney",-1)),Mut=B(()=>c("option",{value:"comfyui"},"Comfyui",-1)),Dut=B(()=>c("option",{value:"fooocus"},"Fooocus",-1)),kut=[Rut,Aut,Nut,Out,Iut,Mut,Dut],Lut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),Put={style:{width:"100%"}},Uut=B(()=>c("option",{value:"None"},"None",-1)),Fut=B(()=>c("option",{value:"musicgen"},"Music Gen",-1)),But=[Uut,Fut],Gut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Vut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),zut={class:"flex flex-row"},Hut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),qut={class:"flex flex-row"},Yut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),$ut={class:"flex flex-row"},Wut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),Kut={class:"flex flex-row"},jut={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"},Qut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),Xut={style:{width:"100%"}},Zut=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),Jut={style:{width:"100%"}},ept=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),tpt={style:{width:"100%"}},npt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),ipt={style:{width:"100%"}},spt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),rpt={style:{width:"100%"}},opt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),apt={style:{width:"100%"}},lpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),cpt={style:{width:"100%"}},dpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),upt={class:"flex flex-row"},ppt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),_pt={class:"flex flex-row"},hpt={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"},fpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),mpt={style:{width:"100%"}},gpt=["value"],bpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),Ept={style:{width:"100%"}},ypt=["value"],vpt={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"},Spt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Tpt={style:{width:"100%"}},xpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys (coma separated, if empty, anyone can use the server without authentication):")],-1)),Cpt={style:{width:"100%"}},wpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),Rpt={style:{width:"100%"}},Apt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode (deactivates all code exectuion to protect the PC from attacks):")],-1)),Npt={style:{width:"100%"}},Opt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),Ipt={style:{width:"100%"}},Mpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),Dpt={style:{width:"100%"}},kpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),Lpt={style:{width:"100%"}},Ppt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),Upt={style:{width:"100%"}},Fpt={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"},Bpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),Gpt={class:"flex flex-row"},Vpt=B(()=>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)),zpt={class:"flex flex-row"},Hpt=B(()=>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)),qpt=B(()=>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)),Ypt=["value"],$pt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Wpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),Kpt={class:"flex flex-row"},jpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),Qpt={class:"flex flex-row"},Xpt=["value"],Zpt={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"},Jpt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),e_t={class:"flex flex-row"},t_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),n_t={class:"flex flex-row"},i_t=["value"],s_t={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},r_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),o_t={class:"flex flex-row"},a_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),l_t=B(()=>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)),c_t=["value"],d_t={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},u_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_enable",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable voice service:")],-1)),p_t={class:"flex flex-row"},__t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_xtts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xTTS service:")],-1)),h_t={class:"flex flex-row"},f_t=["href"],m_t=B(()=>c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/xtts-api-server/blob/main/LICENSE",target:"_blank"},"licence",-1)),g_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts base url:")],-1)),b_t={class:"flex flex-row"},E_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),y_t={class:"flex flex-row"},v_t=["disabled"],S_t=["value"],T_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),x_t={class:"flex flex-row"},C_t=["disabled"],w_t=["value"],R_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_use_deepspeed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable deepspeed:")],-1)),A_t={class:"flex flex-row"},N_t=["disabled"],O_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_use_streaming_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable streaming mode:")],-1)),I_t={class:"flex flex-row"},M_t=["disabled"],D_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),k_t={class:"flex flex-row"},L_t=["disabled"],P_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),U_t={class:"flex flex-row"},F_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),B_t={class:"flex flex-row"},G_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),V_t={class:"flex flex-row"},z_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),H_t={class:"flex flex-row"},q_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),Y_t={class:"flex flex-row"},$_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),W_t={class:"flex flex-row"},K_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),j_t={class:"flex flex-row"},Q_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),X_t={class:"flex flex-row"},Z_t={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},J_t=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),eht={class:"flex flex-row"},tht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),nht={class:"flex flex-row"},iht=B(()=>c("option",null," tts-1 ",-1)),sht=B(()=>c("option",null," tts-2 ",-1)),rht=[iht,sht],oht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),aht={class:"flex flex-row"},lht=B(()=>c("option",null," alloy ",-1)),cht=B(()=>c("option",null," echo ",-1)),dht=B(()=>c("option",null," fable ",-1)),uht=B(()=>c("option",null," nova ",-1)),pht=B(()=>c("option",null," shimmer ",-1)),_ht=[lht,cht,dht,uht,pht],hht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},fht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),mht={class:"flex flex-row"},ght=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),bht=[ght],Eht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),yht={class:"flex flex-row"},vht=B(()=>c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1)),Sht={class:"flex flex-row"},Tht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),xht={class:"flex flex-row"},Cht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},wht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),Rht={class:"flex flex-row"},Aht=B(()=>c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1)),Nht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),Oht={class:"flex flex-row"},Iht=B(()=>c("td",null,null,-1)),Mht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Dht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),kht={class:"flex flex-row"},Lht={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Pht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),Uht={class:"flex flex-row"},Fht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),Bht={class:"flex flex-row"},Ght=B(()=>c("option",null," dall-e-2 ",-1)),Vht=B(()=>c("option",null," dall-e-3 ",-1)),zht=[Ght,Vht],Hht={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"},qht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),Yht={class:"flex flex-row"},$ht=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Wht=[$ht],Kht=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),jht={class:"flex flex-row"},Qht=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Xht=[Qht],Zht=B(()=>c("td",{style:{"min-width":"200px"}},null,-1)),Jht={class:"flex flex-row"},eft=B(()=>c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1)),tft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),nft={class:"flex flex-row"},ift={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"},sft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),rft={class:"flex flex-row"},oft=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),aft=[oft],lft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),cft={class:"flex flex-row"},dft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),uft={class:"flex flex-row"},pft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},_ft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),hft={class:"flex flex-row"},fft=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),mft=[fft],gft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),bft={class:"flex flex-row"},Eft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),yft={class:"flex flex-row"},vft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),Sft={class:"flex flex-col align-bottom"},Tft={class:"relative"},xft=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),Cft={class:"absolute right-0"},wft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),Rft={class:"flex flex-row"},Aft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),Nft={class:"flex flex-row"},Oft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),Ift={class:"flex flex-row"},Mft={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Dft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),kft={class:"flex flex-row"},Lft=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Pft=[Lft],Uft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),Fft={class:"flex flex-row"},Bft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),Gft={class:"flex flex-row"},Vft={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"},zft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Motion Ctrl service:")],-1)),Hft={class:"flex flex-row"},qft=B(()=>c("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Yft=[qft],$ft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Motion Ctrl service:")],-1)),Wft={class:"flex flex-row"},Kft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),jft={class:"flex flex-row"},Qft={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"},Xft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"xtts_enable",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),Zft={class:"flex flex-row"},Jft=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),emt={class:"flex flex-row"},tmt=B(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),nmt={class:"flex flex-row"},imt={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"},smt={class:"flex flex-row p-3"},rmt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),omt=[rmt],amt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),lmt=[amt],cmt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),dmt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},umt=B(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),pmt={key:1,class:"mr-2"},_mt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},hmt={class:"flex gap-1 items-center"},fmt=["src"],mmt={class:"font-bold font-large text-lg line-clamp-1"},gmt={key:0,class:"mb-2"},bmt={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Emt=B(()=>c("i",{"data-feather":"chevron-up"},null,-1)),ymt=[Emt],vmt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Smt=[vmt],Tmt={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"},xmt={class:"flex flex-row p-3"},Cmt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),wmt=[Cmt],Rmt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Amt=[Rmt],Nmt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),Omt={class:"flex flex-row items-center"},Imt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Mmt=B(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Dmt={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},kmt=B(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Lmt={key:2,class:"mr-2"},Pmt={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},Umt={class:"flex gap-1 items-center"},Fmt=["src"],Bmt={class:"font-bold font-large text-lg line-clamp-1"},Gmt={class:"mx-2 mb-4"},Vmt={class:"relative"},zmt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Hmt={key:0},qmt=B(()=>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)),Ymt=[qmt],$mt={key:1},Wmt=B(()=>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)),Kmt=[Wmt],jmt=B(()=>c("label",{for:"only_installed"},"Show only installed models",-1)),Qmt=B(()=>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)),Xmt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},Zmt=B(()=>c("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[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)),Jmt=B(()=>c("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),egt=[Zmt,Jmt],tgt={key:1,class:"mb-2"},ngt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},igt=B(()=>c("i",{"data-feather":"chevron-up"},null,-1)),sgt=[igt],rgt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),ogt=[rgt],agt={class:"mb-2"},lgt={class:"p-2"},cgt={class:"mb-3"},dgt=B(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),ugt={key:0},pgt={class:"mb-3"},_gt=B(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),hgt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},fgt=B(()=>c("div",{role:"status",class:"justify-center"},null,-1)),mgt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},ggt={class:"w-full p-2"},bgt={class:"flex justify-between mb-1"},Egt=zb(' Downloading Loading...',1),ygt={class:"text-sm font-medium text-blue-700 dark:text-white"},vgt=["title"],Sgt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Tgt={class:"flex justify-between mb-1"},xgt={class:"text-base font-medium text-blue-700 dark:text-white"},Cgt={class:"text-sm font-medium text-blue-700 dark:text-white"},wgt={class:"flex flex-grow"},Rgt={class:"flex flex-row flex-grow gap-3"},Agt={class:"p-2 text-center grow"},Ngt={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"},Ogt={class:"flex flex-row p-3 items-center"},Igt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),Mgt=[Igt],Dgt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),kgt=[Dgt],Lgt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),Pgt={key:0,class:"mr-2"},Ugt={class:"mr-2 font-bold font-large text-lg line-clamp-1"},Fgt={key:1,class:"mr-2"},Bgt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},Ggt={key:0,class:"flex -space-x-4 items-center"},Vgt={class:"group items-center flex flex-row"},zgt=["onClick"],Hgt=["src","title"],qgt=["onClick"],Ygt=B(()=>c("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[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)),$gt=[Ygt],Wgt=B(()=>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)),Kgt=[Wgt],jgt={class:"mx-2 mb-4"},Qgt=B(()=>c("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Xgt={class:"relative"},Zgt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Jgt={key:0},ebt=B(()=>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)),tbt=[ebt],nbt={key:1},ibt=B(()=>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)),sbt=[ibt],rbt={key:0,class:"mx-2 mb-4"},obt={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},abt=["selected"],lbt={key:0,class:"mb-2"},cbt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},dbt=B(()=>c("i",{"data-feather":"chevron-up"},null,-1)),ubt=[dbt],pbt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),_bt=[pbt],hbt={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"},fbt={class:"flex flex-row"},mbt=B(()=>c("i",{"data-feather":"chevron-right"},null,-1)),gbt=[mbt],bbt=B(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Ebt=[bbt],ybt=B(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),vbt={class:"m-2"},Sbt={class:"flex flex-row gap-2 items-center"},Tbt=B(()=>c("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),xbt={class:"m-2"},Cbt=B(()=>c("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),wbt={class:"m-2"},Rbt={class:"flex flex-col align-bottom"},Abt={class:"relative"},Nbt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),Obt={class:"absolute right-0"},Ibt={class:"m-2"},Mbt={class:"flex flex-col align-bottom"},Dbt={class:"relative"},kbt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),Lbt={class:"absolute right-0"},Pbt={class:"m-2"},Ubt={class:"flex flex-col align-bottom"},Fbt={class:"relative"},Bbt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),Gbt={class:"absolute right-0"},Vbt={class:"m-2"},zbt={class:"flex flex-col align-bottom"},Hbt={class:"relative"},qbt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),Ybt={class:"absolute right-0"},$bt={class:"m-2"},Wbt={class:"flex flex-col align-bottom"},Kbt={class:"relative"},jbt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),Qbt={class:"absolute right-0"},Xbt={class:"m-2"},Zbt={class:"flex flex-col align-bottom"},Jbt={class:"relative"},eEt=B(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),tEt={class:"absolute right-0"};function nEt(t,e,n,i,s,r){const o=ft("Card"),a=ft("BindingEntry"),l=ft("RadioOptions"),u=ft("model-entry"),d=ft("personality-entry"),h=ft("AddModelDialog"),f=ft("ChoiceDialog");return A(),M(We,null,[c("div",lot,[c("div",cot,[s.showConfirmation?(A(),M("div",dot,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=Te(_=>s.showConfirmation=!1,["stop"]))},pot),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=Te(_=>r.save_configuration(),["stop"]))},hot)])):$("",!0),s.showConfirmation?$("",!0):(A(),M("div",fot,[c("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=_=>s.showConfirmation=!0)},got),c("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=_=>r.reset_configuration())},Eot),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]=Te(_=>s.all_collapsed=!s.all_collapsed,["stop"]))},vot)])),c("div",Sot,[c("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=_=>r.api_get_req("clear_uploads").then(m=>{m.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},xot),c("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=_=>r.api_post_req("restart_program").then(m=>{m.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},wot),c("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=_=>r.api_post_req("update_software").then(m=>{m.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},[Rot,s.has_updates?(A(),M("div",Aot,Oot)):$("",!0)]),c("div",Iot,[s.settingsChanged?(A(),M("div",Mot,[Dot,s.isLoading?$("",!0):(A(),M("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=Te(_=>r.applyConfiguration(),["stop"]))},Lot))])):$("",!0),s.isLoading?(A(),M("div",Pot,[c("p",null,ge(s.loading_text),1),Uot,Fot])):$("",!0)])])]),c("div",{class:qe(s.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[c("div",Bot,[c("div",Got,[c("button",{onClick:e[9]||(e[9]=Te(_=>s.sc_collapsed=!s.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,zot,512),[[Mt,s.sc_collapsed]]),z(c("div",null,qot,512),[[Mt,!s.sc_collapsed]]),Yot,$ot,c("div",Wot,[c("div",Kot,[c("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(A(),M("div",jot,[(A(!0),M(We,null,ct(r.vramUsage.gpus,_=>(A(),M("div",{class:"flex gap-2 items-center",key:_},[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,Qot),c("h3",Xot,[c("div",null,ge(r.computedFileSize(_.used_vram))+" / "+ge(r.computedFileSize(_.total_vram))+" ("+ge(_.percentage)+"%) ",1)])]))),128))])):$("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(A(),M("div",Zot,[c("div",Jot,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,eat),c("h3",tat,[c("div",null,ge(r.vramUsage.gpus.length)+"x ",1)])])])):$("",!0)]),nat,c("h3",iat,[c("div",null,ge(r.ram_usage)+" / "+ge(r.ram_total_space)+" ("+ge(r.ram_percent_usage)+"%)",1)]),sat,c("h3",rat,[c("div",null,ge(r.disk_binding_models_usage)+" / "+ge(r.disk_total_space)+" ("+ge(r.disk_percent_usage)+"%)",1)])])])])]),c("div",{class:qe([{hidden:s.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",oat,[aat,c("div",lat,[c("div",null,[cat,Je(ge(r.ram_available_space),1)]),c("div",null,[dat,Je(" "+ge(r.ram_usage)+" / "+ge(r.ram_total_space)+" ("+ge(r.ram_percent_usage)+")% ",1)])]),c("div",uat,[c("div",pat,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+r.ram_percent_usage+"%;")},null,4)])])]),c("div",_at,[hat,c("div",fat,[c("div",null,[mat,Je(ge(r.disk_available_space),1)]),c("div",null,[gat,Je(" "+ge(r.disk_binding_models_usage)+" / "+ge(r.disk_total_space)+" ("+ge(r.disk_percent_usage)+"%)",1)])]),c("div",bat,[c("div",Eat,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(A(!0),M(We,null,ct(r.vramUsage.gpus,_=>(A(),M("div",{class:"mb-2",key:_},[c("label",yat,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,vat),Je(" GPU usage: ")]),c("div",Sat,[c("div",null,[Tat,Je(ge(_.gpu_model),1)]),c("div",null,[xat,Je(ge(this.computedFileSize(_.available_space)),1)]),c("div",null,[Cat,Je(" "+ge(this.computedFileSize(_.used_vram))+" / "+ge(this.computedFileSize(_.total_vram))+" ("+ge(_.percentage)+"%)",1)])]),c("div",wat,[c("div",Rat,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+_.percentage+"%;")},null,4)])])]))),128))],2)]),c("div",Aat,[c("div",Nat,[c("button",{onClick:e[10]||(e[10]=Te(_=>s.minconf_collapsed=!s.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,Iat,512),[[Mt,s.minconf_collapsed]]),z(c("div",null,Dat,512),[[Mt,!s.minconf_collapsed]]),kat])]),c("div",{class:qe([{hidden:s.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",Lat,[Re(o,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Pat,[c("tr",null,[Uat,c("td",null,[c("label",Fat,[c("img",{src:r.configFile.app_custom_logo!=null&&r.configFile.app_custom_logo!=""?"/user_infos/"+r.configFile.app_custom_logo:s.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,Bat)]),c("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[11]||(e[11]=(..._)=>r.uploadLogo&&r.uploadLogo(..._))},null,32)]),c("td",Gat,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[12]||(e[12]=Te(_=>r.resetLogo(),["stop"]))},zat)])]),c("tr",null,[Hat,c("td",qat,[c("div",Yat,[z(c("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[13]||(e[13]=_=>r.configFile.hardware_mode=_),onChange:e[14]||(e[14]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},elt,544),[[jt,r.configFile.hardware_mode]])])])]),c("tr",null,[tlt,c("td",nlt,[z(c("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[15]||(e[15]=_=>r.configFile.discussion_db_name=_),onChange:e[16]||(e[16]=_=>s.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),[[Oe,r.configFile.discussion_db_name]])])]),c("tr",null,[ilt,c("td",null,[c("div",slt,[z(c("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[17]||(e[17]=_=>r.configFile.copy_to_clipboard_add_all_details=_),onChange:e[18]||(e[18]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.copy_to_clipboard_add_all_details]])])])]),c("tr",null,[rlt,c("td",null,[c("div",olt,[z(c("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[19]||(e[19]=_=>r.configFile.auto_show_browser=_),onChange:e[20]||(e[20]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_show_browser]])])])]),c("tr",null,[alt,c("td",null,[c("div",llt,[z(c("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[21]||(e[21]=_=>r.configFile.debug=_),onChange:e[22]||(e[22]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.debug]])])])]),c("tr",null,[clt,c("td",null,[c("div",dlt,[z(c("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[23]||(e[23]=_=>r.configFile.debug_log_file_path=_),onChange:e[24]||(e[24]=_=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.debug_log_file_path]])])])]),c("tr",null,[ult,c("td",null,[c("div",plt,[z(c("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[25]||(e[25]=_=>r.configFile.show_news_panel=_),onChange:e[26]||(e[26]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.show_news_panel]])])])]),c("tr",null,[_lt,c("td",null,[c("div",hlt,[z(c("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[27]||(e[27]=_=>r.configFile.auto_save=_),onChange:e[28]||(e[28]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_save]])])])]),c("tr",null,[flt,c("td",null,[c("div",mlt,[z(c("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[29]||(e[29]=_=>r.configFile.auto_update=_),onChange:e[30]||(e[30]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_update]])])])]),c("tr",null,[glt,c("td",null,[c("div",blt,[z(c("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[31]||(e[31]=_=>r.configFile.auto_title=_),onChange:e[32]||(e[32]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_title]])])])])])]),_:1}),Re(o,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Elt,[c("tr",null,[ylt,c("td",null,[c("select",{onChange:e[33]||(e[33]=(..._)=>r.handleTemplateSelection&&r.handleTemplateSelection(..._))},Clt,32)])]),c("tr",null,[wlt,c("td",null,[z(c("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[34]||(e[34]=_=>r.configFile.start_header_id_template=_),onChange:e[35]||(e[35]=_=>s.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),[[Oe,r.configFile.start_header_id_template]])])]),c("tr",null,[Rlt,c("td",null,[z(c("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[36]||(e[36]=_=>r.configFile.end_header_id_template=_),onChange:e[37]||(e[37]=_=>s.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),[[Oe,r.configFile.end_header_id_template]])])]),c("tr",null,[Alt,c("td",null,[z(c("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[38]||(e[38]=_=>r.configFile.start_user_header_id_template=_),onChange:e[39]||(e[39]=_=>s.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),[[Oe,r.configFile.start_user_header_id_template]])])]),c("tr",null,[Nlt,c("td",null,[z(c("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[40]||(e[40]=_=>r.configFile.end_user_header_id_template=_),onChange:e[41]||(e[41]=_=>s.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),[[Oe,r.configFile.end_user_header_id_template]])])]),c("tr",null,[Olt,c("td",null,[z(c("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[42]||(e[42]=_=>r.configFile.end_user_message_id_template=_),onChange:e[43]||(e[43]=_=>s.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),[[Oe,r.configFile.end_user_message_id_template]])])]),c("tr",null,[Ilt,c("td",null,[z(c("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[44]||(e[44]=_=>r.configFile.start_ai_header_id_template=_),onChange:e[45]||(e[45]=_=>s.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),[[Oe,r.configFile.start_ai_header_id_template]])])]),c("tr",null,[Mlt,c("td",null,[z(c("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[46]||(e[46]=_=>r.configFile.end_ai_header_id_template=_),onChange:e[47]||(e[47]=_=>s.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),[[Oe,r.configFile.end_ai_header_id_template]])])]),c("tr",null,[Dlt,c("td",null,[z(c("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[48]||(e[48]=_=>r.configFile.end_ai_message_id_template=_),onChange:e[49]||(e[49]=_=>s.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),[[Oe,r.configFile.end_ai_message_id_template]])])]),c("tr",null,[klt,c("td",null,[z(c("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[50]||(e[50]=_=>r.configFile.separator_template=_),onChange:e[51]||(e[51]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.separator_template]])])]),c("tr",null,[Llt,c("td",null,[z(c("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[52]||(e[52]=_=>r.configFile.system_message_template=_),onChange:e[53]||(e[53]=_=>s.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),[[Oe,r.configFile.system_message_template]])])]),c("tr",null,[Plt,c("td",null,[c("div",{innerHTML:r.full_template},null,8,Ult)])])])]),_:1}),Re(o,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Flt,[c("tr",null,[Blt,c("td",Glt,[z(c("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[54]||(e[54]=_=>r.configFile.user_name=_),onChange:e[55]||(e[55]=_=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.user_name]])])]),c("tr",null,[Vlt,c("td",zlt,[z(c("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[56]||(e[56]=_=>r.configFile.user_description=_),onChange:e[57]||(e[57]=_=>s.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.user_description]])])]),c("tr",null,[Hlt,c("td",qlt,[z(c("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[58]||(e[58]=_=>r.configFile.use_user_informations_in_discussion=_),onChange:e[59]||(e[59]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_user_informations_in_discussion]])])]),c("tr",null,[Ylt,c("td",$lt,[z(c("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[60]||(e[60]=_=>r.configFile.use_model_name_in_discussions=_),onChange:e[61]||(e[61]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_model_name_in_discussions]])])]),c("tr",null,[Wlt,c("td",null,[c("label",Klt,[c("img",{src:r.configFile.user_avatar!=null&&r.configFile.user_avatar!=""?"/user_infos/"+r.configFile.user_avatar:s.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,jlt)]),c("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[62]||(e[62]=(..._)=>r.uploadAvatar&&r.uploadAvatar(..._))},null,32)]),c("td",Qlt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[63]||(e[63]=Te(_=>r.resetAvatar(),["stop"]))},Zlt)])]),c("tr",null,[Jlt,c("td",null,[c("div",ect,[z(c("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[64]||(e[64]=_=>r.configFile.use_user_name_in_discussions=_),onChange:e[65]||(e[65]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_user_name_in_discussions]])])])]),c("tr",null,[tct,c("td",nct,[z(c("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[66]||(e[66]=_=>r.configFile.max_n_predict=_),onChange:e[67]||(e[67]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.max_n_predict]])])]),c("tr",null,[ict,c("td",sct,[z(c("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[68]||(e[68]=_=>r.configFile.max_n_predict=_),onChange:e[69]||(e[69]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.max_n_predict]])])])])]),_:1}),Re(o,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",rct,[c("tr",null,[oct,c("td",act,[z(c("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[70]||(e[70]=_=>r.configFile.turn_on_code_execution=_),onChange:e[71]||(e[71]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_code_execution]])])]),c("tr",null,[lct,c("td",cct,[z(c("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[72]||(e[72]=_=>r.configFile.turn_on_code_validation=_),onChange:e[73]||(e[73]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_code_validation]])])]),c("tr",null,[dct,c("td",uct,[z(c("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[74]||(e[74]=_=>r.configFile.turn_on_setting_update_validation=_),onChange:e[75]||(e[75]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_setting_update_validation]])])]),c("tr",null,[pct,c("td",_ct,[z(c("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[76]||(e[76]=_=>r.configFile.turn_on_open_file_validation=_),onChange:e[77]||(e[77]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_open_file_validation]])])]),c("tr",null,[hct,c("td",fct,[z(c("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[78]||(e[78]=_=>r.configFile.turn_on_send_file_validation=_),onChange:e[79]||(e[79]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),Re(o,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",mct,[c("tr",null,[gct,c("td",null,[c("div",bct,[z(c("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[80]||(e[80]=_=>r.configFile.activate_skills_lib=_),onChange:e[81]||(e[81]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.activate_skills_lib]])])])]),c("tr",null,[Ect,c("td",yct,[z(c("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[82]||(e[82]=_=>r.configFile.skills_lib_database_name=_),onChange:e[83]||(e[83]=_=>s.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),[[Oe,r.configFile.skills_lib_database_name]])])])])]),_:1}),Re(o,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",vct,[c("tr",null,[Sct,c("td",null,[c("div",Tct,[z(c("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[84]||(e[84]=_=>r.configFile.pdf_latex_path=_),onChange:e[85]||(e[85]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.pdf_latex_path]])])])])])]),_:1}),Re(o,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",xct,[c("tr",null,[Cct,c("td",null,[c("div",wct,[z(c("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[86]||(e[86]=_=>r.configFile.positive_boost=_),onChange:e[87]||(e[87]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.positive_boost]])])])]),c("tr",null,[Rct,c("td",null,[c("div",Act,[z(c("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[88]||(e[88]=_=>r.configFile.negative_boost=_),onChange:e[89]||(e[89]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.negative_boost]])])])]),c("tr",null,[Nct,c("td",null,[c("div",Oct,[z(c("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[90]||(e[90]=_=>r.configFile.fun_mode=_),onChange:e[91]||(e[91]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.fun_mode]])])])])])]),_:1})])],2)]),c("div",Ict,[c("div",Mct,[c("button",{onClick:e[92]||(e[92]=Te(_=>s.data_conf_collapsed=!s.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,kct,512),[[Mt,s.data_conf_collapsed]]),z(c("div",null,Pct,512),[[Mt,!s.data_conf_collapsed]]),Uct])]),c("div",{class:qe([{hidden:s.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Re(o,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Fct,[c("tr",null,[Bct,c("td",Gct,[(A(!0),M(We,null,ct(r.configFile.rag_databases,(_,m)=>(A(),M("div",{key:m,class:"flex items-center mb-2"},[z(c("input",{type:"text","onUpdate:modelValue":E=>r.configFile.rag_databases[m]=E,onChange:e[93]||(e[93]=E=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,40,Vct),[[Oe,r.configFile.rag_databases[m]]]),c("button",{onClick:E=>r.vectorize_folder(m),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded"},"(Re)Vectorize",8,zct),c("button",{onClick:E=>r.select_folder(m),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-green-300 rounded"},"Select Folder",8,Hct),c("button",{onClick:E=>r.removeDataSource(m),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-green-300 rounded"},"Remove",8,qct)]))),128)),c("button",{onClick:e[94]||(e[94]=(..._)=>r.addDataSource&&r.addDataSource(..._)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),c("tr",null,[Yct,c("td",null,[z(c("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[95]||(e[95]=_=>r.configFile.rag_vectorizer=_),onChange:e[96]||(e[96]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},jct,544),[[jt,r.configFile.rag_vectorizer]])])]),c("tr",null,[Qct,c("td",null,[z(c("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[97]||(e[97]=_=>r.configFile.rag_vectorizer_model=_),onChange:e[98]||(e[98]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Zct,544),[[jt,r.configFile.rag_vectorizer_model]])])]),c("tr",null,[Jct,c("td",null,[z(c("input",{id:"rag_chunk_size","onUpdate:modelValue":e[99]||(e[99]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[100]||(e[100]=_=>s.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.data_vectorization_chunk_size]]),z(c("input",{"onUpdate:modelValue":e[101]||(e[101]=_=>r.configFile.rag_chunk_size=_),type:"number",onChange:e[102]||(e[102]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.rag_chunk_size]])])]),c("tr",null,[edt,c("td",null,[z(c("input",{id:"rag_n_chunks","onUpdate:modelValue":e[103]||(e[103]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[104]||(e[104]=_=>s.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.data_vectorization_chunk_size]]),z(c("input",{"onUpdate:modelValue":e[105]||(e[105]=_=>r.configFile.rag_n_chunks=_),type:"number",onChange:e[106]||(e[106]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.rag_n_chunks]])])]),c("tr",null,[tdt,c("td",null,[z(c("input",{"onUpdate:modelValue":e[107]||(e[107]=_=>r.configFile.rag_clean_chunks=_),type:"checkbox",onChange:e[108]||(e[108]=_=>s.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.rag_clean_chunks]])])]),c("tr",null,[ndt,c("td",null,[z(c("input",{"onUpdate:modelValue":e[109]||(e[109]=_=>r.configFile.rag_follow_subfolders=_),type:"checkbox",onChange:e[110]||(e[110]=_=>s.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.rag_follow_subfolders]])])]),c("tr",null,[idt,c("td",null,[z(c("input",{"onUpdate:modelValue":e[111]||(e[111]=_=>r.configFile.rag_check_new_files_at_startup=_),type:"checkbox",onChange:e[112]||(e[112]=_=>s.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.rag_check_new_files_at_startup]])])]),c("tr",null,[sdt,c("td",null,[z(c("input",{"onUpdate:modelValue":e[113]||(e[113]=_=>r.configFile.rag_preprocess_chunks=_),type:"checkbox",onChange:e[114]||(e[114]=_=>s.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.rag_preprocess_chunks]])])])])]),_:1}),Re(o,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",rdt,[c("tr",null,[odt,c("td",null,[c("div",adt,[z(c("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[115]||(e[115]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[116]||(e[116]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_save_db]])])])]),c("tr",null,[ldt,c("td",null,[c("div",cdt,[z(c("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[117]||(e[117]=_=>r.configFile.data_vectorization_visualize_on_vectorization=_),onChange:e[118]||(e[118]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),c("tr",null,[ddt,c("td",null,[c("div",udt,[z(c("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[119]||(e[119]=_=>r.configFile.data_vectorization_build_keys_words=_),onChange:e[120]||(e[120]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_build_keys_words]])])])]),c("tr",null,[pdt,c("td",null,[c("div",_dt,[z(c("input",{type:"checkbox",id:"data_vectorization_force_first_chunk",required:"","onUpdate:modelValue":e[121]||(e[121]=_=>r.configFile.data_vectorization_force_first_chunk=_),onChange:e[122]||(e[122]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_force_first_chunk]])])])]),c("tr",null,[hdt,c("td",null,[c("div",fdt,[z(c("input",{type:"checkbox",id:"data_vectorization_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[123]||(e[123]=_=>r.configFile.data_vectorization_put_chunk_informations_into_context=_),onChange:e[124]||(e[124]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_put_chunk_informations_into_context]])])])]),c("tr",null,[mdt,c("td",null,[z(c("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[125]||(e[125]=_=>r.configFile.data_vectorization_method=_),onChange:e[126]||(e[126]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},vdt,544),[[jt,r.configFile.data_vectorization_method]])])]),c("tr",null,[Sdt,c("td",Tdt,[z(c("input",{type:"text",id:"data_vectorization_sentense_transformer_model",required:"","onUpdate:modelValue":e[127]||(e[127]=_=>r.configFile.data_vectorization_sentense_transformer_model=_),onChange:e[128]||(e[128]=_=>s.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),[[Oe,r.configFile.data_vectorization_sentense_transformer_model]])])]),c("tr",null,[xdt,c("td",null,[z(c("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[129]||(e[129]=_=>r.configFile.data_visualization_method=_),onChange:e[130]||(e[130]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Rdt,544),[[jt,r.configFile.data_visualization_method]])])]),c("tr",null,[Adt,c("td",null,[c("div",Ndt,[z(c("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[131]||(e[131]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[132]||(e[132]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.data_vectorization_save_db]])])])]),c("tr",null,[Odt,c("td",null,[z(c("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[133]||(e[133]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[134]||(e[134]=_=>s.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),[[Oe,r.configFile.data_vectorization_chunk_size]]),z(c("input",{"onUpdate:modelValue":e[135]||(e[135]=_=>r.configFile.data_vectorization_chunk_size=_),type:"number",onChange:e[136]||(e[136]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.data_vectorization_chunk_size]])])]),c("tr",null,[Idt,c("td",null,[z(c("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[137]||(e[137]=_=>r.configFile.data_vectorization_overlap_size=_),onChange:e[138]||(e[138]=_=>s.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),[[Oe,r.configFile.data_vectorization_overlap_size]]),z(c("input",{"onUpdate:modelValue":e[139]||(e[139]=_=>r.configFile.data_vectorization_overlap_size=_),type:"number",onChange:e[140]||(e[140]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.data_vectorization_overlap_size]])])]),c("tr",null,[Mdt,c("td",null,[z(c("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[141]||(e[141]=_=>r.configFile.data_vectorization_nb_chunks=_),onChange:e[142]||(e[142]=_=>s.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),[[Oe,r.configFile.data_vectorization_nb_chunks]]),z(c("input",{"onUpdate:modelValue":e[143]||(e[143]=_=>r.configFile.data_vectorization_nb_chunks=_),type:"number",onChange:e[144]||(e[144]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1})],2)]),c("div",Ddt,[c("div",kdt,[c("button",{onClick:e[145]||(e[145]=Te(_=>s.internet_conf_collapsed=!s.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,Pdt,512),[[Mt,s.internet_conf_collapsed]]),z(c("div",null,Fdt,512),[[Mt,!s.internet_conf_collapsed]]),Bdt])]),c("div",{class:qe([{hidden:s.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Re(o,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Gdt,[c("tr",null,[Vdt,c("td",null,[c("div",zdt,[z(c("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[146]||(e[146]=_=>r.configFile.activate_internet_search=_),onChange:e[147]||(e[147]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.activate_internet_search]])])])]),c("tr",null,[Hdt,c("td",null,[c("div",qdt,[z(c("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[148]||(e[148]=_=>r.configFile.activate_internet_pages_judgement=_),onChange:e[149]||(e[149]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.activate_internet_pages_judgement]])])])]),c("tr",null,[Ydt,c("td",null,[c("div",$dt,[z(c("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[150]||(e[150]=_=>r.configFile.internet_quick_search=_),onChange:e[151]||(e[151]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.internet_quick_search]])])])]),c("tr",null,[Wdt,c("td",null,[c("div",Kdt,[z(c("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[152]||(e[152]=_=>r.configFile.internet_activate_search_decision=_),onChange:e[153]||(e[153]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.internet_activate_search_decision]])])])]),c("tr",null,[jdt,c("td",null,[c("div",Qdt,[z(c("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[154]||(e[154]=_=>r.configFile.internet_vectorization_chunk_size=_),onChange:e[155]||(e[155]=_=>s.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),[[Oe,r.configFile.internet_vectorization_chunk_size]]),z(c("input",{"onUpdate:modelValue":e[156]||(e[156]=_=>r.configFile.internet_vectorization_chunk_size=_),type:"number",onChange:e[157]||(e[157]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.internet_vectorization_chunk_size]])])])]),c("tr",null,[Xdt,c("td",null,[c("div",Zdt,[z(c("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[158]||(e[158]=_=>r.configFile.internet_vectorization_overlap_size=_),onChange:e[159]||(e[159]=_=>s.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),[[Oe,r.configFile.internet_vectorization_overlap_size]]),z(c("input",{"onUpdate:modelValue":e[160]||(e[160]=_=>r.configFile.internet_vectorization_overlap_size=_),type:"number",onChange:e[161]||(e[161]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.internet_vectorization_overlap_size]])])])]),c("tr",null,[Jdt,c("td",null,[c("div",eut,[z(c("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[162]||(e[162]=_=>r.configFile.internet_vectorization_nb_chunks=_),onChange:e[163]||(e[163]=_=>s.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.internet_vectorization_nb_chunks]]),z(c("input",{"onUpdate:modelValue":e[164]||(e[164]=_=>r.configFile.internet_vectorization_nb_chunks=_),type:"number",onChange:e[165]||(e[165]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.internet_vectorization_nb_chunks]])])])]),c("tr",null,[tut,c("td",null,[c("div",nut,[z(c("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[166]||(e[166]=_=>r.configFile.internet_nb_search_pages=_),onChange:e[167]||(e[167]=_=>s.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.internet_nb_search_pages]]),z(c("input",{"onUpdate:modelValue":e[168]||(e[168]=_=>r.configFile.internet_nb_search_pages=_),type:"number",onChange:e[169]||(e[169]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),c("div",iut,[c("div",sut,[c("button",{onClick:e[170]||(e[170]=Te(_=>s.servers_conf_collapsed=!s.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,out,512),[[Mt,s.servers_conf_collapsed]]),z(c("div",null,lut,512),[[Mt,!s.servers_conf_collapsed]]),cut])]),c("div",{class:qe([{hidden:s.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Re(o,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",dut,[c("tr",null,[uut,c("td",put,[z(c("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[171]||(e[171]=_=>r.configFile.active_tts_service=_),onChange:e[172]||(e[172]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},gut,544),[[jt,r.configFile.active_tts_service]])])]),c("tr",null,[but,c("td",Eut,[z(c("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[173]||(e[173]=_=>r.configFile.active_stt_service=_),onChange:e[174]||(e[174]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Tut,544),[[jt,r.configFile.active_stt_service]])])]),xut,c("tr",null,[Cut,c("td",wut,[z(c("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[175]||(e[175]=_=>r.configFile.active_tti_service=_),onChange:e[176]||(e[176]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},kut,544),[[jt,r.configFile.active_tti_service]])])]),c("tr",null,[Lut,c("td",Put,[z(c("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[177]||(e[177]=_=>r.configFile.active_ttm_service=_),onChange:e[178]||(e[178]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},But,544),[[jt,r.configFile.active_ttm_service]])])])])]),_:1}),Re(o,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Gut,[c("tr",null,[Vut,c("td",null,[c("div",zut,[z(c("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[179]||(e[179]=_=>r.configFile.use_negative_prompt=_),onChange:e[180]||(e[180]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_negative_prompt]])])])]),c("tr",null,[Hut,c("td",null,[c("div",qut,[z(c("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[181]||(e[181]=_=>r.configFile.use_ai_generated_negative_prompt=_),onChange:e[182]||(e[182]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.use_ai_generated_negative_prompt]])])])]),c("tr",null,[Yut,c("td",null,[c("div",$ut,[z(c("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[183]||(e[183]=_=>r.configFile.negative_prompt_generation_prompt=_),onChange:e[184]||(e[184]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.negative_prompt_generation_prompt]])])])]),c("tr",null,[Wut,c("td",null,[c("div",Kut,[z(c("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[185]||(e[185]=_=>r.configFile.default_negative_prompt=_),onChange:e[186]||(e[186]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.default_negative_prompt]])])])])])]),_:1}),Re(o,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",jut,[c("tr",null,[Qut,c("td",Xut,[z(c("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[187]||(e[187]=_=>r.configFile.stt_listening_threshold=_),onChange:e[188]||(e[188]=_=>s.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),[[Oe,r.configFile.stt_listening_threshold]])])]),c("tr",null,[Zut,c("td",Jut,[z(c("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[189]||(e[189]=_=>r.configFile.stt_silence_duration=_),onChange:e[190]||(e[190]=_=>s.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),[[Oe,r.configFile.stt_silence_duration]])])]),c("tr",null,[ept,c("td",tpt,[z(c("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[191]||(e[191]=_=>r.configFile.stt_sound_threshold_percentage=_),onChange:e[192]||(e[192]=_=>s.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),[[Oe,r.configFile.stt_sound_threshold_percentage]])])]),c("tr",null,[npt,c("td",ipt,[z(c("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[193]||(e[193]=_=>r.configFile.stt_gain=_),onChange:e[194]||(e[194]=_=>s.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),[[Oe,r.configFile.stt_gain]])])]),c("tr",null,[spt,c("td",rpt,[z(c("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[195]||(e[195]=_=>r.configFile.stt_rate=_),onChange:e[196]||(e[196]=_=>s.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),[[Oe,r.configFile.stt_rate]])])]),c("tr",null,[opt,c("td",apt,[z(c("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[197]||(e[197]=_=>r.configFile.stt_channels=_),onChange:e[198]||(e[198]=_=>s.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),[[Oe,r.configFile.stt_channels]])])]),c("tr",null,[lpt,c("td",cpt,[z(c("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[199]||(e[199]=_=>r.configFile.stt_buffer_size=_),onChange:e[200]||(e[200]=_=>s.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),[[Oe,r.configFile.stt_buffer_size]])])]),c("tr",null,[dpt,c("td",null,[c("div",upt,[z(c("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[201]||(e[201]=_=>r.configFile.stt_activate_word_detection=_),onChange:e[202]||(e[202]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.stt_activate_word_detection]])])])]),c("tr",null,[ppt,c("td",null,[c("div",_pt,[z(c("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[203]||(e[203]=_=>r.configFile.stt_word_detection_file=_),onChange:e[204]||(e[204]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.stt_word_detection_file]])])])])])]),_:1}),Re(o,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",hpt,[c("tr",null,[fpt,c("td",mpt,[z(c("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[205]||(e[205]=_=>r.configFile.stt_input_device=_),onChange:e[206]||(e[206]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(s.snd_input_devices,(_,m)=>(A(),M("option",{key:_,value:s.snd_input_devices_indexes[m]},ge(_),9,gpt))),128))],544),[[jt,r.configFile.stt_input_device]])])]),c("tr",null,[bpt,c("td",Ept,[z(c("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[207]||(e[207]=_=>r.configFile.tts_output_device=_),onChange:e[208]||(e[208]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(s.snd_output_devices,(_,m)=>(A(),M("option",{key:_,value:s.snd_output_devices_indexes[m]},ge(_),9,ypt))),128))],544),[[jt,r.configFile.tts_output_device]])])])])]),_:1}),Re(o,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",vpt,[c("tr",null,[Spt,c("td",Tpt,[z(c("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[209]||(e[209]=_=>r.configFile.host=_),onChange:e[210]||(e[210]=_=>s.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),[[Oe,r.configFile.host]])])]),c("tr",null,[xpt,c("td",Cpt,[z(c("input",{type:"text",id:"lollms_access_keys",required:"","onUpdate:modelValue":e[211]||(e[211]=_=>r.configFile.lollms_access_keys=_),onChange:e[212]||(e[212]=_=>s.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),[[Oe,r.configFile.lollms_access_keys]])])]),c("tr",null,[wpt,c("td",Rpt,[z(c("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[213]||(e[213]=_=>r.configFile.port=_),onChange:e[214]||(e[214]=_=>s.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),[[Oe,r.configFile.port]])])]),c("tr",null,[Apt,c("td",Npt,[z(c("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[215]||(e[215]=_=>r.configFile.headless_server_mode=_),onChange:e[216]||(e[216]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.headless_server_mode]])])]),c("tr",null,[Opt,c("td",Ipt,[z(c("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[217]||(e[217]=_=>r.configFile.activate_lollms_server=_),onChange:e[218]||(e[218]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.activate_lollms_server]])])]),c("tr",null,[Mpt,c("td",Dpt,[z(c("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[219]||(e[219]=_=>r.configFile.activate_ollama_emulator=_),onChange:e[220]||(e[220]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.activate_ollama_emulator]])])]),c("tr",null,[kpt,c("td",Lpt,[z(c("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[221]||(e[221]=_=>r.configFile.activate_openai_emulator=_),onChange:e[222]||(e[222]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.activate_openai_emulator]])])]),c("tr",null,[Ppt,c("td",Upt,[z(c("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[223]||(e[223]=_=>r.configFile.activate_mistralai_emulator=_),onChange:e[224]||(e[224]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[et,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),Re(o,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Fpt,[c("tr",null,[Bpt,c("td",null,[c("div",Gpt,[z(c("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[225]||(e[225]=_=>r.configFile.activate_audio_infos=_),onChange:e[226]||(e[226]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.activate_audio_infos]])])])]),c("tr",null,[Vpt,c("td",null,[c("div",zpt,[z(c("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[227]||(e[227]=_=>r.configFile.audio_auto_send_input=_),onChange:e[228]||(e[228]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.audio_auto_send_input]])])])]),c("tr",null,[Hpt,c("td",null,[z(c("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[229]||(e[229]=_=>r.configFile.audio_silenceTimer=_),onChange:e[230]||(e[230]=_=>s.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),[[Oe,r.configFile.audio_silenceTimer]]),z(c("input",{"onUpdate:modelValue":e[231]||(e[231]=_=>r.configFile.audio_silenceTimer=_),onChange:e[232]||(e[232]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.audio_silenceTimer]])])]),c("tr",null,[qpt,c("td",null,[z(c("select",{id:"audio_in_language","onUpdate:modelValue":e[233]||(e[233]=_=>r.configFile.audio_in_language=_),onChange:e[234]||(e[234]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(r.audioLanguages,_=>(A(),M("option",{key:_.code,value:_.code},ge(_.name),9,Ypt))),128))],544),[[jt,r.configFile.audio_in_language]])])])])]),_:1}),Re(o,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",$pt,[c("tr",null,[Wpt,c("td",null,[c("div",Kpt,[z(c("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[235]||(e[235]=_=>r.configFile.whisper_activate=_),onChange:e[236]||(e[236]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.whisper_activate]])])])]),c("tr",null,[jpt,c("td",null,[c("div",Qpt,[z(c("select",{id:"whisper_model","onUpdate:modelValue":e[237]||(e[237]=_=>r.configFile.whisper_model=_),onChange:e[238]||(e[238]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(r.whisperModels,_=>(A(),M("option",{key:_,value:_},ge(_),9,Xpt))),128))],544),[[jt,r.configFile.whisper_model]])])])])])]),_:1}),Re(o,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Zpt,[c("tr",null,[Jpt,c("td",null,[c("div",e_t,[z(c("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[239]||(e[239]=_=>r.configFile.openai_whisper_key=_),onChange:e[240]||(e[240]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.openai_whisper_key]])])])]),c("tr",null,[t_t,c("td",null,[c("div",n_t,[z(c("select",{id:"openai_whisper_model","onUpdate:modelValue":e[241]||(e[241]=_=>r.configFile.openai_whisper_model=_),onChange:e[242]||(e[242]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(r.openaiWhisperModels,_=>(A(),M("option",{key:_,value:_},ge(_),9,i_t))),128))],544),[[jt,r.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),Re(o,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",s_t,[c("tr",null,[r_t,c("td",null,[c("div",o_t,[z(c("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[243]||(e[243]=_=>r.configFile.auto_speak=_),onChange:e[244]||(e[244]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.auto_speak]])])])]),c("tr",null,[a_t,c("td",null,[z(c("input",{id:"audio_pitch","onUpdate:modelValue":e[245]||(e[245]=_=>r.configFile.audio_pitch=_),onChange:e[246]||(e[246]=_=>s.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),[[Oe,r.configFile.audio_pitch]]),z(c("input",{"onUpdate:modelValue":e[247]||(e[247]=_=>r.configFile.audio_pitch=_),onChange:e[248]||(e[248]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.audio_pitch]])])]),c("tr",null,[l_t,c("td",null,[z(c("select",{id:"audio_out_voice","onUpdate:modelValue":e[249]||(e[249]=_=>r.configFile.audio_out_voice=_),onChange:e[250]||(e[250]=_=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(A(!0),M(We,null,ct(s.audioVoices,_=>(A(),M("option",{key:_.name,value:_.name},ge(_.name),9,c_t))),128))],544),[[jt,r.configFile.audio_out_voice]])])])])]),_:1}),Re(o,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",d_t,[c("tr",null,[u_t,c("td",null,[c("div",p_t,[z(c("input",{type:"checkbox",id:"xtts_enable",required:"","onUpdate:modelValue":e[251]||(e[251]=_=>r.configFile.xtts_enable=_),onChange:e[252]||(e[252]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.xtts_enable]])])])]),c("tr",null,[__t,c("td",null,[c("div",h_t,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[253]||(e[253]=(..._)=>r.reinstallAudioService&&r.reinstallAudioService(..._))},"install xtts service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[254]||(e[254]=(..._)=>r.startAudioService&&r.startAudioService(..._))},"start xtts service"),c("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:this.$store.state.config.xtts_base_url+"/docs",target:"_blank"},"show xtts service entries",8,f_t),m_t])])]),c("tr",null,[g_t,c("td",null,[c("div",b_t,[z(c("input",{type:"text",id:"xtts_base_url",required:"","onUpdate:modelValue":e[255]||(e[255]=_=>r.configFile.xtts_base_url=_),onChange:e[256]||(e[256]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.xtts_base_url]])])])]),c("tr",null,[E_t,c("td",null,[c("div",y_t,[z(c("select",{"onUpdate:modelValue":e[257]||(e[257]=_=>r.xtts_current_language=_),onChange:e[258]||(e[258]=_=>s.settingsChanged=!0),disabled:!r.xtts_enable},[(A(!0),M(We,null,ct(s.voice_languages,(_,m)=>(A(),M("option",{key:m,value:_},ge(m),9,S_t))),128))],40,v_t),[[jt,r.xtts_current_language]])])])]),c("tr",null,[T_t,c("td",null,[c("div",x_t,[z(c("select",{"onUpdate:modelValue":e[259]||(e[259]=_=>r.xtts_current_voice=_),onChange:e[260]||(e[260]=_=>s.settingsChanged=!0),disabled:!r.xtts_enable},[(A(!0),M(We,null,ct(s.voices,_=>(A(),M("option",{key:_,value:_},ge(_),9,w_t))),128))],40,C_t),[[jt,r.xtts_current_voice]])])])]),c("tr",null,[R_t,c("td",null,[c("div",A_t,[z(c("input",{type:"checkbox",id:"xtts_use_deepspeed",required:"","onUpdate:modelValue":e[261]||(e[261]=_=>r.configFile.xtts_use_deepspeed=_),onChange:e[262]||(e[262]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.xtts_enable},null,40,N_t),[[et,r.configFile.xtts_use_deepspeed]])])])]),c("tr",null,[O_t,c("td",null,[c("div",I_t,[z(c("input",{type:"checkbox",id:"xtts_use_streaming_mode",required:"","onUpdate:modelValue":e[263]||(e[263]=_=>r.configFile.xtts_use_streaming_mode=_),onChange:e[264]||(e[264]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.xtts_enable},null,40,M_t),[[et,r.configFile.xtts_use_streaming_mode]])])])]),c("tr",null,[D_t,c("td",null,[c("div",k_t,[z(c("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[265]||(e[265]=_=>r.configFile.auto_read=_),onChange:e[266]||(e[266]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.xtts_enable},null,40,L_t),[[et,r.configFile.auto_read]])])])]),c("tr",null,[P_t,c("td",null,[c("div",U_t,[z(c("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[267]||(e[267]=_=>r.configFile.xtts_stream_chunk_size=_),onChange:e[268]||(e[268]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.xtts_stream_chunk_size]])])])]),c("tr",null,[F_t,c("td",null,[c("div",B_t,[z(c("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[269]||(e[269]=_=>r.configFile.xtts_temperature=_),onChange:e[270]||(e[270]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[Oe,r.configFile.xtts_temperature,void 0,{number:!0}]])])])]),c("tr",null,[G_t,c("td",null,[c("div",V_t,[z(c("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[271]||(e[271]=_=>r.configFile.xtts_length_penalty=_),onChange:e[272]||(e[272]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[Oe,r.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),c("tr",null,[z_t,c("td",null,[c("div",H_t,[z(c("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[273]||(e[273]=_=>r.configFile.xtts_repetition_penalty=_),onChange:e[274]||(e[274]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[Oe,r.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),c("tr",null,[q_t,c("td",null,[c("div",Y_t,[z(c("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[275]||(e[275]=_=>r.configFile.xtts_top_k=_),onChange:e[276]||(e[276]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.xtts_top_k,void 0,{number:!0}]])])])]),c("tr",null,[$_t,c("td",null,[c("div",W_t,[z(c("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[277]||(e[277]=_=>r.configFile.xtts_top_p=_),onChange:e[278]||(e[278]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.xtts_top_p,void 0,{number:!0}]])])])]),c("tr",null,[K_t,c("td",null,[c("div",j_t,[z(c("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[279]||(e[279]=_=>r.configFile.xtts_speed=_),onChange:e[280]||(e[280]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[Oe,r.configFile.xtts_speed,void 0,{number:!0}]])])])]),c("tr",null,[Q_t,c("td",null,[c("div",X_t,[z(c("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[281]||(e[281]=_=>r.configFile.enable_text_splitting=_),onChange:e[282]||(e[282]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_text_splitting]])])])])])]),_:1}),Re(o,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Z_t,[c("tr",null,[J_t,c("td",null,[c("div",eht,[z(c("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[283]||(e[283]=_=>r.configFile.openai_tts_key=_),onChange:e[284]||(e[284]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.openai_tts_key]])])])]),c("tr",null,[tht,c("td",null,[c("div",nht,[z(c("select",{"onUpdate:modelValue":e[285]||(e[285]=_=>r.configFile.openai_tts_model=_),onChange:e[286]||(e[286]=_=>s.settingsChanged=!0)},rht,544),[[jt,r.configFile.openai_tts_model]])])])]),c("tr",null,[oht,c("td",null,[c("div",aht,[z(c("select",{"onUpdate:modelValue":e[287]||(e[287]=_=>r.configFile.openai_tts_voice=_),onChange:e[288]||(e[288]=_=>s.settingsChanged=!0)},_ht,544),[[jt,r.configFile.openai_tts_voice]])])])])])]),_:1})]),_:1}),Re(o,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",hht,[c("tr",null,[fht,c("td",null,[c("div",mht,[z(c("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[289]||(e[289]=_=>r.configFile.enable_sd_service=_),onChange:e[290]||(e[290]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_sd_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[291]||(e[291]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},bht)])]),c("tr",null,[Eht,c("td",null,[c("div",yht,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[292]||(e[292]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[293]||(e[293]=(..._)=>r.upgradeSDService&&r.upgradeSDService(..._))},"upgrade sd service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[294]||(e[294]=(..._)=>r.startSDService&&r.startSDService(..._))},"start sd service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[295]||(e[295]=(..._)=>r.showSD&&r.showSD(..._))},"show sd ui"),vht])]),c("td",null,[c("div",Sht,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[296]||(e[296]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service")])])]),c("tr",null,[Tht,c("td",null,[c("div",xht,[z(c("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[297]||(e[297]=_=>r.configFile.sd_base_url=_),onChange:e[298]||(e[298]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.sd_base_url]])])])])])]),_:1}),Re(o,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Cht,[c("tr",null,[wht,c("td",null,[c("div",Rht,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[299]||(e[299]=(..._)=>r.reinstallDiffusersService&&r.reinstallDiffusersService(..._))},"install diffusers service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[300]||(e[300]=(..._)=>r.upgradeDiffusersService&&r.upgradeDiffusersService(..._))},"upgrade diffusers service"),Aht])])]),c("tr",null,[Nht,c("td",null,[c("div",Oht,[z(c("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[301]||(e[301]=_=>r.configFile.diffusers_model=_),onChange:e[302]||(e[302]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.diffusers_model]])])]),Iht])])]),_:1}),Re(o,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Mht,[c("tr",null,[Dht,c("td",null,[c("div",kht,[z(c("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[303]||(e[303]=_=>r.configFile.midjourney_key=_),onChange:e[304]||(e[304]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.midjourney_key]])])])])])]),_:1}),Re(o,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Lht,[c("tr",null,[Pht,c("td",null,[c("div",Uht,[z(c("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[305]||(e[305]=_=>r.configFile.dall_e_key=_),onChange:e[306]||(e[306]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.dall_e_key]])])])]),c("tr",null,[Fht,c("td",null,[c("div",Bht,[z(c("select",{"onUpdate:modelValue":e[307]||(e[307]=_=>r.configFile.dall_e_generation_engine=_),onChange:e[308]||(e[308]=_=>s.settingsChanged=!0)},zht,544),[[jt,r.configFile.dall_e_generation_engine]])])])])])]),_:1}),Re(o,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Hht,[c("tr",null,[qht,c("td",null,[c("div",Yht,[z(c("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[309]||(e[309]=_=>r.configFile.enable_comfyui_service=_),onChange:e[310]||(e[310]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_comfyui_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[311]||(e[311]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Wht)])]),c("tr",null,[Kht,c("td",null,[c("div",jht,[z(c("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[312]||(e[312]=_=>r.configFile.comfyui_model=_),onChange:e[313]||(e[313]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.comfyui_model]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[314]||(e[314]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Xht)])]),c("tr",null,[Zht,c("td",null,[c("div",Jht,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[315]||(e[315]=(..._)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(..._))},"install comfyui service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[316]||(e[316]=(..._)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(..._))},"upgrade comfyui service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[317]||(e[317]=(..._)=>r.startComfyUIService&&r.startComfyUIService(..._))},"start comfyui service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[318]||(e[318]=(..._)=>r.showComfyui&&r.showComfyui(..._))},"show comfyui"),eft])])]),c("tr",null,[tft,c("td",null,[c("div",nft,[z(c("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[319]||(e[319]=_=>r.configFile.comfyui_base_url=_),onChange:e[320]||(e[320]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),Re(o,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",ift,[c("tr",null,[sft,c("td",null,[c("div",rft,[z(c("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[321]||(e[321]=_=>r.configFile.enable_ollama_service=_),onChange:e[322]||(e[322]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_ollama_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[323]||(e[323]=_=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},cft)])]),c("tr",null,[dft,c("td",null,[c("div",uft,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[324]||(e[324]=(..._)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(..._))},"install ollama service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[325]||(e[325]=(..._)=>r.startollamaService&&r.startollamaService(..._))},"start ollama service")])])]),c("tr",null,[pft,c("td",null,[c("div",_ft,[z(c("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[326]||(e[326]=_=>r.configFile.ollama_base_url=_),onChange:e[327]||(e[327]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.ollama_base_url]])])])])])]),_:1}),Re(o,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",hft,[c("tr",null,[fft,c("td",null,[c("div",mft,[z(c("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[328]||(e[328]=_=>r.configFile.enable_vllm_service=_),onChange:e[329]||(e[329]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_vllm_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[330]||(e[330]=_=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. +Here is how you can do that`))},aft)])]),c("tr",null,[lft,c("td",null,[c("div",cft,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[324]||(e[324]=(..._)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(..._))},"install ollama service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[325]||(e[325]=(..._)=>r.startollamaService&&r.startollamaService(..._))},"start ollama service")])])]),c("tr",null,[dft,c("td",null,[c("div",uft,[z(c("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[326]||(e[326]=_=>r.configFile.ollama_base_url=_),onChange:e[327]||(e[327]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.ollama_base_url]])])])])])]),_:1}),Re(o,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",pft,[c("tr",null,[_ft,c("td",null,[c("div",hft,[z(c("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[328]||(e[328]=_=>r.configFile.enable_vllm_service=_),onChange:e[329]||(e[329]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_vllm_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[330]||(e[330]=_=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},bft)])]),c("tr",null,[Eft,c("td",null,[c("div",yft,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[331]||(e[331]=(..._)=>r.reinstallvLLMService&&r.reinstallvLLMService(..._))},"install vLLM service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[332]||(e[332]=(..._)=>r.startvLLMService&&r.startvLLMService(..._))},"start vllm service")])])]),c("tr",null,[vft,c("td",null,[c("div",Sft,[z(c("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[333]||(e[333]=_=>r.configFile.vllm_url=_),onChange:e[334]||(e[334]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.vllm_url]])])])]),c("tr",null,[Tft,c("td",null,[c("div",xft,[c("div",Cft,[wft,c("p",Rft,[z(c("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[335]||(e[335]=_=>r.configFile.vllm_gpu_memory_utilization=_),onChange:e[336]||(e[336]=_=>s.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),[[Oe,r.configFile.vllm_gpu_memory_utilization]])])]),z(c("input",{id:"vllm_gpu_memory_utilization",onChange:e[337]||(e[337]=_=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[338]||(e[338]=_=>r.configFile.vllm_gpu_memory_utilization=_),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.vllm_gpu_memory_utilization]])])])]),c("tr",null,[Aft,c("td",null,[c("div",Nft,[z(c("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[339]||(e[339]=_=>r.configFile.vllm_max_num_seqs=_),onChange:e[340]||(e[340]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.vllm_max_num_seqs]])])])]),c("tr",null,[Oft,c("td",null,[c("div",Ift,[z(c("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[341]||(e[341]=_=>r.configFile.vllm_max_model_len=_),onChange:e[342]||(e[342]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.vllm_max_model_len]])])])]),c("tr",null,[Mft,c("td",null,[c("div",Dft,[z(c("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[343]||(e[343]=_=>r.configFile.vllm_model_path=_),onChange:e[344]||(e[344]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.vllm_model_path]])])])])])]),_:1}),Re(o,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",kft,[c("tr",null,[Lft,c("td",null,[c("div",Pft,[z(c("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[345]||(e[345]=_=>r.configFile.enable_petals_service=_),onChange:e[346]||(e[346]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_petals_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[347]||(e[347]=_=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. +Here is how you can do that`))},mft)])]),c("tr",null,[gft,c("td",null,[c("div",bft,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[331]||(e[331]=(..._)=>r.reinstallvLLMService&&r.reinstallvLLMService(..._))},"install vLLM service"),c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[332]||(e[332]=(..._)=>r.startvLLMService&&r.startvLLMService(..._))},"start vllm service")])])]),c("tr",null,[Eft,c("td",null,[c("div",yft,[z(c("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[333]||(e[333]=_=>r.configFile.vllm_url=_),onChange:e[334]||(e[334]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.vllm_url]])])])]),c("tr",null,[vft,c("td",null,[c("div",Sft,[c("div",Tft,[xft,c("p",Cft,[z(c("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[335]||(e[335]=_=>r.configFile.vllm_gpu_memory_utilization=_),onChange:e[336]||(e[336]=_=>s.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),[[Oe,r.configFile.vllm_gpu_memory_utilization]])])]),z(c("input",{id:"vllm_gpu_memory_utilization",onChange:e[337]||(e[337]=_=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[338]||(e[338]=_=>r.configFile.vllm_gpu_memory_utilization=_),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.vllm_gpu_memory_utilization]])])])]),c("tr",null,[wft,c("td",null,[c("div",Rft,[z(c("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[339]||(e[339]=_=>r.configFile.vllm_max_num_seqs=_),onChange:e[340]||(e[340]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.vllm_max_num_seqs]])])])]),c("tr",null,[Aft,c("td",null,[c("div",Nft,[z(c("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[341]||(e[341]=_=>r.configFile.vllm_max_model_len=_),onChange:e[342]||(e[342]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.vllm_max_model_len]])])])]),c("tr",null,[Oft,c("td",null,[c("div",Ift,[z(c("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[343]||(e[343]=_=>r.configFile.vllm_model_path=_),onChange:e[344]||(e[344]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.vllm_model_path]])])])])])]),_:1}),Re(o,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Mft,[c("tr",null,[Dft,c("td",null,[c("div",kft,[z(c("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[345]||(e[345]=_=>r.configFile.enable_petals_service=_),onChange:e[346]||(e[346]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_petals_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[347]||(e[347]=_=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},Fft)])]),c("tr",null,[Bft,c("td",null,[c("div",Gft,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[348]||(e[348]=(..._)=>r.reinstallPetalsService&&r.reinstallPetalsService(..._))},"install petals service")])])]),c("tr",null,[Vft,c("td",null,[c("div",zft,[z(c("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[349]||(e[349]=_=>r.configFile.petals_base_url=_),onChange:e[350]||(e[350]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),Re(o,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Motion Ctrl service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Hft,[c("tr",null,[qft,c("td",null,[c("div",Yft,[z(c("input",{type:"checkbox",id:"enable_motion_ctrl_service",required:"","onUpdate:modelValue":e[351]||(e[351]=_=>r.configFile.enable_motion_ctrl_service=_),onChange:e[352]||(e[352]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_motion_ctrl_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[353]||(e[353]=_=>this.$store.state.messageBox.showMessage("Activates Motion ctrl service. The service will be automatically loaded at startup alowing you to use the motoin control endpoint to generate videos"))},Wft)])]),c("tr",null,[Kft,c("td",null,[c("div",jft,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[354]||(e[354]=(..._)=>r.reinstallMotionCtrlService&&r.reinstallMotionCtrlService(..._))},"install Motion Ctrl service")])])]),c("tr",null,[Qft,c("td",null,[c("div",Xft,[z(c("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[355]||(e[355]=_=>r.configFile.sd_base_url=_),onChange:e[356]||(e[356]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.sd_base_url]])])])])])]),_:1}),Re(o,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Zft,[c("tr",null,[Jft,c("td",null,[c("div",emt,[z(c("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[357]||(e[357]=_=>r.configFile.elastic_search_service=_),onChange:e[358]||(e[358]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.elastic_search_service]])])])]),c("tr",null,[tmt,c("td",null,[c("div",nmt,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[359]||(e[359]=(..._)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(..._))},"install ElasticSearch service")])])]),c("tr",null,[imt,c("td",null,[c("div",smt,[z(c("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[360]||(e[360]=_=>r.configFile.elastic_search_url=_),onChange:e[361]||(e[361]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),c("div",rmt,[c("div",omt,[c("button",{onClick:e[362]||(e[362]=Te(_=>s.bzc_collapsed=!s.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,lmt,512),[[Mt,s.bzc_collapsed]]),z(c("div",null,dmt,512),[[Mt,!s.bzc_collapsed]]),umt,r.configFile.binding_name?$("",!0):(A(),M("div",pmt,[_mt,Je(" No binding selected! ")])),r.configFile.binding_name?(A(),M("div",hmt,"|")):$("",!0),r.configFile.binding_name?(A(),M("div",fmt,[c("div",mmt,[c("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,gmt),c("h3",bmt,ge(r.binding_name),1)])])):$("",!0)])]),c("div",{class:qe([{hidden:s.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(A(),M("div",Emt,[c("label",ymt," Bindings: ("+ge(r.bindingsZoo.length)+") ",1),c("div",{class:qe(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.bzl_collapsed?"":"max-h-96"])},[Re(os,{name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(r.bindingsZoo,(_,m)=>(A(),xt(a,{ref_for:!0,ref:"bindingZoo",key:"index-"+m+"-"+_.folder,binding:_,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:_.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):$("",!0),s.bzl_collapsed?(A(),M("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[363]||(e[363]=_=>s.bzl_collapsed=!s.bzl_collapsed)},Smt)):(A(),M("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[364]||(e[364]=_=>s.bzl_collapsed=!s.bzl_collapsed)},xmt))],2)]),c("div",Cmt,[c("div",wmt,[c("button",{onClick:e[365]||(e[365]=Te(_=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[z(c("div",null,Amt,512),[[Mt,s.mzc_collapsed]]),z(c("div",null,Omt,512),[[Mt,!s.mzc_collapsed]]),Imt,c("div",Mmt,[r.configFile.binding_name?$("",!0):(A(),M("div",Dmt,[kmt,Je(" Select binding first! ")])),!r.configFile.model_name&&r.configFile.binding_name?(A(),M("div",Lmt,[Pmt,Je(" No model selected! ")])):$("",!0),r.configFile.model_name?(A(),M("div",Umt,"|")):$("",!0),r.configFile.model_name?(A(),M("div",Fmt,[c("div",Bmt,[c("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,Gmt),c("h3",Vmt,ge(r.configFile.model_name),1)])])):$("",!0)])])]),c("div",{class:qe([{hidden:s.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",zmt,[c("div",Hmt,[c("div",qmt,[s.searchModelInProgress?(A(),M("div",Ymt,Wmt)):$("",!0),s.searchModelInProgress?$("",!0):(A(),M("div",Kmt,Qmt))]),z(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[366]||(e[366]=_=>s.searchModel=_),onKeyup:e[367]||(e[367]=Hs((..._)=>r.searchModel_func&&r.searchModel_func(..._),["enter"]))},null,544),[[Oe,s.searchModel]]),s.searchModel?(A(),M("button",{key:0,onClick:e[368]||(e[368]=Te(_=>s.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")):$("",!0)])]),c("div",null,[z(c("input",{"onUpdate:modelValue":e[369]||(e[369]=_=>s.show_only_installed_models=_),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[et,s.show_only_installed_models]]),Xmt]),c("div",null,[Re(l,{radioOptions:s.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),Zmt,s.is_loading_zoo?(A(),M("div",Jmt,ngt)):$("",!0),s.models_zoo&&s.models_zoo.length>0?(A(),M("div",igt,[c("label",sgt," Models: ("+ge(s.models_zoo.length)+") ",1),c("div",{class:qe(["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",s.mzl_collapsed?"":"max-h-96"])},[Re(os,{name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(r.rendered_models_zoo,(_,m)=>(A(),xt(u,{ref_for:!0,ref:"modelZoo",key:"index-"+m+"-"+_.name,model:_,"is-installed":_.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:_.name===r.configFile.model_name,model_type:_.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),c("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[370]||(e[370]=(..._)=>r.load_more_models&&r.load_more_models(..._))},"Load more models",512)]),_:1})],2)])):$("",!0),s.mzl_collapsed?(A(),M("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[371]||(e[371]=(..._)=>r.open_mzl&&r.open_mzl(..._))},ogt)):(A(),M("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[372]||(e[372]=(..._)=>r.open_mzl&&r.open_mzl(..._))},lgt)),c("div",cgt,[c("div",dgt,[c("div",null,[c("div",ugt,[pgt,z(c("input",{type:"text","onUpdate:modelValue":e[373]||(e[373]=_=>s.reference_path=_),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[Oe,s.reference_path]])]),c("button",{type:"button",onClick:e[374]||(e[374]=Te(_=>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")]),s.modelDownlaodInProgress?$("",!0):(A(),M("div",_gt,[c("div",hgt,[fgt,z(c("input",{type:"text","onUpdate:modelValue":e[375]||(e[375]=_=>s.addModel.url=_),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[Oe,s.addModel.url]])]),c("button",{type:"button",onClick:e[376]||(e[376]=Te(_=>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")])),s.modelDownlaodInProgress?(A(),M("div",mgt,[ggt,c("div",bgt,[c("div",Egt,[c("div",ygt,[vgt,c("span",Sgt,ge(Math.floor(s.addModel.progress))+"%",1)]),c("div",{class:"mx-1 opacity-80 line-clamp-1",title:s.addModel.url},ge(s.addModel.url),9,Tgt),c("div",xgt,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en({width:s.addModel.progress+"%"})},null,4)]),c("div",Cgt,[c("span",wgt,"Download speed: "+ge(r.speed_computed)+"/s",1),c("span",Rgt,ge(r.downloaded_size_computed)+"/"+ge(r.total_size_computed),1)])])]),c("div",Agt,[c("div",Ngt,[c("div",Ogt,[c("button",{onClick:e[377]||(e[377]=Te((..._)=>r.onCancelInstall&&r.onCancelInstall(..._),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):$("",!0)])])],2)]),c("div",Igt,[c("div",Mgt,[c("button",{onClick:e[380]||(e[380]=Te(_=>s.pzc_collapsed=!s.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[z(c("div",null,kgt,512),[[Mt,s.pzc_collapsed]]),z(c("div",null,Pgt,512),[[Mt,!s.pzc_collapsed]]),Ugt,r.configFile.personalities?(A(),M("div",Fgt,"|")):$("",!0),c("div",Bgt,ge(r.active_pesonality),1),r.configFile.personalities?(A(),M("div",Ggt,"|")):$("",!0),r.configFile.personalities?(A(),M("div",Vgt,[r.mountedPersArr.length>0?(A(),M("div",zgt,[(A(!0),M(We,null,ct(r.mountedPersArr,(_,m)=>(A(),M("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:m+"-"+_.name,ref_for:!0,ref:"mountedPersonalities"},[c("div",Hgt,[c("button",{onClick:Te(E=>r.onPersonalitySelected(_),["stop"])},[c("img",{src:s.bUrl+_.avatar,onError:e[378]||(e[378]=(...E)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...E)),class:qe(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(_.full_path)?"border-secondary":"border-transparent z-0"]),title:_.name},null,42,Ygt)],8,qgt),c("button",{onClick:Te(E=>r.unmountPersonality(_),["stop"])},Kgt,8,$gt)])]))),128))])):$("",!0)])):$("",!0),c("button",{onClick:e[379]||(e[379]=Te(_=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},Qgt)])]),c("div",{class:qe([{hidden:s.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",Xgt,[Zgt,c("div",Jgt,[c("div",ebt,[s.searchPersonalityInProgress?(A(),M("div",tbt,ibt)):$("",!0),s.searchPersonalityInProgress?$("",!0):(A(),M("div",sbt,obt))]),z(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[381]||(e[381]=_=>s.searchPersonality=_),onKeyup:e[382]||(e[382]=Te((..._)=>r.searchPersonality_func&&r.searchPersonality_func(..._),["stop"]))},null,544),[[Oe,s.searchPersonality]]),s.searchPersonality?(A(),M("button",{key:0,onClick:e[383]||(e[383]=Te(_=>s.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")):$("",!0)])]),s.searchPersonality?$("",!0):(A(),M("div",abt,[c("label",lbt," Personalities Category: ("+ge(s.persCatgArr.length)+") ",1),c("select",{id:"persCat",onChange:e[384]||(e[384]=_=>r.update_personality_category(_.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(A(!0),M(We,null,ct(s.persCatgArr,(_,m)=>(A(),M("option",{key:m,selected:_==this.configFile.personality_category},ge(_),9,cbt))),128))],32)])),c("div",null,[s.personalitiesFiltered.length>0?(A(),M("div",dbt,[c("label",ubt,ge(s.searchPersonality?"Search results":"Personalities")+": ("+ge(s.personalitiesFiltered.length)+") ",1),c("div",{class:qe(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.pzl_collapsed?"":"max-h-96"])},[Re(os,{name:"bounce"},{default:$e(()=>[(A(!0),M(We,null,ct(s.personalitiesFiltered,(_,m)=>(A(),xt(d,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+m+"-"+_.name,personality:_,select_language:!0,full_path:_.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(E=>E===_.full_path||E===_.full_path+":"+_.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-open-folder"]))),128))]),_:1})],2)])):$("",!0)]),s.pzl_collapsed?(A(),M("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[385]||(e[385]=_=>s.pzl_collapsed=!s.pzl_collapsed)},_bt)):(A(),M("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[386]||(e[386]=_=>s.pzl_collapsed=!s.pzl_collapsed)},fbt))],2)]),c("div",mbt,[c("div",gbt,[c("button",{onClick:e[387]||(e[387]=Te(_=>s.mc_collapsed=!s.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[z(c("div",null,Ebt,512),[[Mt,s.mc_collapsed]]),z(c("div",null,vbt,512),[[Mt,!s.mc_collapsed]]),Sbt])]),c("div",{class:qe([{hidden:s.mc_collapsed},"flex flex-col mb-2 p-2"])},[c("div",Tbt,[c("div",xbt,[z(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[388]||(e[388]=Te(()=>{},["stop"])),"onUpdate:modelValue":e[389]||(e[389]=_=>r.configFile.override_personality_model_parameters=_),onChange:e[390]||(e[390]=_=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[et,r.configFile.override_personality_model_parameters]]),Cbt])]),c("div",{class:qe(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[c("div",wbt,[Rbt,z(c("input",{type:"text",id:"seed","onUpdate:modelValue":e[391]||(e[391]=_=>r.configFile.seed=_),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Oe,r.configFile.seed]])]),c("div",Abt,[c("div",Nbt,[c("div",Obt,[Ibt,c("p",Mbt,[z(c("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[392]||(e[392]=_=>r.configFile.temperature=_),onChange:e[393]||(e[393]=_=>s.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),[[Oe,r.configFile.temperature]])])]),z(c("input",{id:"temperature",onChange:e[394]||(e[394]=_=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[395]||(e[395]=_=>r.configFile.temperature=_),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.temperature]])])]),c("div",Dbt,[c("div",kbt,[c("div",Lbt,[Pbt,c("p",Ubt,[z(c("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[396]||(e[396]=_=>r.configFile.n_predict=_),onChange:e[397]||(e[397]=_=>s.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),[[Oe,r.configFile.n_predict]])])]),z(c("input",{id:"predict",type:"range",onChange:e[398]||(e[398]=_=>s.settingsChanged=!0),"onUpdate:modelValue":e[399]||(e[399]=_=>r.configFile.n_predict=_),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.n_predict]])])]),c("div",Fbt,[c("div",Bbt,[c("div",Gbt,[Vbt,c("p",zbt,[z(c("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[400]||(e[400]=_=>r.configFile.top_k=_),onChange:e[401]||(e[401]=_=>s.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),[[Oe,r.configFile.top_k]])])]),z(c("input",{id:"top_k",type:"range",onChange:e[402]||(e[402]=_=>s.settingsChanged=!0),"onUpdate:modelValue":e[403]||(e[403]=_=>r.configFile.top_k=_),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.top_k]])])]),c("div",Hbt,[c("div",qbt,[c("div",Ybt,[$bt,c("p",Wbt,[z(c("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[404]||(e[404]=_=>r.configFile.top_p=_),onChange:e[405]||(e[405]=_=>s.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),[[Oe,r.configFile.top_p]])])]),z(c("input",{id:"top_p",type:"range","onUpdate:modelValue":e[406]||(e[406]=_=>r.configFile.top_p=_),min:"0",max:"1",step:"0.01",onChange:e[407]||(e[407]=_=>s.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),[[Oe,r.configFile.top_p]])])]),c("div",Kbt,[c("div",jbt,[c("div",Qbt,[Xbt,c("p",Zbt,[z(c("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[408]||(e[408]=_=>r.configFile.repeat_penalty=_),onChange:e[409]||(e[409]=_=>s.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),[[Oe,r.configFile.repeat_penalty]])])]),z(c("input",{id:"repeat_penalty",onChange:e[410]||(e[410]=_=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[411]||(e[411]=_=>r.configFile.repeat_penalty=_),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.repeat_penalty]])])]),c("div",Jbt,[c("div",eEt,[c("div",tEt,[nEt,c("p",iEt,[z(c("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[412]||(e[412]=_=>r.configFile.repeat_last_n=_),onChange:e[413]||(e[413]=_=>s.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),[[Oe,r.configFile.repeat_last_n]])])]),z(c("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[414]||(e[414]=_=>r.configFile.repeat_last_n=_),min:"0",max:"100",step:"1",onChange:e[415]||(e[415]=_=>s.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),[[Oe,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),Re(h,{ref:"addmodeldialog"},null,512),Re(f,{class:"z-20",show:s.variantSelectionDialogVisible,choices:s.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const rEt=bt(aot,[["render",sEt],["__scopeId","data-v-e25208c0"]]),oEt={components:{ClipBoardTextInput:CE,Card:yc},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};Ce.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}}},aEt={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"},lEt={class:"mb-4"},cEt=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),dEt=["value"],uEt={class:"mb-4"},pEt=c("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),_Et={class:"mb-4"},hEt=c("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),fEt={class:"mb-4"},mEt=c("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),gEt={class:"mb-4"},bEt=c("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),EEt={class:"mb-4"},yEt=c("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),vEt={class:"mb-4"},SEt=c("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),TEt=c("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),xEt={key:1};function CEt(t,e,n,i,s,r){const o=ft("Card"),a=ft("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(A(),M("div",aEt,[c("form",{onSubmit:e[2]||(e[2]=Te((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:""},[Re(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:$e(()=>[Re(o,{title:"Model",class:"",isHorizontal:!1},{default:$e(()=>[c("div",lEt,[cEt,z(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"},[(A(!0),M(We,null,ct(r.models,l=>(A(),M("option",{key:l,value:l},ge(l),9,dEt))),128))],544),[[jt,r.selectedModel]])])]),_:1}),Re(o,{title:"Data",isHorizontal:!1},{default:$e(()=>[c("div",uEt,[pEt,Re(a,{id:"model_path",inputType:"file",value:s.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),Re(o,{title:"Training",isHorizontal:!1},{default:$e(()=>[c("div",_Et,[hEt,Re(a,{id:"model_path",inputType:"integer",value:s.lr},null,8,["value"])]),c("div",fEt,[mEt,Re(a,{id:"model_path",inputType:"integer",value:s.num_epochs},null,8,["value"])]),c("div",gEt,[bEt,Re(a,{id:"model_path",inputType:"integer",value:s.max_length},null,8,["value"])]),c("div",EEt,[yEt,Re(a,{id:"model_path",inputType:"integer",value:s.batch_size},null,8,["value"])])]),_:1}),Re(o,{title:"Output",isHorizontal:!1},{default:$e(()=>[c("div",vEt,[SEt,Re(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),Re(o,{disableHoverAnimation:!0,disableFocus:!0},{default:$e(()=>[TEt]),_:1})],32)])):(A(),M("div",xEt,[Re(o,{title:"Info",class:"",isHorizontal:!1},{default:$e(()=>[Je(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const wEt=bt(oEt,[["render",CEt]]),REt={components:{ClipBoardTextInput:CE,Card:yc},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)}}},AEt={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"},NEt={class:"mb-4"},OEt=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),IEt={class:"mb-4"},MEt=c("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),DEt=c("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function kEt(t,e,n,i,s,r){const o=ft("ClipBoardTextInput"),a=ft("Card");return A(),M("div",AEt,[c("form",{onSubmit:e[0]||(e[0]=Te((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[Re(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:$e(()=>[Re(a,{title:"Model",class:"",isHorizontal:!1},{default:$e(()=>[c("div",NEt,[OEt,Re(o,{id:"model_path",inputType:"text",value:s.model_name},null,8,["value"])]),c("div",IEt,[MEt,Re(o,{id:"model_path",inputType:"text",value:s.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),Re(a,{disableHoverAnimation:!0,disableFocus:!0},{default:$e(()=>[DEt]),_:1})],32)])}const LEt=bt(REt,[["render",kEt]]),PEt={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,Ge(()=>{He.replace()})},watch:{showConfirmation(){Ge(()=>{He.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&Ge(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&Ge(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},UEt=["id"],FEt={class:"flex flex-row items-center gap-2"},BEt={key:0},GEt={class:"flex flex-row items-center w-full"},VEt=["title"],zEt=["value"],HEt={class:"flex items-center flex-1 max-h-6"},qEt={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},YEt=c("i",{"data-feather":"x"},null,-1),$Et=[YEt],WEt=c("i",{"data-feather":"check"},null,-1),KEt=[WEt],jEt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},QEt=c("i",{"data-feather":"folder"},null,-1),XEt=[QEt],ZEt=c("i",{"data-feather":"type"},null,-1),JEt=[ZEt],eyt=c("i",{"data-feather":"edit-2"},null,-1),tyt=[eyt],nyt=c("i",{"data-feather":"trash"},null,-1),iyt=[nyt];function syt(t,e,n,i,s,r){return A(),M("div",{class:qe([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]=Te(o=>r.selectEvent(),["stop"]))},[c("div",FEt,[n.isCheckbox?(A(),M("div",BEt,[z(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]=Te(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>s.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,n.id))},null,544),[[et,s.checkBoxValue_local]])])):$("",!0),n.selected?(A(),M("div",{key:1,class:qe(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):$("",!0),n.selected?$("",!0):(A(),M("div",{key:2,class:qe(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),c("div",GEt,[s.editTitle?$("",!0):(A(),M("p",{key:0,title:n.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},ge(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,VEt)),s.editTitle?(A(),M("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]=Hs(Te(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Hs(Te(o=>s.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=Te(()=>{},["stop"]))},null,40,zEt)):$("",!0),c("div",HEt,[s.showConfirmation?(A(),M("div",qEt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=Te(o=>r.cancel(),["stop"]))},$Et),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=Te(o=>s.editTitleMode?r.editTitleEvent():s.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},KEt)])):$("",!0),s.showConfirmation?$("",!0):(A(),M("div",jEt,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=Te(o=>r.openFolderEvent(),["stop"]))},XEt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=Te(o=>s.makeTitleMode=!0,["stop"]))},JEt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=Te(o=>s.editTitleMode=!0,["stop"]))},tyt),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=Te(o=>s.deleteMode=!0,["stop"]))},iyt)]))])])],10,UEt)}const AE=bt(PEt,[["render",syt]]),ryt={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(t){this.prompt=t}}},oyt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},ayt={class:"bg-white p-8 rounded"},lyt={class:"text-xl font-bold mb-4"};function cyt(t,e,n,i,s,r){return A(),M("div",null,[s.show?(A(),M("div",oyt,[c("div",ayt,[c("h2",lyt,ge(n.promptText),1),z(c("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>s.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[Oe,s.inputText]]),c("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),c("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):$("",!0)])}const yO=bt(ryt,[["render",cyt]]),dyt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:AE,MarkdownRenderer:rp},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){Ce.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),Ce.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){Ce.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),Ce.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){Ce.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},uyt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},pyt={class:"min-w-[23rem] max-w-[23rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},_yt={class:"search p-4"},hyt={classclass:"absolute flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},fyt=c("h2",{class:"text-xl font-bold m-4"},"Titles",-1),myt={class:"z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},gyt=c("h2",{class:"text-xl font-bold m-4"},"Content",-1);function byt(t,e,n,i,s,r){const o=ft("Discussion"),a=ft("MarkdownRenderer");return A(),M("div",{class:qe([{hidden:!s.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[c("div",uyt,[c("div",pyt,[c("div",_yt,[z(c("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=l=>s.searchQuery=l),placeholder:"Search skills",class:"border border-gray-300 rounded px-2 py-1 mr-2"},null,512),[[Oe,s.searchQuery]]),c("button",{onClick:e[1]||(e[1]=(...l)=>r.searchSkills&&r.searchSkills(...l)),class:"bg-blue-500 text-white rounded px-4 py-1"},"Search")]),c("div",hyt,[fyt,s.titles.length>0?(A(),xt(os,{key:0,name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(s.titles,l=>(A(),xt(o,{key:l.id,id:l.id,title:l.title,selected:r.fetchContent(l.id),loading:s.loading,isCheckbox:s.isCheckbox,checkBoxValue:!1,onSelect:u=>r.fetchContent(l.id),onDelete:u=>r.deleteSkill(l.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):$("",!0)])]),c("div",myt,[gyt,Re(a,{host:n.host,"markdown-text":s.content,message_id:s.id,discussion_id:s.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),c("button",{onClick:e[2]||(e[2]=(...l)=>r.closeComponent&&r.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const vO=bt(dyt,[["render",byt]]),Eyt={props:{htmlContent:{type:String,required:!0}}},yyt=["innerHTML"];function vyt(t,e,n,i,s,r){return A(),M("div",{class:"w-full h-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",innerHTML:n.htmlContent},null,8,yyt)}const Syt=bt(Eyt,[["render",vyt]]);const Tyt={props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Form"}},data(){return{collapsed:!0}},computed:{formattedJson(){return typeof this.jsonData=="string"?JSON.stringify(JSON.parse(this.jsonData),null," ").replace(/\n/g,"
"):JSON.stringify(this.jsonData,null," ").replace(/\n/g,"
")},isObject(){return 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}}},xyt={key:0},Cyt={class:"toggle-icon mr-1"},wyt={key:0,class:"fas fa-plus-circle text-gray-600"},Ryt={key:1,class:"fas fa-minus-circle text-gray-600"},Ayt={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},Nyt={key:0,class:"fas fa-plus-circle text-gray-600"},Oyt={key:1,class:"fas fa-minus-circle text-gray-600"},Iyt=["innerHTML"];function Myt(t,e,n,i,s,r){return r.isContentPresent?(A(),M("div",xyt,[c("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...o)=>r.toggleCollapsible&&r.toggleCollapsible(...o))},[c("span",Cyt,[s.collapsed?(A(),M("i",wyt)):(A(),M("i",Ryt))]),Je(" "+ge(n.jsonFormText),1)]),z(c("div",null,[c("div",Ayt,[r.isObject?(A(),M("span",{key:0,onClick:e[1]||(e[1]=(...o)=>r.toggleCollapsed&&r.toggleCollapsed(...o)),class:"toggle-icon cursor-pointer mr-1"},[s.collapsed?(A(),M("i",Nyt)):(A(),M("i",Oyt))])):$("",!0),c("pre",{innerHTML:r.formattedJson},null,8,Iyt)])],512),[[Mt,!s.collapsed]])])):$("",!0)}const Dyt=bt(Tyt,[["render",Myt]]),kyt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0},step_type:{type:String,required:!1,default:"start_end"}}},Lyt={class:"flex items-start"},Pyt={class:"step flex items-center mb-4"},Uyt={key:0,class:"flex items-center justify-center w-6 h-6 mr-2"},Fyt={key:0},Byt=c("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),Gyt=[Byt],Vyt={key:1},zyt=c("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),Hyt=[zyt],qyt={key:2},Yyt=c("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),$yt=[Yyt],Wyt={key:1,role:"status",class:"m-15"},Kyt=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),jyt=[Kyt],Qyt={class:"text-sm ml-6"};function Xyt(t,e,n,i,s,r){return A(),M("div",Lyt,[c("div",Pyt,[n.step_type=="start_end"?(A(),M("div",Uyt,[n.done?$("",!0):(A(),M("div",Fyt,Gyt)),n.done&&n.status?(A(),M("div",Vyt,Hyt)):$("",!0),n.done&&!n.status?(A(),M("div",qyt,$yt)):$("",!0)])):$("",!0),n.done?$("",!0):(A(),M("div",Wyt,jyt)),c("h3",Qyt,ge(n.message),1)])])}const Zyt=bt(kyt,[["render",Xyt]]),Jyt="/assets/process-61f7a21b.svg",evt="/assets/ok-a0b56451.svg",tvt="/assets/failed-183609e7.svg",SO="/assets/send_globe-305330b9.svg";const nvt="/",ivt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:rp,Step:Zyt,RenderHTMLJS:Syt,JsonViewer:Dyt,DynamicUIRenderer:EO},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{isSynthesizingVoice:!1,cpp_block:pO,html5_block:_O,LaTeX_block:hO,json_block:uO,javascript_block:dO,process_svg:Jyt,ok_svg:evt,failed_svg:tvt,loading_svg:mO,sendGlobe:SO,code_block:lO,python_block:cO,bash_block:fO,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Ge(()=>{He.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const i=Math.floor(n/(1e3*60*60));n-=i*(1e3*60*60);const s=Math.floor(n/(1e3*60));n-=s*(1e3*60);const r=Math.floor(n/1e3);return n-=r*1e3,[i,s,r]},insertTab(t){const e=t.target,n=e.selectionStart,i=e.selectionEnd,s=t.shiftKey;if(n===i)if(s){if(e.value.substring(n-4,n)==" "){const r=e.value.substring(0,n-4),o=e.value.substring(i),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const r=e.value.substring(0,n),o=e.value.substring(i),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const o=e.value.substring(n,i).split(` +Here is how you can do that`))},Pft)])]),c("tr",null,[Uft,c("td",null,[c("div",Fft,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[348]||(e[348]=(..._)=>r.reinstallPetalsService&&r.reinstallPetalsService(..._))},"install petals service")])])]),c("tr",null,[Bft,c("td",null,[c("div",Gft,[z(c("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[349]||(e[349]=_=>r.configFile.petals_base_url=_),onChange:e[350]||(e[350]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),Re(o,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[Re(o,{title:"Motion Ctrl service",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Vft,[c("tr",null,[zft,c("td",null,[c("div",Hft,[z(c("input",{type:"checkbox",id:"enable_motion_ctrl_service",required:"","onUpdate:modelValue":e[351]||(e[351]=_=>r.configFile.enable_motion_ctrl_service=_),onChange:e[352]||(e[352]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.enable_motion_ctrl_service]])])]),c("td",null,[c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[353]||(e[353]=_=>this.$store.state.messageBox.showMessage("Activates Motion ctrl service. The service will be automatically loaded at startup alowing you to use the motoin control endpoint to generate videos"))},Yft)])]),c("tr",null,[$ft,c("td",null,[c("div",Wft,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[354]||(e[354]=(..._)=>r.reinstallMotionCtrlService&&r.reinstallMotionCtrlService(..._))},"install Motion Ctrl service")])])]),c("tr",null,[Kft,c("td",null,[c("div",jft,[z(c("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[355]||(e[355]=_=>r.configFile.sd_base_url=_),onChange:e[356]||(e[356]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.sd_base_url]])])])])])]),_:1}),Re(o,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:$e(()=>[c("table",Qft,[c("tr",null,[Xft,c("td",null,[c("div",Zft,[z(c("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[357]||(e[357]=_=>r.configFile.elastic_search_service=_),onChange:e[358]||(e[358]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[et,r.configFile.elastic_search_service]])])])]),c("tr",null,[Jft,c("td",null,[c("div",emt,[c("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[359]||(e[359]=(..._)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(..._))},"install ElasticSearch service")])])]),c("tr",null,[tmt,c("td",null,[c("div",nmt,[z(c("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[360]||(e[360]=_=>r.configFile.elastic_search_url=_),onChange:e[361]||(e[361]=_=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Oe,r.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),c("div",imt,[c("div",smt,[c("button",{onClick:e[362]||(e[362]=Te(_=>s.bzc_collapsed=!s.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[z(c("div",null,omt,512),[[Mt,s.bzc_collapsed]]),z(c("div",null,lmt,512),[[Mt,!s.bzc_collapsed]]),cmt,r.configFile.binding_name?$("",!0):(A(),M("div",dmt,[umt,Je(" No binding selected! ")])),r.configFile.binding_name?(A(),M("div",pmt,"|")):$("",!0),r.configFile.binding_name?(A(),M("div",_mt,[c("div",hmt,[c("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,fmt),c("h3",mmt,ge(r.binding_name),1)])])):$("",!0)])]),c("div",{class:qe([{hidden:s.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(A(),M("div",gmt,[c("label",bmt," Bindings: ("+ge(r.bindingsZoo.length)+") ",1),c("div",{class:qe(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.bzl_collapsed?"":"max-h-96"])},[Re(os,{name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(r.bindingsZoo,(_,m)=>(A(),xt(a,{ref_for:!0,ref:"bindingZoo",key:"index-"+m+"-"+_.folder,binding:_,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:_.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):$("",!0),s.bzl_collapsed?(A(),M("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[363]||(e[363]=_=>s.bzl_collapsed=!s.bzl_collapsed)},ymt)):(A(),M("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[364]||(e[364]=_=>s.bzl_collapsed=!s.bzl_collapsed)},Smt))],2)]),c("div",Tmt,[c("div",xmt,[c("button",{onClick:e[365]||(e[365]=Te(_=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[z(c("div",null,wmt,512),[[Mt,s.mzc_collapsed]]),z(c("div",null,Amt,512),[[Mt,!s.mzc_collapsed]]),Nmt,c("div",Omt,[r.configFile.binding_name?$("",!0):(A(),M("div",Imt,[Mmt,Je(" Select binding first! ")])),!r.configFile.model_name&&r.configFile.binding_name?(A(),M("div",Dmt,[kmt,Je(" No model selected! ")])):$("",!0),r.configFile.model_name?(A(),M("div",Lmt,"|")):$("",!0),r.configFile.model_name?(A(),M("div",Pmt,[c("div",Umt,[c("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,Fmt),c("h3",Bmt,ge(r.configFile.model_name),1)])])):$("",!0)])])]),c("div",{class:qe([{hidden:s.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",Gmt,[c("div",Vmt,[c("div",zmt,[s.searchModelInProgress?(A(),M("div",Hmt,Ymt)):$("",!0),s.searchModelInProgress?$("",!0):(A(),M("div",$mt,Kmt))]),z(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[366]||(e[366]=_=>s.searchModel=_),onKeyup:e[367]||(e[367]=Hs((..._)=>r.searchModel_func&&r.searchModel_func(..._),["enter"]))},null,544),[[Oe,s.searchModel]]),s.searchModel?(A(),M("button",{key:0,onClick:e[368]||(e[368]=Te(_=>s.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")):$("",!0)])]),c("div",null,[z(c("input",{"onUpdate:modelValue":e[369]||(e[369]=_=>s.show_only_installed_models=_),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[et,s.show_only_installed_models]]),jmt]),c("div",null,[Re(l,{radioOptions:s.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),Qmt,s.is_loading_zoo?(A(),M("div",Xmt,egt)):$("",!0),s.models_zoo&&s.models_zoo.length>0?(A(),M("div",tgt,[c("label",ngt," Models: ("+ge(s.models_zoo.length)+") ",1),c("div",{class:qe(["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",s.mzl_collapsed?"":"max-h-96"])},[Re(os,{name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(r.rendered_models_zoo,(_,m)=>(A(),xt(u,{ref_for:!0,ref:"modelZoo",key:"index-"+m+"-"+_.name,model:_,"is-installed":_.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:_.name===r.configFile.model_name,model_type:_.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),c("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[370]||(e[370]=(..._)=>r.load_more_models&&r.load_more_models(..._))},"Load more models",512)]),_:1})],2)])):$("",!0),s.mzl_collapsed?(A(),M("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[371]||(e[371]=(..._)=>r.open_mzl&&r.open_mzl(..._))},sgt)):(A(),M("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[372]||(e[372]=(..._)=>r.open_mzl&&r.open_mzl(..._))},ogt)),c("div",agt,[c("div",lgt,[c("div",null,[c("div",cgt,[dgt,z(c("input",{type:"text","onUpdate:modelValue":e[373]||(e[373]=_=>s.reference_path=_),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[Oe,s.reference_path]])]),c("button",{type:"button",onClick:e[374]||(e[374]=Te(_=>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")]),s.modelDownlaodInProgress?$("",!0):(A(),M("div",ugt,[c("div",pgt,[_gt,z(c("input",{type:"text","onUpdate:modelValue":e[375]||(e[375]=_=>s.addModel.url=_),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[Oe,s.addModel.url]])]),c("button",{type:"button",onClick:e[376]||(e[376]=Te(_=>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")])),s.modelDownlaodInProgress?(A(),M("div",hgt,[fgt,c("div",mgt,[c("div",ggt,[c("div",bgt,[Egt,c("span",ygt,ge(Math.floor(s.addModel.progress))+"%",1)]),c("div",{class:"mx-1 opacity-80 line-clamp-1",title:s.addModel.url},ge(s.addModel.url),9,vgt),c("div",Sgt,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en({width:s.addModel.progress+"%"})},null,4)]),c("div",Tgt,[c("span",xgt,"Download speed: "+ge(r.speed_computed)+"/s",1),c("span",Cgt,ge(r.downloaded_size_computed)+"/"+ge(r.total_size_computed),1)])])]),c("div",wgt,[c("div",Rgt,[c("div",Agt,[c("button",{onClick:e[377]||(e[377]=Te((..._)=>r.onCancelInstall&&r.onCancelInstall(..._),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):$("",!0)])])],2)]),c("div",Ngt,[c("div",Ogt,[c("button",{onClick:e[380]||(e[380]=Te(_=>s.pzc_collapsed=!s.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[z(c("div",null,Mgt,512),[[Mt,s.pzc_collapsed]]),z(c("div",null,kgt,512),[[Mt,!s.pzc_collapsed]]),Lgt,r.configFile.personalities?(A(),M("div",Pgt,"|")):$("",!0),c("div",Ugt,ge(r.active_pesonality),1),r.configFile.personalities?(A(),M("div",Fgt,"|")):$("",!0),r.configFile.personalities?(A(),M("div",Bgt,[r.mountedPersArr.length>0?(A(),M("div",Ggt,[(A(!0),M(We,null,ct(r.mountedPersArr,(_,m)=>(A(),M("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:m+"-"+_.name,ref_for:!0,ref:"mountedPersonalities"},[c("div",Vgt,[c("button",{onClick:Te(E=>r.onPersonalitySelected(_),["stop"])},[c("img",{src:s.bUrl+_.avatar,onError:e[378]||(e[378]=(...E)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...E)),class:qe(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(_.full_path)?"border-secondary":"border-transparent z-0"]),title:_.name},null,42,Hgt)],8,zgt),c("button",{onClick:Te(E=>r.unmountPersonality(_),["stop"])},$gt,8,qgt)])]))),128))])):$("",!0)])):$("",!0),c("button",{onClick:e[379]||(e[379]=Te(_=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},Kgt)])]),c("div",{class:qe([{hidden:s.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",jgt,[Qgt,c("div",Xgt,[c("div",Zgt,[s.searchPersonalityInProgress?(A(),M("div",Jgt,tbt)):$("",!0),s.searchPersonalityInProgress?$("",!0):(A(),M("div",nbt,sbt))]),z(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[381]||(e[381]=_=>s.searchPersonality=_),onKeyup:e[382]||(e[382]=Te((..._)=>r.searchPersonality_func&&r.searchPersonality_func(..._),["stop"]))},null,544),[[Oe,s.searchPersonality]]),s.searchPersonality?(A(),M("button",{key:0,onClick:e[383]||(e[383]=Te(_=>s.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")):$("",!0)])]),s.searchPersonality?$("",!0):(A(),M("div",rbt,[c("label",obt," Personalities Category: ("+ge(s.persCatgArr.length)+") ",1),c("select",{id:"persCat",onChange:e[384]||(e[384]=_=>r.update_personality_category(_.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(A(!0),M(We,null,ct(s.persCatgArr,(_,m)=>(A(),M("option",{key:m,selected:_==this.configFile.personality_category},ge(_),9,abt))),128))],32)])),c("div",null,[s.personalitiesFiltered.length>0?(A(),M("div",lbt,[c("label",cbt,ge(s.searchPersonality?"Search results":"Personalities")+": ("+ge(s.personalitiesFiltered.length)+") ",1),c("div",{class:qe(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.pzl_collapsed?"":"max-h-96"])},[Re(os,{name:"bounce"},{default:$e(()=>[(A(!0),M(We,null,ct(s.personalitiesFiltered,(_,m)=>(A(),xt(d,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+m+"-"+_.name,personality:_,select_language:!0,full_path:_.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(E=>E===_.full_path||E===_.full_path+":"+_.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-open-folder"]))),128))]),_:1})],2)])):$("",!0)]),s.pzl_collapsed?(A(),M("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[385]||(e[385]=_=>s.pzl_collapsed=!s.pzl_collapsed)},ubt)):(A(),M("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[386]||(e[386]=_=>s.pzl_collapsed=!s.pzl_collapsed)},_bt))],2)]),c("div",hbt,[c("div",fbt,[c("button",{onClick:e[387]||(e[387]=Te(_=>s.mc_collapsed=!s.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[z(c("div",null,gbt,512),[[Mt,s.mc_collapsed]]),z(c("div",null,Ebt,512),[[Mt,!s.mc_collapsed]]),ybt])]),c("div",{class:qe([{hidden:s.mc_collapsed},"flex flex-col mb-2 p-2"])},[c("div",vbt,[c("div",Sbt,[z(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[388]||(e[388]=Te(()=>{},["stop"])),"onUpdate:modelValue":e[389]||(e[389]=_=>r.configFile.override_personality_model_parameters=_),onChange:e[390]||(e[390]=_=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[et,r.configFile.override_personality_model_parameters]]),Tbt])]),c("div",{class:qe(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[c("div",xbt,[Cbt,z(c("input",{type:"text",id:"seed","onUpdate:modelValue":e[391]||(e[391]=_=>r.configFile.seed=_),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Oe,r.configFile.seed]])]),c("div",wbt,[c("div",Rbt,[c("div",Abt,[Nbt,c("p",Obt,[z(c("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[392]||(e[392]=_=>r.configFile.temperature=_),onChange:e[393]||(e[393]=_=>s.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),[[Oe,r.configFile.temperature]])])]),z(c("input",{id:"temperature",onChange:e[394]||(e[394]=_=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[395]||(e[395]=_=>r.configFile.temperature=_),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.temperature]])])]),c("div",Ibt,[c("div",Mbt,[c("div",Dbt,[kbt,c("p",Lbt,[z(c("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[396]||(e[396]=_=>r.configFile.n_predict=_),onChange:e[397]||(e[397]=_=>s.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),[[Oe,r.configFile.n_predict]])])]),z(c("input",{id:"predict",type:"range",onChange:e[398]||(e[398]=_=>s.settingsChanged=!0),"onUpdate:modelValue":e[399]||(e[399]=_=>r.configFile.n_predict=_),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.n_predict]])])]),c("div",Pbt,[c("div",Ubt,[c("div",Fbt,[Bbt,c("p",Gbt,[z(c("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[400]||(e[400]=_=>r.configFile.top_k=_),onChange:e[401]||(e[401]=_=>s.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),[[Oe,r.configFile.top_k]])])]),z(c("input",{id:"top_k",type:"range",onChange:e[402]||(e[402]=_=>s.settingsChanged=!0),"onUpdate:modelValue":e[403]||(e[403]=_=>r.configFile.top_k=_),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.top_k]])])]),c("div",Vbt,[c("div",zbt,[c("div",Hbt,[qbt,c("p",Ybt,[z(c("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[404]||(e[404]=_=>r.configFile.top_p=_),onChange:e[405]||(e[405]=_=>s.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),[[Oe,r.configFile.top_p]])])]),z(c("input",{id:"top_p",type:"range","onUpdate:modelValue":e[406]||(e[406]=_=>r.configFile.top_p=_),min:"0",max:"1",step:"0.01",onChange:e[407]||(e[407]=_=>s.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),[[Oe,r.configFile.top_p]])])]),c("div",$bt,[c("div",Wbt,[c("div",Kbt,[jbt,c("p",Qbt,[z(c("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[408]||(e[408]=_=>r.configFile.repeat_penalty=_),onChange:e[409]||(e[409]=_=>s.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),[[Oe,r.configFile.repeat_penalty]])])]),z(c("input",{id:"repeat_penalty",onChange:e[410]||(e[410]=_=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[411]||(e[411]=_=>r.configFile.repeat_penalty=_),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Oe,r.configFile.repeat_penalty]])])]),c("div",Xbt,[c("div",Zbt,[c("div",Jbt,[eEt,c("p",tEt,[z(c("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[412]||(e[412]=_=>r.configFile.repeat_last_n=_),onChange:e[413]||(e[413]=_=>s.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),[[Oe,r.configFile.repeat_last_n]])])]),z(c("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[414]||(e[414]=_=>r.configFile.repeat_last_n=_),min:"0",max:"100",step:"1",onChange:e[415]||(e[415]=_=>s.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),[[Oe,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),Re(h,{ref:"addmodeldialog"},null,512),Re(f,{class:"z-20",show:s.variantSelectionDialogVisible,choices:s.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const iEt=bt(aot,[["render",nEt],["__scopeId","data-v-cb71036e"]]),sEt={components:{ClipBoardTextInput:CE,Card:yc},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};Ce.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}}},rEt={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"},oEt={class:"mb-4"},aEt=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),lEt=["value"],cEt={class:"mb-4"},dEt=c("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),uEt={class:"mb-4"},pEt=c("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),_Et={class:"mb-4"},hEt=c("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),fEt={class:"mb-4"},mEt=c("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),gEt={class:"mb-4"},bEt=c("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),EEt={class:"mb-4"},yEt=c("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),vEt=c("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),SEt={key:1};function TEt(t,e,n,i,s,r){const o=ft("Card"),a=ft("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(A(),M("div",rEt,[c("form",{onSubmit:e[2]||(e[2]=Te((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:""},[Re(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:$e(()=>[Re(o,{title:"Model",class:"",isHorizontal:!1},{default:$e(()=>[c("div",oEt,[aEt,z(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"},[(A(!0),M(We,null,ct(r.models,l=>(A(),M("option",{key:l,value:l},ge(l),9,lEt))),128))],544),[[jt,r.selectedModel]])])]),_:1}),Re(o,{title:"Data",isHorizontal:!1},{default:$e(()=>[c("div",cEt,[dEt,Re(a,{id:"model_path",inputType:"file",value:s.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),Re(o,{title:"Training",isHorizontal:!1},{default:$e(()=>[c("div",uEt,[pEt,Re(a,{id:"model_path",inputType:"integer",value:s.lr},null,8,["value"])]),c("div",_Et,[hEt,Re(a,{id:"model_path",inputType:"integer",value:s.num_epochs},null,8,["value"])]),c("div",fEt,[mEt,Re(a,{id:"model_path",inputType:"integer",value:s.max_length},null,8,["value"])]),c("div",gEt,[bEt,Re(a,{id:"model_path",inputType:"integer",value:s.batch_size},null,8,["value"])])]),_:1}),Re(o,{title:"Output",isHorizontal:!1},{default:$e(()=>[c("div",EEt,[yEt,Re(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),Re(o,{disableHoverAnimation:!0,disableFocus:!0},{default:$e(()=>[vEt]),_:1})],32)])):(A(),M("div",SEt,[Re(o,{title:"Info",class:"",isHorizontal:!1},{default:$e(()=>[Je(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const xEt=bt(sEt,[["render",TEt]]),CEt={components:{ClipBoardTextInput:CE,Card:yc},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)}}},wEt={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"},REt={class:"mb-4"},AEt=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),NEt={class:"mb-4"},OEt=c("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),IEt=c("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function MEt(t,e,n,i,s,r){const o=ft("ClipBoardTextInput"),a=ft("Card");return A(),M("div",wEt,[c("form",{onSubmit:e[0]||(e[0]=Te((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[Re(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:$e(()=>[Re(a,{title:"Model",class:"",isHorizontal:!1},{default:$e(()=>[c("div",REt,[AEt,Re(o,{id:"model_path",inputType:"text",value:s.model_name},null,8,["value"])]),c("div",NEt,[OEt,Re(o,{id:"model_path",inputType:"text",value:s.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),Re(a,{disableHoverAnimation:!0,disableFocus:!0},{default:$e(()=>[IEt]),_:1})],32)])}const DEt=bt(CEt,[["render",MEt]]),kEt={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,Ge(()=>{He.replace()})},watch:{showConfirmation(){Ge(()=>{He.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&Ge(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&Ge(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},LEt=["id"],PEt={class:"flex flex-row items-center gap-2"},UEt={key:0},FEt={class:"flex flex-row items-center w-full"},BEt=["title"],GEt=["value"],VEt={class:"flex items-center flex-1 max-h-6"},zEt={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},HEt=c("i",{"data-feather":"x"},null,-1),qEt=[HEt],YEt=c("i",{"data-feather":"check"},null,-1),$Et=[YEt],WEt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},KEt=c("i",{"data-feather":"folder"},null,-1),jEt=[KEt],QEt=c("i",{"data-feather":"type"},null,-1),XEt=[QEt],ZEt=c("i",{"data-feather":"edit-2"},null,-1),JEt=[ZEt],eyt=c("i",{"data-feather":"trash"},null,-1),tyt=[eyt];function nyt(t,e,n,i,s,r){return A(),M("div",{class:qe([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]=Te(o=>r.selectEvent(),["stop"]))},[c("div",PEt,[n.isCheckbox?(A(),M("div",UEt,[z(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]=Te(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>s.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,n.id))},null,544),[[et,s.checkBoxValue_local]])])):$("",!0),n.selected?(A(),M("div",{key:1,class:qe(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):$("",!0),n.selected?$("",!0):(A(),M("div",{key:2,class:qe(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),c("div",FEt,[s.editTitle?$("",!0):(A(),M("p",{key:0,title:n.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},ge(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,BEt)),s.editTitle?(A(),M("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]=Hs(Te(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Hs(Te(o=>s.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=Te(()=>{},["stop"]))},null,40,GEt)):$("",!0),c("div",VEt,[s.showConfirmation?(A(),M("div",zEt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=Te(o=>r.cancel(),["stop"]))},qEt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=Te(o=>s.editTitleMode?r.editTitleEvent():s.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},$Et)])):$("",!0),s.showConfirmation?$("",!0):(A(),M("div",WEt,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=Te(o=>r.openFolderEvent(),["stop"]))},jEt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=Te(o=>s.makeTitleMode=!0,["stop"]))},XEt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=Te(o=>s.editTitleMode=!0,["stop"]))},JEt),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=Te(o=>s.deleteMode=!0,["stop"]))},tyt)]))])])],10,LEt)}const AE=bt(kEt,[["render",nyt]]),iyt={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(t){this.prompt=t}}},syt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},ryt={class:"bg-white p-8 rounded"},oyt={class:"text-xl font-bold mb-4"};function ayt(t,e,n,i,s,r){return A(),M("div",null,[s.show?(A(),M("div",syt,[c("div",ryt,[c("h2",oyt,ge(n.promptText),1),z(c("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>s.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[Oe,s.inputText]]),c("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),c("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):$("",!0)])}const yO=bt(iyt,[["render",ayt]]),lyt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:AE,MarkdownRenderer:rp},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){Ce.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),Ce.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){Ce.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),Ce.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){Ce.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},cyt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},dyt={class:"min-w-[23rem] max-w-[23rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},uyt={class:"search p-4"},pyt={classclass:"absolute flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},_yt=c("h2",{class:"text-xl font-bold m-4"},"Titles",-1),hyt={class:"z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},fyt=c("h2",{class:"text-xl font-bold m-4"},"Content",-1);function myt(t,e,n,i,s,r){const o=ft("Discussion"),a=ft("MarkdownRenderer");return A(),M("div",{class:qe([{hidden:!s.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[c("div",cyt,[c("div",dyt,[c("div",uyt,[z(c("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=l=>s.searchQuery=l),placeholder:"Search skills",class:"border border-gray-300 rounded px-2 py-1 mr-2"},null,512),[[Oe,s.searchQuery]]),c("button",{onClick:e[1]||(e[1]=(...l)=>r.searchSkills&&r.searchSkills(...l)),class:"bg-blue-500 text-white rounded px-4 py-1"},"Search")]),c("div",pyt,[_yt,s.titles.length>0?(A(),xt(os,{key:0,name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(s.titles,l=>(A(),xt(o,{key:l.id,id:l.id,title:l.title,selected:r.fetchContent(l.id),loading:s.loading,isCheckbox:s.isCheckbox,checkBoxValue:!1,onSelect:u=>r.fetchContent(l.id),onDelete:u=>r.deleteSkill(l.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):$("",!0)])]),c("div",hyt,[fyt,Re(a,{host:n.host,"markdown-text":s.content,message_id:s.id,discussion_id:s.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),c("button",{onClick:e[2]||(e[2]=(...l)=>r.closeComponent&&r.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const vO=bt(lyt,[["render",myt]]),gyt={props:{htmlContent:{type:String,required:!0}}},byt=["innerHTML"];function Eyt(t,e,n,i,s,r){return A(),M("div",{class:"w-full h-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",innerHTML:n.htmlContent},null,8,byt)}const yyt=bt(gyt,[["render",Eyt]]);const vyt={props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Form"}},data(){return{collapsed:!0}},computed:{formattedJson(){return typeof this.jsonData=="string"?JSON.stringify(JSON.parse(this.jsonData),null," ").replace(/\n/g,"
"):JSON.stringify(this.jsonData,null," ").replace(/\n/g,"
")},isObject(){return 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}}},Syt={key:0},Tyt={class:"toggle-icon mr-1"},xyt={key:0,class:"fas fa-plus-circle text-gray-600"},Cyt={key:1,class:"fas fa-minus-circle text-gray-600"},wyt={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},Ryt={key:0,class:"fas fa-plus-circle text-gray-600"},Ayt={key:1,class:"fas fa-minus-circle text-gray-600"},Nyt=["innerHTML"];function Oyt(t,e,n,i,s,r){return r.isContentPresent?(A(),M("div",Syt,[c("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...o)=>r.toggleCollapsible&&r.toggleCollapsible(...o))},[c("span",Tyt,[s.collapsed?(A(),M("i",xyt)):(A(),M("i",Cyt))]),Je(" "+ge(n.jsonFormText),1)]),z(c("div",null,[c("div",wyt,[r.isObject?(A(),M("span",{key:0,onClick:e[1]||(e[1]=(...o)=>r.toggleCollapsed&&r.toggleCollapsed(...o)),class:"toggle-icon cursor-pointer mr-1"},[s.collapsed?(A(),M("i",Ryt)):(A(),M("i",Ayt))])):$("",!0),c("pre",{innerHTML:r.formattedJson},null,8,Nyt)])],512),[[Mt,!s.collapsed]])])):$("",!0)}const Iyt=bt(vyt,[["render",Oyt]]),Myt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0},step_type:{type:String,required:!1,default:"start_end"}}},Dyt={class:"flex items-start"},kyt={class:"step flex items-center mb-4"},Lyt={key:0,class:"flex items-center justify-center w-6 h-6 mr-2"},Pyt={key:0},Uyt=c("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),Fyt=[Uyt],Byt={key:1},Gyt=c("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),Vyt=[Gyt],zyt={key:2},Hyt=c("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),qyt=[Hyt],Yyt={key:1,role:"status",class:"m-15"},$yt=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),Wyt=[$yt],Kyt={class:"text-sm ml-6"};function jyt(t,e,n,i,s,r){return A(),M("div",Dyt,[c("div",kyt,[n.step_type=="start_end"?(A(),M("div",Lyt,[n.done?$("",!0):(A(),M("div",Pyt,Fyt)),n.done&&n.status?(A(),M("div",Byt,Vyt)):$("",!0),n.done&&!n.status?(A(),M("div",zyt,qyt)):$("",!0)])):$("",!0),n.done?$("",!0):(A(),M("div",Yyt,Wyt)),c("h3",Kyt,ge(n.message),1)])])}const Qyt=bt(Myt,[["render",jyt]]),Xyt="/assets/process-61f7a21b.svg",Zyt="/assets/ok-a0b56451.svg",Jyt="/assets/failed-183609e7.svg",SO="/assets/send_globe-305330b9.svg";const evt="/",tvt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:rp,Step:Qyt,RenderHTMLJS:yyt,JsonViewer:Iyt,DynamicUIRenderer:EO},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{isSynthesizingVoice:!1,cpp_block:pO,html5_block:_O,LaTeX_block:hO,json_block:uO,javascript_block:dO,process_svg:Xyt,ok_svg:Zyt,failed_svg:Jyt,loading_svg:mO,sendGlobe:SO,code_block:lO,python_block:cO,bash_block:fO,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Ge(()=>{He.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const i=Math.floor(n/(1e3*60*60));n-=i*(1e3*60*60);const s=Math.floor(n/(1e3*60));n-=s*(1e3*60);const r=Math.floor(n/1e3);return n-=r*1e3,[i,s,r]},insertTab(t){const e=t.target,n=e.selectionStart,i=e.selectionEnd,s=t.shiftKey;if(n===i)if(s){if(e.value.substring(n-4,n)==" "){const r=e.value.substring(0,n-4),o=e.value.substring(i),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const r=e.value.substring(0,n),o=e.value.substring(i),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const o=e.value.substring(n,i).split(` `).map(d=>d.trim()===""?d:s?d.startsWith(" ")?d.substring(4):d:" "+d),a=e.value.substring(0,n),l=e.value.substring(i),u=a+o.join(` `)+l;this.message.content=u,this.$nextTick(()=>{e.selectionStart=n,e.selectionEnd=i+o.length*4})}t.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){this.isSynthesizingVoice?(this.isSynthesizingVoice=!1,this.$refs.audio_player.pause()):(this.isSynthesizingVoice=!0,Ce.post("./text2wav",{text:this.message.content}).then(t=>{this.isSynthesizingVoice=!1;let e=t.data.url;console.log(e),this.audio_url=e,this.message.metadata||(this.message.metadata=[]);let n=!1;for(let i of this.message.metadata)Object.prototype.hasOwnProperty.call(i,"audio_url")&&(i.audio_url=this.audio_url,n=!0);n||this.message.metadata.push({audio_url:this.audio_url}),this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url)}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSynthesizingVoice=!1}))},speak(){if(this.$store.state.config.active_tts_service!="browser"&&this.$store.state.config.active_tts_service!="None")this.isSpeaking=!0,Ce.post("./text2Audio",{text:this.message.content}).then(t=>{this.isSpeaking=!1}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSpeaking=!1});else{if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let t=0;console.log("voice on"),this.isSpeaking=!0;const e=200;this.message.content,this.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(s=>s.name===this.$store.state.config.audio_out_voice)[0]);const n=s=>{let r=this.message.content.substring(s,s+e);const o=[".","!","?",` `];let a=-1;return o.forEach(l=>{const u=r.lastIndexOf(l);u>a&&(a=u)}),a==-1&&(a=r.length),console.log(a),a+s+1},i=()=>{if(this.status_message=="Done"||this.message.content.includes(".")||this.message.content.includes("?")||this.message.content.includes("!")){const s=n(t),r=this.message.content.substring(t,s);this.msg.text=r,t=s+1,this.msg.onend=o=>{t{i()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",s))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{i()},1)};console.log("Speaking chunk"),i()}},toggleModel(){this.expanded=!this.expanded},addBlock(t){let e=this.$refs.mdTextarea.selectionStart,n=this.$refs.mdTextarea.selectionEnd;e==n?speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+3+t.length):speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+t+` `+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+` -`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url),this.editMsgMode=!1},resendMessage(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?nvt+this.avatar:(console.log("No avatar found"),Ti)},defaultImg(t){t.target.src=Ti},parseDate(t){let e=new Date(Date.parse(t)),i=Math.floor((new Date-e)/1e3);return i<=1?"just now":i<20?i+" seconds ago":i<40?"half a minute ago":i<60?"less than a minute ago":i<=90?"one minute ago":i<=3540?Math.round(i/60)+" minutes ago":i<=5400?"1 hour ago":i<=86400?Math.round(i/3600)+" hours ago":i<=129600?"1 day ago":i<604800?Math.round(i/86400)+" days ago":i<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,i=Math.floor(n/86400);if(!(isNaN(i)||i<0||i>=31))return i==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")||i==1&&"Yesterday"||i<7&&i+" days ago"||i<31&&Math.ceil(i/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){this.$store.state.config.auto_speak&&(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode||this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed"),console.log(this.message.ui)},showConfirmation(){Ge(()=>{He.replace()})},deleteMsgMode(){Ge(()=>{He.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,Ge(()=>{He.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[i,s,r]=this.computeTimeDiff(t,e);function o(l){return l<10&&(l="0"+l),l}return o(i)+"h:"+o(s)+"m:"+o(r)+"s"},warmup_duration(){const t=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let i,s,r;[i,s,r]=this.computeTimeDiff(t,e);function o(l){return l<10&&(l="0"+l),l}return o(i)+"h:"+o(s)+"m:"+o(r)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let s=e.getTime()-t.getTime();const r=Math.floor(s/1e3),o=n/r;return Math.round(o)+" t/s"}}},svt={class:"relative w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent 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"},rvt={class:"flex flex-row gap-2"},ovt={class:"flex-shrink-0"},avt={class:"group/avatar"},lvt=["src","data-popover-target"],cvt={class:"flex flex-col w-full flex-grow-0"},dvt={class:"flex flex-row flex-grow items-start"},uvt={class:"flex flex-col mb-2"},pvt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},_vt=["title"],hvt=c("div",{class:"flex-grow"},null,-1),fvt={class:"flex-row justify-end mx-2"},mvt={class:"invisible group-hover:visible flex flex-row"},gvt={key:0,class:"flex items-center duration-75"},bvt=c("i",{"data-feather":"x"},null,-1),Evt=[bvt],yvt=c("i",{"data-feather":"check"},null,-1),vvt=[yvt],Svt=c("i",{"data-feather":"edit"},null,-1),Tvt=[Svt],xvt=["src"],Cvt=["src"],wvt=["src"],Rvt=["src"],Avt=["src"],Nvt=["src"],Ovt=["src"],Ivt=["src"],Mvt=c("i",{"data-feather":"copy"},null,-1),Dvt=[Mvt],kvt=c("i",{"data-feather":"send"},null,-1),Lvt=[kvt],Pvt=["src"],Uvt=c("i",{"data-feather":"send"},null,-1),Fvt=[Uvt],Bvt=c("i",{"data-feather":"fast-forward"},null,-1),Gvt=[Bvt],Vvt={key:14,class:"flex items-center duration-75"},zvt=c("i",{"data-feather":"x"},null,-1),Hvt=[zvt],qvt=c("i",{"data-feather":"check"},null,-1),Yvt=[qvt],$vt=c("i",{"data-feather":"trash"},null,-1),Wvt=[$vt],Kvt=c("i",{"data-feather":"thumbs-up"},null,-1),jvt=[Kvt],Qvt={class:"flex flex-row items-center"},Xvt=c("i",{"data-feather":"thumbs-down"},null,-1),Zvt=[Xvt],Jvt={class:"flex flex-row items-center"},eSt=c("i",{"data-feather":"volume-2"},null,-1),tSt=[eSt],nSt={key:16,class:"flex flex-row items-center"},iSt=c("i",{"data-feather":"voicemail"},null,-1),sSt=[iSt],rSt=["src"],oSt={class:"overflow-x-auto w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},aSt={class:"flex w-full cursor-pointer rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900 mb-3.5 max-w-full"},lSt={class:"grid min-w-72 select-none grid-cols-[40px,1fr] items-center gap-2.5 p-2"},cSt={class:"relative grid aspect-square place-content-center overflow-hidden rounded-lg bg-gray-300 dark:bg-gray-200"},dSt=["src"],uSt=["src"],pSt=["src"],_St={class:"leading-4"},hSt=c("dd",{class:"text-sm"},"Processing infos",-1),fSt={class:"flex items-center gap-1 truncate whitespace-nowrap text-[.82rem] text-gray-400"},mSt={class:"content px-5 pb-5 pt-4"},gSt={class:"list-none"},bSt=c("div",{class:"flex flex-col items-start w-full"},null,-1),ESt={class:"flex flex-col items-start w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},ySt={key:1},vSt=["src"],SSt={class:"text-sm text-gray-400 mt-2"},TSt={class:"flex flex-row items-center gap-2"},xSt={key:0},CSt={class:"font-thin"},wSt={key:1},RSt={class:"font-thin"},ASt={key:2},NSt={class:"font-thin"},OSt={key:3},ISt=["title"],MSt={key:4},DSt=["title"],kSt={key:5},LSt=["title"],PSt={key:6},USt=["title"];function FSt(t,e,n,i,s,r){var h;const o=ft("Step"),a=ft("RenderHTMLJS"),l=ft("MarkdownRenderer"),u=ft("JsonViewer"),d=ft("DynamicUIRenderer");return A(),M("div",svt,[c("div",rvt,[c("div",ovt,[c("div",avt,[c("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=f=>r.defaultImg(f)),"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,lvt)])]),c("div",cvt,[c("div",dvt,[c("div",uvt,[c("div",pvt,ge(n.message.sender)+" ",1),n.message.created_at?(A(),M("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},ge(r.created_at),9,_vt)):$("",!0)]),hvt,c("div",fvt,[c("div",mvt,[r.editMsgMode?(A(),M("div",gvt,[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]=Te(f=>r.editMsgMode=!1,["stop"]))},Evt),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]=Te((...f)=>r.updateMessage&&r.updateMessage(...f),["stop"]))},vvt)])):$("",!0),r.editMsgMode?$("",!0):(A(),M("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Edit message",onClick:e[3]||(e[3]=Te(f=>r.editMsgMode=!0,["stop"]))},Tvt)),r.editMsgMode?(A(),M("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add generic block",onClick:e[4]||(e[4]=Te(f=>r.addBlock(""),["stop"]))},[c("img",{src:s.code_block,width:"25",height:"25"},null,8,xvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add python block",onClick:e[5]||(e[5]=Te(f=>r.addBlock("python"),["stop"]))},[c("img",{src:s.python_block,width:"25",height:"25"},null,8,Cvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add javascript block",onClick:e[6]||(e[6]=Te(f=>r.addBlock("javascript"),["stop"]))},[c("img",{src:s.javascript_block,width:"25",height:"25"},null,8,wvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:5,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add json block",onClick:e[7]||(e[7]=Te(f=>r.addBlock("json"),["stop"]))},[c("img",{src:s.json_block,width:"25",height:"25"},null,8,Rvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:6,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add c++ block",onClick:e[8]||(e[8]=Te(f=>r.addBlock("c++"),["stop"]))},[c("img",{src:s.cpp_block,width:"25",height:"25"},null,8,Avt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:7,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add html block",onClick:e[9]||(e[9]=Te(f=>r.addBlock("html"),["stop"]))},[c("img",{src:s.html5_block,width:"25",height:"25"},null,8,Nvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:8,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add LaTex block",onClick:e[10]||(e[10]=Te(f=>r.addBlock("latex"),["stop"]))},[c("img",{src:s.LaTeX_block,width:"25",height:"25"},null,8,Ovt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:9,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add bash block",onClick:e[11]||(e[11]=Te(f=>r.addBlock("bash"),["stop"]))},[c("img",{src:s.bash_block,width:"25",height:"25"},null,8,Ivt)])):$("",!0),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Copy message to clipboard",onClick:e[12]||(e[12]=Te(f=>r.copyContentToClipboard(),["stop"]))},Dvt),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(A(),M("div",{key:10,class:qe(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message with full context",onClick:e[13]||(e[13]=Te(f=>r.resendMessage("full_context"),["stop"]))},Lvt,2)):$("",!0),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(A(),M("div",{key:11,class:qe(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[14]||(e[14]=Te(f=>r.resendMessage("full_context_with_internet"),["stop"]))},[c("img",{src:s.sendGlobe,width:"25",height:"25"},null,8,Pvt)],2)):$("",!0),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(A(),M("div",{key:12,class:qe(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[15]||(e[15]=Te(f=>r.resendMessage("simple_question"),["stop"]))},Fvt,2)):$("",!0),!r.editMsgMode&&n.message.sender==this.$store.state.mountedPers.name?(A(),M("div",{key:13,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Resend message",onClick:e[16]||(e[16]=Te(f=>r.continueMessage(),["stop"]))},Gvt)):$("",!0),s.deleteMsgMode?(A(),M("div",Vvt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[17]||(e[17]=Te(f=>s.deleteMsgMode=!1,["stop"]))},Hvt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[18]||(e[18]=Te(f=>r.deleteMsg(),["stop"]))},Yvt)])):$("",!0),!r.editMsgMode&&!s.deleteMsgMode?(A(),M("div",{key:15,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[19]||(e[19]=f=>s.deleteMsgMode=!0)},Wvt)):$("",!0),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[20]||(e[20]=Te(f=>r.rankUp(),["stop"]))},jvt),c("div",Qvt,[c("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[21]||(e[21]=Te(f=>r.rankDown(),["stop"]))},Zvt),n.message.rank!=0?(A(),M("div",{key:0,class:qe(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},ge(n.message.rank),3)):$("",!0)]),c("div",Jvt,[this.$store.state.config.active_tts_service!="None"?(A(),M("div",{key:0,class:qe(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[22]||(e[22]=Te(f=>r.speak(),["stop"]))},tSt,2)):$("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(A(),M("div",nSt,[s.isSynthesizingVoice?(A(),M("img",{key:1,src:s.loading_svg},null,8,rSt)):(A(),M("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"generate_audio",onClick:e[23]||(e[23]=Te(f=>r.read(),["stop"]))},sSt))])):$("",!0)])])]),c("div",oSt,[z(c("details",aSt,[c("summary",lSt,[c("div",cSt,[n.message.status_message!="Done"&n.message.status_message!="Generation canceled"?(A(),M("img",{key:0,src:s.loading_svg,class:"w-50 h-50 absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,dSt)):$("",!0),n.message.status_message=="Generation canceled"?(A(),M("img",{key:1,src:s.failed_svg,class:"w-50 h-50 absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,uSt)):$("",!0),n.message.status_message=="Done"?(A(),M("img",{key:2,src:s.ok_svg,class:"w-50 h-50 absolute m-2 w-6 inset-0 text-geen-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,pSt)):$("",!0)]),c("dl",_St,[hSt,c("dt",fSt,ge(n.message==null?"":n.message.status_message),1)])]),c("div",mSt,[c("ol",gSt,[(A(!0),M(We,null,ct(n.message.steps,(f,_)=>(A(),M("div",{key:"step-"+n.message.id+"-"+_,class:"group border-l pb-6 last:!border-transparent last:pb-0 dark:border-gray-800",style:en({backgroundColor:f.done?"transparent":"inherit"})},[Re(o,{done:f.done,message:f.message,status:f.status,step_type:f.type},null,8,["done","message","status","step_type"])],4))),128))])])],512),[[Mt,n.message!=null&&n.message.steps!=null&&n.message.steps.length>0]]),bSt,c("div",ESt,[(A(!0),M(We,null,ct(n.message.html_js_s,(f,_)=>(A(),M("div",{key:"htmljs-"+n.message.id+"-"+_,class:"htmljs font-bold",style:en({backgroundColor:t.step.done?"transparent":"inherit"})},[Re(a,{htmlContent:f},null,8,["htmlContent"])],4))),128))]),r.editMsgMode?$("",!0):(A(),xt(l,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),c("div",null,[n.message.open?z((A(),M("textarea",{key:0,ref:"mdTextarea",onKeydown:e[24]||(e[24]=Hs(Te((...f)=>r.insertTab&&r.insertTab(...f),["prevent"]),["tab"])),class:"block min-h-[900px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,placeholder:"Enter message here...","onUpdate:modelValue":e[25]||(e[25]=f=>n.message.content=f)},`\r - `,544)),[[Oe,n.message.content]]):$("",!0)]),n.message.metadata!==null?(A(),M("div",ySt,[(A(!0),M(We,null,ct(((h=n.message.metadata)==null?void 0:h.filter(f=>f!=null&&f.hasOwnProperty("title")&&f.hasOwnProperty("content")))||[],(f,_)=>(A(),M("div",{key:"json-"+n.message.id+"-"+_,class:"json font-bold"},[Re(u,{jsonFormText:f.title,jsonData:f.content},null,8,["jsonFormText","jsonData"])]))),128))])):$("",!0),n.message.ui!==null&&n.message.ui!==void 0&&n.message.ui!==""?(A(),xt(d,{key:2,class:"w-full",code:n.message.ui},null,8,["code"])):$("",!0),s.audio_url!=null?(A(),M("audio",{controls:"",key:s.audio_url},[c("source",{src:s.audio_url,type:"audio/wav",ref:"audio_player"},null,8,vSt),Je(" Your browser does not support the audio element. ")])):$("",!0)]),c("div",SSt,[c("div",TSt,[n.message.binding?(A(),M("p",xSt,[Je("Binding: "),c("span",CSt,ge(n.message.binding),1)])):$("",!0),n.message.model?(A(),M("p",wSt,[Je("Model: "),c("span",RSt,ge(n.message.model),1)])):$("",!0),n.message.seed?(A(),M("p",ASt,[Je("Seed: "),c("span",NSt,ge(n.message.seed),1)])):$("",!0),n.message.nb_tokens?(A(),M("p",OSt,[Je("Number of tokens: "),c("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},ge(n.message.nb_tokens),9,ISt)])):$("",!0),r.warmup_duration?(A(),M("p",MSt,[Je("Warmup duration: "),c("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},ge(r.warmup_duration),9,DSt)])):$("",!0),r.time_spent?(A(),M("p",kSt,[Je("Generation duration: "),c("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},ge(r.time_spent),9,LSt)])):$("",!0),r.generation_rate?(A(),M("p",PSt,[Je("Rate: "),c("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},ge(r.generation_rate),9,USt)])):$("",!0)])])])])])}const TO=bt(ivt,[["render",FSt]]),BSt="/";Ce.defaults.baseURL="/";const GSt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:fc,UniversalForm:Ec},data(){return{bUrl:BSt,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await Ce.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(s=>s===t.full_path),i={client_id:this.$store.state.client_id,id:n};e=await Ce.post("/select_personality",i),console.log("Generating message from ",e.data.status),Ke.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await Ce.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{Ce.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{Ce.post("/set_active_personality_settings",n).then(i=>{i&&i.data?(console.log("personality set with new settings",i.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. +`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url),this.editMsgMode=!1},resendMessage(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?evt+this.avatar:(console.log("No avatar found"),Ti)},defaultImg(t){t.target.src=Ti},parseDate(t){let e=new Date(Date.parse(t)),i=Math.floor((new Date-e)/1e3);return i<=1?"just now":i<20?i+" seconds ago":i<40?"half a minute ago":i<60?"less than a minute ago":i<=90?"one minute ago":i<=3540?Math.round(i/60)+" minutes ago":i<=5400?"1 hour ago":i<=86400?Math.round(i/3600)+" hours ago":i<=129600?"1 day ago":i<604800?Math.round(i/86400)+" days ago":i<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,i=Math.floor(n/86400);if(!(isNaN(i)||i<0||i>=31))return i==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")||i==1&&"Yesterday"||i<7&&i+" days ago"||i<31&&Math.ceil(i/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){this.$store.state.config.auto_speak&&(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode||this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed"),console.log(this.message.ui)},showConfirmation(){Ge(()=>{He.replace()})},deleteMsgMode(){Ge(()=>{He.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,Ge(()=>{He.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[i,s,r]=this.computeTimeDiff(t,e);function o(l){return l<10&&(l="0"+l),l}return o(i)+"h:"+o(s)+"m:"+o(r)+"s"},warmup_duration(){const t=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let i,s,r;[i,s,r]=this.computeTimeDiff(t,e);function o(l){return l<10&&(l="0"+l),l}return o(i)+"h:"+o(s)+"m:"+o(r)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let s=e.getTime()-t.getTime();const r=Math.floor(s/1e3),o=n/r;return Math.round(o)+" t/s"}}},nvt={class:"relative w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent 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"},ivt={class:"flex flex-row gap-2"},svt={class:"flex-shrink-0"},rvt={class:"group/avatar"},ovt=["src","data-popover-target"],avt={class:"flex flex-col w-full flex-grow-0"},lvt={class:"flex flex-row flex-grow items-start"},cvt={class:"flex flex-col mb-2"},dvt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},uvt=["title"],pvt=c("div",{class:"flex-grow"},null,-1),_vt={class:"flex-row justify-end mx-2"},hvt={class:"invisible group-hover:visible flex flex-row"},fvt={key:0,class:"flex items-center duration-75"},mvt=c("i",{"data-feather":"x"},null,-1),gvt=[mvt],bvt=c("i",{"data-feather":"check"},null,-1),Evt=[bvt],yvt=c("i",{"data-feather":"edit"},null,-1),vvt=[yvt],Svt=["src"],Tvt=["src"],xvt=["src"],Cvt=["src"],wvt=["src"],Rvt=["src"],Avt=["src"],Nvt=["src"],Ovt=c("i",{"data-feather":"copy"},null,-1),Ivt=[Ovt],Mvt=c("i",{"data-feather":"send"},null,-1),Dvt=[Mvt],kvt=["src"],Lvt=c("i",{"data-feather":"send"},null,-1),Pvt=[Lvt],Uvt=c("i",{"data-feather":"fast-forward"},null,-1),Fvt=[Uvt],Bvt={key:14,class:"flex items-center duration-75"},Gvt=c("i",{"data-feather":"x"},null,-1),Vvt=[Gvt],zvt=c("i",{"data-feather":"check"},null,-1),Hvt=[zvt],qvt=c("i",{"data-feather":"trash"},null,-1),Yvt=[qvt],$vt=c("i",{"data-feather":"thumbs-up"},null,-1),Wvt=[$vt],Kvt={class:"flex flex-row items-center"},jvt=c("i",{"data-feather":"thumbs-down"},null,-1),Qvt=[jvt],Xvt={class:"flex flex-row items-center"},Zvt=c("i",{"data-feather":"volume-2"},null,-1),Jvt=[Zvt],eSt={key:16,class:"flex flex-row items-center"},tSt=c("i",{"data-feather":"voicemail"},null,-1),nSt=[tSt],iSt=["src"],sSt={class:"overflow-x-auto w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},rSt={class:"flex w-full cursor-pointer rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900 mb-3.5 max-w-full"},oSt={class:"grid min-w-72 select-none grid-cols-[40px,1fr] items-center gap-2.5 p-2"},aSt={class:"relative grid aspect-square place-content-center overflow-hidden rounded-lg bg-gray-300 dark:bg-gray-200"},lSt=["src"],cSt=["src"],dSt=["src"],uSt={class:"leading-4"},pSt=c("dd",{class:"text-sm"},"Processing infos",-1),_St={class:"flex items-center gap-1 truncate whitespace-nowrap text-[.82rem] text-gray-400"},hSt={class:"content px-5 pb-5 pt-4"},fSt={class:"list-none"},mSt=c("div",{class:"flex flex-col items-start w-full"},null,-1),gSt={class:"flex flex-col items-start w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},bSt={key:1},ESt=["src"],ySt={class:"text-sm text-gray-400 mt-2"},vSt={class:"flex flex-row items-center gap-2"},SSt={key:0},TSt={class:"font-thin"},xSt={key:1},CSt={class:"font-thin"},wSt={key:2},RSt={class:"font-thin"},ASt={key:3},NSt=["title"],OSt={key:4},ISt=["title"],MSt={key:5},DSt=["title"],kSt={key:6},LSt=["title"];function PSt(t,e,n,i,s,r){var h;const o=ft("Step"),a=ft("RenderHTMLJS"),l=ft("MarkdownRenderer"),u=ft("JsonViewer"),d=ft("DynamicUIRenderer");return A(),M("div",nvt,[c("div",ivt,[c("div",svt,[c("div",rvt,[c("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=f=>r.defaultImg(f)),"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,ovt)])]),c("div",avt,[c("div",lvt,[c("div",cvt,[c("div",dvt,ge(n.message.sender)+" ",1),n.message.created_at?(A(),M("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},ge(r.created_at),9,uvt)):$("",!0)]),pvt,c("div",_vt,[c("div",hvt,[r.editMsgMode?(A(),M("div",fvt,[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]=Te(f=>r.editMsgMode=!1,["stop"]))},gvt),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]=Te((...f)=>r.updateMessage&&r.updateMessage(...f),["stop"]))},Evt)])):$("",!0),r.editMsgMode?$("",!0):(A(),M("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Edit message",onClick:e[3]||(e[3]=Te(f=>r.editMsgMode=!0,["stop"]))},vvt)),r.editMsgMode?(A(),M("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add generic block",onClick:e[4]||(e[4]=Te(f=>r.addBlock(""),["stop"]))},[c("img",{src:s.code_block,width:"25",height:"25"},null,8,Svt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add python block",onClick:e[5]||(e[5]=Te(f=>r.addBlock("python"),["stop"]))},[c("img",{src:s.python_block,width:"25",height:"25"},null,8,Tvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add javascript block",onClick:e[6]||(e[6]=Te(f=>r.addBlock("javascript"),["stop"]))},[c("img",{src:s.javascript_block,width:"25",height:"25"},null,8,xvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:5,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add json block",onClick:e[7]||(e[7]=Te(f=>r.addBlock("json"),["stop"]))},[c("img",{src:s.json_block,width:"25",height:"25"},null,8,Cvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:6,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add c++ block",onClick:e[8]||(e[8]=Te(f=>r.addBlock("c++"),["stop"]))},[c("img",{src:s.cpp_block,width:"25",height:"25"},null,8,wvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:7,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add html block",onClick:e[9]||(e[9]=Te(f=>r.addBlock("html"),["stop"]))},[c("img",{src:s.html5_block,width:"25",height:"25"},null,8,Rvt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:8,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add LaTex block",onClick:e[10]||(e[10]=Te(f=>r.addBlock("latex"),["stop"]))},[c("img",{src:s.LaTeX_block,width:"25",height:"25"},null,8,Avt)])):$("",!0),r.editMsgMode?(A(),M("div",{key:9,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add bash block",onClick:e[11]||(e[11]=Te(f=>r.addBlock("bash"),["stop"]))},[c("img",{src:s.bash_block,width:"25",height:"25"},null,8,Nvt)])):$("",!0),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Copy message to clipboard",onClick:e[12]||(e[12]=Te(f=>r.copyContentToClipboard(),["stop"]))},Ivt),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(A(),M("div",{key:10,class:qe(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message with full context",onClick:e[13]||(e[13]=Te(f=>r.resendMessage("full_context"),["stop"]))},Dvt,2)):$("",!0),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(A(),M("div",{key:11,class:qe(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[14]||(e[14]=Te(f=>r.resendMessage("full_context_with_internet"),["stop"]))},[c("img",{src:s.sendGlobe,width:"25",height:"25"},null,8,kvt)],2)):$("",!0),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(A(),M("div",{key:12,class:qe(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[15]||(e[15]=Te(f=>r.resendMessage("simple_question"),["stop"]))},Pvt,2)):$("",!0),!r.editMsgMode&&n.message.sender==this.$store.state.mountedPers.name?(A(),M("div",{key:13,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Resend message",onClick:e[16]||(e[16]=Te(f=>r.continueMessage(),["stop"]))},Fvt)):$("",!0),s.deleteMsgMode?(A(),M("div",Bvt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[17]||(e[17]=Te(f=>s.deleteMsgMode=!1,["stop"]))},Vvt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[18]||(e[18]=Te(f=>r.deleteMsg(),["stop"]))},Hvt)])):$("",!0),!r.editMsgMode&&!s.deleteMsgMode?(A(),M("div",{key:15,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[19]||(e[19]=f=>s.deleteMsgMode=!0)},Yvt)):$("",!0),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[20]||(e[20]=Te(f=>r.rankUp(),["stop"]))},Wvt),c("div",Kvt,[c("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[21]||(e[21]=Te(f=>r.rankDown(),["stop"]))},Qvt),n.message.rank!=0?(A(),M("div",{key:0,class:qe(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},ge(n.message.rank),3)):$("",!0)]),c("div",Xvt,[this.$store.state.config.active_tts_service!="None"?(A(),M("div",{key:0,class:qe(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[22]||(e[22]=Te(f=>r.speak(),["stop"]))},Jvt,2)):$("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(A(),M("div",eSt,[s.isSynthesizingVoice?(A(),M("img",{key:1,src:s.loading_svg},null,8,iSt)):(A(),M("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"generate_audio",onClick:e[23]||(e[23]=Te(f=>r.read(),["stop"]))},nSt))])):$("",!0)])])]),c("div",sSt,[z(c("details",rSt,[c("summary",oSt,[c("div",aSt,[n.message.status_message!="Done"&n.message.status_message!="Generation canceled"?(A(),M("img",{key:0,src:s.loading_svg,class:"w-50 h-50 absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,lSt)):$("",!0),n.message.status_message=="Generation canceled"?(A(),M("img",{key:1,src:s.failed_svg,class:"w-50 h-50 absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,cSt)):$("",!0),n.message.status_message=="Done"?(A(),M("img",{key:2,src:s.ok_svg,class:"w-50 h-50 absolute m-2 w-6 inset-0 text-geen-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,dSt)):$("",!0)]),c("dl",uSt,[pSt,c("dt",_St,ge(n.message==null?"":n.message.status_message),1)])]),c("div",hSt,[c("ol",fSt,[(A(!0),M(We,null,ct(n.message.steps,(f,_)=>(A(),M("div",{key:"step-"+n.message.id+"-"+_,class:"group border-l pb-6 last:!border-transparent last:pb-0 dark:border-gray-800",style:en({backgroundColor:f.done?"transparent":"inherit"})},[Re(o,{done:f.done,message:f.message,status:f.status,step_type:f.type},null,8,["done","message","status","step_type"])],4))),128))])])],512),[[Mt,n.message!=null&&n.message.steps!=null&&n.message.steps.length>0]]),mSt,c("div",gSt,[(A(!0),M(We,null,ct(n.message.html_js_s,(f,_)=>(A(),M("div",{key:"htmljs-"+n.message.id+"-"+_,class:"htmljs font-bold",style:en({backgroundColor:t.step.done?"transparent":"inherit"})},[Re(a,{htmlContent:f},null,8,["htmlContent"])],4))),128))]),r.editMsgMode?$("",!0):(A(),xt(l,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),c("div",null,[n.message.open?z((A(),M("textarea",{key:0,ref:"mdTextarea",onKeydown:e[24]||(e[24]=Hs(Te((...f)=>r.insertTab&&r.insertTab(...f),["prevent"]),["tab"])),class:"block min-h-[900px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,placeholder:"Enter message here...","onUpdate:modelValue":e[25]||(e[25]=f=>n.message.content=f)},`\r + `,544)),[[Oe,n.message.content]]):$("",!0)]),n.message.metadata!==null?(A(),M("div",bSt,[(A(!0),M(We,null,ct(((h=n.message.metadata)==null?void 0:h.filter(f=>f!=null&&f.hasOwnProperty("title")&&f.hasOwnProperty("content")))||[],(f,_)=>(A(),M("div",{key:"json-"+n.message.id+"-"+_,class:"json font-bold"},[Re(u,{jsonFormText:f.title,jsonData:f.content},null,8,["jsonFormText","jsonData"])]))),128))])):$("",!0),n.message.ui!==null&&n.message.ui!==void 0&&n.message.ui!==""?(A(),xt(d,{key:2,class:"w-full",code:n.message.ui},null,8,["code"])):$("",!0),s.audio_url!=null?(A(),M("audio",{controls:"",key:s.audio_url},[c("source",{src:s.audio_url,type:"audio/wav",ref:"audio_player"},null,8,ESt),Je(" Your browser does not support the audio element. ")])):$("",!0)]),c("div",ySt,[c("div",vSt,[n.message.binding?(A(),M("p",SSt,[Je("Binding: "),c("span",TSt,ge(n.message.binding),1)])):$("",!0),n.message.model?(A(),M("p",xSt,[Je("Model: "),c("span",CSt,ge(n.message.model),1)])):$("",!0),n.message.seed?(A(),M("p",wSt,[Je("Seed: "),c("span",RSt,ge(n.message.seed),1)])):$("",!0),n.message.nb_tokens?(A(),M("p",ASt,[Je("Number of tokens: "),c("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},ge(n.message.nb_tokens),9,NSt)])):$("",!0),r.warmup_duration?(A(),M("p",OSt,[Je("Warmup duration: "),c("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},ge(r.warmup_duration),9,ISt)])):$("",!0),r.time_spent?(A(),M("p",MSt,[Je("Generation duration: "),c("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},ge(r.time_spent),9,DSt)])):$("",!0),r.generation_rate?(A(),M("p",kSt,[Je("Rate: "),c("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},ge(r.generation_rate),9,LSt)])):$("",!0)])])])])])}const TO=bt(tvt,[["render",PSt]]),USt="/";Ce.defaults.baseURL="/";const FSt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:fc,UniversalForm:Ec},data(){return{bUrl:USt,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await Ce.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(s=>s===t.full_path),i={client_id:this.$store.state.client_id,id:n};e=await Ce.post("/select_personality",i),console.log("Generating message from ",e.data.status),Ke.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await Ce.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{Ce.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{Ce.post("/set_active_personality_settings",n).then(i=>{i&&i.data?(console.log("personality set with new settings",i.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. `+i,4,!1)})}catch(i){this.$refs.toast.showToast(`Did not get Personality settings responses. - Endpoint error: `+i.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(Ge(()=>{He.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await Ce.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ap}}},VSt={class:"w-fit flex select-none"},zSt={class:"w-fit flex select-none"},HSt={class:"w-8 h-8 group relative"},qSt=["src","title"],YSt={class:"opacity-0 group-hover:opacity-100"},$St=c("span",{title:"Remount"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-0 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[c("g",{id:"surface1"},[c("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1),WSt=[$St],KSt=c("span",{title:"Talk"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[c("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),c("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1),jSt=[KSt];function QSt(t,e,n,i,s,r){const o=ft("UniversalForm");return A(),M(We,null,[c("div",VSt,[c("div",zSt,[c("div",HSt,[c("img",{src:s.bUrl+r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 hover:scale-150 active:scale-90 hover:z-50 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+r.mountedPers.name,onClick:e[1]||(e[1]=a=>r.onSettingsPersonality(r.mountedPers))},null,40,qSt),c("div",YSt,[t.personalityHoveredIndex===t.index?(A(),M("button",{key:0,class:"z-50 -top-1 group-hover:translate-x-5 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[2]||(e[2]=Te(a=>r.remount_personality(),["prevent"]))},WSt)):$("",!0),t.personalityHoveredIndex===t.index?(A(),M("button",{key:1,class:"-top-1 group-hover:-translate-x-12 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[3]||(e[3]=Te(a=>r.handleOnTalk(),["prevent"]))},jSt)):$("",!0),c("div",{class:"top-0 group-hover:-translate-x-8 group-hover:-translate-y-8 left-0 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-500 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[4]||(e[4]=Te((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+ge(r.mountedPersArr.length-1),1)])])])]),Re(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const XSt=bt(GSt,[["render",QSt]]);const ZSt="/";Ce.defaults.baseURL="/";const JSt={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:bO,Toast:fc,UniversalForm:Ec},name:"MountedPersonalitiesList",data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},bUrl:ZSt,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 Ce.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ap},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,Ce.post("/reinstall_personality",{name:t.personality.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality + Endpoint error: `+i.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(Ge(()=>{He.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await Ce.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ap}}},BSt={class:"w-fit flex select-none"},GSt={class:"w-fit flex select-none"},VSt={class:"w-8 h-8 group relative"},zSt=["src","title"],HSt={class:"opacity-0 group-hover:opacity-100"},qSt=c("span",{title:"Remount"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-0 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[c("g",{id:"surface1"},[c("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1),YSt=[qSt],$St=c("span",{title:"Talk"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[c("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),c("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1),WSt=[$St];function KSt(t,e,n,i,s,r){const o=ft("UniversalForm");return A(),M(We,null,[c("div",BSt,[c("div",GSt,[c("div",VSt,[c("img",{src:s.bUrl+r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 hover:scale-150 active:scale-90 hover:z-50 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+r.mountedPers.name,onClick:e[1]||(e[1]=a=>r.onSettingsPersonality(r.mountedPers))},null,40,zSt),c("div",HSt,[t.personalityHoveredIndex===t.index?(A(),M("button",{key:0,class:"z-50 -top-1 group-hover:translate-x-5 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[2]||(e[2]=Te(a=>r.remount_personality(),["prevent"]))},YSt)):$("",!0),t.personalityHoveredIndex===t.index?(A(),M("button",{key:1,class:"-top-1 group-hover:-translate-x-12 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[3]||(e[3]=Te(a=>r.handleOnTalk(),["prevent"]))},WSt)):$("",!0),c("div",{class:"top-0 group-hover:-translate-x-8 group-hover:-translate-y-8 left-0 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-500 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[4]||(e[4]=Te((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+ge(r.mountedPersArr.length-1),1)])])])]),Re(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const jSt=bt(FSt,[["render",KSt]]);const QSt="/";Ce.defaults.baseURL="/";const XSt={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:bO,Toast:fc,UniversalForm:Ec},name:"MountedPersonalitiesList",data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},bUrl:QSt,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 Ce.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ap},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,Ce.post("/reinstall_personality",{name:t.personality.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},editPersonality(t){t=t.personality,Ce.post("/get_personality_config",{client_id:this.$store.state.client_id,category:t.category,name:t.folder}).then(e=>{const n=e.data;console.log("Done"),n.status?(this.$store.state.currentPersonConfig=n.config,this.$store.state.showPersonalityEditor=!0,this.$store.state.personality_editor.showPanel(),this.$store.state.selectedPersonality=t):console.error(n.error)}).catch(e=>{console.error(e)})},onPersonalityMounted(t){this.mountPersonality(t)},onPersonalityUnMounted(t){this.unmountPersonality(t)},onPersonalityRemount(t){this.reMountPersonality(t)},async handleOpenFolder(t){const e={client_id:this.$store.state.client_id,personality_folder:t.personality.folder};console.log(e),await Ce.post("/open_personality_folder",e)},async handleOnTalk(t){if(He.replace(),console.log("ppa",t),t){if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality: `+t.name,4,!0))}else this.onPersonalityMounted(t);this.onTalk(t)}},async onPersonalitySelected(t){if(He.replace(),console.log("Selected personality : ",JSON.stringify(t.personality)),t){if(t.selected){this.$refs.toast.showToast("Personality already selected",4,!0);return}if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality: `+t.name,4,!0))}else this.onPersonalityMounted(t)}},onSettingsPersonality(t){try{Ce.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+t.personality.name,"Save changes","Cancel").then(n=>{try{Ce.post("/set_active_personality_settings",n).then(i=>{i&&i.data?(console.log("personality set with new settings",i.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. @@ -192,15 +192,15 @@ If You are using windows, this will install wsl so you need to activate it. Error: `+e.error,4,!1))},async reMountPersonality(t){if(console.log("remount pers",t),!t)return;if(!this.configFile.personalities.includes(t.personality.full_path)){this.$refs.toast.showToast("Personality not mounted",4,!1);return}const e=await this.remount_personality(t.personality);console.log("remount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality remounted",4,!0),t.isMounted=!0,this.onMounted(this),(await this.select_personality(t.personality)).status&&this.$refs.toast.showToast(`Selected personality: `+t.personality.name,4,!0),this.getMountedPersonalities()):(t.isMounted=!1,this.$refs.toast.showToast(`Could not mount personality Error: `+e.error,4,!1))},async unmountPersonality(t){if(!t)return;console.log(`Unmounting ${JSON.stringify(t.personality)}`);const e=await this.unmount_personality(t.personality);if(e.status){console.log("unmount response",e),this.configFile.active_personality_id=e.active_personality_id,this.configFile.personalities=e.personalities;const n=this.configFile.personalities[this.configFile.active_personality_id],i=this.personalities.findIndex(a=>a.full_path==n),s=this.$refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path),r=this.personalities[i];r.isMounted=!1,r.selected=!0,this.$refs.personalitiesZoo[s].isMounted=!1,this.getMountedPersonalities(),(await this.select_personality(r)).status&&He.replace(),this.$refs.toast.showToast("Personality unmounted",4,!0),this.onUnMounted(this)}else this.$refs.toast.showToast(`Could not unmount personality -Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;er.full_path==n),s=this.personalities[i];if(s)console.log("adding from config"),t.push(s);else{console.log("adding default");const r=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),o=this.personalities[r];t.push(o)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;es.full_path==n);if(console.log("discussionPersonalities -includes",i),console.log("discussionPersonalities -mounted list",this.mountedPersArr),i==-1){const s=this.personalities.findIndex(o=>o.full_path==n),r=this.personalities[s];console.log("adding discucc121",r,n),r&&(this.mountedPersArr.push(r),console.log("adding discucc",r))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},NE=t=>(Or("data-v-d7f8ef94"),t=t(),Ir(),t),e0t={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},t0t={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},n0t=NE(()=>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)),i0t=NE(()=>c("span",{class:"sr-only"},"Loading...",-1)),s0t=[n0t,i0t],r0t=NE(()=>c("i",{"data-feather":"chevron-down"},null,-1)),o0t=[r0t],a0t={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},l0t={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function c0t(t,e,n,i,s,r){const o=ft("personality-entry"),a=ft("Toast"),l=ft("UniversalForm");return A(),M("div",e0t,[s.isLoading?(A(),M("div",t0t,s0t)):$("",!0),c("div",null,[r.mountedPersArr.length>0?(A(),M("div",{key:0,class:qe(s.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[c("button",{class:"mt-0 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Close personality list",type:"button",onClick:e[0]||(e[0]=Te((...u)=>r.toggleShowPersList&&r.toggleShowPersList(...u),["stop"]))},o0t),c("label",a0t," Mounted Personalities: ("+ge(r.mountedPersArr.length)+") ",1),c("div",l0t,[Re(os,{name:"bounce"},{default:$e(()=>[(A(!0),M(We,null,ct(this.$store.state.mountedPersArr,(u,d)=>(A(),xt(o,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+d+"-"+u.name,personality:u,full_path:u.full_path,select_language:!1,selected:r.configFile.personalities[r.configFile.active_personality_id]===u.full_path||r.configFile.personalities[r.configFile.active_personality_id]===u.full_path+":"+u.language,"on-selected":r.onPersonalitySelected,"on-mount":r.onPersonalityMounted,"on-edit":r.editPersonality,"on-un-mount":r.onPersonalityUnMounted,"on-remount":r.onPersonalityRemount,"on-settings":r.onSettingsPersonality,"on-reinstall":r.onPersonalityReinstall,"on-talk":r.handleOnTalk,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-edit","on-un-mount","on-remount","on-settings","on-reinstall","on-talk","on-open-folder"]))),128))]),_:1})])],2)):$("",!0)]),Re(a,{ref:"toast"},null,512),Re(l,{ref:"universalForm",class:"z-20"},null,512)])}const d0t=bt(JSt,[["render",c0t],["__scopeId","data-v-d7f8ef94"]]);const u0t={components:{InteractiveMenu:wE},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){this.commands=this.commandsList,console.log("Commands",this.commands),document.addEventListener("click",this.handleClickOutside),Ge(()=>{He.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(i=>i.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=i=>{this.selectedFile=i.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};Ke.on("file_received",i=>{i.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file -`+i.error,4,!1),this.loading=!1,Ke.off("file_received")}),Ke.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){Ge(()=>{He.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},p0t=t=>(Or("data-v-1a32c141"),t=t(),Ir(),t),_0t={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},h0t=p0t(()=>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)),f0t=[h0t];function m0t(t,e,n,i,s,r){const o=ft("InteractiveMenu");return s.loading?(A(),M("div",_0t,f0t)):(A(),xt(o,{key:1,commands:n.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const g0t=bt(u0t,[["render",m0t],["__scopeId","data-v-1a32c141"]]),b0t="/assets/loader_v0-16906488.svg";console.log("modelImgPlaceholder:",Pi);const E0t="/",y0t={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{UniversalForm:Ec,MountedPersonalities:XSt,MountedPersonalitiesList:d0t,PersonalitiesCommands:g0t},setup(){},data(){return{is_rt:!1,personalityHoveredIndex:null,loader_v0:b0t,sendGlobe:SO,modelImgPlaceholder:Pi,bUrl:E0t,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{isDataSourceNamesValid(){return console.log("dataSourceNames:",this.dataSourceNames),console.log("Type of dataSourceNames:",typeof this.dataSourceNames),Array.isArray(this.dataSourceNames)&&this.dataSourceNames.length>0},dataSourceNames(){console.log("dataSourceNames",this.$store.state.config.rag_databases);const t=this.$store.state.config.rag_databases.map(e=>{console.log("entry",e);const n=e.split("::");console.log("extracted",n[0]);const s=e.endsWith("mounted")?"feather:check":"";return console.log("icon decision",s),{name:n[0],value:n[0]||"default_value",icon:s,help:"mounts the database"}});return console.log("formatted data sources",t),t},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},installedBindings(){return this.$store.state.installedBindings},installedModels(){return this.$store.state.installedModels},mountedPersonalities(){return this.$store.state.mountedPersArr},binding_name(){return this.$store.state.config.binding_name},model_name(){return this.$store.state.config.model_name},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let t=[];for(let e=0;e0&&this.addFiles(n)},toggleSwitch(){this.$store.state.config.activate_internet_search=!this.$store.state.config.activate_internet_search,this.isLoading=!0,Ce.post("/apply_settings",{config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.config.activate_internet_search?this.$store.state.toast.showToast("Websearch activated.",4,!0):this.$store.state.toast.showToast("Websearch deactivated.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Ge(()=>{He.replace()})})},showModelConfig(){try{this.isLoading=!0,Ce.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{Ce.post("/set_active_binding_settings",e).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. +Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;er.full_path==n),s=this.personalities[i];if(s)console.log("adding from config"),t.push(s);else{console.log("adding default");const r=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),o=this.personalities[r];t.push(o)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;es.full_path==n);if(console.log("discussionPersonalities -includes",i),console.log("discussionPersonalities -mounted list",this.mountedPersArr),i==-1){const s=this.personalities.findIndex(o=>o.full_path==n),r=this.personalities[s];console.log("adding discucc121",r,n),r&&(this.mountedPersArr.push(r),console.log("adding discucc",r))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},NE=t=>(Or("data-v-d7f8ef94"),t=t(),Ir(),t),ZSt={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},JSt={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},e0t=NE(()=>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)),t0t=NE(()=>c("span",{class:"sr-only"},"Loading...",-1)),n0t=[e0t,t0t],i0t=NE(()=>c("i",{"data-feather":"chevron-down"},null,-1)),s0t=[i0t],r0t={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},o0t={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function a0t(t,e,n,i,s,r){const o=ft("personality-entry"),a=ft("Toast"),l=ft("UniversalForm");return A(),M("div",ZSt,[s.isLoading?(A(),M("div",JSt,n0t)):$("",!0),c("div",null,[r.mountedPersArr.length>0?(A(),M("div",{key:0,class:qe(s.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[c("button",{class:"mt-0 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Close personality list",type:"button",onClick:e[0]||(e[0]=Te((...u)=>r.toggleShowPersList&&r.toggleShowPersList(...u),["stop"]))},s0t),c("label",r0t," Mounted Personalities: ("+ge(r.mountedPersArr.length)+") ",1),c("div",o0t,[Re(os,{name:"bounce"},{default:$e(()=>[(A(!0),M(We,null,ct(this.$store.state.mountedPersArr,(u,d)=>(A(),xt(o,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+d+"-"+u.name,personality:u,full_path:u.full_path,select_language:!1,selected:r.configFile.personalities[r.configFile.active_personality_id]===u.full_path||r.configFile.personalities[r.configFile.active_personality_id]===u.full_path+":"+u.language,"on-selected":r.onPersonalitySelected,"on-mount":r.onPersonalityMounted,"on-edit":r.editPersonality,"on-un-mount":r.onPersonalityUnMounted,"on-remount":r.onPersonalityRemount,"on-settings":r.onSettingsPersonality,"on-reinstall":r.onPersonalityReinstall,"on-talk":r.handleOnTalk,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-edit","on-un-mount","on-remount","on-settings","on-reinstall","on-talk","on-open-folder"]))),128))]),_:1})])],2)):$("",!0)]),Re(a,{ref:"toast"},null,512),Re(l,{ref:"universalForm",class:"z-20"},null,512)])}const l0t=bt(XSt,[["render",a0t],["__scopeId","data-v-d7f8ef94"]]);const c0t={components:{InteractiveMenu:wE},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){this.commands=this.commandsList,console.log("Commands",this.commands),document.addEventListener("click",this.handleClickOutside),Ge(()=>{He.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(i=>i.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=i=>{this.selectedFile=i.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};Ke.on("file_received",i=>{i.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file +`+i.error,4,!1),this.loading=!1,Ke.off("file_received")}),Ke.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){Ge(()=>{He.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},d0t=t=>(Or("data-v-1a32c141"),t=t(),Ir(),t),u0t={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},p0t=d0t(()=>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)),_0t=[p0t];function h0t(t,e,n,i,s,r){const o=ft("InteractiveMenu");return s.loading?(A(),M("div",u0t,_0t)):(A(),xt(o,{key:1,commands:n.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const f0t=bt(c0t,[["render",h0t],["__scopeId","data-v-1a32c141"]]),m0t="/assets/loader_v0-16906488.svg";console.log("modelImgPlaceholder:",Pi);const g0t="/",b0t={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{UniversalForm:Ec,MountedPersonalities:jSt,MountedPersonalitiesList:l0t,PersonalitiesCommands:f0t},setup(){},data(){return{is_rt:!1,personalityHoveredIndex:null,loader_v0:m0t,sendGlobe:SO,modelImgPlaceholder:Pi,bUrl:g0t,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{isDataSourceNamesValid(){return console.log("dataSourceNames:",this.dataSourceNames),console.log("Type of dataSourceNames:",typeof this.dataSourceNames),Array.isArray(this.dataSourceNames)&&this.dataSourceNames.length>0},dataSourceNames(){console.log("dataSourceNames",this.$store.state.config.rag_databases);const t=this.$store.state.config.rag_databases.map(e=>{console.log("entry",e);const n=e.split("::");console.log("extracted",n[0]);const s=e.endsWith("mounted")?"feather:check":"";return console.log("icon decision",s),{name:n[0],value:n[0]||"default_value",icon:s,help:"mounts the database"}});return console.log("formatted data sources",t),t},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},installedBindings(){return this.$store.state.installedBindings},installedModels(){return this.$store.state.installedModels},mountedPersonalities(){return this.$store.state.mountedPersArr},binding_name(){return this.$store.state.config.binding_name},model_name(){return this.$store.state.config.model_name},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let t=[];for(let e=0;e0&&this.addFiles(n)},toggleSwitch(){this.$store.state.config.activate_internet_search=!this.$store.state.config.activate_internet_search,this.isLoading=!0,Ce.post("/apply_settings",{config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.config.activate_internet_search?this.$store.state.toast.showToast("Websearch activated.",4,!0):this.$store.state.toast.showToast("Websearch deactivated.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Ge(()=>{He.replace()})})},showModelConfig(){try{this.isLoading=!0,Ce.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{Ce.post("/set_active_binding_settings",e).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+n,4,!1),this.isLoading=!1)})}catch(n){this.$store.state.toast.showToast(`Did not get binding settings responses. Endpoint error: `+n.message,4,!1),this.isLoading=!1}}):(this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(t){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},async remount_personality(t){if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await Ce.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},async unmountPersonality(t){if(console.log("Unmounting personality:",t),!t)return;const e=await this.unmount_personality(t.personality||t);if(console.log(e),e.status){this.$store.state.config.personalities=e.personalities,this.$store.state.toast.showToast("Personality unmounted",4,!0),this.$store.dispatch("refreshMountedPersonalities");const n=this.$store.state.mountedPersArr[this.$store.state.mountedPersArr.length-1];console.log(n,this.$store.state.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this.$store.state.toast.showToast(`Selected personality: `+n.name,4,!0)}else this.$store.state.toast.showToast(`Could not unmount personality Error: `+e.error,4,!1)},async unmount_personality(t){if(!t)return{status:!1,error:"no personality - unmount_personality"};const e={client_id:this.$store.state.client_id,language:t.language,category:t.category,folder:t.folder};try{const n=await Ce.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async showPersonalityHoveredIn(t){this.personalityHoveredIndex=t},async showPersonalityHoveredOut(){this.personalityHoveredIndex=null},async onPersonalitySelected(t){if(t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=t.language===null?t.full_path:t.full_path+":"+t.language;if(console.log("pers_path",e),console.log("this.$store.state.config.personalities",this.$store.state.config.personalities),this.$store.state.config.personalities.includes(e)){const n=await this.select_personality(t);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshMountedPersonalities"),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage"),await this.$store.dispatch("fetchisRTOn"),console.log("pers is mounted",n),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+t.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: -`+t.name,4,!1)}else console.log("mounting pers");this.$emit("personalitySelected"),Ge(()=>{He.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const e=t.language===null?t.full_path:t.full_path+":"+t.language;console.log("Selecting personality ",e);const n=this.$store.state.config.personalities.findIndex(s=>s===e),i={client_id:this.$store.state.client_id,id:n};try{const s=await Ce.post("/select_personality",i);if(s)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),s.data}catch(s){console.log(s.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(t){t.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const n=new MouseEvent("click");e.dispatchEvent(n)},setBinding(t){console.log("Setting binding to "+t.name),this.selecting_binding=!0,this.selectedBinding=t,this.$store.state.messageBox.showBlockingMessage("Loading binding"),Ce.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},setModel(t){console.log("Setting model to "+t.name),this.selecting_model=!0,this.selectedModel=t,this.$store.state.messageBox.showBlockingMessage("Loading model"),Ce.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},download_files(){Ce.get("/download_files")},remove_file(t){Ce.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){Ce.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(t,e){console.log("Send file triggered");const n=new FileReader,i=24*1024;let s=0,r=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,l=s+a.byteLength>=t.size;Ke.emit("send_file_chunk",{filename:t.name,chunk:a,offset:s,isLastChunk:l,chunkIndex:r}),s+=a.byteLength,r++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=t.slice(s,s+i);n.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},startRTCom(){this.is_rt=!0,console.log("is_rt:",this.is_rt),Ke.emit("start_bidirectional_audio_stream"),Ge(()=>{He.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),Ke.emit("stop_bidirectional_audio_stream"),Ge(()=>{He.replace()})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isListeningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(t){this.showPersonalities=!this.showPersonalities},handleOnTalk(t){console.log("talking"),this.showPersonalities=!1,this.$store.state.toast.showToast(`Personality ${t.name} is Talking`,4,!0),this.onTalk(t)},onMountFun(t){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(t){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(t){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(t){return Ge(()=>{He.replace()}),rs(t)},removeItem(t){console.log("Removing ",t.name),Ce.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await Ce.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){Ke.emit("take_picture"),Ke.on("picture_taken",()=>{Ce.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(t){console.log("Adding files");const e=[...t];let n=0;const i=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const s=e[n];this.filesList.push(s),this.isFileSentList.push(!1),this.send_file(s,()=>{n++,i()})};i()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){Ge(()=>{He.replace()})},loading(t,e){Ge(()=>{He.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let i=0;i{He.replace()}),console.log("Chatbar mounted"),Ke.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.status),console.log("active_tts_service: ",this.$store.state.config.active_tts_service),console.log("is_rt_on: ",this.$store.state.is_rt_on)}),this.$store.dispatch("fetchisRTOn")},activated(){Ge(()=>{He.replace()})}},Pt=t=>(Or("data-v-011f8851"),t=t(),Ir(),t),v0t={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},S0t={key:0,class:"items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},T0t={class:"flex"},x0t=["title"],C0t=Pt(()=>c("i",{"data-feather":"list"},null,-1)),w0t=[C0t],R0t={key:0},A0t={class:"flex flex-col max-h-64"},N0t=["title"],O0t={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},I0t={key:0,filesList:"",role:"status"},M0t=Pt(()=>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)),D0t=Pt(()=>c("span",{class:"sr-only"},"Loading...",-1)),k0t=[M0t,D0t],L0t=Pt(()=>c("div",null,[c("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),P0t=Pt(()=>c("div",{class:"grow"},null,-1)),U0t={class:"flex flex-row items-center"},F0t={class:"whitespace-nowrap"},B0t=["onClick"],G0t=Pt(()=>c("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),V0t=[G0t],z0t={key:1,class:"flex mx-1 w-500"},H0t={class:"whitespace-nowrap flex flex-row gap-2"},q0t=Pt(()=>c("p",{class:"font-bold"}," Total size: ",-1)),Y0t=Pt(()=>c("div",{class:"grow"},null,-1)),$0t=Pt(()=>c("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),W0t=[$0t],K0t=Pt(()=>c("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)),j0t=[K0t],Q0t={key:2,class:"mx-1"},X0t={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end bg-primary"},Z0t={role:"status"},J0t=["src"],eTt=Pt(()=>c("span",{class:"sr-only"},"Selecting model...",-1)),tTt={class:"flex w-fit relative grow w-full"},nTt={class:"relative text-light-text-panel dark:text-dark-text-panel grow flex h-12.5 cursor-pointer select-none items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone p-1 shadow-sm hover:shadow-none dark:border-gray-800",tabindex:"0"},iTt={key:0,title:"Waiting for reply"},sTt=["src"],rTt=Pt(()=>c("div",{role:"status"},[c("span",{class:"sr-only"},"Loading...")],-1)),oTt={key:1,class:"w-fit group relative"},aTt={class:"group space-x-1 w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},lTt={key:0,class:"group items-center flex flex-row"},cTt=["onClick"],dTt=["src","title"],uTt={class:"group items-center flex flex-row"},pTt=["src","title"],_Tt={key:2,class:"w-fit group relative"},hTt={class:"group space-x-1 w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},fTt={key:0,class:"group items-center flex flex-row"},mTt=["onClick"],gTt=["src","title"],bTt={class:"group items-center flex flex-row"},ETt=["src","title"],yTt={key:3,class:"w-fit group relative"},vTt={class:"hide .group-hover:block fixed w-[1000px] bottom-0 group absolute opacity-0 group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},STt={class:"w-fit flex-wrap flex"},TTt=["onMouseover"],xTt={class:"relative"},CTt=["onClick"],wTt=["src","title"],RTt=["onClick"],ATt=Pt(()=>c("span",{class:"-top-6 -right-6 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Unmount personality"},[c("svg",{"aria-hidden":"true",class:"top-1 left-1 relative w-5 h-5 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20","stroke-width":"1",xmlns:"http://www.w3.org/2000/svg"},[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)),NTt=[ATt],OTt=["onClick"],ITt=Pt(()=>c("span",{class:"-top-9 left-2 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Remount"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[c("g",{id:"surface1"},[c("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1)),MTt=[ITt],DTt=["onClick"],kTt=Pt(()=>c("span",{class:"-top-6 -left-6 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Talk"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[c("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),c("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1)),LTt=[kTt],PTt={class:"w-fit"},UTt={class:"w-fit"},FTt={class:"relative grow"},BTt={class:"group relative w-max"},GTt=Pt(()=>c("i",{"data-feather":"send"},null,-1)),VTt=[GTt],zTt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI.")],-1)),HTt={class:"group relative w-max"},qTt=["src"],YTt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI with internet search.")],-1)),$Tt={class:"group relative w-max"},WTt=Pt(()=>c("i",{"data-feather":"mic"},null,-1)),KTt=[WTt],jTt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Press and talk.")],-1)),QTt={key:5,class:"group relative w-max"},XTt=Pt(()=>c("i",{"data-feather":"mic"},null,-1)),ZTt=[XTt],JTt=Pt(()=>c("i",{"data-feather":"mic"},null,-1)),ext=[JTt],txt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Real time bidirectional audio mode.")],-1)),nxt={key:6,class:"group relative w-max"},ixt=Pt(()=>c("i",{"data-feather":"file-plus"},null,-1)),sxt=[ixt],rxt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Send File to the AI.")],-1)),oxt={class:"group relative w-max"},axt=Pt(()=>c("i",{"data-feather":"camera"},null,-1)),lxt=[axt],cxt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Take a shot from webcam.")],-1)),dxt={class:"group relative w-max"},uxt=Pt(()=>c("i",{"data-feather":"globe"},null,-1)),pxt=[uxt],_xt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Add a weblink to the discussion.")],-1)),hxt={class:"group relative w-max"},fxt=Pt(()=>c("i",{"data-feather":"message-square"},null,-1)),mxt=[fxt],gxt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty User message.")],-1)),bxt={class:"group relative w-max"},Ext=Pt(()=>c("i",{"data-feather":"message-square"},null,-1)),yxt=[Ext],vxt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty ai message.")],-1)),Sxt=Pt(()=>c("div",{class:"ml-auto gap-2"},null,-1));function Txt(t,e,n,i,s,r){const o=ft("MountedPersonalitiesList"),a=ft("MountedPersonalities"),l=ft("PersonalitiesCommands"),u=ft("UniversalForm");return A(),M(We,null,[c("form",null,[c("div",v0t,[s.filesList.length>0||s.showPersonalities?(A(),M("div",S0t,[c("div",T0t,[c("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:s.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=Te(d=>s.showfilesList=!s.showfilesList,["stop"]))},w0t,8,x0t)]),s.filesList.length>0&&s.showfilesList==!0?(A(),M("div",R0t,[c("div",A0t,[Re(os,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:$e(()=>[(A(!0),M(We,null,ct(s.filesList,(d,h)=>(A(),M("div",{key:h+"-"+d.name},[c("div",{class:"m-1",title:d.name},[c("div",O0t,[s.isFileSentList[h]?$("",!0):(A(),M("div",I0t,k0t)),L0t,c("div",{class:qe(["line-clamp-1 w-3/5",s.isFileSentList[h]?"text-green-500":"text-red-200"])},ge(d.name),3),P0t,c("div",U0t,[c("p",F0t,ge(r.computedFileSize(d.size)),1),c("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:f=>r.removeItem(d)},V0t,8,B0t)])])],8,N0t)]))),128))]),_:1})])])):$("",!0),s.filesList.length>0?(A(),M("div",z0t,[c("div",H0t,[q0t,Je(" "+ge(s.totalSize)+" ("+ge(s.filesList.length)+") ",1)]),Y0t,c("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...d)=>r.clear_files&&r.clear_files(...d))},W0t),c("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...d)=>r.download_files&&r.download_files(...d))},j0t)])):$("",!0),s.showPersonalities?(A(),M("div",Q0t,[Re(o,{ref:"mountedPersList",onShowPersList:r.onShowPersListFun,"on-mounted":r.onMountFun,"on-un-mounted":r.onUnmountFun,"on-remounted":t.onRemountFun,"on-talk":r.handleOnTalk,discussionPersonalities:r.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):$("",!0)])):$("",!0),s.selecting_model||s.selecting_binding?(A(),M("div",X0t,[c("div",Z0t,[c("img",{src:s.loader_v0,class:"w-50 h-50"},null,8,J0t),eTt])])):$("",!0),c("div",tTt,[c("div",nTt,[n.loading?(A(),M("div",iTt,[c("img",{src:s.loader_v0},null,8,sTt),rTt])):$("",!0),n.loading?$("",!0):(A(),M("div",oTt,[c("div",aTt,[(A(!0),M(We,null,ct(r.installedBindings,(d,h)=>(A(),M("div",{class:"w-full",key:h+"-"+d.name,ref_for:!0,ref:"installedBindings"},[d.name!=r.binding_name?(A(),M("div",lTt,[c("button",{onClick:Te(f=>r.setBinding(d),["prevent"]),class:"w-8 h-8"},[c("img",{src:d.icon?d.icon:s.modelImgPlaceholder,class:"z-50 w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:d.name},null,8,dTt)],8,cTt)])):$("",!0)]))),128))]),c("div",uTt,[c("button",{onClick:e[3]||(e[3]=Te(d=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[c("img",{src:r.currentBindingIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:r.currentBinding?r.currentBinding.name:"unknown"},null,8,pTt)])])])),n.loading?$("",!0):(A(),M("div",_Tt,[c("div",hTt,[(A(!0),M(We,null,ct(r.installedModels,(d,h)=>(A(),M("div",{class:"w-full",key:h+"-"+d.name,ref_for:!0,ref:"installedModels"},[d.name!=r.model_name?(A(),M("div",fTt,[c("button",{onClick:Te(f=>r.setModel(d),["prevent"]),class:"w-8 h-8"},[c("img",{src:d.icon?d.icon:s.modelImgPlaceholder,class:"z-50 w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:d.name},null,8,gTt)],8,mTt)])):$("",!0)]))),128))]),c("div",bTt,[c("button",{onClick:e[4]||(e[4]=Te(d=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[c("img",{src:r.currentModelIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:r.currentModel?r.currentModel.name:"unknown"},null,8,ETt)])])])),n.loading?$("",!0):(A(),M("div",yTt,[c("div",vTt,[c("div",STt,[(A(!0),M(We,null,ct(r.mountedPersonalities,(d,h)=>(A(),M("div",{class:"w-fit h-fit",key:h+"-"+d.name,ref_for:!0,ref:"mountedPersonalities",onMouseover:f=>r.showPersonalityHoveredIn(h),onMouseleave:e[6]||(e[6]=f=>r.showPersonalityHoveredOut())},[h!=r.personality_name?(A(),M("div",{key:0,class:qe(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",s.personalityHoveredIndex===h?"scale-150":""])},[c("div",xTt,[c("button",{onClick:Te(f=>r.onPersonalitySelected(d),["prevent"]),class:"w-10 h-10 relative"},[c("img",{src:s.bUrl+d.avatar,onError:e[5]||(e[5]=(...f)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...f)),class:qe(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",s.personalityHoveredIndex===h?"scale-150 ":""+this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(d.full_path)?"border-secondary":"border-transparent z-0"]),title:d.name},null,42,wTt)],8,CTt),s.personalityHoveredIndex===h?(A(),M("button",{key:0,onClick:Te(f=>r.unmountPersonality(d),["prevent"])},NTt,8,RTt)):$("",!0),s.personalityHoveredIndex===h?(A(),M("button",{key:1,onClick:Te(f=>r.remount_personality(d),["prevent"])},MTt,8,OTt)):$("",!0),s.personalityHoveredIndex===h?(A(),M("button",{key:2,onClick:Te(f=>r.handleOnTalk(d),["prevent"])},LTt,8,DTt)):$("",!0)])],2)):$("",!0)],40,TTt))),128))])]),Re(a,{ref:"mountedPers",onShowPersList:r.onShowPersListFun,onReady:r.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])])),c("div",PTt,[s.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(A(),xt(l,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):$("",!0)]),c("div",UTt,[r.isDataSourceNamesValid?(A(),xt(l,{key:0,icon:"feather:book",commandsList:r.dataSourceNames,sendCommand:r.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):$("",!0)]),c("div",FTt,[z(c("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[7]||(e[7]=d=>s.message=d),title:"Hold SHIFT + ENTER to add new line",onPaste:e[8]||(e[8]=(...d)=>r.handlePaste&&r.handlePaste(...d)),class:"inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:e[9]||(e[9]=Hs(Te(d=>r.submitOnEnter(d),["exact"]),["enter"]))},`\r - `,544),[[Oe,s.message]])]),n.loading?(A(),M("button",{key:4,type:"button",class:"bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800",onClick:e[10]||(e[10]=Te((...d)=>r.stopGenerating&&r.stopGenerating(...d),["stop"]))}," Stop generating ")):$("",!0),c("div",BTt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[11]||(e[11]=(...d)=>r.submit&&r.submit(...d)),title:"Send",class:"w-6 text-panel hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},VTt)),zTt]),c("div",HTt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[12]||(e[12]=(...d)=>r.submitWithInternetSearch&&r.submitWithInternetSearch(...d)),title:"Send With internet",class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},[c("img",{src:s.sendGlobe,width:"50",height:"50",style:{stroke:"currentColor",fill:"currentColor"}},null,8,qTt)])),YTt]),c("div",$Tt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[13]||(e[13]=(...d)=>r.startSpeechRecognition&&r.startSpeechRecognition(...d)),class:qe([{"text-red-500":s.isListeningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"])},KTt,2)),jTt]),t.$store.state.config.active_tts_service!="None"?(A(),M("div",QTt,[s.is_rt?(A(),M("button",{key:0,type:"button",onClick:e[14]||(e[14]=(...d)=>r.stopRTCom&&r.stopRTCom(...d)),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90 bg-red-500 border borderred700 rounded-md"},ZTt)):(A(),M("button",{key:1,type:"button",onClick:e[15]||(e[15]=(...d)=>r.startRTCom&&r.startRTCom(...d)),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90 bg-green-500 border border-green-700 rounded-md"},ext)),txt])):$("",!0),n.loading?$("",!0):(A(),M("div",nxt,[c("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[16]||(e[16]=(...d)=>r.addFiles&&r.addFiles(...d)),multiple:""},null,544),c("button",{type:"button",onClick:e[17]||(e[17]=Te((...d)=>r.add_file&&r.add_file(...d),["prevent"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},sxt),rxt])),c("div",oxt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[18]||(e[18]=Te((...d)=>r.takePicture&&r.takePicture(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},lxt)),cxt]),c("div",dxt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[19]||(e[19]=Te((...d)=>r.addWebLink&&r.addWebLink(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},pxt)),_xt]),c("div",hxt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[20]||(e[20]=Te((...d)=>r.makeAnEmptyUserMessage&&r.makeAnEmptyUserMessage(...d),["stop"])),class:"w-6 text-gray-800 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},mxt)),gxt]),c("div",bxt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[21]||(e[21]=Te((...d)=>r.makeAnEmptyAIMessage&&r.makeAnEmptyAIMessage(...d),["stop"])),class:"w-6 text-red-400 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},yxt)),vxt])]),Sxt])])]),Re(u,{ref:"universalForm",class:"z-20"},null,512)],64)}const xO=bt(y0t,[["render",Txt],["__scopeId","data-v-011f8851"]]),xxt={name:"WelcomeComponent",computed:{storeLogo(){return this.$store.state.config?Ti:this.$store.state.config.app_custom_logo!=""?"/user_infos/"+this.$store.state.config.app_custom_logo:Ti}},data(){},setup(){return{}}},Cxt={class:"flex flex-col text-center w-full h-full"},wxt={class:"flex flex-col text-center items-center"},Rxt={class:"flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"},Axt=["src"],Nxt=c("div",{class:"flex flex-col items-start"},[c("p",{class:"text-2xl"},"LoLLMS"),c("p",{class:"text-gray-400 text-base"},"One tool to rule them all")],-1),Oxt=c("hr",{class:"mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"},null,-1),Ixt=c("p",{class:"text-2xl"},"Welcome",-1),Mxt=c("p",{class:"text-lg"},"Please create a new discussion or select existing one to start",-1);function Dxt(t,e,n,i,s,r){return A(),M("div",Cxt,[c("div",wxt,[c("div",Rxt,[c("img",{class:"w-12 hover:scale-95 duration-150",title:"LoLLMS WebUI",src:t.$store.state.config==null?r.storeLogo:t.$store.state.config.app_custom_logo!=""?"/user_infos/"+t.$store.state.config.app_custom_logo:r.storeLogo,alt:"Logo"},null,8,Axt),Nxt]),Oxt,Ixt,Mxt])])}const CO=bt(xxt,[["render",Dxt]]);var kxt=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),ru=globalThis&&globalThis.__assign||function(){return ru=Object.assign||function(t){for(var e,n=1,i=arguments.length;n"u")return!1;var e=ai(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Wxt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},s=e.attributes[n]||{},r=e.elements[n];!xi(r)||!us(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function Kxt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],r=e.attributes[i]||{},o=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),a=o.reduce(function(l,u){return l[u]="",l},{});!xi(s)||!us(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const jxt={name:"applyStyles",enabled:!0,phase:"write",fn:Wxt,effect:Kxt,requires:["computeStyles"]};function as(t){return t.split("-")[0]}var lo=Math.max,cu=Math.min,va=Math.round;function tb(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function MO(){return!/^((?!chrome|android).)*safari/i.test(tb())}function Sa(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),s=1,r=1;e&&xi(t)&&(s=t.offsetWidth>0&&va(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&va(i.height)/t.offsetHeight||1);var o=go(t)?ai(t):window,a=o.visualViewport,l=!MO()&&n,u=(i.left+(l&&a?a.offsetLeft:0))/s,d=(i.top+(l&&a?a.offsetTop:0))/r,h=i.width/s,f=i.height/r;return{width:h,height:f,top:d,right:u+h,bottom:d+f,left:u,x:u,y:d}}function PE(t){var e=Sa(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function DO(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&LE(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function qs(t){return ai(t).getComputedStyle(t)}function Qxt(t){return["table","td","th"].indexOf(us(t))>=0}function Dr(t){return((go(t)?t.ownerDocument:t.document)||window.document).documentElement}function lp(t){return us(t)==="html"?t:t.assignedSlot||t.parentNode||(LE(t)?t.host:null)||Dr(t)}function kC(t){return!xi(t)||qs(t).position==="fixed"?null:t.offsetParent}function Xxt(t){var e=/firefox/i.test(tb()),n=/Trident/i.test(tb());if(n&&xi(t)){var i=qs(t);if(i.position==="fixed")return null}var s=lp(t);for(LE(s)&&(s=s.host);xi(s)&&["html","body"].indexOf(us(s))<0;){var r=qs(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Sc(t){for(var e=ai(t),n=kC(t);n&&Qxt(n)&&qs(n).position==="static";)n=kC(n);return n&&(us(n)==="html"||us(n)==="body"&&qs(n).position==="static")?e:n||Xxt(t)||e}function UE(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ll(t,e,n){return lo(t,cu(e,n))}function Zxt(t,e,n){var i=Ll(t,e,n);return i>n?n:i}function kO(){return{top:0,right:0,bottom:0,left:0}}function LO(t){return Object.assign({},kO(),t)}function PO(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var Jxt=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,LO(typeof e!="number"?e:PO(e,vc))};function eCt(t){var e,n=t.state,i=t.name,s=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=as(n.placement),l=UE(a),u=[Xn,Ai].indexOf(a)>=0,d=u?"height":"width";if(!(!r||!o)){var h=Jxt(s.padding,n),f=PE(r),_=l==="y"?Qn:Xn,m=l==="y"?Ri:Ai,E=n.rects.reference[d]+n.rects.reference[l]-o[l]-n.rects.popper[d],b=o[l]-n.rects.reference[l],g=Sc(r),y=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,v=E/2-b/2,T=h[_],C=y-f[d]-h[m],x=y/2-f[d]/2+v,O=Ll(T,x,C),w=l;n.modifiersData[i]=(e={},e[w]=O,e.centerOffset=O-x,e)}}function tCt(t){var e=t.state,n=t.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||DO(e.elements.popper,s)&&(e.elements.arrow=s))}const nCt={name:"arrow",enabled:!0,phase:"main",fn:eCt,effect:tCt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ta(t){return t.split("-")[1]}var iCt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function sCt(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:va(n*s)/s||0,y:va(i*s)/s||0}}function LC(t){var e,n=t.popper,i=t.popperRect,s=t.placement,r=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,d=t.roundOffsets,h=t.isFixed,f=o.x,_=f===void 0?0:f,m=o.y,E=m===void 0?0:m,b=typeof d=="function"?d({x:_,y:E}):{x:_,y:E};_=b.x,E=b.y;var g=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=Xn,T=Qn,C=window;if(u){var x=Sc(n),O="clientHeight",w="clientWidth";if(x===ai(n)&&(x=Dr(n),qs(x).position!=="static"&&a==="absolute"&&(O="scrollHeight",w="scrollWidth")),x=x,s===Qn||(s===Xn||s===Ai)&&r===sc){T=Ri;var S=h&&x===C&&C.visualViewport?C.visualViewport.height:x[O];E-=S-i.height,E*=l?1:-1}if(s===Xn||(s===Qn||s===Ri)&&r===sc){v=Ai;var R=h&&x===C&&C.visualViewport?C.visualViewport.width:x[w];_-=R-i.width,_*=l?1:-1}}var U=Object.assign({position:a},u&&iCt),F=d===!0?sCt({x:_,y:E},ai(n)):{x:_,y:E};if(_=F.x,E=F.y,l){var Q;return Object.assign({},U,(Q={},Q[T]=y?"0":"",Q[v]=g?"0":"",Q.transform=(C.devicePixelRatio||1)<=1?"translate("+_+"px, "+E+"px)":"translate3d("+_+"px, "+E+"px, 0)",Q))}return Object.assign({},U,(e={},e[T]=y?E+"px":"",e[v]=g?_+"px":"",e.transform="",e))}function rCt(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=i===void 0?!0:i,r=n.adaptive,o=r===void 0?!0:r,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:as(e.placement),variation:Ta(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,LC(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,LC(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const oCt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rCt,data:{}};var $c={passive:!0};function aCt(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=ai(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&u.forEach(function(d){d.addEventListener("scroll",n.update,$c)}),a&&l.addEventListener("resize",n.update,$c),function(){r&&u.forEach(function(d){d.removeEventListener("scroll",n.update,$c)}),a&&l.removeEventListener("resize",n.update,$c)}}const lCt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:aCt,data:{}};var cCt={left:"right",right:"left",bottom:"top",top:"bottom"};function Gd(t){return t.replace(/left|right|bottom|top/g,function(e){return cCt[e]})}var dCt={start:"end",end:"start"};function PC(t){return t.replace(/start|end/g,function(e){return dCt[e]})}function FE(t){var e=ai(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function BE(t){return Sa(Dr(t)).left+FE(t).scrollLeft}function uCt(t,e){var n=ai(t),i=Dr(t),s=n.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var u=MO();(u||!u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+BE(t),y:l}}function pCt(t){var e,n=Dr(t),i=FE(t),s=(e=t.ownerDocument)==null?void 0:e.body,r=lo(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=lo(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+BE(t),l=-i.scrollTop;return qs(s||n).direction==="rtl"&&(a+=lo(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function GE(t){var e=qs(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function UO(t){return["html","body","#document"].indexOf(us(t))>=0?t.ownerDocument.body:xi(t)&&GE(t)?t:UO(lp(t))}function Pl(t,e){var n;e===void 0&&(e=[]);var i=UO(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=ai(i),o=s?[r].concat(r.visualViewport||[],GE(i)?i:[]):i,a=e.concat(o);return s?a:a.concat(Pl(lp(o)))}function nb(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function _Ct(t,e){var n=Sa(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function UC(t,e,n){return e===OO?nb(uCt(t,n)):go(e)?_Ct(e,n):nb(pCt(Dr(t)))}function hCt(t){var e=Pl(lp(t)),n=["absolute","fixed"].indexOf(qs(t).position)>=0,i=n&&xi(t)?Sc(t):t;return go(i)?e.filter(function(s){return go(s)&&DO(s,i)&&us(s)!=="body"}):[]}function fCt(t,e,n,i){var s=e==="clippingParents"?hCt(t):[].concat(e),r=[].concat(s,[n]),o=r[0],a=r.reduce(function(l,u){var d=UC(t,u,i);return l.top=lo(d.top,l.top),l.right=cu(d.right,l.right),l.bottom=cu(d.bottom,l.bottom),l.left=lo(d.left,l.left),l},UC(t,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function FO(t){var e=t.reference,n=t.element,i=t.placement,s=i?as(i):null,r=i?Ta(i):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case Qn:l={x:o,y:e.y-n.height};break;case Ri:l={x:o,y:e.y+e.height};break;case Ai:l={x:e.x+e.width,y:a};break;case Xn:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=s?UE(s):null;if(u!=null){var d=u==="y"?"height":"width";switch(r){case ya:l[u]=l[u]-(e[d]/2-n[d]/2);break;case sc:l[u]=l[u]+(e[d]/2-n[d]/2);break}}return l}function rc(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=i===void 0?t.placement:i,r=n.strategy,o=r===void 0?t.strategy:r,a=n.boundary,l=a===void 0?Lxt:a,u=n.rootBoundary,d=u===void 0?OO:u,h=n.elementContext,f=h===void 0?fl:h,_=n.altBoundary,m=_===void 0?!1:_,E=n.padding,b=E===void 0?0:E,g=LO(typeof b!="number"?b:PO(b,vc)),y=f===fl?Pxt:fl,v=t.rects.popper,T=t.elements[m?y:f],C=fCt(go(T)?T:T.contextElement||Dr(t.elements.popper),l,d,o),x=Sa(t.elements.reference),O=FO({reference:x,element:v,strategy:"absolute",placement:s}),w=nb(Object.assign({},v,O)),S=f===fl?w:x,R={top:C.top-S.top+g.top,bottom:S.bottom-C.bottom+g.bottom,left:C.left-S.left+g.left,right:S.right-C.right+g.right},U=t.modifiersData.offset;if(f===fl&&U){var F=U[s];Object.keys(R).forEach(function(Q){var L=[Ai,Ri].indexOf(Q)>=0?1:-1,Y=[Qn,Ri].indexOf(Q)>=0?"y":"x";R[Q]+=F[Y]*L})}return R}function mCt(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?IO:l,d=Ta(i),h=d?a?DC:DC.filter(function(m){return Ta(m)===d}):vc,f=h.filter(function(m){return u.indexOf(m)>=0});f.length===0&&(f=h);var _=f.reduce(function(m,E){return m[E]=rc(t,{placement:E,boundary:s,rootBoundary:r,padding:o})[as(E)],m},{});return Object.keys(_).sort(function(m,E){return _[m]-_[E]})}function gCt(t){if(as(t)===kE)return[];var e=Gd(t);return[PC(t),e,PC(e)]}function bCt(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,u=n.padding,d=n.boundary,h=n.rootBoundary,f=n.altBoundary,_=n.flipVariations,m=_===void 0?!0:_,E=n.allowedAutoPlacements,b=e.options.placement,g=as(b),y=g===b,v=l||(y||!m?[Gd(b)]:gCt(b)),T=[b].concat(v).reduce(function(fe,ye){return fe.concat(as(ye)===kE?mCt(e,{placement:ye,boundary:d,rootBoundary:h,padding:u,flipVariations:m,allowedAutoPlacements:E}):ye)},[]),C=e.rects.reference,x=e.rects.popper,O=new Map,w=!0,S=T[0],R=0;R=0,Y=L?"width":"height",V=rc(e,{placement:U,boundary:d,rootBoundary:h,altBoundary:f,padding:u}),P=L?Q?Ai:Xn:Q?Ri:Qn;C[Y]>x[Y]&&(P=Gd(P));var X=Gd(P),W=[];if(r&&W.push(V[F]<=0),a&&W.push(V[P]<=0,V[X]<=0),W.every(function(fe){return fe})){S=U,w=!1;break}O.set(U,W)}if(w)for(var Z=m?3:1,ae=function(ye){var Ne=T.find(function(te){var me=O.get(te);if(me)return me.slice(0,ye).every(function(ne){return ne})});if(Ne)return S=Ne,"break"},ie=Z;ie>0;ie--){var ee=ae(ie);if(ee==="break")break}e.placement!==S&&(e.modifiersData[i]._skip=!0,e.placement=S,e.reset=!0)}}const ECt={name:"flip",enabled:!0,phase:"main",fn:bCt,requiresIfExists:["offset"],data:{_skip:!1}};function FC(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function BC(t){return[Qn,Ai,Ri,Xn].some(function(e){return t[e]>=0})}function yCt(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=rc(e,{elementContext:"reference"}),a=rc(e,{altBoundary:!0}),l=FC(o,i),u=FC(a,s,r),d=BC(l),h=BC(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const vCt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yCt};function SCt(t,e,n){var i=as(t),s=[Xn,Qn].indexOf(i)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[Xn,Ai].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function TCt(t){var e=t.state,n=t.options,i=t.name,s=n.offset,r=s===void 0?[0,0]:s,o=IO.reduce(function(d,h){return d[h]=SCt(h,e.rects,r),d},{}),a=o[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=o}const xCt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:TCt};function CCt(t){var e=t.state,n=t.name;e.modifiersData[n]=FO({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const wCt={name:"popperOffsets",enabled:!0,phase:"read",fn:CCt,data:{}};function RCt(t){return t==="x"?"y":"x"}function ACt(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.padding,f=n.tether,_=f===void 0?!0:f,m=n.tetherOffset,E=m===void 0?0:m,b=rc(e,{boundary:l,rootBoundary:u,padding:h,altBoundary:d}),g=as(e.placement),y=Ta(e.placement),v=!y,T=UE(g),C=RCt(T),x=e.modifiersData.popperOffsets,O=e.rects.reference,w=e.rects.popper,S=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,R=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),U=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(x){if(r){var Q,L=T==="y"?Qn:Xn,Y=T==="y"?Ri:Ai,V=T==="y"?"height":"width",P=x[T],X=P+b[L],W=P-b[Y],Z=_?-w[V]/2:0,ae=y===ya?O[V]:w[V],ie=y===ya?-w[V]:-O[V],ee=e.elements.arrow,fe=_&&ee?PE(ee):{width:0,height:0},ye=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:kO(),Ne=ye[L],te=ye[Y],me=Ll(0,O[V],fe[V]),ne=v?O[V]/2-Z-me-Ne-R.mainAxis:ae-me-Ne-R.mainAxis,Se=v?-O[V]/2+Z+me+te+R.mainAxis:ie+me+te+R.mainAxis,De=e.elements.arrow&&Sc(e.elements.arrow),k=De?T==="y"?De.clientTop||0:De.clientLeft||0:0,G=(Q=U==null?void 0:U[T])!=null?Q:0,K=P+ne-G-k,de=P+Se-G,se=Ll(_?cu(X,K):X,P,_?lo(W,de):W);x[T]=se,F[T]=se-P}if(a){var we,Ie=T==="x"?Qn:Xn,q=T==="x"?Ri:Ai,_e=x[C],re=C==="y"?"height":"width",ce=_e+b[Ie],D=_e-b[q],I=[Qn,Xn].indexOf(g)!==-1,H=(we=U==null?void 0:U[C])!=null?we:0,he=I?ce:_e-O[re]-w[re]-H+R.altAxis,J=I?_e+O[re]+w[re]-H-R.altAxis:D,oe=_&&I?Zxt(he,_e,J):Ll(_?he:ce,_e,_?J:D);x[C]=oe,F[C]=oe-_e}e.modifiersData[i]=F}}const NCt={name:"preventOverflow",enabled:!0,phase:"main",fn:ACt,requiresIfExists:["offset"]};function OCt(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function ICt(t){return t===ai(t)||!xi(t)?FE(t):OCt(t)}function MCt(t){var e=t.getBoundingClientRect(),n=va(e.width)/t.offsetWidth||1,i=va(e.height)/t.offsetHeight||1;return n!==1||i!==1}function DCt(t,e,n){n===void 0&&(n=!1);var i=xi(e),s=xi(e)&&MCt(e),r=Dr(e),o=Sa(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((us(e)!=="body"||GE(r))&&(a=ICt(e)),xi(e)?(l=Sa(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=BE(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function kCt(t){var e=new Map,n=new Set,i=[];t.forEach(function(r){e.set(r.name,r)});function s(r){n.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),i.push(r)}return t.forEach(function(r){n.has(r.name)||s(r)}),i}function LCt(t){var e=kCt(t);return $xt.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function PCt(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function UCt(t){var e=t.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var GC={placement:"bottom",modifiers:[],strategy:"absolute"};function VC(){for(var t=arguments.length,e=new Array(t),n=0;n(Or("data-v-b8e854ae"),t=t(),Ir(),t),YCt={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center"},$Ct={class:"flex flex-col text-center"},WCt={class:"flex flex-col text-center items-center"},KCt={class:"flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"},jCt=Ft(()=>c("img",{class:"w-24 animate-bounce",title:"LoLLMS WebUI",src:Ti,alt:"Logo"},null,-1)),QCt={class:"flex flex-col items-start"},XCt={class:"text-2xl font-bold text-5xl drop-shadow-md align-middle"},ZCt=Ft(()=>c("p",{class:"text-gray-400 text-base"},"One tool to rule them all",-1)),JCt=Ft(()=>c("p",{class:"text-gray-400 text-base"},"by ParisNeo",-1)),e1t=Ft(()=>c("hr",{class:"mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"},null,-1)),t1t=Ft(()=>c("p",{class:"text-2xl mb-10 font-bold drop-shadow-md"},"Welcome",-1)),n1t={role:"status",class:"text-center w-full display: flex; flex-row align-items: center;"},i1t={class:"text-2xl animate-pulse mt-2"},s1t=Ft(()=>c("i",{"data-feather":"chevron-right"},null,-1)),r1t=[s1t],o1t=Ft(()=>c("i",{"data-feather":"chevron-left"},null,-1)),a1t=[o1t],l1t={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},c1t={class:"text-light-text-panel dark:text-dark-text-panel bg-bg-light-panel sticky z-10 top-0 dark:bg-bg-dark-tone shadow-md"},d1t={class:"flex-row p-4 flex items-center gap-3 flex-0"},u1t=Ft(()=>c("i",{"data-feather":"plus"},null,-1)),p1t=[u1t],_1t=Ft(()=>c("i",{"data-feather":"check-square"},null,-1)),h1t=[_1t],f1t={class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},m1t=Ft(()=>c("i",{"data-feather":"database"},null,-1)),g1t=[m1t],b1t=Ft(()=>c("i",{"data-feather":"log-in"},null,-1)),E1t=[b1t],y1t=Ft(()=>c("i",{"data-feather":"folder"},null,-1)),v1t=[y1t],S1t={key:1,class:"dropdown"},T1t=Ft(()=>c("i",{"data-feather":"search"},null,-1)),x1t=[T1t],C1t={key:2,class:"flex gap-3 flex-1 items-center duration-75"},w1t=Ft(()=>c("i",{"data-feather":"x"},null,-1)),R1t=[w1t],A1t=Ft(()=>c("i",{"data-feather":"check"},null,-1)),N1t=[A1t],O1t=Ft(()=>c("i",{"data-feather":"hard-drive"},null,-1)),I1t=[O1t],M1t=Ft(()=>c("i",{"data-feather":"check-circle"},null,-1)),D1t=[M1t],k1t=Ft(()=>c("i",{"data-feather":"x-octagon"},null,-1)),L1t=[k1t],P1t=Ft(()=>c("i",{"data-feather":"book"},null,-1)),U1t=[P1t],F1t={key:7,title:"Loading..",class:"flex flex-row flex-grow justify-end"},B1t=Ft(()=>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)),G1t=[B1t],V1t={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},z1t={class:"p-4 pt-2"},H1t={class:"relative"},q1t=Ft(()=>c("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[c("div",{class:"scale-75"},[c("i",{"data-feather":"search"})])],-1)),Y1t={class:"absolute inset-y-0 right-0 flex items-center pr-3"},$1t=Ft(()=>c("i",{"data-feather":"x"},null,-1)),W1t=[$1t],K1t={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},j1t={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},Q1t={class:"flex flex-row flex-grow"},X1t={key:0},Z1t={class:"flex flex-row"},J1t={key:0,class:"flex gap-3"},ewt=Ft(()=>c("i",{"data-feather":"trash"},null,-1)),twt=[ewt],nwt={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},iwt=Ft(()=>c("i",{"data-feather":"check"},null,-1)),swt=[iwt],rwt=Ft(()=>c("i",{"data-feather":"x"},null,-1)),owt=[rwt],awt={class:"flex gap-3"},lwt=Ft(()=>c("i",{"data-feather":"codepen"},null,-1)),cwt=[lwt],dwt=Ft(()=>c("i",{"data-feather":"folder"},null,-1)),uwt=[dwt],pwt=Ft(()=>c("i",{"data-feather":"bookmark"},null,-1)),_wt=[pwt],hwt=Ft(()=>c("i",{"data-feather":"list"},null,-1)),fwt=[hwt],mwt={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},gwt={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},bwt=Ft(()=>c("p",{class:"px-3"},"No discussions are found",-1)),Ewt=[bwt],ywt=Ft(()=>c("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),vwt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},Swt={key:1,class:"relative flex flex-col flex-grow w-full"},Twt={class:"container pt-4 pb-50 mb-50 w-full"},xwt=Ft(()=>c("div",null,[c("br"),c("br"),c("br"),c("br"),c("br"),c("br"),c("br")],-1)),Cwt=Ft(()=>c("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1)),wwt={key:0,class:"flex flex-row items-center justify-center h-10"},Rwt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},Awt={class:"text-2xl animate-pulse mt-2 text-light-text-panel dark:text-dark-text-panel"},Nwt={setup(){},data(){return{memory_icon:VCt,active_skills:zCt,inactive_skills:HCt,skillsRegistry:qCt,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CHUNK:0,MSG_TYPE_FULL:1,MSG_TYPE_FULL_INVISIBLE_TO_AI:2,MSG_TYPE_FULL_INVISIBLE_TO_USER:3,MSG_TYPE_EXCEPTION:4,MSG_TYPE_WARNING:5,MSG_TYPE_INFO:6,MSG_TYPE_STEP:7,MSG_TYPE_STEP_START:8,MSG_TYPE_STEP_PROGRESS:9,MSG_TYPE_STEP_END:10,MSG_TYPE_JSON_INFOS:11,MSG_TYPE_REF:12,MSG_TYPE_CODE:13,MSG_TYPE_UI:14,MSG_TYPE_NEW_MESSAGE:15,MSG_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,panelCollapsed:!1,isOpen:!1,discussion_id:0}},methods:{add_webpage(){console.log("addWebLink received"),this.$refs.web_url_input_box.showPanel()},addWebpage(){Ce.post("/add_webpage",{client_id:this.client_id,url:this.$refs.web_url_input_box.inputText},{headers:this.posts_headers}).then(t=>{t&&t.status&&(console.log("Done"),this.recoverFiles())})},show_progress(t){this.progress_visibility_val=!0},hide_progress(t){this.progress_visibility_val=!1},update_progress(t){console.log("Progress update"),this.progress_value=t.value},onSettingsBinding(){try{this.isLoading=!0,Ce.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(t.data&&Object.keys(t.data).length>0?this.$store.state.universalForm.showForm(t.data,"Binding settings - "+bindingEntry.binding.name,"Save changes","Cancel").then(e=>{try{Ce.post("/set_active_binding_settings",e).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. +`+t.name,4,!1)}else console.log("mounting pers");this.$emit("personalitySelected"),Ge(()=>{He.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const e=t.language===null?t.full_path:t.full_path+":"+t.language;console.log("Selecting personality ",e);const n=this.$store.state.config.personalities.findIndex(s=>s===e),i={client_id:this.$store.state.client_id,id:n};try{const s=await Ce.post("/select_personality",i);if(s)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),s.data}catch(s){console.log(s.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(t){t.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const n=new MouseEvent("click");e.dispatchEvent(n)},setBinding(t){console.log("Setting binding to "+t.name),this.selecting_binding=!0,this.selectedBinding=t,this.$store.state.messageBox.showBlockingMessage("Loading binding"),Ce.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},setModel(t){console.log("Setting model to "+t.name),this.selecting_model=!0,this.selectedModel=t,this.$store.state.messageBox.showBlockingMessage("Loading model"),Ce.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},download_files(){Ce.get("/download_files")},remove_file(t){Ce.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){Ce.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(t,e){console.log("Send file triggered");const n=new FileReader,i=24*1024;let s=0,r=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,l=s+a.byteLength>=t.size;Ke.emit("send_file_chunk",{filename:t.name,chunk:a,offset:s,isLastChunk:l,chunkIndex:r}),s+=a.byteLength,r++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=t.slice(s,s+i);n.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},startRTCom(){this.is_rt=!0,console.log("is_rt:",this.is_rt),Ke.emit("start_bidirectional_audio_stream"),Ge(()=>{He.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),Ke.emit("stop_bidirectional_audio_stream"),Ge(()=>{He.replace()})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isListeningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(t){this.showPersonalities=!this.showPersonalities},handleOnTalk(t){console.log("talking"),this.showPersonalities=!1,this.$store.state.toast.showToast(`Personality ${t.name} is Talking`,4,!0),this.onTalk(t)},onMountFun(t){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(t){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(t){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(t){return Ge(()=>{He.replace()}),rs(t)},removeItem(t){console.log("Removing ",t.name),Ce.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await Ce.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){Ke.emit("take_picture"),Ke.on("picture_taken",()=>{Ce.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(t){console.log("Adding files");const e=[...t];let n=0;const i=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const s=e[n];this.filesList.push(s),this.isFileSentList.push(!1),this.send_file(s,()=>{n++,i()})};i()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){Ge(()=>{He.replace()})},loading(t,e){Ge(()=>{He.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let i=0;i{He.replace()}),console.log("Chatbar mounted"),Ke.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.status),console.log("active_tts_service: ",this.$store.state.config.active_tts_service),console.log("is_rt_on: ",this.$store.state.is_rt_on)}),this.$store.dispatch("fetchisRTOn")},activated(){Ge(()=>{He.replace()})}},Pt=t=>(Or("data-v-011f8851"),t=t(),Ir(),t),E0t={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},y0t={key:0,class:"items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},v0t={class:"flex"},S0t=["title"],T0t=Pt(()=>c("i",{"data-feather":"list"},null,-1)),x0t=[T0t],C0t={key:0},w0t={class:"flex flex-col max-h-64"},R0t=["title"],A0t={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},N0t={key:0,filesList:"",role:"status"},O0t=Pt(()=>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)),I0t=Pt(()=>c("span",{class:"sr-only"},"Loading...",-1)),M0t=[O0t,I0t],D0t=Pt(()=>c("div",null,[c("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),k0t=Pt(()=>c("div",{class:"grow"},null,-1)),L0t={class:"flex flex-row items-center"},P0t={class:"whitespace-nowrap"},U0t=["onClick"],F0t=Pt(()=>c("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),B0t=[F0t],G0t={key:1,class:"flex mx-1 w-500"},V0t={class:"whitespace-nowrap flex flex-row gap-2"},z0t=Pt(()=>c("p",{class:"font-bold"}," Total size: ",-1)),H0t=Pt(()=>c("div",{class:"grow"},null,-1)),q0t=Pt(()=>c("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),Y0t=[q0t],$0t=Pt(()=>c("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)),W0t=[$0t],K0t={key:2,class:"mx-1"},j0t={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end bg-primary"},Q0t={role:"status"},X0t=["src"],Z0t=Pt(()=>c("span",{class:"sr-only"},"Selecting model...",-1)),J0t={class:"flex w-fit relative grow w-full"},eTt={class:"relative text-light-text-panel dark:text-dark-text-panel grow flex h-12.5 cursor-pointer select-none items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone p-1 shadow-sm hover:shadow-none dark:border-gray-800",tabindex:"0"},tTt={key:0,title:"Waiting for reply"},nTt=["src"],iTt=Pt(()=>c("div",{role:"status"},[c("span",{class:"sr-only"},"Loading...")],-1)),sTt={key:1,class:"w-fit group relative"},rTt={class:"group space-x-1 w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},oTt={key:0,class:"group items-center flex flex-row"},aTt=["onClick"],lTt=["src","title"],cTt={class:"group items-center flex flex-row"},dTt=["src","title"],uTt={key:2,class:"w-fit group relative"},pTt={class:"group space-x-1 w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},_Tt={key:0,class:"group items-center flex flex-row"},hTt=["onClick"],fTt=["src","title"],mTt={class:"group items-center flex flex-row"},gTt=["src","title"],bTt={key:3,class:"w-fit group relative"},ETt={class:"hide .group-hover:block fixed w-[1000px] bottom-0 group absolute opacity-0 group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},yTt={class:"w-fit flex-wrap flex"},vTt=["onMouseover"],STt={class:"relative"},TTt=["onClick"],xTt=["src","title"],CTt=["onClick"],wTt=Pt(()=>c("span",{class:"-top-6 -right-6 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Unmount personality"},[c("svg",{"aria-hidden":"true",class:"top-1 left-1 relative w-5 h-5 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20","stroke-width":"1",xmlns:"http://www.w3.org/2000/svg"},[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)),RTt=[wTt],ATt=["onClick"],NTt=Pt(()=>c("span",{class:"-top-9 left-2 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Remount"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[c("g",{id:"surface1"},[c("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1)),OTt=[NTt],ITt=["onClick"],MTt=Pt(()=>c("span",{class:"-top-6 -left-6 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Talk"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[c("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),c("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1)),DTt=[MTt],kTt={class:"w-fit"},LTt={class:"w-fit"},PTt={class:"relative grow"},UTt={class:"group relative w-max"},FTt=Pt(()=>c("i",{"data-feather":"send"},null,-1)),BTt=[FTt],GTt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI.")],-1)),VTt={class:"group relative w-max"},zTt=["src"],HTt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI with internet search.")],-1)),qTt={class:"group relative w-max"},YTt=Pt(()=>c("i",{"data-feather":"mic"},null,-1)),$Tt=[YTt],WTt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Press and talk.")],-1)),KTt={key:5,class:"group relative w-max"},jTt=Pt(()=>c("i",{"data-feather":"mic"},null,-1)),QTt=[jTt],XTt=Pt(()=>c("i",{"data-feather":"mic"},null,-1)),ZTt=[XTt],JTt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Real time bidirectional audio mode.")],-1)),ext={key:6,class:"group relative w-max"},txt=Pt(()=>c("i",{"data-feather":"file-plus"},null,-1)),nxt=[txt],ixt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Send File to the AI.")],-1)),sxt={class:"group relative w-max"},rxt=Pt(()=>c("i",{"data-feather":"camera"},null,-1)),oxt=[rxt],axt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Take a shot from webcam.")],-1)),lxt={class:"group relative w-max"},cxt=Pt(()=>c("i",{"data-feather":"globe"},null,-1)),dxt=[cxt],uxt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Add a weblink to the discussion.")],-1)),pxt={class:"group relative w-max"},_xt=Pt(()=>c("i",{"data-feather":"message-square"},null,-1)),hxt=[_xt],fxt=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty User message.")],-1)),mxt={class:"group relative w-max"},gxt=Pt(()=>c("i",{"data-feather":"message-square"},null,-1)),bxt=[gxt],Ext=Pt(()=>c("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[c("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty ai message.")],-1)),yxt=Pt(()=>c("div",{class:"ml-auto gap-2"},null,-1));function vxt(t,e,n,i,s,r){const o=ft("MountedPersonalitiesList"),a=ft("MountedPersonalities"),l=ft("PersonalitiesCommands"),u=ft("UniversalForm");return A(),M(We,null,[c("form",null,[c("div",E0t,[s.filesList.length>0||s.showPersonalities?(A(),M("div",y0t,[c("div",v0t,[c("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:s.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=Te(d=>s.showfilesList=!s.showfilesList,["stop"]))},x0t,8,S0t)]),s.filesList.length>0&&s.showfilesList==!0?(A(),M("div",C0t,[c("div",w0t,[Re(os,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:$e(()=>[(A(!0),M(We,null,ct(s.filesList,(d,h)=>(A(),M("div",{key:h+"-"+d.name},[c("div",{class:"m-1",title:d.name},[c("div",A0t,[s.isFileSentList[h]?$("",!0):(A(),M("div",N0t,M0t)),D0t,c("div",{class:qe(["line-clamp-1 w-3/5",s.isFileSentList[h]?"text-green-500":"text-red-200"])},ge(d.name),3),k0t,c("div",L0t,[c("p",P0t,ge(r.computedFileSize(d.size)),1),c("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:f=>r.removeItem(d)},B0t,8,U0t)])])],8,R0t)]))),128))]),_:1})])])):$("",!0),s.filesList.length>0?(A(),M("div",G0t,[c("div",V0t,[z0t,Je(" "+ge(s.totalSize)+" ("+ge(s.filesList.length)+") ",1)]),H0t,c("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...d)=>r.clear_files&&r.clear_files(...d))},Y0t),c("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...d)=>r.download_files&&r.download_files(...d))},W0t)])):$("",!0),s.showPersonalities?(A(),M("div",K0t,[Re(o,{ref:"mountedPersList",onShowPersList:r.onShowPersListFun,"on-mounted":r.onMountFun,"on-un-mounted":r.onUnmountFun,"on-remounted":t.onRemountFun,"on-talk":r.handleOnTalk,discussionPersonalities:r.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):$("",!0)])):$("",!0),s.selecting_model||s.selecting_binding?(A(),M("div",j0t,[c("div",Q0t,[c("img",{src:s.loader_v0,class:"w-50 h-50"},null,8,X0t),Z0t])])):$("",!0),c("div",J0t,[c("div",eTt,[n.loading?(A(),M("div",tTt,[c("img",{src:s.loader_v0},null,8,nTt),iTt])):$("",!0),n.loading?$("",!0):(A(),M("div",sTt,[c("div",rTt,[(A(!0),M(We,null,ct(r.installedBindings,(d,h)=>(A(),M("div",{class:"w-full",key:h+"-"+d.name,ref_for:!0,ref:"installedBindings"},[d.name!=r.binding_name?(A(),M("div",oTt,[c("button",{onClick:Te(f=>r.setBinding(d),["prevent"]),class:"w-8 h-8"},[c("img",{src:d.icon?d.icon:s.modelImgPlaceholder,class:"z-50 w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:d.name},null,8,lTt)],8,aTt)])):$("",!0)]))),128))]),c("div",cTt,[c("button",{onClick:e[3]||(e[3]=Te(d=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[c("img",{src:r.currentBindingIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:r.currentBinding?r.currentBinding.name:"unknown"},null,8,dTt)])])])),n.loading?$("",!0):(A(),M("div",uTt,[c("div",pTt,[(A(!0),M(We,null,ct(r.installedModels,(d,h)=>(A(),M("div",{class:"w-full",key:h+"-"+d.name,ref_for:!0,ref:"installedModels"},[d.name!=r.model_name?(A(),M("div",_Tt,[c("button",{onClick:Te(f=>r.setModel(d),["prevent"]),class:"w-8 h-8"},[c("img",{src:d.icon?d.icon:s.modelImgPlaceholder,class:"z-50 w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:d.name},null,8,fTt)],8,hTt)])):$("",!0)]))),128))]),c("div",mTt,[c("button",{onClick:e[4]||(e[4]=Te(d=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[c("img",{src:r.currentModelIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:r.currentModel?r.currentModel.name:"unknown"},null,8,gTt)])])])),n.loading?$("",!0):(A(),M("div",bTt,[c("div",ETt,[c("div",yTt,[(A(!0),M(We,null,ct(r.mountedPersonalities,(d,h)=>(A(),M("div",{class:"w-fit h-fit",key:h+"-"+d.name,ref_for:!0,ref:"mountedPersonalities",onMouseover:f=>r.showPersonalityHoveredIn(h),onMouseleave:e[6]||(e[6]=f=>r.showPersonalityHoveredOut())},[h!=r.personality_name?(A(),M("div",{key:0,class:qe(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",s.personalityHoveredIndex===h?"scale-150":""])},[c("div",STt,[c("button",{onClick:Te(f=>r.onPersonalitySelected(d),["prevent"]),class:"w-10 h-10 relative"},[c("img",{src:s.bUrl+d.avatar,onError:e[5]||(e[5]=(...f)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...f)),class:qe(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",s.personalityHoveredIndex===h?"scale-150 ":""+this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(d.full_path)?"border-secondary":"border-transparent z-0"]),title:d.name},null,42,xTt)],8,TTt),s.personalityHoveredIndex===h?(A(),M("button",{key:0,onClick:Te(f=>r.unmountPersonality(d),["prevent"])},RTt,8,CTt)):$("",!0),s.personalityHoveredIndex===h?(A(),M("button",{key:1,onClick:Te(f=>r.remount_personality(d),["prevent"])},OTt,8,ATt)):$("",!0),s.personalityHoveredIndex===h?(A(),M("button",{key:2,onClick:Te(f=>r.handleOnTalk(d),["prevent"])},DTt,8,ITt)):$("",!0)])],2)):$("",!0)],40,vTt))),128))])]),Re(a,{ref:"mountedPers",onShowPersList:r.onShowPersListFun,onReady:r.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])])),c("div",kTt,[s.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(A(),xt(l,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):$("",!0)]),c("div",LTt,[r.isDataSourceNamesValid?(A(),xt(l,{key:0,icon:"feather:book",commandsList:r.dataSourceNames,sendCommand:r.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):$("",!0)]),c("div",PTt,[z(c("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[7]||(e[7]=d=>s.message=d),title:"Hold SHIFT + ENTER to add new line",onPaste:e[8]||(e[8]=(...d)=>r.handlePaste&&r.handlePaste(...d)),class:"inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:e[9]||(e[9]=Hs(Te(d=>r.submitOnEnter(d),["exact"]),["enter"]))},`\r + `,544),[[Oe,s.message]])]),n.loading?(A(),M("button",{key:4,type:"button",class:"bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800",onClick:e[10]||(e[10]=Te((...d)=>r.stopGenerating&&r.stopGenerating(...d),["stop"]))}," Stop generating ")):$("",!0),c("div",UTt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[11]||(e[11]=(...d)=>r.submit&&r.submit(...d)),title:"Send",class:"w-6 text-panel hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},BTt)),GTt]),c("div",VTt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[12]||(e[12]=(...d)=>r.submitWithInternetSearch&&r.submitWithInternetSearch(...d)),title:"Send With internet",class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},[c("img",{src:s.sendGlobe,width:"50",height:"50",style:{stroke:"currentColor",fill:"currentColor"}},null,8,zTt)])),HTt]),c("div",qTt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[13]||(e[13]=(...d)=>r.startSpeechRecognition&&r.startSpeechRecognition(...d)),class:qe([{"text-red-500":s.isListeningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"])},$Tt,2)),WTt]),t.$store.state.config.active_tts_service!="None"?(A(),M("div",KTt,[s.is_rt?(A(),M("button",{key:0,type:"button",onClick:e[14]||(e[14]=(...d)=>r.stopRTCom&&r.stopRTCom(...d)),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90 bg-red-500 border borderred700 rounded-md"},QTt)):(A(),M("button",{key:1,type:"button",onClick:e[15]||(e[15]=(...d)=>r.startRTCom&&r.startRTCom(...d)),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90 bg-green-500 border border-green-700 rounded-md"},ZTt)),JTt])):$("",!0),n.loading?$("",!0):(A(),M("div",ext,[c("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[16]||(e[16]=(...d)=>r.addFiles&&r.addFiles(...d)),multiple:""},null,544),c("button",{type:"button",onClick:e[17]||(e[17]=Te((...d)=>r.add_file&&r.add_file(...d),["prevent"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},nxt),ixt])),c("div",sxt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[18]||(e[18]=Te((...d)=>r.takePicture&&r.takePicture(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},oxt)),axt]),c("div",lxt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[19]||(e[19]=Te((...d)=>r.addWebLink&&r.addWebLink(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},dxt)),uxt]),c("div",pxt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[20]||(e[20]=Te((...d)=>r.makeAnEmptyUserMessage&&r.makeAnEmptyUserMessage(...d),["stop"])),class:"w-6 text-gray-800 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},hxt)),fxt]),c("div",mxt,[n.loading?$("",!0):(A(),M("button",{key:0,type:"button",onClick:e[21]||(e[21]=Te((...d)=>r.makeAnEmptyAIMessage&&r.makeAnEmptyAIMessage(...d),["stop"])),class:"w-6 text-red-400 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},bxt)),Ext])]),yxt])])]),Re(u,{ref:"universalForm",class:"z-20"},null,512)],64)}const xO=bt(b0t,[["render",vxt],["__scopeId","data-v-011f8851"]]),Sxt={name:"WelcomeComponent",computed:{storeLogo(){return this.$store.state.config?Ti:this.$store.state.config.app_custom_logo!=""?"/user_infos/"+this.$store.state.config.app_custom_logo:Ti}},data(){},setup(){return{}}},Txt={class:"flex flex-col text-center w-full h-full"},xxt={class:"flex flex-col text-center items-center"},Cxt={class:"flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"},wxt=["src"],Rxt=c("div",{class:"flex flex-col items-start"},[c("p",{class:"text-2xl"},"LoLLMS"),c("p",{class:"text-gray-400 text-base"},"One tool to rule them all")],-1),Axt=c("hr",{class:"mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"},null,-1),Nxt=c("p",{class:"text-2xl"},"Welcome",-1),Oxt=c("p",{class:"text-lg"},"Please create a new discussion or select existing one to start",-1);function Ixt(t,e,n,i,s,r){return A(),M("div",Txt,[c("div",xxt,[c("div",Cxt,[c("img",{class:"w-12 hover:scale-95 duration-150",title:"LoLLMS WebUI",src:t.$store.state.config==null?r.storeLogo:t.$store.state.config.app_custom_logo!=""?"/user_infos/"+t.$store.state.config.app_custom_logo:r.storeLogo,alt:"Logo"},null,8,wxt),Rxt]),Axt,Nxt,Oxt])])}const CO=bt(Sxt,[["render",Ixt]]);var Mxt=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),ru=globalThis&&globalThis.__assign||function(){return ru=Object.assign||function(t){for(var e,n=1,i=arguments.length;n"u")return!1;var e=ai(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Yxt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},s=e.attributes[n]||{},r=e.elements[n];!xi(r)||!us(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function $xt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],r=e.attributes[i]||{},o=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),a=o.reduce(function(l,u){return l[u]="",l},{});!xi(s)||!us(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const Wxt={name:"applyStyles",enabled:!0,phase:"write",fn:Yxt,effect:$xt,requires:["computeStyles"]};function as(t){return t.split("-")[0]}var lo=Math.max,cu=Math.min,va=Math.round;function tb(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function MO(){return!/^((?!chrome|android).)*safari/i.test(tb())}function Sa(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),s=1,r=1;e&&xi(t)&&(s=t.offsetWidth>0&&va(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&va(i.height)/t.offsetHeight||1);var o=go(t)?ai(t):window,a=o.visualViewport,l=!MO()&&n,u=(i.left+(l&&a?a.offsetLeft:0))/s,d=(i.top+(l&&a?a.offsetTop:0))/r,h=i.width/s,f=i.height/r;return{width:h,height:f,top:d,right:u+h,bottom:d+f,left:u,x:u,y:d}}function PE(t){var e=Sa(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function DO(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&LE(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function qs(t){return ai(t).getComputedStyle(t)}function Kxt(t){return["table","td","th"].indexOf(us(t))>=0}function Dr(t){return((go(t)?t.ownerDocument:t.document)||window.document).documentElement}function lp(t){return us(t)==="html"?t:t.assignedSlot||t.parentNode||(LE(t)?t.host:null)||Dr(t)}function kC(t){return!xi(t)||qs(t).position==="fixed"?null:t.offsetParent}function jxt(t){var e=/firefox/i.test(tb()),n=/Trident/i.test(tb());if(n&&xi(t)){var i=qs(t);if(i.position==="fixed")return null}var s=lp(t);for(LE(s)&&(s=s.host);xi(s)&&["html","body"].indexOf(us(s))<0;){var r=qs(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Sc(t){for(var e=ai(t),n=kC(t);n&&Kxt(n)&&qs(n).position==="static";)n=kC(n);return n&&(us(n)==="html"||us(n)==="body"&&qs(n).position==="static")?e:n||jxt(t)||e}function UE(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ll(t,e,n){return lo(t,cu(e,n))}function Qxt(t,e,n){var i=Ll(t,e,n);return i>n?n:i}function kO(){return{top:0,right:0,bottom:0,left:0}}function LO(t){return Object.assign({},kO(),t)}function PO(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var Xxt=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,LO(typeof e!="number"?e:PO(e,vc))};function Zxt(t){var e,n=t.state,i=t.name,s=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=as(n.placement),l=UE(a),u=[Xn,Ai].indexOf(a)>=0,d=u?"height":"width";if(!(!r||!o)){var h=Xxt(s.padding,n),f=PE(r),_=l==="y"?Qn:Xn,m=l==="y"?Ri:Ai,E=n.rects.reference[d]+n.rects.reference[l]-o[l]-n.rects.popper[d],b=o[l]-n.rects.reference[l],g=Sc(r),y=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,v=E/2-b/2,T=h[_],C=y-f[d]-h[m],x=y/2-f[d]/2+v,O=Ll(T,x,C),w=l;n.modifiersData[i]=(e={},e[w]=O,e.centerOffset=O-x,e)}}function Jxt(t){var e=t.state,n=t.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||DO(e.elements.popper,s)&&(e.elements.arrow=s))}const eCt={name:"arrow",enabled:!0,phase:"main",fn:Zxt,effect:Jxt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ta(t){return t.split("-")[1]}var tCt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nCt(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:va(n*s)/s||0,y:va(i*s)/s||0}}function LC(t){var e,n=t.popper,i=t.popperRect,s=t.placement,r=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,d=t.roundOffsets,h=t.isFixed,f=o.x,_=f===void 0?0:f,m=o.y,E=m===void 0?0:m,b=typeof d=="function"?d({x:_,y:E}):{x:_,y:E};_=b.x,E=b.y;var g=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=Xn,T=Qn,C=window;if(u){var x=Sc(n),O="clientHeight",w="clientWidth";if(x===ai(n)&&(x=Dr(n),qs(x).position!=="static"&&a==="absolute"&&(O="scrollHeight",w="scrollWidth")),x=x,s===Qn||(s===Xn||s===Ai)&&r===sc){T=Ri;var S=h&&x===C&&C.visualViewport?C.visualViewport.height:x[O];E-=S-i.height,E*=l?1:-1}if(s===Xn||(s===Qn||s===Ri)&&r===sc){v=Ai;var R=h&&x===C&&C.visualViewport?C.visualViewport.width:x[w];_-=R-i.width,_*=l?1:-1}}var U=Object.assign({position:a},u&&tCt),F=d===!0?nCt({x:_,y:E},ai(n)):{x:_,y:E};if(_=F.x,E=F.y,l){var Q;return Object.assign({},U,(Q={},Q[T]=y?"0":"",Q[v]=g?"0":"",Q.transform=(C.devicePixelRatio||1)<=1?"translate("+_+"px, "+E+"px)":"translate3d("+_+"px, "+E+"px, 0)",Q))}return Object.assign({},U,(e={},e[T]=y?E+"px":"",e[v]=g?_+"px":"",e.transform="",e))}function iCt(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=i===void 0?!0:i,r=n.adaptive,o=r===void 0?!0:r,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:as(e.placement),variation:Ta(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,LC(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,LC(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const sCt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:iCt,data:{}};var $c={passive:!0};function rCt(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=ai(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&u.forEach(function(d){d.addEventListener("scroll",n.update,$c)}),a&&l.addEventListener("resize",n.update,$c),function(){r&&u.forEach(function(d){d.removeEventListener("scroll",n.update,$c)}),a&&l.removeEventListener("resize",n.update,$c)}}const oCt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:rCt,data:{}};var aCt={left:"right",right:"left",bottom:"top",top:"bottom"};function Gd(t){return t.replace(/left|right|bottom|top/g,function(e){return aCt[e]})}var lCt={start:"end",end:"start"};function PC(t){return t.replace(/start|end/g,function(e){return lCt[e]})}function FE(t){var e=ai(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function BE(t){return Sa(Dr(t)).left+FE(t).scrollLeft}function cCt(t,e){var n=ai(t),i=Dr(t),s=n.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var u=MO();(u||!u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+BE(t),y:l}}function dCt(t){var e,n=Dr(t),i=FE(t),s=(e=t.ownerDocument)==null?void 0:e.body,r=lo(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=lo(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+BE(t),l=-i.scrollTop;return qs(s||n).direction==="rtl"&&(a+=lo(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function GE(t){var e=qs(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function UO(t){return["html","body","#document"].indexOf(us(t))>=0?t.ownerDocument.body:xi(t)&&GE(t)?t:UO(lp(t))}function Pl(t,e){var n;e===void 0&&(e=[]);var i=UO(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=ai(i),o=s?[r].concat(r.visualViewport||[],GE(i)?i:[]):i,a=e.concat(o);return s?a:a.concat(Pl(lp(o)))}function nb(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function uCt(t,e){var n=Sa(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function UC(t,e,n){return e===OO?nb(cCt(t,n)):go(e)?uCt(e,n):nb(dCt(Dr(t)))}function pCt(t){var e=Pl(lp(t)),n=["absolute","fixed"].indexOf(qs(t).position)>=0,i=n&&xi(t)?Sc(t):t;return go(i)?e.filter(function(s){return go(s)&&DO(s,i)&&us(s)!=="body"}):[]}function _Ct(t,e,n,i){var s=e==="clippingParents"?pCt(t):[].concat(e),r=[].concat(s,[n]),o=r[0],a=r.reduce(function(l,u){var d=UC(t,u,i);return l.top=lo(d.top,l.top),l.right=cu(d.right,l.right),l.bottom=cu(d.bottom,l.bottom),l.left=lo(d.left,l.left),l},UC(t,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function FO(t){var e=t.reference,n=t.element,i=t.placement,s=i?as(i):null,r=i?Ta(i):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case Qn:l={x:o,y:e.y-n.height};break;case Ri:l={x:o,y:e.y+e.height};break;case Ai:l={x:e.x+e.width,y:a};break;case Xn:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=s?UE(s):null;if(u!=null){var d=u==="y"?"height":"width";switch(r){case ya:l[u]=l[u]-(e[d]/2-n[d]/2);break;case sc:l[u]=l[u]+(e[d]/2-n[d]/2);break}}return l}function rc(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=i===void 0?t.placement:i,r=n.strategy,o=r===void 0?t.strategy:r,a=n.boundary,l=a===void 0?Dxt:a,u=n.rootBoundary,d=u===void 0?OO:u,h=n.elementContext,f=h===void 0?fl:h,_=n.altBoundary,m=_===void 0?!1:_,E=n.padding,b=E===void 0?0:E,g=LO(typeof b!="number"?b:PO(b,vc)),y=f===fl?kxt:fl,v=t.rects.popper,T=t.elements[m?y:f],C=_Ct(go(T)?T:T.contextElement||Dr(t.elements.popper),l,d,o),x=Sa(t.elements.reference),O=FO({reference:x,element:v,strategy:"absolute",placement:s}),w=nb(Object.assign({},v,O)),S=f===fl?w:x,R={top:C.top-S.top+g.top,bottom:S.bottom-C.bottom+g.bottom,left:C.left-S.left+g.left,right:S.right-C.right+g.right},U=t.modifiersData.offset;if(f===fl&&U){var F=U[s];Object.keys(R).forEach(function(Q){var L=[Ai,Ri].indexOf(Q)>=0?1:-1,Y=[Qn,Ri].indexOf(Q)>=0?"y":"x";R[Q]+=F[Y]*L})}return R}function hCt(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?IO:l,d=Ta(i),h=d?a?DC:DC.filter(function(m){return Ta(m)===d}):vc,f=h.filter(function(m){return u.indexOf(m)>=0});f.length===0&&(f=h);var _=f.reduce(function(m,E){return m[E]=rc(t,{placement:E,boundary:s,rootBoundary:r,padding:o})[as(E)],m},{});return Object.keys(_).sort(function(m,E){return _[m]-_[E]})}function fCt(t){if(as(t)===kE)return[];var e=Gd(t);return[PC(t),e,PC(e)]}function mCt(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,u=n.padding,d=n.boundary,h=n.rootBoundary,f=n.altBoundary,_=n.flipVariations,m=_===void 0?!0:_,E=n.allowedAutoPlacements,b=e.options.placement,g=as(b),y=g===b,v=l||(y||!m?[Gd(b)]:fCt(b)),T=[b].concat(v).reduce(function(fe,ye){return fe.concat(as(ye)===kE?hCt(e,{placement:ye,boundary:d,rootBoundary:h,padding:u,flipVariations:m,allowedAutoPlacements:E}):ye)},[]),C=e.rects.reference,x=e.rects.popper,O=new Map,w=!0,S=T[0],R=0;R=0,Y=L?"width":"height",V=rc(e,{placement:U,boundary:d,rootBoundary:h,altBoundary:f,padding:u}),P=L?Q?Ai:Xn:Q?Ri:Qn;C[Y]>x[Y]&&(P=Gd(P));var X=Gd(P),W=[];if(r&&W.push(V[F]<=0),a&&W.push(V[P]<=0,V[X]<=0),W.every(function(fe){return fe})){S=U,w=!1;break}O.set(U,W)}if(w)for(var Z=m?3:1,ae=function(ye){var Ne=T.find(function(te){var me=O.get(te);if(me)return me.slice(0,ye).every(function(ne){return ne})});if(Ne)return S=Ne,"break"},ie=Z;ie>0;ie--){var ee=ae(ie);if(ee==="break")break}e.placement!==S&&(e.modifiersData[i]._skip=!0,e.placement=S,e.reset=!0)}}const gCt={name:"flip",enabled:!0,phase:"main",fn:mCt,requiresIfExists:["offset"],data:{_skip:!1}};function FC(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function BC(t){return[Qn,Ai,Ri,Xn].some(function(e){return t[e]>=0})}function bCt(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=rc(e,{elementContext:"reference"}),a=rc(e,{altBoundary:!0}),l=FC(o,i),u=FC(a,s,r),d=BC(l),h=BC(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const ECt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:bCt};function yCt(t,e,n){var i=as(t),s=[Xn,Qn].indexOf(i)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[Xn,Ai].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function vCt(t){var e=t.state,n=t.options,i=t.name,s=n.offset,r=s===void 0?[0,0]:s,o=IO.reduce(function(d,h){return d[h]=yCt(h,e.rects,r),d},{}),a=o[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=o}const SCt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vCt};function TCt(t){var e=t.state,n=t.name;e.modifiersData[n]=FO({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const xCt={name:"popperOffsets",enabled:!0,phase:"read",fn:TCt,data:{}};function CCt(t){return t==="x"?"y":"x"}function wCt(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.padding,f=n.tether,_=f===void 0?!0:f,m=n.tetherOffset,E=m===void 0?0:m,b=rc(e,{boundary:l,rootBoundary:u,padding:h,altBoundary:d}),g=as(e.placement),y=Ta(e.placement),v=!y,T=UE(g),C=CCt(T),x=e.modifiersData.popperOffsets,O=e.rects.reference,w=e.rects.popper,S=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,R=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),U=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(x){if(r){var Q,L=T==="y"?Qn:Xn,Y=T==="y"?Ri:Ai,V=T==="y"?"height":"width",P=x[T],X=P+b[L],W=P-b[Y],Z=_?-w[V]/2:0,ae=y===ya?O[V]:w[V],ie=y===ya?-w[V]:-O[V],ee=e.elements.arrow,fe=_&&ee?PE(ee):{width:0,height:0},ye=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:kO(),Ne=ye[L],te=ye[Y],me=Ll(0,O[V],fe[V]),ne=v?O[V]/2-Z-me-Ne-R.mainAxis:ae-me-Ne-R.mainAxis,Se=v?-O[V]/2+Z+me+te+R.mainAxis:ie+me+te+R.mainAxis,De=e.elements.arrow&&Sc(e.elements.arrow),k=De?T==="y"?De.clientTop||0:De.clientLeft||0:0,G=(Q=U==null?void 0:U[T])!=null?Q:0,K=P+ne-G-k,de=P+Se-G,se=Ll(_?cu(X,K):X,P,_?lo(W,de):W);x[T]=se,F[T]=se-P}if(a){var we,Ie=T==="x"?Qn:Xn,q=T==="x"?Ri:Ai,_e=x[C],re=C==="y"?"height":"width",ce=_e+b[Ie],D=_e-b[q],I=[Qn,Xn].indexOf(g)!==-1,H=(we=U==null?void 0:U[C])!=null?we:0,he=I?ce:_e-O[re]-w[re]-H+R.altAxis,J=I?_e+O[re]+w[re]-H-R.altAxis:D,oe=_&&I?Qxt(he,_e,J):Ll(_?he:ce,_e,_?J:D);x[C]=oe,F[C]=oe-_e}e.modifiersData[i]=F}}const RCt={name:"preventOverflow",enabled:!0,phase:"main",fn:wCt,requiresIfExists:["offset"]};function ACt(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function NCt(t){return t===ai(t)||!xi(t)?FE(t):ACt(t)}function OCt(t){var e=t.getBoundingClientRect(),n=va(e.width)/t.offsetWidth||1,i=va(e.height)/t.offsetHeight||1;return n!==1||i!==1}function ICt(t,e,n){n===void 0&&(n=!1);var i=xi(e),s=xi(e)&&OCt(e),r=Dr(e),o=Sa(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((us(e)!=="body"||GE(r))&&(a=NCt(e)),xi(e)?(l=Sa(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=BE(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function MCt(t){var e=new Map,n=new Set,i=[];t.forEach(function(r){e.set(r.name,r)});function s(r){n.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),i.push(r)}return t.forEach(function(r){n.has(r.name)||s(r)}),i}function DCt(t){var e=MCt(t);return qxt.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function kCt(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function LCt(t){var e=t.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var GC={placement:"bottom",modifiers:[],strategy:"absolute"};function VC(){for(var t=arguments.length,e=new Array(t),n=0;n(Or("data-v-b8e854ae"),t=t(),Ir(),t),HCt={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center"},qCt={class:"flex flex-col text-center"},YCt={class:"flex flex-col text-center items-center"},$Ct={class:"flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"},WCt=Ft(()=>c("img",{class:"w-24 animate-bounce",title:"LoLLMS WebUI",src:Ti,alt:"Logo"},null,-1)),KCt={class:"flex flex-col items-start"},jCt={class:"text-2xl font-bold text-5xl drop-shadow-md align-middle"},QCt=Ft(()=>c("p",{class:"text-gray-400 text-base"},"One tool to rule them all",-1)),XCt=Ft(()=>c("p",{class:"text-gray-400 text-base"},"by ParisNeo",-1)),ZCt=Ft(()=>c("hr",{class:"mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"},null,-1)),JCt=Ft(()=>c("p",{class:"text-2xl mb-10 font-bold drop-shadow-md"},"Welcome",-1)),e1t={role:"status",class:"text-center w-full display: flex; flex-row align-items: center;"},t1t={class:"text-2xl animate-pulse mt-2"},n1t=Ft(()=>c("i",{"data-feather":"chevron-right"},null,-1)),i1t=[n1t],s1t=Ft(()=>c("i",{"data-feather":"chevron-left"},null,-1)),r1t=[s1t],o1t={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},a1t={class:"text-light-text-panel dark:text-dark-text-panel bg-bg-light-panel sticky z-10 top-0 dark:bg-bg-dark-tone shadow-md"},l1t={class:"flex-row p-4 flex items-center gap-3 flex-0"},c1t=Ft(()=>c("i",{"data-feather":"plus"},null,-1)),d1t=[c1t],u1t=Ft(()=>c("i",{"data-feather":"check-square"},null,-1)),p1t=[u1t],_1t={class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},h1t=Ft(()=>c("i",{"data-feather":"database"},null,-1)),f1t=[h1t],m1t=Ft(()=>c("i",{"data-feather":"log-in"},null,-1)),g1t=[m1t],b1t=Ft(()=>c("i",{"data-feather":"folder"},null,-1)),E1t=[b1t],y1t={key:1,class:"dropdown"},v1t=Ft(()=>c("i",{"data-feather":"search"},null,-1)),S1t=[v1t],T1t={key:2,class:"flex gap-3 flex-1 items-center duration-75"},x1t=Ft(()=>c("i",{"data-feather":"x"},null,-1)),C1t=[x1t],w1t=Ft(()=>c("i",{"data-feather":"check"},null,-1)),R1t=[w1t],A1t=Ft(()=>c("i",{"data-feather":"hard-drive"},null,-1)),N1t=[A1t],O1t=Ft(()=>c("i",{"data-feather":"check-circle"},null,-1)),I1t=[O1t],M1t=Ft(()=>c("i",{"data-feather":"x-octagon"},null,-1)),D1t=[M1t],k1t=Ft(()=>c("i",{"data-feather":"book"},null,-1)),L1t=[k1t],P1t={key:7,title:"Loading..",class:"flex flex-row flex-grow justify-end"},U1t=Ft(()=>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)),F1t=[U1t],B1t={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},G1t={class:"p-4 pt-2"},V1t={class:"relative"},z1t=Ft(()=>c("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[c("div",{class:"scale-75"},[c("i",{"data-feather":"search"})])],-1)),H1t={class:"absolute inset-y-0 right-0 flex items-center pr-3"},q1t=Ft(()=>c("i",{"data-feather":"x"},null,-1)),Y1t=[q1t],$1t={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},W1t={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},K1t={class:"flex flex-row flex-grow"},j1t={key:0},Q1t={class:"flex flex-row"},X1t={key:0,class:"flex gap-3"},Z1t=Ft(()=>c("i",{"data-feather":"trash"},null,-1)),J1t=[Z1t],ewt={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},twt=Ft(()=>c("i",{"data-feather":"check"},null,-1)),nwt=[twt],iwt=Ft(()=>c("i",{"data-feather":"x"},null,-1)),swt=[iwt],rwt={class:"flex gap-3"},owt=Ft(()=>c("i",{"data-feather":"codepen"},null,-1)),awt=[owt],lwt=Ft(()=>c("i",{"data-feather":"folder"},null,-1)),cwt=[lwt],dwt=Ft(()=>c("i",{"data-feather":"bookmark"},null,-1)),uwt=[dwt],pwt=Ft(()=>c("i",{"data-feather":"list"},null,-1)),_wt=[pwt],hwt={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},fwt={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},mwt=Ft(()=>c("p",{class:"px-3"},"No discussions are found",-1)),gwt=[mwt],bwt=Ft(()=>c("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),Ewt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},ywt={key:1,class:"relative flex flex-col flex-grow w-full"},vwt={class:"container pt-4 pb-50 mb-50 w-full"},Swt=Ft(()=>c("div",null,[c("br"),c("br"),c("br"),c("br"),c("br"),c("br"),c("br")],-1)),Twt=Ft(()=>c("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1)),xwt={key:0,class:"flex flex-row items-center justify-center h-10"},Cwt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},wwt={class:"text-2xl animate-pulse mt-2 text-light-text-panel dark:text-dark-text-panel"},Rwt={setup(){},data(){return{memory_icon:BCt,active_skills:GCt,inactive_skills:VCt,skillsRegistry:zCt,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CHUNK:0,MSG_TYPE_FULL:1,MSG_TYPE_FULL_INVISIBLE_TO_AI:2,MSG_TYPE_FULL_INVISIBLE_TO_USER:3,MSG_TYPE_EXCEPTION:4,MSG_TYPE_WARNING:5,MSG_TYPE_INFO:6,MSG_TYPE_STEP:7,MSG_TYPE_STEP_START:8,MSG_TYPE_STEP_PROGRESS:9,MSG_TYPE_STEP_END:10,MSG_TYPE_JSON_INFOS:11,MSG_TYPE_REF:12,MSG_TYPE_CODE:13,MSG_TYPE_UI:14,MSG_TYPE_NEW_MESSAGE:15,MSG_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,panelCollapsed:!1,isOpen:!1,discussion_id:0}},methods:{add_webpage(){console.log("addWebLink received"),this.$refs.web_url_input_box.showPanel()},addWebpage(){Ce.post("/add_webpage",{client_id:this.client_id,url:this.$refs.web_url_input_box.inputText},{headers:this.posts_headers}).then(t=>{t&&t.status&&(console.log("Done"),this.recoverFiles())})},show_progress(t){this.progress_visibility_val=!0},hide_progress(t){this.progress_visibility_val=!1},update_progress(t){console.log("Progress update"),this.progress_value=t.value},onSettingsBinding(){try{this.isLoading=!0,Ce.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(t.data&&Object.keys(t.data).length>0?this.$store.state.universalForm.showForm(t.data,"Binding settings - "+bindingEntry.binding.name,"Save changes","Cancel").then(e=>{try{Ce.post("/set_active_binding_settings",e).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+n,4,!1),this.isLoading=!1)})}catch(n){this.$store.state.toast.showToast(`Did not get binding settings responses. Endpoint error: `+n.message,4,!1),this.isLoading=!1}}):(this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(t){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},showDatabaseSelector(){this.database_selectorDialogVisible=!0},async ondatabase_selectorDialogSelected(t){console.log("Selected:",t)},onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=!1},async onvalidatedatabase_selectorChoice(t){if(this.database_selectorDialogVisible=!1,(await Ce.post("/select_database",{client_id:this.client_id,name:t},{headers:this.posts_headers})).status){console.log("Selected database"),this.$store.state.config=await Ce.get("/get_config"),console.log("new config loaded :",this.$store.state.config);let n=await Ce.get("/list_databases").data;console.log("New list of database: ",n),this.$store.state.databases=n,console.log("New list of database: ",this.$store.state.databases),location.reload()}},async addDiscussion2SkillsLibrary(){(await Ce.post("/add_discussion_to_skills_library",{client_id:this.client_id},{headers:this.posts_headers})).status&&console.log("done")},async toggleSkillsLib(){this.$store.state.config.activate_skills_lib=!this.$store.state.config.activate_skills_lib,await this.applyConfiguration()},async showSkillsLib(){this.$refs.skills_lib.showSkillsLibrary()},async applyConfiguration(){this.loading=!0;const t=await Ce.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config});this.loading=!1,t.data.status?this.$store.state.toast.showToast("Configuration changed successfully.",4,!0):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Ge(()=>{He.replace()})},save_configuration(){this.showConfirmation=!1,Ce.post("/save_settings",{}).then(t=>{if(t)return t.status?this.$store.state.toast.showToast("Settings saved!",4,!0):this.$store.state.messageBox.showMessage("Error: Couldn't save settings!"),t.data}).catch(t=>(console.log(t.message,"save_configuration"),this.$store.state.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},showToastMessage(t,e,n){console.log("sending",t),this.$store.state.toast.showToast(t,e,n)},togglePanel(){this.panelCollapsed=!this.panelCollapsed},toggleDropdown(){this.isOpen=!this.isOpen},importChatGPT(){},async api_get_req(t){try{const e=await Ce.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req");return}},async list_discussions(){try{const t=await Ce.get("/list_discussions");if(t)return this.createDiscussionList(t.data),t.data}catch(t){return console.log("Error: Could not list discussions",t.message),[]}},load_discussion(t,e){t&&(console.log("Loading discussion",t),this.loading=!0,this.discussionArr=[],this.setDiscussionLoading(t,this.loading),Ke.on("discussion",n=>{console.log("Discussion recovered"),this.loading=!1,this.setDiscussionLoading(t,this.loading),n&&(this.discussionArr=n.filter(i=>i.message_type==this.msgTypes.MSG_TYPE_CHUNK||i.message_type==this.msgTypes.MSG_TYPE_FULL||i.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI||i.message_type==this.msgTypes.MSG_TYPE_CODE||i.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS||i.message_type==this.msgTypes.MSG_TYPE_UI),console.log("this.discussionArr"),console.log(this.discussionArr),e&&e()),Ke.off("discussion")}),Ke.emit("load_discussion",{id:t}),console.log("here"))},recoverFiles(){console.log("Recovering files"),Ce.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.$refs.chatBox.filesList=t.data.files,this.$refs.chatBox.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.$refs.chatBox.filesList}`)})},new_discussion(t){try{this.loading=!0,Ke.on("discussion_created",e=>{Ke.off("discussion_created"),this.list_discussions().then(()=>{const n=this.list.findIndex(s=>s.id==e.id),i=this.list[n];this.selectDiscussion(i),this.load_discussion(e.id,()=>{this.loading=!1,this.recoverFiles(),Ge(()=>{const s=document.getElementById("dis-"+e.id);this.scrollToElement(s),console.log("Scrolling tp "+s)})})})}),console.log("new_discussion ",t),Ke.emit("new_discussion",{title:t})}catch(e){return console.log("Error: Could not create new discussion",e.message),{}}},async delete_discussion(t){try{t&&(this.loading=!0,this.setDiscussionLoading(t,this.loading),await Ce.post("/delete_discussion",{client_id:this.client_id,id:t},{headers:this.posts_headers}),this.loading=!1,this.setDiscussionLoading(t,this.loading))}catch(e){console.log("Error: Could not delete discussion",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async edit_title(t,e){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const n=await Ce.post("/edit_title",{client_id:this.client_id,id:t,title:e},{headers:this.posts_headers});if(this.loading=!1,this.setDiscussionLoading(t,this.loading),n.status==200){const i=this.list.findIndex(r=>r.id==t),s=this.list[i];s.title=e,this.tempList=this.list}}}catch(n){console.log("Error: Could not edit title",n.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async make_title(t){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const e=await Ce.post("/make_title",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(console.log("Making title:",e),this.loading=!1,this.setDiscussionLoading(t,this.loading),e.status==200){const n=this.list.findIndex(s=>s.id==t),i=this.list[n];i.title=e.data.title,this.tempList=this.list}}}catch(e){console.log("Error: Could not edit title",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async delete_message(t){try{console.log(typeof t),console.log(typeof this.client_id),console.log(t),console.log(this.client_id);const e=await Ce.post("/delete_message",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could delete message",e.message),{}}},async stop_gen(){try{if(this.discussionArr.length>0){const t=this.discussionArr[this.discussionArr.length-1];t.status_message="Generation canceled"}if(Ke.emit("cancel_generation"),res)return res.data}catch(t){return console.log("Error: Could not stop generating",t.message),{}}},async message_rank_up(t){try{const e=await Ce.post("/message_rank_up",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank up message",e.message),{}}},async message_rank_down(t){try{const e=await Ce.post("/message_rank_down",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank down message",e.message),{}}},async edit_message(t,e,n){try{console.log(typeof this.client_id),console.log(typeof t),console.log(typeof e),console.log(typeof{audio_url:n});const i=await Ce.post("/edit_message",{client_id:this.client_id,id:t,message:e,metadata:[{audio_url:n}]},{headers:this.posts_headers});if(i)return i.data}catch(i){return console.log("Error: Could not update message",i.message),{}}},async export_multiple_discussions(t,e){try{if(t.length>0){const n=await Ce.post("/export_multiple_discussions",{client_id:this.$store.state.client_id,discussion_ids:t,export_format:e},{headers:this.posts_headers});if(n)return n.data}}catch(n){return console.log("Error: Could not export multiple discussions",n.message),{}}},async import_multiple_discussions(t){try{if(t.length>0){console.log("sending import",t);const e=await Ce.post("/import_multiple_discussions",{client_id:this.$store.state.client_id,jArray:t},{headers:this.posts_headers});if(e)return console.log("import response",e.data),e.data}}catch(e){console.log("Error: Could not import multiple discussions",e.message);return}},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.filterTitle?this.list=this.tempList.filter(t=>t.title&&t.title.includes(this.filterTitle)):this.list=this.tempList,this.filterInProgress=!1},100))},async selectDiscussion(t){if(this.isGenerating){this.$store.state.toast.showToast("You are currently generating a text. Please wait for text generation to finish or stop it before trying to select another discussion",4,!1);return}t&&(this.currentDiscussion===void 0?(this.currentDiscussion=t,this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&((this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content),this.recoverFiles())})):this.currentDiscussion.id!=t.id&&(console.log("item",t),console.log("this.currentDiscussion",this.currentDiscussion),this.currentDiscussion=t,console.log("this.currentDiscussion",this.currentDiscussion),this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content),this.recoverFiles()})),Ge(()=>{const e=document.getElementById("dis-"+this.currentDiscussion.id);this.scrollToElementInContainer(e,"leftPanel");const n=document.getElementById("messages-list");this.scrollBottom(n)}))},scrollToElement(t){t?t.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):console.log("Error: scrollToElement")},scrollToElementInContainer(t,e){try{const n=t.offsetTop;document.getElementById(e).scrollTo({top:n,behavior:"smooth"})}catch{console.log("error")}},scrollBottom(t){t?t.scrollTo({top:t.scrollHeight,behavior:"smooth"}):console.log("Error: scrollBottom")},scrollTop(t){t?t.scrollTo({top:0,behavior:"smooth"}):console.log("Error: scrollTop")},createUserMsg(t){let e={content:t.message,id:t.id,rank:0,sender:t.user,created_at:t.created_at,steps:[],html_js_s:[],status_message:"Warming up"};this.discussionArr.push(e),Ge(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},updateLastUserMsg(t){const e=this.discussionArr.indexOf(i=>i.id=t.user_id),n={binding:t.binding,content:t.message,created_at:t.created_at,type:t.type,finished_generating_at:t.finished_generating_at,id:t.user_id,model:t.model,personality:t.personality,sender:t.user,steps:[]};e!==-1&&(this.discussionArr[e]=n)},socketIOConnected(){return console.log("socketIOConnected"),this.$store.state.isConnected=!0,this.$store.state.client_id=Ke.id,!0},socketIODisconnected(){return console.log("socketIOConnected"),this.currentDiscussion=null,this.$store.dispatch("refreshModels"),this.$store.state.isConnected=!1,!0},new_message(t){t.sender_type==this.SENDER_TYPES_AI&&(this.isGenerating=!0),console.log("Making a new message"),console.log("New message",t);let e={sender:t.sender,message_type:t.message_type,sender_type:t.sender_type,content:t.content,id:t.id,discussion_id:t.discussion_id,parent_id:t.parent_id,binding:t.binding,model:t.model,personality:t.personality,created_at:t.created_at,finished_generating_at:t.finished_generating_at,rank:0,ui:t.ui,steps:[],parameters:t.parameters,metadata:t.metadata,open:t.open};e.status_message="Warming up",console.log(e),this.discussionArr.push(e),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,t.message),console.log("infos",t)},async talk(t){this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await Ce.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(s=>s===t.full_path),i={client_id:this.$store.state.client_id,id:n};e=await Ce.post("/select_personality",i),console.log("Generating message from ",e.data.status),Ke.emit("generate_msg_from",{id:-1})}},createEmptyUserMessage(t){Ke.emit("create_empty_message",{type:0,message:t})},createEmptyAIMessage(){Ke.emit("create_empty_message",{type:1})},sendMsg(t,e){if(!t){this.$store.state.toast.showToast("Message contains no content!",4,!1);return}this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Ce.get("/get_generation_status",{}).then(n=>{if(n)if(n.data.status)console.log("Already generating");else{e=="internet"?Ke.emit("generate_msg_with_internet",{prompt:t}):Ke.emit("generate_msg",{prompt:t});let i=0;this.discussionArr.length>0&&(i=Number(this.discussionArr[this.discussionArr.length-1].id)+1);let s={message:t,id:i,rank:0,user:this.$store.state.config.user_name,created_at:new Date().toLocaleString(),sender:this.$store.state.config.user_name,message_type:this.msgTypes.MSG_TYPE_FULL,sender_type:this.senderTypes.SENDER_TYPES_USER,content:t,id:i,discussion_id:this.discussion_id,parent_id:i,binding:"",model:"",personality:"",created_at:new Date().toLocaleString(),finished_generating_at:new Date().toLocaleString(),rank:0,steps:[],parameters:null,metadata:[],ui:null};this.createUserMsg(s)}}).catch(n=>{console.log("Error: Could not get generation status",n)})},sendCmd(t){this.isGenerating=!0,Ke.emit("execute_command",{command:t,parameters:[]})},notify(t){self.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Ge(()=>{const e=document.getElementById("messages-list");this.scrollBottom(e)}),t.display_type==0?this.$store.state.toast.showToast(t.content,t.duration,t.notification_type):t.display_type==1?this.$store.state.messageBox.showMessage(t.content):t.display_type==2?(this.$store.state.messageBox.hideMessage(),this.$store.state.yesNoDialog.askQuestion(t.content,"Yes","No").then(e=>{Ke.emit("yesNoRes",{yesRes:e})})):t.display_type==3?this.$store.state.messageBox.showBlockingMessage(t.content):t.display_type==4&&this.$store.state.messageBox.hideMessage(),this.chime.play()},streamMessageContent(t){if(this.discussion_id=t.discussion_id,this.setDiscussionLoading(this.discussion_id,!0),this.currentDiscussion.id==this.discussion_id){const e=this.discussionArr.findIndex(i=>i.id==t.id),n=this.discussionArr[e];if(n&&(t.message_type==this.msgTypes.MSG_TYPE_FULL||t.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI))this.isGenerating=!0,n.content=t.content,n.created_at=t.created_at,n.started_generating_at=t.started_generating_at,n.nb_tokens=t.nb_tokens,n.finished_generating_at=t.finished_generating_at;else if(n&&t.message_type==this.msgTypes.MSG_TYPE_CHUNK)this.isGenerating=!0,n.content+=t.content,n.created_at=t.created_at,n.started_generating_at=t.started_generating_at,n.nb_tokens=t.nb_tokens,n.finished_generating_at=t.finished_generating_at;else if(t.message_type==this.msgTypes.MSG_TYPE_STEP)n.status_message=t.content,n.steps.push({message:t.content,done:!0,status:!0,type:"instantanious"});else if(t.message_type==this.msgTypes.MSG_TYPE_STEP_START)n.status_message=t.content,n.steps.push({message:t.content,done:!1,status:!0,type:"start_end"});else if(t.message_type==this.msgTypes.MSG_TYPE_STEP_END){console.log("received step end",t);try{n.steps.forEach(i=>{if(i.message===t.content){i.done=!0;try{console.log(t.parameters);const s=t.parameters;s!==void 0&&(i.status=s.status,console.log(s))}catch(s){console.error("Error parsing JSON:",s.message)}}})}catch{console.log("error")}}else t.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS?(console.log("JSON message"),console.log(t.metadata),n.metadata=t.metadata):t.message_type==this.msgTypes.MSG_TYPE_UI?(console.log("UI message"),n.ui=t.ui,console.log(n.ui)):t.message_type==this.msgTypes.MSG_TYPE_EXCEPTION&&this.$store.state.toast.showToast(t.content,5,!1)}this.$nextTick(()=>{He.replace()})},async changeTitleUsingUserMSG(t,e){const n=this.list.findIndex(s=>s.id==t),i=this.list[n];e&&(i.title=e,this.tempList=this.list,await this.edit_title(t,e))},async createNewDiscussion(){this.new_discussion(null)},loadLastUsedDiscussion(){console.log("Loading last discussion");const t=localStorage.getItem("selected_discussion");if(console.log("Last discussion id: ",t),t){const e=this.list.findIndex(i=>i.id==t),n=this.list[e];n&&this.selectDiscussion(n)}},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},async deleteDiscussion(t){await this.delete_discussion(t),this.currentDiscussion.id==t&&(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle()),this.list.splice(this.list.findIndex(e=>e.id==t),1),this.createDiscussionList(this.list)},async deleteDiscussionMulti(){const t=this.selectedDiscussions;for(let e=0;ei.id==n.id),1)}this.tempList=this.list,this.isCheckbox=!1,this.$store.state.toast.showToast("Removed ("+t.length+") items",4,!0),this.showConfirmation=!1,console.log("Multi delete done")},async deleteMessage(t){await this.delete_message(t).then(()=>{this.discussionArr.splice(this.discussionArr.findIndex(e=>e.id==t),1)}).catch(()=>{this.$store.state.toast.showToast("Could not remove message",4,!1),console.log("Error: Could not delete message")})},async openFolder(t){const e=JSON.stringify({client_id:this.$store.state.client_id,discussion_id:t.id});console.log(e),await Ce.post("/open_discussion_folder",e,{method:"POST",headers:{"Content-Type":"application/json"}})},async editTitle(t){const e=this.list.findIndex(i=>i.id==t.id),n=this.list[e];n.title=t.title,n.loading=!0,await this.edit_title(t.id,t.title),n.loading=!1},async makeTitle(t){this.list.findIndex(e=>e.id==t.id),await this.make_title(t.id)},checkUncheckDiscussion(t,e){const n=this.list.findIndex(s=>s.id==e),i=this.list[n];i.checkBoxValue=t.target.checked,this.tempList=this.list},selectAllDiscussions(){this.isSelectAll=!this.tempList.filter(t=>t.checkBoxValue==!1).length>0;for(let t=0;t({id:n.id,title:n.title,selected:!1,loading:!1,checkBoxValue:!1})).sort(function(n,i){return i.id-n.id});this.list=e,this.tempList=e}},setDiscussionLoading(t,e){try{const n=this.list.findIndex(s=>s.id==t),i=this.list[n];i.loading=e}catch{console.log("Error setting discussion loading")}},setPageTitle(t){if(t)if(t.id){const e=t.title?t.title==="untitled"?"New discussion":t.title:"New discussion";document.title="LoLLMS WebUI - "+e}else{const e=t||"Welcome";document.title="LoLLMS WebUI - "+e}else{const e=t||"Welcome";document.title="LoLLMS WebUI - "+e}},async rankUpMessage(t){await this.message_rank_up(t).then(e=>{const n=this.discussionArr[this.discussionArr.findIndex(i=>i.id==t)];n.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank up message",4,!1),console.log("Error: Could not rank up message")})},async rankDownMessage(t){await this.message_rank_down(t).then(e=>{const n=this.discussionArr[this.discussionArr.findIndex(i=>i.id==t)];n.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank down message",4,!1),console.log("Error: Could not rank down message")})},async updateMessage(t,e,n){await this.edit_message(t,e,n).then(()=>{const i=this.discussionArr[this.discussionArr.findIndex(s=>s.id==t)];i.content=e}).catch(()=>{this.$store.state.toast.showToast("Could not update message",4,!1),console.log("Error: Could not update message")})},resendMessage(t,e,n){Ge(()=>{He.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Ce.get("/get_generation_status",{}).then(i=>{i&&(i.data.status?(this.$store.state.toast.showToast("The server is busy. Wait",4,!1),console.log("Already generating")):Ke.emit("generate_msg_from",{prompt:e,id:t,msg_type:n}))}).catch(i=>{console.log("Error: Could not get generation status",i)})},continueMessage(t,e){Ge(()=>{He.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Ce.get("/get_generation_status",{}).then(n=>{n&&(n.data.status?console.log("Already generating"):Ke.emit("continue_generate_msg_from",{prompt:e,id:t}))}).catch(n=>{console.log("Error: Could not get generation status",n)})},stopGenerating(){this.stop_gen(),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),console.log("Stopped generating"),Ge(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},finalMsgEvent(t){let e=0;this.discussion_id=t.discussion_id,this.currentDiscussion.id==this.discussion_id&&(e=this.discussionArr.findIndex(i=>i.id==t.id),this.discussionArr[e].content=t.content,this.discussionArr[e].finished_generating_at=t.finished_generating_at),Ge(()=>{const i=document.getElementById("messages-list");this.scrollBottom(i),this.recoverFiles()}),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),this.chime.play(),e=this.discussionArr.findIndex(i=>i.id==t.id);const n=this.discussionArr[e];if(n.status_message="Done",console.log("final",t),this.$store.state.config.auto_speak&&this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode){e=this.discussionArr.findIndex(s=>s.id==t.id);let i=this.$refs["msg-"+t.id][0];console.log(i),i.speak()}},copyToClipBoard(t){let e="";if(t.message.content&&(e=t.message.content),this.$store.state.config.copy_to_clipboard_add_all_details){let n="";t.message.binding&&(n=`Binding: ${t.message.binding}`);let i="";t.message.personality&&(i=` Personality: ${t.message.personality}`);let s="";t.created_at_parsed&&(s=` @@ -211,15 +211,15 @@ ${e} ${l}`;navigator.clipboard.writeText(u)}else navigator.clipboard.writeText(e);this.$store.state.toast.showToast("Copied to clipboard successfully",4,!0),Ge(()=>{He.replace()})},closeToast(){this.showToast=!1},saveJSONtoFile(t,e){e=e||"data.json";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([JSON.stringify(t,null,2)],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},saveMarkdowntoFile(t,e){e=e||"data.md";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([t],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},parseJsonObj(t){try{return JSON.parse(t)}catch(e){return this.$store.state.toast.showToast(`Could not parse JSON. `+e.message,4,!1),null}},async parseJsonFile(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=s=>e(this.parseJsonObj(s.target.result)),i.onerror=s=>n(s),i.readAsText(t)})},async exportDiscussionsAsMarkdown(){const t=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){console.log("export",t);let e=new Date;const n=e.getFullYear(),i=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),u="discussions_export_"+(n+"."+i+"."+s+"."+r+o+a)+".md";this.loading=!0;const d=await this.export_multiple_discussions(t,"markdown");d?(this.saveMarkdowntoFile(d,u),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async exportDiscussions(){},async exportDiscussionsAsJson(){const t=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){console.log("export",t);let e=new Date;const n=e.getFullYear(),i=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),u="discussions_export_"+(n+"."+i+"."+s+"."+r+o+a)+".json";this.loading=!0;const d=await this.export_multiple_discussions(t,"json");d?(this.saveJSONtoFile(d,u),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async importDiscussionsBundle(t){},async importDiscussions(t){const e=await this.parseJsonFile(t.target.files[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1)},async getPersonalityAvatars(){for(;this.$store.state.personalities===null;)await new Promise(e=>setTimeout(e,100));let t=this.$store.state.personalities;this.personalityAvatars=t.map(e=>({name:e.name,avatar:e.avatar}))},getAvatar(t){if(t.toLowerCase().trim()==this.$store.state.config.user_name.toLowerCase().trim())return"user_infos/"+this.$store.state.config.user_avatar;const e=this.personalityAvatars.findIndex(i=>i.name===t),n=this.personalityAvatars[e];if(n)return console.log("Avatar",n.avatar),n.avatar},setFileListChat(t){try{this.$refs.chatBox.fileList=this.$refs.chatBox.fileList.concat(t)}catch(e){this.$store.state.toast.showToast(`Failed to set filelist in chatbox -`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(t){if(t.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){const e=(await Ce.get("/get_versionID")).data.versionId;for(this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{He.replace()}),Ke.on("disucssion_renamed",n=>{console.log("Received new title",n.discussion_id,n.title);const i=this.list.findIndex(r=>r.id==n.discussion_id),s=this.list[i];s.title=n.title}),Ke.onclose=n=>{console.log("WebSocket connection closed:",n.code,n.reason),this.socketIODisconnected()},Ke.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),Ke.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),Ke.disconnect()},Ke.on("connected",this.socketIOConnected),Ke.on("disconnected",this.socketIODisconnected),console.log("Added events"),console.log("Waiting to be ready");this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100));console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),Ke.on("show_progress",this.show_progress),Ke.on("hide_progress",this.hide_progress),Ke.on("update_progress",this.update_progress),Ke.on("notification",this.notify),Ke.on("new_message",this.new_message),Ke.on("update_message",this.streamMessageContent),Ke.on("close_message",this.finalMsgEvent),Ke.onopen=()=>{console.log("WebSocket connection established."),this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.isCreated=!0},async mounted(){Ke.on("refresh_files",()=>{this.recoverFiles()}),this.$nextTick(()=>{He.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Ge(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:AE,Message:TO,ChatBox:xO,WelcomeComponent:CO,ChoiceDialog:RE,ProgressBar:ic,InputBox:yO,SkillsLibraryViewer:vO},watch:{progress_visibility_val(t){console.log("progress_visibility changed")},filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){Ge(()=>{He.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){Ge(()=>{He.replace()})},isSearch(){Ge(()=>{He.replace()})}},computed:{...Ck({versionId:t=>t.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?" v"+this.$store.state.version:""}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(t){this.$store.state.isModelOk=t}},isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady:{get(){return this.$store.state.ready}},databases(){return this.$store.state.databases},client_id(){return Ke.id},isReady(){return console.log("verify ready",this.isCreated),this.isCreated},showPanel(){return this.$store.state.ready&&!this.panelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Ge(()=>{He.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},Owt=Object.assign(Nwt,{__name:"DiscussionsView",setup(t){return Ws(()=>{YO()}),Ce.defaults.baseURL="/",(e,n)=>(A(),M(We,null,[Re(cs,{name:"fade-and-fly"},{default:$e(()=>[e.isReady?$("",!0):(A(),M("div",YCt,[c("div",$Ct,[c("div",WCt,[c("div",KCt,[jCt,c("div",QCt,[c("p",XCt,"LoLLMS "+ge(e.version_info),1),ZCt,JCt])]),e1t,t1t,c("div",n1t,[Re(ic,{ref:"loading_progress",progress:e.loading_progress},null,8,["progress"]),c("p",i1t,ge(e.loading_infos)+" ...",1)])])])]))]),_:1}),e.isReady?(A(),M("button",{key:0,onClick:n[0]||(n[0]=(...i)=>e.togglePanel&&e.togglePanel(...i)),class:"absolute top-0 left-0 z-50 p-2 m-2 bg-white rounded-full shadow-md bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-primary-light dark:hover:bg-primary"},[z(c("div",null,r1t,512),[[Mt,e.panelCollapsed]]),z(c("div",null,a1t,512),[[Mt,!e.panelCollapsed]])])):$("",!0),Re(cs,{name:"slide-right"},{default:$e(()=>[e.showPanel?(A(),M("div",l1t,[c("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:n[28]||(n[28]=Te(i=>e.setDropZoneDiscussion(),["stop","prevent"]))},[c("div",c1t,[c("div",d1t,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[1]||(n[1]=i=>e.createNewDiscussion())},p1t),c("button",{class:qe(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:n[2]||(n[2]=i=>e.isCheckbox=!e.isCheckbox)},h1t,2),c("button",f1t,[c("i",{"data-feather":"trash-2",onClick:n[3]||(n[3]=Te(()=>{},["stop"]))})]),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:n[4]||(n[4]=Te(i=>e.database_selectorDialogVisible=!0,["stop"]))},g1t),c("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:n[5]||(n[5]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},null,544),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:n[6]||(n[6]=Te(i=>e.$refs.fileDialog.click(),["stop"]))},E1t),c("input",{type:"file",ref:"bundleLoadingDialog",style:{display:"none"},onChange:n[7]||(n[7]=(...i)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...i))},null,544),e.showSaveConfirmation?$("",!0):(A(),M("button",{key:0,title:"Import discussion bundle",onClick:n[8]||(n[8]=Te(i=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-2xl hover:text-secondary duration-75 active:scale-90"},v1t)),e.isOpen?(A(),M("div",S1t,[c("button",{onClick:n[9]||(n[9]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},"LOLLMS"),c("button",{onClick:n[10]||(n[10]=(...i)=>e.importChatGPT&&e.importChatGPT(...i))},"ChatGPT")])):$("",!0),c("button",{class:qe(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:n[11]||(n[11]=i=>e.isSearch=!e.isSearch)},x1t,2),e.showSaveConfirmation?(A(),M("div",C1t,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:n[12]||(n[12]=Te(i=>e.showSaveConfirmation=!1,["stop"]))},R1t),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:n[13]||(n[13]=Te(i=>e.save_configuration(),["stop"]))},N1t)])):$("",!0),e.loading?$("",!0):(A(),M("button",{key:3,type:"button",onClick:n[14]||(n[14]=Te((...i)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...i),["stop"])),title:"Add this discussion content to skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},I1t)),!e.loading&&e.$store.state.config.activate_skills_lib?(A(),M("button",{key:4,type:"button",onClick:n[15]||(n[15]=Te((...i)=>e.toggleSkillsLib&&e.toggleSkillsLib(...i),["stop"])),title:"Skills database is activated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},D1t)):$("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(A(),M("button",{key:5,type:"button",onClick:n[16]||(n[16]=Te((...i)=>e.toggleSkillsLib&&e.toggleSkillsLib(...i),["stop"])),title:"Skills database is deactivated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},L1t)):$("",!0),e.loading?$("",!0):(A(),M("button",{key:6,type:"button",onClick:n[17]||(n[17]=Te((...i)=>e.showSkillsLib&&e.showSkillsLib(...i),["stop"])),title:"Show Skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},U1t)),e.loading?(A(),M("div",F1t,G1t)):$("",!0)]),e.isSearch?(A(),M("div",V1t,[c("div",z1t,[c("div",H1t,[q1t,c("div",Y1t,[c("div",{class:qe(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[18]||(n[18]=i=>e.filterTitle="")},W1t,2)]),z(c("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":n[19]||(n[19]=i=>e.filterTitle=i),onInput:n[20]||(n[20]=i=>e.filterDiscussions())},null,544),[[Oe,e.filterTitle]])])])])):$("",!0),e.isCheckbox?(A(),M("hr",K1t)):$("",!0),e.isCheckbox?(A(),M("div",j1t,[c("div",Q1t,[e.selectedDiscussions.length>0?(A(),M("p",X1t,"Selected: "+ge(e.selectedDiscussions.length),1)):$("",!0)]),c("div",Z1t,[e.selectedDiscussions.length>0?(A(),M("div",J1t,[e.showConfirmation?$("",!0):(A(),M("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[21]||(n[21]=Te(i=>e.showConfirmation=!0,["stop"]))},twt)),e.showConfirmation?(A(),M("div",nwt,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[22]||(n[22]=Te((...i)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...i),["stop"]))},swt),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[23]||(n[23]=Te(i=>e.showConfirmation=!1,["stop"]))},owt)])):$("",!0)])):$("",!0),c("div",awt,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:n[24]||(n[24]=Te((...i)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...i),["stop"]))},cwt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[25]||(n[25]=Te((...i)=>e.exportDiscussions&&e.exportDiscussions(...i),["stop"]))},uwt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[26]||(n[26]=Te((...i)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...i),["stop"]))},_wt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[27]||(n[27]=Te((...i)=>e.selectAllDiscussions&&e.selectAllDiscussions(...i),["stop"]))},fwt)])])])):$("",!0)]),c("div",mwt,[c("div",{class:qe(["mx-4 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[c("div",{id:"dis-list",class:qe([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full"])},[e.list.length>0?(A(),xt(os,{key:0,name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(e.list,(i,s)=>(A(),xt(AE,{key:i.id,id:i.id,title:i.title,selected:e.currentDiscussion.id==i.id,loading:i.loading,isCheckbox:e.isCheckbox,checkBoxValue:i.checkBoxValue,onSelect:r=>e.selectDiscussion(i),onDelete:r=>e.deleteDiscussion(i.id),onOpenFolder:e.openFolder,onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onOpenFolder","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):$("",!0),e.list.length<1?(A(),M("div",gwt,Ewt)):$("",!0),ywt],2)],2)])],32),c("div",{class:"absolute h-15 bottom-0 left-0 w-full bg-bg-light-panel dark:bg-bg-dark-tone light-text-panel py-4 cursor-pointer text-light-text-panel dark:text-dark-text-panel hover:text-secondary",onClick:n[29]||(n[29]=(...i)=>e.showDatabaseSelector&&e.showDatabaseSelector(...i))},[c("p",vwt,ge(e.formatted_database_name.replace("_"," ")),1)])])):$("",!0)]),_:1}),e.isReady?(A(),M("div",Swt,[c("div",{id:"messages-list",class:qe(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",e.isDragOverChat?"pointer-events-none":""])},[c("div",Twt,[e.discussionArr.length>0?(A(),xt(os,{key:0,name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(e.discussionArr,(i,s)=>(A(),xt(TO,{key:i.id,message:i,id:"msg-"+i.id,ref_for:!0,ref:"msg-"+i.id,host:e.host,onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(i.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128))]),_:1})):$("",!0),e.currentDiscussion.id?$("",!0):(A(),xt(CO,{key:1})),xwt]),Cwt],2),e.currentDiscussion.id?(A(),M("div",wwt,[Re(xO,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):$("",!0)])):$("",!0),Re(RE,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"]),z(c("div",Rwt,[Re(ic,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),c("p",Awt,ge(e.loading_infos)+" ...",1)],512),[[Mt,e.progress_visibility]]),Re(yO,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:e.addWebpage,ref:"web_url_input_box"},null,8,["onOk"]),Re(vO,{ref:"skills_lib"},null,512)],64))}}),Iwt=bt(Owt,[["__scopeId","data-v-b8e854ae"]]);/** +`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(t){if(t.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){const e=(await Ce.get("/get_versionID")).data.versionId;for(this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{He.replace()}),Ke.on("disucssion_renamed",n=>{console.log("Received new title",n.discussion_id,n.title);const i=this.list.findIndex(r=>r.id==n.discussion_id),s=this.list[i];s.title=n.title}),Ke.onclose=n=>{console.log("WebSocket connection closed:",n.code,n.reason),this.socketIODisconnected()},Ke.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),Ke.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),Ke.disconnect()},Ke.on("connected",this.socketIOConnected),Ke.on("disconnected",this.socketIODisconnected),console.log("Added events"),console.log("Waiting to be ready");this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100));console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),Ke.on("show_progress",this.show_progress),Ke.on("hide_progress",this.hide_progress),Ke.on("update_progress",this.update_progress),Ke.on("notification",this.notify),Ke.on("new_message",this.new_message),Ke.on("update_message",this.streamMessageContent),Ke.on("close_message",this.finalMsgEvent),Ke.onopen=()=>{console.log("WebSocket connection established."),this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.isCreated=!0},async mounted(){Ke.on("refresh_files",()=>{this.recoverFiles()}),this.$nextTick(()=>{He.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Ge(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:AE,Message:TO,ChatBox:xO,WelcomeComponent:CO,ChoiceDialog:RE,ProgressBar:ic,InputBox:yO,SkillsLibraryViewer:vO},watch:{progress_visibility_val(t){console.log("progress_visibility changed")},filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){Ge(()=>{He.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){Ge(()=>{He.replace()})},isSearch(){Ge(()=>{He.replace()})}},computed:{...Ck({versionId:t=>t.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?" v"+this.$store.state.version:""}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(t){this.$store.state.isModelOk=t}},isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady:{get(){return this.$store.state.ready}},databases(){return this.$store.state.databases},client_id(){return Ke.id},isReady(){return console.log("verify ready",this.isCreated),this.isCreated},showPanel(){return this.$store.state.ready&&!this.panelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Ge(()=>{He.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},Awt=Object.assign(Rwt,{__name:"DiscussionsView",setup(t){return Ws(()=>{YO()}),Ce.defaults.baseURL="/",(e,n)=>(A(),M(We,null,[Re(cs,{name:"fade-and-fly"},{default:$e(()=>[e.isReady?$("",!0):(A(),M("div",HCt,[c("div",qCt,[c("div",YCt,[c("div",$Ct,[WCt,c("div",KCt,[c("p",jCt,"LoLLMS "+ge(e.version_info),1),QCt,XCt])]),ZCt,JCt,c("div",e1t,[Re(ic,{ref:"loading_progress",progress:e.loading_progress},null,8,["progress"]),c("p",t1t,ge(e.loading_infos)+" ...",1)])])])]))]),_:1}),e.isReady?(A(),M("button",{key:0,onClick:n[0]||(n[0]=(...i)=>e.togglePanel&&e.togglePanel(...i)),class:"absolute top-0 left-0 z-50 p-2 m-2 bg-white rounded-full shadow-md bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-primary-light dark:hover:bg-primary"},[z(c("div",null,i1t,512),[[Mt,e.panelCollapsed]]),z(c("div",null,r1t,512),[[Mt,!e.panelCollapsed]])])):$("",!0),Re(cs,{name:"slide-right"},{default:$e(()=>[e.showPanel?(A(),M("div",o1t,[c("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:n[28]||(n[28]=Te(i=>e.setDropZoneDiscussion(),["stop","prevent"]))},[c("div",a1t,[c("div",l1t,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[1]||(n[1]=i=>e.createNewDiscussion())},d1t),c("button",{class:qe(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:n[2]||(n[2]=i=>e.isCheckbox=!e.isCheckbox)},p1t,2),c("button",_1t,[c("i",{"data-feather":"trash-2",onClick:n[3]||(n[3]=Te(()=>{},["stop"]))})]),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:n[4]||(n[4]=Te(i=>e.database_selectorDialogVisible=!0,["stop"]))},f1t),c("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:n[5]||(n[5]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},null,544),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:n[6]||(n[6]=Te(i=>e.$refs.fileDialog.click(),["stop"]))},g1t),c("input",{type:"file",ref:"bundleLoadingDialog",style:{display:"none"},onChange:n[7]||(n[7]=(...i)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...i))},null,544),e.showSaveConfirmation?$("",!0):(A(),M("button",{key:0,title:"Import discussion bundle",onClick:n[8]||(n[8]=Te(i=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-2xl hover:text-secondary duration-75 active:scale-90"},E1t)),e.isOpen?(A(),M("div",y1t,[c("button",{onClick:n[9]||(n[9]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},"LOLLMS"),c("button",{onClick:n[10]||(n[10]=(...i)=>e.importChatGPT&&e.importChatGPT(...i))},"ChatGPT")])):$("",!0),c("button",{class:qe(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:n[11]||(n[11]=i=>e.isSearch=!e.isSearch)},S1t,2),e.showSaveConfirmation?(A(),M("div",T1t,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:n[12]||(n[12]=Te(i=>e.showSaveConfirmation=!1,["stop"]))},C1t),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:n[13]||(n[13]=Te(i=>e.save_configuration(),["stop"]))},R1t)])):$("",!0),e.loading?$("",!0):(A(),M("button",{key:3,type:"button",onClick:n[14]||(n[14]=Te((...i)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...i),["stop"])),title:"Add this discussion content to skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},N1t)),!e.loading&&e.$store.state.config.activate_skills_lib?(A(),M("button",{key:4,type:"button",onClick:n[15]||(n[15]=Te((...i)=>e.toggleSkillsLib&&e.toggleSkillsLib(...i),["stop"])),title:"Skills database is activated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},I1t)):$("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(A(),M("button",{key:5,type:"button",onClick:n[16]||(n[16]=Te((...i)=>e.toggleSkillsLib&&e.toggleSkillsLib(...i),["stop"])),title:"Skills database is deactivated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},D1t)):$("",!0),e.loading?$("",!0):(A(),M("button",{key:6,type:"button",onClick:n[17]||(n[17]=Te((...i)=>e.showSkillsLib&&e.showSkillsLib(...i),["stop"])),title:"Show Skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},L1t)),e.loading?(A(),M("div",P1t,F1t)):$("",!0)]),e.isSearch?(A(),M("div",B1t,[c("div",G1t,[c("div",V1t,[z1t,c("div",H1t,[c("div",{class:qe(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[18]||(n[18]=i=>e.filterTitle="")},Y1t,2)]),z(c("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":n[19]||(n[19]=i=>e.filterTitle=i),onInput:n[20]||(n[20]=i=>e.filterDiscussions())},null,544),[[Oe,e.filterTitle]])])])])):$("",!0),e.isCheckbox?(A(),M("hr",$1t)):$("",!0),e.isCheckbox?(A(),M("div",W1t,[c("div",K1t,[e.selectedDiscussions.length>0?(A(),M("p",j1t,"Selected: "+ge(e.selectedDiscussions.length),1)):$("",!0)]),c("div",Q1t,[e.selectedDiscussions.length>0?(A(),M("div",X1t,[e.showConfirmation?$("",!0):(A(),M("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[21]||(n[21]=Te(i=>e.showConfirmation=!0,["stop"]))},J1t)),e.showConfirmation?(A(),M("div",ewt,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[22]||(n[22]=Te((...i)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...i),["stop"]))},nwt),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[23]||(n[23]=Te(i=>e.showConfirmation=!1,["stop"]))},swt)])):$("",!0)])):$("",!0),c("div",rwt,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:n[24]||(n[24]=Te((...i)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...i),["stop"]))},awt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[25]||(n[25]=Te((...i)=>e.exportDiscussions&&e.exportDiscussions(...i),["stop"]))},cwt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[26]||(n[26]=Te((...i)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...i),["stop"]))},uwt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[27]||(n[27]=Te((...i)=>e.selectAllDiscussions&&e.selectAllDiscussions(...i),["stop"]))},_wt)])])])):$("",!0)]),c("div",hwt,[c("div",{class:qe(["mx-4 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[c("div",{id:"dis-list",class:qe([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full"])},[e.list.length>0?(A(),xt(os,{key:0,name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(e.list,(i,s)=>(A(),xt(AE,{key:i.id,id:i.id,title:i.title,selected:e.currentDiscussion.id==i.id,loading:i.loading,isCheckbox:e.isCheckbox,checkBoxValue:i.checkBoxValue,onSelect:r=>e.selectDiscussion(i),onDelete:r=>e.deleteDiscussion(i.id),onOpenFolder:e.openFolder,onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onOpenFolder","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):$("",!0),e.list.length<1?(A(),M("div",fwt,gwt)):$("",!0),bwt],2)],2)])],32),c("div",{class:"absolute h-15 bottom-0 left-0 w-full bg-bg-light-panel dark:bg-bg-dark-tone light-text-panel py-4 cursor-pointer text-light-text-panel dark:text-dark-text-panel hover:text-secondary",onClick:n[29]||(n[29]=(...i)=>e.showDatabaseSelector&&e.showDatabaseSelector(...i))},[c("p",Ewt,ge(e.formatted_database_name.replace("_"," ")),1)])])):$("",!0)]),_:1}),e.isReady?(A(),M("div",ywt,[c("div",{id:"messages-list",class:qe(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",e.isDragOverChat?"pointer-events-none":""])},[c("div",vwt,[e.discussionArr.length>0?(A(),xt(os,{key:0,name:"list"},{default:$e(()=>[(A(!0),M(We,null,ct(e.discussionArr,(i,s)=>(A(),xt(TO,{key:i.id,message:i,id:"msg-"+i.id,ref_for:!0,ref:"msg-"+i.id,host:e.host,onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(i.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128))]),_:1})):$("",!0),e.currentDiscussion.id?$("",!0):(A(),xt(CO,{key:1})),Swt]),Twt],2),e.currentDiscussion.id?(A(),M("div",xwt,[Re(xO,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):$("",!0)])):$("",!0),Re(RE,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"]),z(c("div",Cwt,[Re(ic,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),c("p",wwt,ge(e.loading_infos)+" ...",1)],512),[[Mt,e.progress_visibility]]),Re(yO,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:e.addWebpage,ref:"web_url_input_box"},null,8,["onOk"]),Re(vO,{ref:"skills_lib"},null,512)],64))}}),Nwt=bt(Awt,[["__scopeId","data-v-b8e854ae"]]);/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const jE="159",Mwt=0,HC=1,Dwt=2,$O=1,kwt=2,Ms=3,Ys=0,Zn=1,es=2,xr=0,la=1,qC=2,YC=3,$C=4,Lwt=5,eo=100,Pwt=101,Uwt=102,WC=103,KC=104,Fwt=200,Bwt=201,Gwt=202,Vwt=203,rb=204,ob=205,zwt=206,Hwt=207,qwt=208,Ywt=209,$wt=210,Wwt=211,Kwt=212,jwt=213,Qwt=214,Xwt=0,Zwt=1,Jwt=2,fu=3,eRt=4,tRt=5,nRt=6,iRt=7,QE=0,sRt=1,rRt=2,Cr=0,oRt=1,aRt=2,lRt=3,cRt=4,dRt=5,jC="attached",uRt="detached",WO=300,xa=301,Ca=302,ab=303,lb=304,cp=306,wa=1e3,mi=1001,mu=1002,yn=1003,cb=1004,Vd=1005,jn=1006,KO=1007,bo=1008,wr=1009,pRt=1010,_Rt=1011,XE=1012,jO=1013,yr=1014,Ps=1015,oc=1016,QO=1017,XO=1018,co=1020,hRt=1021,gi=1023,fRt=1024,mRt=1025,uo=1026,Ra=1027,gRt=1028,ZO=1029,bRt=1030,JO=1031,eI=1033,Um=33776,Fm=33777,Bm=33778,Gm=33779,QC=35840,XC=35841,ZC=35842,JC=35843,tI=36196,e1=37492,t1=37496,n1=37808,i1=37809,s1=37810,r1=37811,o1=37812,a1=37813,l1=37814,c1=37815,d1=37816,u1=37817,p1=37818,_1=37819,h1=37820,f1=37821,Vm=36492,m1=36494,g1=36495,ERt=36283,b1=36284,E1=36285,y1=36286,ac=2300,Aa=2301,zm=2302,v1=2400,S1=2401,T1=2402,yRt=2500,vRt=0,nI=1,db=2,iI=3e3,po=3001,SRt=3200,TRt=3201,ZE=0,xRt=1,bi="",on="srgb",On="srgb-linear",JE="display-p3",dp="display-p3-linear",gu="linear",Zt="srgb",bu="rec709",Eu="p3",Io=7680,x1=519,CRt=512,wRt=513,RRt=514,sI=515,ARt=516,NRt=517,ORt=518,IRt=519,ub=35044,C1="300 es",pb=1035,Us=2e3,yu=2001;class ja{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(n)===-1&&i[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const s=this._listeners[e];if(s!==void 0){const r=s.indexOf(n);r!==-1&&s.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const s=i.slice(0);for(let r=0,o=s.length;r>8&255]+Mn[t>>16&255]+Mn[t>>24&255]+"-"+Mn[e&255]+Mn[e>>8&255]+"-"+Mn[e>>16&15|64]+Mn[e>>24&255]+"-"+Mn[n&63|128]+Mn[n>>8&255]+"-"+Mn[n>>16&255]+Mn[n>>24&255]+Mn[i&255]+Mn[i>>8&255]+Mn[i>>16&255]+Mn[i>>24&255]).toLowerCase()}function Ln(t,e,n){return Math.max(e,Math.min(n,t))}function ey(t,e){return(t%e+e)%e}function MRt(t,e,n,i,s){return i+(t-e)*(s-i)/(n-e)}function DRt(t,e,n){return t!==e?(n-t)/(e-t):0}function Bl(t,e,n){return(1-n)*t+n*e}function kRt(t,e,n,i){return Bl(t,e,1-Math.exp(-n*i))}function LRt(t,e=1){return e-Math.abs(ey(t,e*2)-e)}function PRt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function URt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function FRt(t,e){return t+Math.floor(Math.random()*(e-t+1))}function BRt(t,e){return t+Math.random()*(e-t)}function GRt(t){return t*(.5-Math.random())}function VRt(t){t!==void 0&&(w1=t);let e=w1+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function zRt(t){return t*Fl}function HRt(t){return t*Na}function _b(t){return(t&t-1)===0&&t!==0}function qRt(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function vu(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function YRt(t,e,n,i,s){const r=Math.cos,o=Math.sin,a=r(n/2),l=o(n/2),u=r((e+i)/2),d=o((e+i)/2),h=r((e-i)/2),f=o((e-i)/2),_=r((i-e)/2),m=o((i-e)/2);switch(s){case"XYX":t.set(a*d,l*h,l*f,a*u);break;case"YZY":t.set(l*f,a*d,l*h,a*u);break;case"ZXZ":t.set(l*h,l*f,a*d,a*u);break;case"XZX":t.set(a*d,l*m,l*_,a*u);break;case"YXY":t.set(l*_,a*d,l*m,a*u);break;case"ZYZ":t.set(l*m,l*_,a*d,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function ts(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Ht(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const $Rt={DEG2RAD:Fl,RAD2DEG:Na,generateUUID:zi,clamp:Ln,euclideanModulo:ey,mapLinear:MRt,inverseLerp:DRt,lerp:Bl,damp:kRt,pingpong:LRt,smoothstep:PRt,smootherstep:URt,randInt:FRt,randFloat:BRt,randFloatSpread:GRt,seededRandom:VRt,degToRad:zRt,radToDeg:HRt,isPowerOfTwo:_b,ceilPowerOfTwo:qRt,floorPowerOfTwo:vu,setQuaternionFromProperEuler:YRt,normalize:Ht,denormalize:ts};class It{constructor(e=0,n=0){It.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,i=this.y,s=e.elements;return this.x=s[0]*n+s[3]*i+s[6],this.y=s[1]*n+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Ln(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y;return n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const i=Math.cos(n),s=Math.sin(n),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class wt{constructor(e,n,i,s,r,o,a,l,u){wt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,i,s,r,o,a,l,u)}set(e,n,i,s,r,o,a,l,u){const d=this.elements;return d[0]=e,d[1]=s,d[2]=a,d[3]=n,d[4]=r,d[5]=l,d[6]=i,d[7]=o,d[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(e,n,i){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,s=n.elements,r=this.elements,o=i[0],a=i[3],l=i[6],u=i[1],d=i[4],h=i[7],f=i[2],_=i[5],m=i[8],E=s[0],b=s[3],g=s[6],y=s[1],v=s[4],T=s[7],C=s[2],x=s[5],O=s[8];return r[0]=o*E+a*y+l*C,r[3]=o*b+a*v+l*x,r[6]=o*g+a*T+l*O,r[1]=u*E+d*y+h*C,r[4]=u*b+d*v+h*x,r[7]=u*g+d*T+h*O,r[2]=f*E+_*y+m*C,r[5]=f*b+_*v+m*x,r[8]=f*g+_*T+m*O,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8];return n*o*d-n*a*u-i*r*d+i*a*l+s*r*u-s*o*l}invert(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8],h=d*o-a*u,f=a*l-d*r,_=u*r-o*l,m=n*h+i*f+s*_;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const E=1/m;return e[0]=h*E,e[1]=(s*u-d*i)*E,e[2]=(a*i-s*o)*E,e[3]=f*E,e[4]=(d*n-s*l)*E,e[5]=(s*r-a*n)*E,e[6]=_*E,e[7]=(i*l-u*n)*E,e[8]=(o*n-i*r)*E,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,i,s,r,o,a){const l=Math.cos(r),u=Math.sin(r);return this.set(i*l,i*u,-i*(l*o+u*a)+o+e,-s*u,s*l,-s*(-u*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(Hm.makeScale(e,n)),this}rotate(e){return this.premultiply(Hm.makeRotation(-e)),this}translate(e,n){return this.premultiply(Hm.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,i=e.elements;for(let s=0;s<9;s++)if(n[s]!==i[s])return!1;return!0}fromArray(e,n=0){for(let i=0;i<9;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Hm=new wt;function rI(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function lc(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function WRt(){const t=lc("canvas");return t.style.display="block",t}const R1={};function Gl(t){t in R1||(R1[t]=!0,console.warn(t))}const A1=new wt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),N1=new wt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Zc={[On]:{transfer:gu,primaries:bu,toReference:t=>t,fromReference:t=>t},[on]:{transfer:Zt,primaries:bu,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[dp]:{transfer:gu,primaries:Eu,toReference:t=>t.applyMatrix3(N1),fromReference:t=>t.applyMatrix3(A1)},[JE]:{transfer:Zt,primaries:Eu,toReference:t=>t.convertSRGBToLinear().applyMatrix3(N1),fromReference:t=>t.applyMatrix3(A1).convertLinearToSRGB()}},KRt=new Set([On,dp]),Gt={enabled:!0,_workingColorSpace:On,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!KRt.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const i=Zc[e].toReference,s=Zc[n].fromReference;return s(i(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Zc[t].primaries},getTransfer:function(t){return t===bi?gu:Zc[t].transfer}};function ca(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function qm(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let Mo;class oI{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Mo===void 0&&(Mo=lc("canvas")),Mo.width=e.width,Mo.height=e.height;const i=Mo.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=Mo}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=lc("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o0&&(i.userData=this.userData),n||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==WO)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case wa:e.x=e.x-Math.floor(e.x);break;case mi:e.x=e.x<0?0:1;break;case mu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case wa:e.y=e.y-Math.floor(e.y);break;case mi:e.y=e.y<0?0:1;break;case mu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Gl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===on?po:iI}set encoding(e){Gl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===po?on:bi}}Nn.DEFAULT_IMAGE=null;Nn.DEFAULT_MAPPING=WO;Nn.DEFAULT_ANISOTROPY=1;class Wt{constructor(e=0,n=0,i=0,s=1){Wt.prototype.isVector4=!0,this.x=e,this.y=n,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,i,s){return this.x=e,this.y=n,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*n+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*n+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*n+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*n+o[7]*i+o[11]*s+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,i,s,r;const l=e.elements,u=l[0],d=l[4],h=l[8],f=l[1],_=l[5],m=l[9],E=l[2],b=l[6],g=l[10];if(Math.abs(d-f)<.01&&Math.abs(h-E)<.01&&Math.abs(m-b)<.01){if(Math.abs(d+f)<.1&&Math.abs(h+E)<.1&&Math.abs(m+b)<.1&&Math.abs(u+_+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const v=(u+1)/2,T=(_+1)/2,C=(g+1)/2,x=(d+f)/4,O=(h+E)/4,w=(m+b)/4;return v>T&&v>C?v<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(v),s=x/i,r=O/i):T>C?T<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(T),i=x/s,r=w/s):C<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(C),i=O/r,s=w/r),this.set(i,s,r,n),this}let y=Math.sqrt((b-m)*(b-m)+(h-E)*(h-E)+(f-d)*(f-d));return Math.abs(y)<.001&&(y=1),this.x=(b-m)/y,this.y=(h-E)/y,this.z=(f-d)/y,this.w=Math.acos((u+_+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this.w=e.w+(n.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class XRt extends ja{constructor(e=1,n=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Wt(0,0,e,n),this.scissorTest=!1,this.viewport=new Wt(0,0,e,n);const s={width:e,height:n,depth:1};i.encoding!==void 0&&(Gl("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===po?on:bi),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new Nn(s,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,n,i=1){(this.width!==e||this.height!==n||this.depth!==i)&&(this.width=e,this.height=n,this.depth=i,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new aI(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Eo extends XRt{constructor(e=1,n=1,i={}){super(e,n,i),this.isWebGLRenderTarget=!0}}class lI extends Nn{constructor(e=null,n=1,i=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:i,depth:s},this.magFilter=yn,this.minFilter=yn,this.wrapR=mi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ZRt extends Nn{constructor(e=null,n=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:i,depth:s},this.magFilter=yn,this.minFilter=yn,this.wrapR=mi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class kr{constructor(e=0,n=0,i=0,s=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=i,this._w=s}static slerpFlat(e,n,i,s,r,o,a){let l=i[s+0],u=i[s+1],d=i[s+2],h=i[s+3];const f=r[o+0],_=r[o+1],m=r[o+2],E=r[o+3];if(a===0){e[n+0]=l,e[n+1]=u,e[n+2]=d,e[n+3]=h;return}if(a===1){e[n+0]=f,e[n+1]=_,e[n+2]=m,e[n+3]=E;return}if(h!==E||l!==f||u!==_||d!==m){let b=1-a;const g=l*f+u*_+d*m+h*E,y=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){const C=Math.sqrt(v),x=Math.atan2(C,g*y);b=Math.sin(b*x)/C,a=Math.sin(a*x)/C}const T=a*y;if(l=l*b+f*T,u=u*b+_*T,d=d*b+m*T,h=h*b+E*T,b===1-a){const C=1/Math.sqrt(l*l+u*u+d*d+h*h);l*=C,u*=C,d*=C,h*=C}}e[n]=l,e[n+1]=u,e[n+2]=d,e[n+3]=h}static multiplyQuaternionsFlat(e,n,i,s,r,o){const a=i[s],l=i[s+1],u=i[s+2],d=i[s+3],h=r[o],f=r[o+1],_=r[o+2],m=r[o+3];return e[n]=a*m+d*h+l*_-u*f,e[n+1]=l*m+d*f+u*h-a*_,e[n+2]=u*m+d*_+a*f-l*h,e[n+3]=d*m-a*h-l*f-u*_,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,i,s){return this._x=e,this._y=n,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,u=a(i/2),d=a(s/2),h=a(r/2),f=l(i/2),_=l(s/2),m=l(r/2);switch(o){case"XYZ":this._x=f*d*h+u*_*m,this._y=u*_*h-f*d*m,this._z=u*d*m+f*_*h,this._w=u*d*h-f*_*m;break;case"YXZ":this._x=f*d*h+u*_*m,this._y=u*_*h-f*d*m,this._z=u*d*m-f*_*h,this._w=u*d*h+f*_*m;break;case"ZXY":this._x=f*d*h-u*_*m,this._y=u*_*h+f*d*m,this._z=u*d*m+f*_*h,this._w=u*d*h-f*_*m;break;case"ZYX":this._x=f*d*h-u*_*m,this._y=u*_*h+f*d*m,this._z=u*d*m-f*_*h,this._w=u*d*h+f*_*m;break;case"YZX":this._x=f*d*h+u*_*m,this._y=u*_*h+f*d*m,this._z=u*d*m-f*_*h,this._w=u*d*h-f*_*m;break;case"XZY":this._x=f*d*h-u*_*m,this._y=u*_*h-f*d*m,this._z=u*d*m+f*_*h,this._w=u*d*h+f*_*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const i=n/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,i=n[0],s=n[4],r=n[8],o=n[1],a=n[5],l=n[9],u=n[2],d=n[6],h=n[10],f=i+a+h;if(f>0){const _=.5/Math.sqrt(f+1);this._w=.25/_,this._x=(d-l)*_,this._y=(r-u)*_,this._z=(o-s)*_}else if(i>a&&i>h){const _=2*Math.sqrt(1+i-a-h);this._w=(d-l)/_,this._x=.25*_,this._y=(s+o)/_,this._z=(r+u)/_}else if(a>h){const _=2*Math.sqrt(1+a-i-h);this._w=(r-u)/_,this._x=(s+o)/_,this._y=.25*_,this._z=(l+d)/_}else{const _=2*Math.sqrt(1+h-i-a);this._w=(o-s)/_,this._x=(r+u)/_,this._y=(l+d)/_,this._z=.25*_}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ln(this.dot(e),-1,1)))}rotateTowards(e,n){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,n/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const i=e._x,s=e._y,r=e._z,o=e._w,a=n._x,l=n._y,u=n._z,d=n._w;return this._x=i*d+o*a+s*u-r*l,this._y=s*d+o*l+r*a-i*u,this._z=r*d+o*u+i*l-s*a,this._w=o*d-i*a-s*l-r*u,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const _=1-n;return this._w=_*o+n*this._w,this._x=_*i+n*this._x,this._y=_*s+n*this._y,this._z=_*r+n*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),d=Math.atan2(u,a),h=Math.sin((1-n)*d)/u,f=Math.sin(n*d)/u;return this._w=o*h+this._w*f,this._x=i*h+this._x*f,this._y=s*h+this._y*f,this._z=r*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=Math.random(),n=Math.sqrt(1-e),i=Math.sqrt(e),s=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(n*Math.cos(s),i*Math.sin(r),i*Math.cos(r),n*Math.sin(s))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class be{constructor(e=0,n=0,i=0){be.prototype.isVector3=!0,this.x=e,this.y=n,this.z=i}set(e,n,i){return i===void 0&&(i=this.z),this.x=e,this.y=n,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(O1.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(O1.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*n+r[3]*i+r[6]*s,this.y=r[1]*n+r[4]*i+r[7]*s,this.z=r[2]*n+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*n+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*n+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*n+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*n+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const n=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,u=2*(o*s-a*i),d=2*(a*n-r*s),h=2*(r*i-o*n);return this.x=n+l*u+o*h-a*d,this.y=i+l*d+a*u-r*h,this.z=s+l*h+r*d-o*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*n+r[4]*i+r[8]*s,this.y=r[1]*n+r[5]*i+r[9]*s,this.z=r[2]*n+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const i=e.x,s=e.y,r=e.z,o=n.x,a=n.y,l=n.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const i=e.dot(this)/n;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return $m.copy(this).projectOnVector(e),this.sub($m)}reflect(e){return this.sub($m.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Ln(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return n*n+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,i){const s=Math.sin(n)*e;return this.x=s*Math.sin(i),this.y=Math.cos(n)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,i){return this.x=e*Math.sin(n),this.y=i,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=i,this.z=s,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(n),this.y=i*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const $m=new be,O1=new kr;class Xs{constructor(e=new be(1/0,1/0,1/0),n=new be(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,i=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Ii),Ii.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,i;return e.normal.x>0?(n=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),n<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ml),ed.subVectors(this.max,ml),Do.subVectors(e.a,ml),ko.subVectors(e.b,ml),Lo.subVectors(e.c,ml),ir.subVectors(ko,Do),sr.subVectors(Lo,ko),Vr.subVectors(Do,Lo);let n=[0,-ir.z,ir.y,0,-sr.z,sr.y,0,-Vr.z,Vr.y,ir.z,0,-ir.x,sr.z,0,-sr.x,Vr.z,0,-Vr.x,-ir.y,ir.x,0,-sr.y,sr.x,0,-Vr.y,Vr.x,0];return!Wm(n,Do,ko,Lo,ed)||(n=[1,0,0,0,1,0,0,0,1],!Wm(n,Do,ko,Lo,ed))?!1:(td.crossVectors(ir,sr),n=[td.x,td.y,td.z],Wm(n,Do,ko,Lo,ed))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ii).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ii).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Cs[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Cs[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Cs[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Cs[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Cs[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Cs[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Cs[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Cs[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Cs),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Cs=[new be,new be,new be,new be,new be,new be,new be,new be],Ii=new be,Jc=new Xs,Do=new be,ko=new be,Lo=new be,ir=new be,sr=new be,Vr=new be,ml=new be,ed=new be,td=new be,zr=new be;function Wm(t,e,n,i,s){for(let r=0,o=t.length-3;r<=o;r+=3){zr.fromArray(t,r);const a=s.x*Math.abs(zr.x)+s.y*Math.abs(zr.y)+s.z*Math.abs(zr.z),l=e.dot(zr),u=n.dot(zr),d=i.dot(zr);if(Math.max(-Math.max(l,u,d),Math.min(l,u,d))>a)return!1}return!0}const JRt=new Xs,gl=new be,Km=new be;class fs{constructor(e=new be,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const i=this.center;n!==void 0?i.copy(n):JRt.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;gl.subVectors(e,this.center);const n=gl.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),s=(i-this.radius)*.5;this.center.addScaledVector(gl,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Km.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(gl.copy(e.center).add(Km)),this.expandByPoint(gl.copy(e.center).sub(Km))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ws=new be,jm=new be,nd=new be,rr=new be,Qm=new be,id=new be,Xm=new be;class up{constructor(e=new be,n=new be(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ws)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const i=n.dot(this.direction);return i<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=ws.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(ws.copy(this.origin).addScaledVector(this.direction,n),ws.distanceToSquared(e))}distanceSqToSegment(e,n,i,s){jm.copy(e).add(n).multiplyScalar(.5),nd.copy(n).sub(e).normalize(),rr.copy(this.origin).sub(jm);const r=e.distanceTo(n)*.5,o=-this.direction.dot(nd),a=rr.dot(this.direction),l=-rr.dot(nd),u=rr.lengthSq(),d=Math.abs(1-o*o);let h,f,_,m;if(d>0)if(h=o*l-a,f=o*a-l,m=r*d,h>=0)if(f>=-m)if(f<=m){const E=1/d;h*=E,f*=E,_=h*(h+o*f+2*a)+f*(o*h+f+2*l)+u}else f=r,h=Math.max(0,-(o*f+a)),_=-h*h+f*(f+2*l)+u;else f=-r,h=Math.max(0,-(o*f+a)),_=-h*h+f*(f+2*l)+u;else f<=-m?(h=Math.max(0,-(-o*r+a)),f=h>0?-r:Math.min(Math.max(-r,-l),r),_=-h*h+f*(f+2*l)+u):f<=m?(h=0,f=Math.min(Math.max(-r,-l),r),_=f*(f+2*l)+u):(h=Math.max(0,-(o*r+a)),f=h>0?r:Math.min(Math.max(-r,-l),r),_=-h*h+f*(f+2*l)+u);else f=o>0?-r:r,h=Math.max(0,-(o*f+a)),_=-h*h+f*(f+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,h),s&&s.copy(jm).addScaledVector(nd,f),_}intersectSphere(e,n){ws.subVectors(e.center,this.origin);const i=ws.dot(this.direction),s=ws.dot(ws)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/n;return i>=0?i:null}intersectPlane(e,n){const i=this.distanceToPlane(e);return i===null?null:this.at(i,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let i,s,r,o,a,l;const u=1/this.direction.x,d=1/this.direction.y,h=1/this.direction.z,f=this.origin;return u>=0?(i=(e.min.x-f.x)*u,s=(e.max.x-f.x)*u):(i=(e.max.x-f.x)*u,s=(e.min.x-f.x)*u),d>=0?(r=(e.min.y-f.y)*d,o=(e.max.y-f.y)*d):(r=(e.max.y-f.y)*d,o=(e.min.y-f.y)*d),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-f.z)*h,l=(e.max.z-f.z)*h):(a=(e.max.z-f.z)*h,l=(e.min.z-f.z)*h),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,n)}intersectsBox(e){return this.intersectBox(e,ws)!==null}intersectTriangle(e,n,i,s,r){Qm.subVectors(n,e),id.subVectors(i,e),Xm.crossVectors(Qm,id);let o=this.direction.dot(Xm),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;rr.subVectors(this.origin,e);const l=a*this.direction.dot(id.crossVectors(rr,id));if(l<0)return null;const u=a*this.direction.dot(Qm.cross(rr));if(u<0||l+u>o)return null;const d=-a*rr.dot(Xm);return d<0?null:this.at(d/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Rt{constructor(e,n,i,s,r,o,a,l,u,d,h,f,_,m,E,b){Rt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,i,s,r,o,a,l,u,d,h,f,_,m,E,b)}set(e,n,i,s,r,o,a,l,u,d,h,f,_,m,E,b){const g=this.elements;return g[0]=e,g[4]=n,g[8]=i,g[12]=s,g[1]=r,g[5]=o,g[9]=a,g[13]=l,g[2]=u,g[6]=d,g[10]=h,g[14]=f,g[3]=_,g[7]=m,g[11]=E,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Rt().fromArray(this.elements)}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(e){const n=this.elements,i=e.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,i){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,n,i){return this.set(e.x,n.x,i.x,0,e.y,n.y,i.y,0,e.z,n.z,i.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,i=e.elements,s=1/Po.setFromMatrixColumn(e,0).length(),r=1/Po.setFromMatrixColumn(e,1).length(),o=1/Po.setFromMatrixColumn(e,2).length();return n[0]=i[0]*s,n[1]=i[1]*s,n[2]=i[2]*s,n[3]=0,n[4]=i[4]*r,n[5]=i[5]*r,n[6]=i[6]*r,n[7]=0,n[8]=i[8]*o,n[9]=i[9]*o,n[10]=i[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),u=Math.sin(s),d=Math.cos(r),h=Math.sin(r);if(e.order==="XYZ"){const f=o*d,_=o*h,m=a*d,E=a*h;n[0]=l*d,n[4]=-l*h,n[8]=u,n[1]=_+m*u,n[5]=f-E*u,n[9]=-a*l,n[2]=E-f*u,n[6]=m+_*u,n[10]=o*l}else if(e.order==="YXZ"){const f=l*d,_=l*h,m=u*d,E=u*h;n[0]=f+E*a,n[4]=m*a-_,n[8]=o*u,n[1]=o*h,n[5]=o*d,n[9]=-a,n[2]=_*a-m,n[6]=E+f*a,n[10]=o*l}else if(e.order==="ZXY"){const f=l*d,_=l*h,m=u*d,E=u*h;n[0]=f-E*a,n[4]=-o*h,n[8]=m+_*a,n[1]=_+m*a,n[5]=o*d,n[9]=E-f*a,n[2]=-o*u,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const f=o*d,_=o*h,m=a*d,E=a*h;n[0]=l*d,n[4]=m*u-_,n[8]=f*u+E,n[1]=l*h,n[5]=E*u+f,n[9]=_*u-m,n[2]=-u,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const f=o*l,_=o*u,m=a*l,E=a*u;n[0]=l*d,n[4]=E-f*h,n[8]=m*h+_,n[1]=h,n[5]=o*d,n[9]=-a*d,n[2]=-u*d,n[6]=_*h+m,n[10]=f-E*h}else if(e.order==="XZY"){const f=o*l,_=o*u,m=a*l,E=a*u;n[0]=l*d,n[4]=-h,n[8]=u*d,n[1]=f*h+E,n[5]=o*d,n[9]=_*h-m,n[2]=m*h-_,n[6]=a*d,n[10]=E*h+f}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(eAt,e,tAt)}lookAt(e,n,i){const s=this.elements;return ii.subVectors(e,n),ii.lengthSq()===0&&(ii.z=1),ii.normalize(),or.crossVectors(i,ii),or.lengthSq()===0&&(Math.abs(i.z)===1?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),or.crossVectors(i,ii)),or.normalize(),sd.crossVectors(ii,or),s[0]=or.x,s[4]=sd.x,s[8]=ii.x,s[1]=or.y,s[5]=sd.y,s[9]=ii.y,s[2]=or.z,s[6]=sd.z,s[10]=ii.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,s=n.elements,r=this.elements,o=i[0],a=i[4],l=i[8],u=i[12],d=i[1],h=i[5],f=i[9],_=i[13],m=i[2],E=i[6],b=i[10],g=i[14],y=i[3],v=i[7],T=i[11],C=i[15],x=s[0],O=s[4],w=s[8],S=s[12],R=s[1],U=s[5],F=s[9],Q=s[13],L=s[2],Y=s[6],V=s[10],P=s[14],X=s[3],W=s[7],Z=s[11],ae=s[15];return r[0]=o*x+a*R+l*L+u*X,r[4]=o*O+a*U+l*Y+u*W,r[8]=o*w+a*F+l*V+u*Z,r[12]=o*S+a*Q+l*P+u*ae,r[1]=d*x+h*R+f*L+_*X,r[5]=d*O+h*U+f*Y+_*W,r[9]=d*w+h*F+f*V+_*Z,r[13]=d*S+h*Q+f*P+_*ae,r[2]=m*x+E*R+b*L+g*X,r[6]=m*O+E*U+b*Y+g*W,r[10]=m*w+E*F+b*V+g*Z,r[14]=m*S+E*Q+b*P+g*ae,r[3]=y*x+v*R+T*L+C*X,r[7]=y*O+v*U+T*Y+C*W,r[11]=y*w+v*F+T*V+C*Z,r[15]=y*S+v*Q+T*P+C*ae,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],u=e[13],d=e[2],h=e[6],f=e[10],_=e[14],m=e[3],E=e[7],b=e[11],g=e[15];return m*(+r*l*h-s*u*h-r*a*f+i*u*f+s*a*_-i*l*_)+E*(+n*l*_-n*u*f+r*o*f-s*o*_+s*u*d-r*l*d)+b*(+n*u*h-n*a*_-r*o*h+i*o*_+r*a*d-i*u*d)+g*(-s*a*d-n*l*h+n*a*f+s*o*h-i*o*f+i*l*d)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=n,s[14]=i),this}invert(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8],h=e[9],f=e[10],_=e[11],m=e[12],E=e[13],b=e[14],g=e[15],y=h*b*u-E*f*u+E*l*_-a*b*_-h*l*g+a*f*g,v=m*f*u-d*b*u-m*l*_+o*b*_+d*l*g-o*f*g,T=d*E*u-m*h*u+m*a*_-o*E*_-d*a*g+o*h*g,C=m*h*l-d*E*l-m*a*f+o*E*f+d*a*b-o*h*b,x=n*y+i*v+s*T+r*C;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const O=1/x;return e[0]=y*O,e[1]=(E*f*r-h*b*r-E*s*_+i*b*_+h*s*g-i*f*g)*O,e[2]=(a*b*r-E*l*r+E*s*u-i*b*u-a*s*g+i*l*g)*O,e[3]=(h*l*r-a*f*r-h*s*u+i*f*u+a*s*_-i*l*_)*O,e[4]=v*O,e[5]=(d*b*r-m*f*r+m*s*_-n*b*_-d*s*g+n*f*g)*O,e[6]=(m*l*r-o*b*r-m*s*u+n*b*u+o*s*g-n*l*g)*O,e[7]=(o*f*r-d*l*r+d*s*u-n*f*u-o*s*_+n*l*_)*O,e[8]=T*O,e[9]=(m*h*r-d*E*r-m*i*_+n*E*_+d*i*g-n*h*g)*O,e[10]=(o*E*r-m*a*r+m*i*u-n*E*u-o*i*g+n*a*g)*O,e[11]=(d*a*r-o*h*r-d*i*u+n*h*u+o*i*_-n*a*_)*O,e[12]=C*O,e[13]=(d*E*s-m*h*s+m*i*f-n*E*f-d*i*b+n*h*b)*O,e[14]=(m*a*s-o*E*s-m*i*l+n*E*l+o*i*b-n*a*b)*O,e[15]=(o*h*s-d*a*s+d*i*l-n*h*l-o*i*f+n*a*f)*O,this}scale(e){const n=this.elements,i=e.x,s=e.y,r=e.z;return n[0]*=i,n[4]*=s,n[8]*=r,n[1]*=i,n[5]*=s,n[9]*=r,n[2]*=i,n[6]*=s,n[10]*=r,n[3]*=i,n[7]*=s,n[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,i,s))}makeTranslation(e,n,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const i=Math.cos(n),s=Math.sin(n),r=1-i,o=e.x,a=e.y,l=e.z,u=r*o,d=r*a;return this.set(u*o+i,u*a-s*l,u*l+s*a,0,u*a+s*l,d*a+i,d*l-s*o,0,u*l-s*a,d*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,n,i){return this.set(e,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,n,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,n,s,1,0,0,0,0,1),this}compose(e,n,i){const s=this.elements,r=n._x,o=n._y,a=n._z,l=n._w,u=r+r,d=o+o,h=a+a,f=r*u,_=r*d,m=r*h,E=o*d,b=o*h,g=a*h,y=l*u,v=l*d,T=l*h,C=i.x,x=i.y,O=i.z;return s[0]=(1-(E+g))*C,s[1]=(_+T)*C,s[2]=(m-v)*C,s[3]=0,s[4]=(_-T)*x,s[5]=(1-(f+g))*x,s[6]=(b+y)*x,s[7]=0,s[8]=(m+v)*O,s[9]=(b-y)*O,s[10]=(1-(f+E))*O,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,n,i){const s=this.elements;let r=Po.set(s[0],s[1],s[2]).length();const o=Po.set(s[4],s[5],s[6]).length(),a=Po.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Mi.copy(this);const u=1/r,d=1/o,h=1/a;return Mi.elements[0]*=u,Mi.elements[1]*=u,Mi.elements[2]*=u,Mi.elements[4]*=d,Mi.elements[5]*=d,Mi.elements[6]*=d,Mi.elements[8]*=h,Mi.elements[9]*=h,Mi.elements[10]*=h,n.setFromRotationMatrix(Mi),i.x=r,i.y=o,i.z=a,this}makePerspective(e,n,i,s,r,o,a=Us){const l=this.elements,u=2*r/(n-e),d=2*r/(i-s),h=(n+e)/(n-e),f=(i+s)/(i-s);let _,m;if(a===Us)_=-(o+r)/(o-r),m=-2*o*r/(o-r);else if(a===yu)_=-o/(o-r),m=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=u,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=d,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=_,l[14]=m,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,i,s,r,o,a=Us){const l=this.elements,u=1/(n-e),d=1/(i-s),h=1/(o-r),f=(n+e)*u,_=(i+s)*d;let m,E;if(a===Us)m=(o+r)*h,E=-2*h;else if(a===yu)m=r*h,E=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-f,l[1]=0,l[5]=2*d,l[9]=0,l[13]=-_,l[2]=0,l[6]=0,l[10]=E,l[14]=-m,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,i=e.elements;for(let s=0;s<16;s++)if(n[s]!==i[s])return!1;return!0}fromArray(e,n=0){for(let i=0;i<16;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e[n+9]=i[9],e[n+10]=i[10],e[n+11]=i[11],e[n+12]=i[12],e[n+13]=i[13],e[n+14]=i[14],e[n+15]=i[15],e}}const Po=new be,Mi=new Rt,eAt=new be(0,0,0),tAt=new be(1,1,1),or=new be,sd=new be,ii=new be,I1=new Rt,M1=new kr;class pp{constructor(e=0,n=0,i=0,s=pp.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,i,s=this._order){return this._x=e,this._y=n,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],u=s[5],d=s[9],h=s[2],f=s[6],_=s[10];switch(n){case"XYZ":this._y=Math.asin(Ln(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,_),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Ln(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,_),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Ln(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,_),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-Ln(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,_),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(Ln(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,u),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,_));break;case"XZY":this._z=Math.asin(-Ln(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-d,_),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,i){return I1.makeRotationFromQuaternion(e),this.setFromRotationMatrix(I1,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return M1.setFromEuler(this),this.setFromQuaternion(M1,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}pp.DEFAULT_ORDER="XYZ";class cI{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let i=0;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),s.maxGeometryCount=this._maxGeometryCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),this.boundingBox!==null&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()}));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let u=0,d=l.length;u0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),d.length>0&&(i.images=d),h.length>0&&(i.shapes=h),f.length>0&&(i.skeletons=f),_.length>0&&(i.animations=_),m.length>0&&(i.nodes=m)}return i.object=s,i;function o(a){const l=[];for(const u in a){const d=a[u];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,n,i,s,r){Di.subVectors(s,n),As.subVectors(i,n),Zm.subVectors(e,n);const o=Di.dot(Di),a=Di.dot(As),l=Di.dot(Zm),u=As.dot(As),d=As.dot(Zm),h=o*u-a*a;if(h===0)return r.set(-2,-1,-1);const f=1/h,_=(u*l-a*d)*f,m=(o*d-a*l)*f;return r.set(1-_-m,m,_)}static containsPoint(e,n,i,s){return this.getBarycoord(e,n,i,s,Ns),Ns.x>=0&&Ns.y>=0&&Ns.x+Ns.y<=1}static getUV(e,n,i,s,r,o,a,l){return od===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),od=!0),this.getInterpolation(e,n,i,s,r,o,a,l)}static getInterpolation(e,n,i,s,r,o,a,l){return this.getBarycoord(e,n,i,s,Ns),l.setScalar(0),l.addScaledVector(r,Ns.x),l.addScaledVector(o,Ns.y),l.addScaledVector(a,Ns.z),l}static isFrontFacing(e,n,i,s){return Di.subVectors(i,n),As.subVectors(e,n),Di.cross(As).dot(s)<0}set(e,n,i){return this.a.copy(e),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(e,n,i,s){return this.a.copy(e[n]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,n,i,s){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Di.subVectors(this.c,this.b),As.subVectors(this.a,this.b),Di.cross(As).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ui.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Ui.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,i,s,r){return od===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),od=!0),Ui.getInterpolation(e,this.a,this.b,this.c,n,i,s,r)}getInterpolation(e,n,i,s,r){return Ui.getInterpolation(e,this.a,this.b,this.c,n,i,s,r)}containsPoint(e){return Ui.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ui.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const i=this.a,s=this.b,r=this.c;let o,a;Fo.subVectors(s,i),Bo.subVectors(r,i),Jm.subVectors(e,i);const l=Fo.dot(Jm),u=Bo.dot(Jm);if(l<=0&&u<=0)return n.copy(i);eg.subVectors(e,s);const d=Fo.dot(eg),h=Bo.dot(eg);if(d>=0&&h<=d)return n.copy(s);const f=l*h-d*u;if(f<=0&&l>=0&&d<=0)return o=l/(l-d),n.copy(i).addScaledVector(Fo,o);tg.subVectors(e,r);const _=Fo.dot(tg),m=Bo.dot(tg);if(m>=0&&_<=m)return n.copy(r);const E=_*u-l*m;if(E<=0&&u>=0&&m<=0)return a=u/(u-m),n.copy(i).addScaledVector(Bo,a);const b=d*m-_*h;if(b<=0&&h-d>=0&&_-m>=0)return U1.subVectors(r,s),a=(h-d)/(h-d+(_-m)),n.copy(s).addScaledVector(U1,a);const g=1/(b+E+f);return o=E*g,a=f*g,n.copy(i).addScaledVector(Fo,o).addScaledVector(Bo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const dI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ar={h:0,s:0,l:0},ad={h:0,s:0,l:0};function ng(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class gt{constructor(e,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,i)}set(e,n,i){if(n===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,n,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=on){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.toWorkingColorSpace(this,n),this}setRGB(e,n,i,s=Gt.workingColorSpace){return this.r=e,this.g=n,this.b=i,Gt.toWorkingColorSpace(this,s),this}setHSL(e,n,i,s=Gt.workingColorSpace){if(e=ey(e,1),n=Ln(n,0,1),i=Ln(i,0,1),n===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+n):i+n-i*n,o=2*i-r;this.r=ng(o,r,e+1/3),this.g=ng(o,r,e),this.b=ng(o,r,e-1/3)}return Gt.toWorkingColorSpace(this,s),this}setStyle(e,n=on){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,n);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,n);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=on){const i=dI[e.toLowerCase()];return i!==void 0?this.setHex(i,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ca(e.r),this.g=ca(e.g),this.b=ca(e.b),this}copyLinearToSRGB(e){return this.r=qm(e.r),this.g=qm(e.g),this.b=qm(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=on){return Gt.fromWorkingColorSpace(Dn.copy(this),e),Math.round(Ln(Dn.r*255,0,255))*65536+Math.round(Ln(Dn.g*255,0,255))*256+Math.round(Ln(Dn.b*255,0,255))}getHexString(e=on){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Gt.workingColorSpace){Gt.fromWorkingColorSpace(Dn.copy(this),n);const i=Dn.r,s=Dn.g,r=Dn.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,u;const d=(a+o)/2;if(a===o)l=0,u=0;else{const h=o-a;switch(u=d<=.5?h/(o+a):h/(2-o-a),o){case i:l=(s-r)/h+(s0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const i=e[n];if(i===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const s=this[n];if(s===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[n]=i}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==la&&(i.blending=this.blending),this.side!==Ys&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==rb&&(i.blendSrc=this.blendSrc),this.blendDst!==ob&&(i.blendDst=this.blendDst),this.blendEquation!==eo&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==fu&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==x1&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Io&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Io&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Io&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(n){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let i=null;if(n!==null){const s=n.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=n[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class vr extends Hi{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=QE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const dn=new be,ld=new It;class Yn{constructor(e,n,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=i,this.usage=ub,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ps,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,i){e*=this.itemSize,i*=n.itemSize;for(let s=0,r=this.itemSize;s0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const u=i[l];e.data.attributes[l]=u.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],d=[];for(let h=0,f=u.length;h0&&(s[l]=d,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(n));const s=e.attributes;for(const u in s){const d=s[u];this.setAttribute(u,d.clone(n))}const r=e.morphAttributes;for(const u in r){const d=[],h=r[u];for(let f=0,_=h.length;f<_;f++)d.push(h[f].clone(n));this.morphAttributes[u]=d}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let u=0,d=o.length;u0){const s=n[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(F1.copy(r).invert(),Hr.copy(e.ray).applyMatrix4(F1),!(i.boundingBox!==null&&Hr.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,Hr)))}_computeIntersections(e,n,i){let s;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,u=r.attributes.uv,d=r.attributes.uv1,h=r.attributes.normal,f=r.groups,_=r.drawRange;if(a!==null)if(Array.isArray(o))for(let m=0,E=f.length;mn.far?null:{distance:u,point:fd.clone(),object:t}}function md(t,e,n,i,s,r,o,a,l,u){t.getVertexPosition(a,Vo),t.getVertexPosition(l,zo),t.getVertexPosition(u,Ho);const d=cAt(t,e,n,i,Vo,zo,Ho,hd);if(d){s&&(ud.fromBufferAttribute(s,a),pd.fromBufferAttribute(s,l),_d.fromBufferAttribute(s,u),d.uv=Ui.getInterpolation(hd,Vo,zo,Ho,ud,pd,_d,new It)),r&&(ud.fromBufferAttribute(r,a),pd.fromBufferAttribute(r,l),_d.fromBufferAttribute(r,u),d.uv1=Ui.getInterpolation(hd,Vo,zo,Ho,ud,pd,_d,new It),d.uv2=d.uv1),o&&(G1.fromBufferAttribute(o,a),V1.fromBufferAttribute(o,l),z1.fromBufferAttribute(o,u),d.normal=Ui.getInterpolation(hd,Vo,zo,Ho,G1,V1,z1,new be),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c:u,normal:new be,materialIndex:0};Ui.getNormal(Vo,zo,Ho,h.normal),d.face=h}return d}class Rr extends ms{constructor(e=1,n=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],u=[],d=[],h=[];let f=0,_=0;m("z","y","x",-1,-1,i,n,e,o,r,0),m("z","y","x",1,-1,i,n,-e,o,r,1),m("x","z","y",1,1,e,i,n,s,o,2),m("x","z","y",1,-1,e,i,-n,s,o,3),m("x","y","z",1,-1,e,n,i,s,r,4),m("x","y","z",-1,-1,e,n,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new Bs(u,3)),this.setAttribute("normal",new Bs(d,3)),this.setAttribute("uv",new Bs(h,2));function m(E,b,g,y,v,T,C,x,O,w,S){const R=T/O,U=C/w,F=T/2,Q=C/2,L=x/2,Y=O+1,V=w+1;let P=0,X=0;const W=new be;for(let Z=0;Z0?1:-1,d.push(W.x,W.y,W.z),h.push(ie/O),h.push(1-Z/w),P+=1}}for(let Z=0;Z>8&255]+Mn[t>>16&255]+Mn[t>>24&255]+"-"+Mn[e&255]+Mn[e>>8&255]+"-"+Mn[e>>16&15|64]+Mn[e>>24&255]+"-"+Mn[n&63|128]+Mn[n>>8&255]+"-"+Mn[n>>16&255]+Mn[n>>24&255]+Mn[i&255]+Mn[i>>8&255]+Mn[i>>16&255]+Mn[i>>24&255]).toLowerCase()}function Ln(t,e,n){return Math.max(e,Math.min(n,t))}function ey(t,e){return(t%e+e)%e}function ORt(t,e,n,i,s){return i+(t-e)*(s-i)/(n-e)}function IRt(t,e,n){return t!==e?(n-t)/(e-t):0}function Bl(t,e,n){return(1-n)*t+n*e}function MRt(t,e,n,i){return Bl(t,e,1-Math.exp(-n*i))}function DRt(t,e=1){return e-Math.abs(ey(t,e*2)-e)}function kRt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function LRt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function PRt(t,e){return t+Math.floor(Math.random()*(e-t+1))}function URt(t,e){return t+Math.random()*(e-t)}function FRt(t){return t*(.5-Math.random())}function BRt(t){t!==void 0&&(w1=t);let e=w1+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function GRt(t){return t*Fl}function VRt(t){return t*Na}function _b(t){return(t&t-1)===0&&t!==0}function zRt(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function vu(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function HRt(t,e,n,i,s){const r=Math.cos,o=Math.sin,a=r(n/2),l=o(n/2),u=r((e+i)/2),d=o((e+i)/2),h=r((e-i)/2),f=o((e-i)/2),_=r((i-e)/2),m=o((i-e)/2);switch(s){case"XYX":t.set(a*d,l*h,l*f,a*u);break;case"YZY":t.set(l*f,a*d,l*h,a*u);break;case"ZXZ":t.set(l*h,l*f,a*d,a*u);break;case"XZX":t.set(a*d,l*m,l*_,a*u);break;case"YXY":t.set(l*_,a*d,l*m,a*u);break;case"ZYZ":t.set(l*m,l*_,a*d,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function ts(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Ht(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const qRt={DEG2RAD:Fl,RAD2DEG:Na,generateUUID:zi,clamp:Ln,euclideanModulo:ey,mapLinear:ORt,inverseLerp:IRt,lerp:Bl,damp:MRt,pingpong:DRt,smoothstep:kRt,smootherstep:LRt,randInt:PRt,randFloat:URt,randFloatSpread:FRt,seededRandom:BRt,degToRad:GRt,radToDeg:VRt,isPowerOfTwo:_b,ceilPowerOfTwo:zRt,floorPowerOfTwo:vu,setQuaternionFromProperEuler:HRt,normalize:Ht,denormalize:ts};class It{constructor(e=0,n=0){It.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,i=this.y,s=e.elements;return this.x=s[0]*n+s[3]*i+s[6],this.y=s[1]*n+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Ln(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y;return n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const i=Math.cos(n),s=Math.sin(n),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class wt{constructor(e,n,i,s,r,o,a,l,u){wt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,i,s,r,o,a,l,u)}set(e,n,i,s,r,o,a,l,u){const d=this.elements;return d[0]=e,d[1]=s,d[2]=a,d[3]=n,d[4]=r,d[5]=l,d[6]=i,d[7]=o,d[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(e,n,i){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,s=n.elements,r=this.elements,o=i[0],a=i[3],l=i[6],u=i[1],d=i[4],h=i[7],f=i[2],_=i[5],m=i[8],E=s[0],b=s[3],g=s[6],y=s[1],v=s[4],T=s[7],C=s[2],x=s[5],O=s[8];return r[0]=o*E+a*y+l*C,r[3]=o*b+a*v+l*x,r[6]=o*g+a*T+l*O,r[1]=u*E+d*y+h*C,r[4]=u*b+d*v+h*x,r[7]=u*g+d*T+h*O,r[2]=f*E+_*y+m*C,r[5]=f*b+_*v+m*x,r[8]=f*g+_*T+m*O,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8];return n*o*d-n*a*u-i*r*d+i*a*l+s*r*u-s*o*l}invert(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8],h=d*o-a*u,f=a*l-d*r,_=u*r-o*l,m=n*h+i*f+s*_;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const E=1/m;return e[0]=h*E,e[1]=(s*u-d*i)*E,e[2]=(a*i-s*o)*E,e[3]=f*E,e[4]=(d*n-s*l)*E,e[5]=(s*r-a*n)*E,e[6]=_*E,e[7]=(i*l-u*n)*E,e[8]=(o*n-i*r)*E,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,i,s,r,o,a){const l=Math.cos(r),u=Math.sin(r);return this.set(i*l,i*u,-i*(l*o+u*a)+o+e,-s*u,s*l,-s*(-u*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(Hm.makeScale(e,n)),this}rotate(e){return this.premultiply(Hm.makeRotation(-e)),this}translate(e,n){return this.premultiply(Hm.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,i=e.elements;for(let s=0;s<9;s++)if(n[s]!==i[s])return!1;return!0}fromArray(e,n=0){for(let i=0;i<9;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Hm=new wt;function rI(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function lc(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function YRt(){const t=lc("canvas");return t.style.display="block",t}const R1={};function Gl(t){t in R1||(R1[t]=!0,console.warn(t))}const A1=new wt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),N1=new wt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Zc={[On]:{transfer:gu,primaries:bu,toReference:t=>t,fromReference:t=>t},[on]:{transfer:Zt,primaries:bu,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[dp]:{transfer:gu,primaries:Eu,toReference:t=>t.applyMatrix3(N1),fromReference:t=>t.applyMatrix3(A1)},[JE]:{transfer:Zt,primaries:Eu,toReference:t=>t.convertSRGBToLinear().applyMatrix3(N1),fromReference:t=>t.applyMatrix3(A1).convertLinearToSRGB()}},$Rt=new Set([On,dp]),Gt={enabled:!0,_workingColorSpace:On,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!$Rt.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const i=Zc[e].toReference,s=Zc[n].fromReference;return s(i(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Zc[t].primaries},getTransfer:function(t){return t===bi?gu:Zc[t].transfer}};function ca(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function qm(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let Mo;class oI{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Mo===void 0&&(Mo=lc("canvas")),Mo.width=e.width,Mo.height=e.height;const i=Mo.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=Mo}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=lc("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o0&&(i.userData=this.userData),n||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==WO)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case wa:e.x=e.x-Math.floor(e.x);break;case mi:e.x=e.x<0?0:1;break;case mu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case wa:e.y=e.y-Math.floor(e.y);break;case mi:e.y=e.y<0?0:1;break;case mu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Gl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===on?po:iI}set encoding(e){Gl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===po?on:bi}}Nn.DEFAULT_IMAGE=null;Nn.DEFAULT_MAPPING=WO;Nn.DEFAULT_ANISOTROPY=1;class Wt{constructor(e=0,n=0,i=0,s=1){Wt.prototype.isVector4=!0,this.x=e,this.y=n,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,i,s){return this.x=e,this.y=n,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*n+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*n+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*n+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*n+o[7]*i+o[11]*s+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,i,s,r;const l=e.elements,u=l[0],d=l[4],h=l[8],f=l[1],_=l[5],m=l[9],E=l[2],b=l[6],g=l[10];if(Math.abs(d-f)<.01&&Math.abs(h-E)<.01&&Math.abs(m-b)<.01){if(Math.abs(d+f)<.1&&Math.abs(h+E)<.1&&Math.abs(m+b)<.1&&Math.abs(u+_+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const v=(u+1)/2,T=(_+1)/2,C=(g+1)/2,x=(d+f)/4,O=(h+E)/4,w=(m+b)/4;return v>T&&v>C?v<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(v),s=x/i,r=O/i):T>C?T<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(T),i=x/s,r=w/s):C<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(C),i=O/r,s=w/r),this.set(i,s,r,n),this}let y=Math.sqrt((b-m)*(b-m)+(h-E)*(h-E)+(f-d)*(f-d));return Math.abs(y)<.001&&(y=1),this.x=(b-m)/y,this.y=(h-E)/y,this.z=(f-d)/y,this.w=Math.acos((u+_+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this.w=e.w+(n.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class jRt extends ja{constructor(e=1,n=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Wt(0,0,e,n),this.scissorTest=!1,this.viewport=new Wt(0,0,e,n);const s={width:e,height:n,depth:1};i.encoding!==void 0&&(Gl("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===po?on:bi),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new Nn(s,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,n,i=1){(this.width!==e||this.height!==n||this.depth!==i)&&(this.width=e,this.height=n,this.depth=i,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new aI(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Eo extends jRt{constructor(e=1,n=1,i={}){super(e,n,i),this.isWebGLRenderTarget=!0}}class lI extends Nn{constructor(e=null,n=1,i=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:i,depth:s},this.magFilter=yn,this.minFilter=yn,this.wrapR=mi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class QRt extends Nn{constructor(e=null,n=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:i,depth:s},this.magFilter=yn,this.minFilter=yn,this.wrapR=mi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class kr{constructor(e=0,n=0,i=0,s=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=i,this._w=s}static slerpFlat(e,n,i,s,r,o,a){let l=i[s+0],u=i[s+1],d=i[s+2],h=i[s+3];const f=r[o+0],_=r[o+1],m=r[o+2],E=r[o+3];if(a===0){e[n+0]=l,e[n+1]=u,e[n+2]=d,e[n+3]=h;return}if(a===1){e[n+0]=f,e[n+1]=_,e[n+2]=m,e[n+3]=E;return}if(h!==E||l!==f||u!==_||d!==m){let b=1-a;const g=l*f+u*_+d*m+h*E,y=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){const C=Math.sqrt(v),x=Math.atan2(C,g*y);b=Math.sin(b*x)/C,a=Math.sin(a*x)/C}const T=a*y;if(l=l*b+f*T,u=u*b+_*T,d=d*b+m*T,h=h*b+E*T,b===1-a){const C=1/Math.sqrt(l*l+u*u+d*d+h*h);l*=C,u*=C,d*=C,h*=C}}e[n]=l,e[n+1]=u,e[n+2]=d,e[n+3]=h}static multiplyQuaternionsFlat(e,n,i,s,r,o){const a=i[s],l=i[s+1],u=i[s+2],d=i[s+3],h=r[o],f=r[o+1],_=r[o+2],m=r[o+3];return e[n]=a*m+d*h+l*_-u*f,e[n+1]=l*m+d*f+u*h-a*_,e[n+2]=u*m+d*_+a*f-l*h,e[n+3]=d*m-a*h-l*f-u*_,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,i,s){return this._x=e,this._y=n,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,u=a(i/2),d=a(s/2),h=a(r/2),f=l(i/2),_=l(s/2),m=l(r/2);switch(o){case"XYZ":this._x=f*d*h+u*_*m,this._y=u*_*h-f*d*m,this._z=u*d*m+f*_*h,this._w=u*d*h-f*_*m;break;case"YXZ":this._x=f*d*h+u*_*m,this._y=u*_*h-f*d*m,this._z=u*d*m-f*_*h,this._w=u*d*h+f*_*m;break;case"ZXY":this._x=f*d*h-u*_*m,this._y=u*_*h+f*d*m,this._z=u*d*m+f*_*h,this._w=u*d*h-f*_*m;break;case"ZYX":this._x=f*d*h-u*_*m,this._y=u*_*h+f*d*m,this._z=u*d*m-f*_*h,this._w=u*d*h+f*_*m;break;case"YZX":this._x=f*d*h+u*_*m,this._y=u*_*h+f*d*m,this._z=u*d*m-f*_*h,this._w=u*d*h-f*_*m;break;case"XZY":this._x=f*d*h-u*_*m,this._y=u*_*h-f*d*m,this._z=u*d*m+f*_*h,this._w=u*d*h+f*_*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const i=n/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,i=n[0],s=n[4],r=n[8],o=n[1],a=n[5],l=n[9],u=n[2],d=n[6],h=n[10],f=i+a+h;if(f>0){const _=.5/Math.sqrt(f+1);this._w=.25/_,this._x=(d-l)*_,this._y=(r-u)*_,this._z=(o-s)*_}else if(i>a&&i>h){const _=2*Math.sqrt(1+i-a-h);this._w=(d-l)/_,this._x=.25*_,this._y=(s+o)/_,this._z=(r+u)/_}else if(a>h){const _=2*Math.sqrt(1+a-i-h);this._w=(r-u)/_,this._x=(s+o)/_,this._y=.25*_,this._z=(l+d)/_}else{const _=2*Math.sqrt(1+h-i-a);this._w=(o-s)/_,this._x=(r+u)/_,this._y=(l+d)/_,this._z=.25*_}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ln(this.dot(e),-1,1)))}rotateTowards(e,n){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,n/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const i=e._x,s=e._y,r=e._z,o=e._w,a=n._x,l=n._y,u=n._z,d=n._w;return this._x=i*d+o*a+s*u-r*l,this._y=s*d+o*l+r*a-i*u,this._z=r*d+o*u+i*l-s*a,this._w=o*d-i*a-s*l-r*u,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const _=1-n;return this._w=_*o+n*this._w,this._x=_*i+n*this._x,this._y=_*s+n*this._y,this._z=_*r+n*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),d=Math.atan2(u,a),h=Math.sin((1-n)*d)/u,f=Math.sin(n*d)/u;return this._w=o*h+this._w*f,this._x=i*h+this._x*f,this._y=s*h+this._y*f,this._z=r*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=Math.random(),n=Math.sqrt(1-e),i=Math.sqrt(e),s=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(n*Math.cos(s),i*Math.sin(r),i*Math.cos(r),n*Math.sin(s))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class be{constructor(e=0,n=0,i=0){be.prototype.isVector3=!0,this.x=e,this.y=n,this.z=i}set(e,n,i){return i===void 0&&(i=this.z),this.x=e,this.y=n,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(O1.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(O1.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*n+r[3]*i+r[6]*s,this.y=r[1]*n+r[4]*i+r[7]*s,this.z=r[2]*n+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*n+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*n+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*n+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*n+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const n=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,u=2*(o*s-a*i),d=2*(a*n-r*s),h=2*(r*i-o*n);return this.x=n+l*u+o*h-a*d,this.y=i+l*d+a*u-r*h,this.z=s+l*h+r*d-o*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*n+r[4]*i+r[8]*s,this.y=r[1]*n+r[5]*i+r[9]*s,this.z=r[2]*n+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const i=e.x,s=e.y,r=e.z,o=n.x,a=n.y,l=n.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const i=e.dot(this)/n;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return $m.copy(this).projectOnVector(e),this.sub($m)}reflect(e){return this.sub($m.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Ln(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return n*n+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,i){const s=Math.sin(n)*e;return this.x=s*Math.sin(i),this.y=Math.cos(n)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,i){return this.x=e*Math.sin(n),this.y=i,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=i,this.z=s,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(n),this.y=i*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const $m=new be,O1=new kr;class Xs{constructor(e=new be(1/0,1/0,1/0),n=new be(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,i=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Ii),Ii.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,i;return e.normal.x>0?(n=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),n<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ml),ed.subVectors(this.max,ml),Do.subVectors(e.a,ml),ko.subVectors(e.b,ml),Lo.subVectors(e.c,ml),ir.subVectors(ko,Do),sr.subVectors(Lo,ko),Vr.subVectors(Do,Lo);let n=[0,-ir.z,ir.y,0,-sr.z,sr.y,0,-Vr.z,Vr.y,ir.z,0,-ir.x,sr.z,0,-sr.x,Vr.z,0,-Vr.x,-ir.y,ir.x,0,-sr.y,sr.x,0,-Vr.y,Vr.x,0];return!Wm(n,Do,ko,Lo,ed)||(n=[1,0,0,0,1,0,0,0,1],!Wm(n,Do,ko,Lo,ed))?!1:(td.crossVectors(ir,sr),n=[td.x,td.y,td.z],Wm(n,Do,ko,Lo,ed))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ii).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ii).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Cs[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Cs[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Cs[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Cs[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Cs[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Cs[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Cs[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Cs[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Cs),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Cs=[new be,new be,new be,new be,new be,new be,new be,new be],Ii=new be,Jc=new Xs,Do=new be,ko=new be,Lo=new be,ir=new be,sr=new be,Vr=new be,ml=new be,ed=new be,td=new be,zr=new be;function Wm(t,e,n,i,s){for(let r=0,o=t.length-3;r<=o;r+=3){zr.fromArray(t,r);const a=s.x*Math.abs(zr.x)+s.y*Math.abs(zr.y)+s.z*Math.abs(zr.z),l=e.dot(zr),u=n.dot(zr),d=i.dot(zr);if(Math.max(-Math.max(l,u,d),Math.min(l,u,d))>a)return!1}return!0}const XRt=new Xs,gl=new be,Km=new be;class fs{constructor(e=new be,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const i=this.center;n!==void 0?i.copy(n):XRt.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;gl.subVectors(e,this.center);const n=gl.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),s=(i-this.radius)*.5;this.center.addScaledVector(gl,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Km.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(gl.copy(e.center).add(Km)),this.expandByPoint(gl.copy(e.center).sub(Km))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ws=new be,jm=new be,nd=new be,rr=new be,Qm=new be,id=new be,Xm=new be;class up{constructor(e=new be,n=new be(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ws)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const i=n.dot(this.direction);return i<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=ws.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(ws.copy(this.origin).addScaledVector(this.direction,n),ws.distanceToSquared(e))}distanceSqToSegment(e,n,i,s){jm.copy(e).add(n).multiplyScalar(.5),nd.copy(n).sub(e).normalize(),rr.copy(this.origin).sub(jm);const r=e.distanceTo(n)*.5,o=-this.direction.dot(nd),a=rr.dot(this.direction),l=-rr.dot(nd),u=rr.lengthSq(),d=Math.abs(1-o*o);let h,f,_,m;if(d>0)if(h=o*l-a,f=o*a-l,m=r*d,h>=0)if(f>=-m)if(f<=m){const E=1/d;h*=E,f*=E,_=h*(h+o*f+2*a)+f*(o*h+f+2*l)+u}else f=r,h=Math.max(0,-(o*f+a)),_=-h*h+f*(f+2*l)+u;else f=-r,h=Math.max(0,-(o*f+a)),_=-h*h+f*(f+2*l)+u;else f<=-m?(h=Math.max(0,-(-o*r+a)),f=h>0?-r:Math.min(Math.max(-r,-l),r),_=-h*h+f*(f+2*l)+u):f<=m?(h=0,f=Math.min(Math.max(-r,-l),r),_=f*(f+2*l)+u):(h=Math.max(0,-(o*r+a)),f=h>0?r:Math.min(Math.max(-r,-l),r),_=-h*h+f*(f+2*l)+u);else f=o>0?-r:r,h=Math.max(0,-(o*f+a)),_=-h*h+f*(f+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,h),s&&s.copy(jm).addScaledVector(nd,f),_}intersectSphere(e,n){ws.subVectors(e.center,this.origin);const i=ws.dot(this.direction),s=ws.dot(ws)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/n;return i>=0?i:null}intersectPlane(e,n){const i=this.distanceToPlane(e);return i===null?null:this.at(i,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let i,s,r,o,a,l;const u=1/this.direction.x,d=1/this.direction.y,h=1/this.direction.z,f=this.origin;return u>=0?(i=(e.min.x-f.x)*u,s=(e.max.x-f.x)*u):(i=(e.max.x-f.x)*u,s=(e.min.x-f.x)*u),d>=0?(r=(e.min.y-f.y)*d,o=(e.max.y-f.y)*d):(r=(e.max.y-f.y)*d,o=(e.min.y-f.y)*d),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-f.z)*h,l=(e.max.z-f.z)*h):(a=(e.max.z-f.z)*h,l=(e.min.z-f.z)*h),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,n)}intersectsBox(e){return this.intersectBox(e,ws)!==null}intersectTriangle(e,n,i,s,r){Qm.subVectors(n,e),id.subVectors(i,e),Xm.crossVectors(Qm,id);let o=this.direction.dot(Xm),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;rr.subVectors(this.origin,e);const l=a*this.direction.dot(id.crossVectors(rr,id));if(l<0)return null;const u=a*this.direction.dot(Qm.cross(rr));if(u<0||l+u>o)return null;const d=-a*rr.dot(Xm);return d<0?null:this.at(d/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Rt{constructor(e,n,i,s,r,o,a,l,u,d,h,f,_,m,E,b){Rt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,i,s,r,o,a,l,u,d,h,f,_,m,E,b)}set(e,n,i,s,r,o,a,l,u,d,h,f,_,m,E,b){const g=this.elements;return g[0]=e,g[4]=n,g[8]=i,g[12]=s,g[1]=r,g[5]=o,g[9]=a,g[13]=l,g[2]=u,g[6]=d,g[10]=h,g[14]=f,g[3]=_,g[7]=m,g[11]=E,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Rt().fromArray(this.elements)}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(e){const n=this.elements,i=e.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,i){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,n,i){return this.set(e.x,n.x,i.x,0,e.y,n.y,i.y,0,e.z,n.z,i.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,i=e.elements,s=1/Po.setFromMatrixColumn(e,0).length(),r=1/Po.setFromMatrixColumn(e,1).length(),o=1/Po.setFromMatrixColumn(e,2).length();return n[0]=i[0]*s,n[1]=i[1]*s,n[2]=i[2]*s,n[3]=0,n[4]=i[4]*r,n[5]=i[5]*r,n[6]=i[6]*r,n[7]=0,n[8]=i[8]*o,n[9]=i[9]*o,n[10]=i[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),u=Math.sin(s),d=Math.cos(r),h=Math.sin(r);if(e.order==="XYZ"){const f=o*d,_=o*h,m=a*d,E=a*h;n[0]=l*d,n[4]=-l*h,n[8]=u,n[1]=_+m*u,n[5]=f-E*u,n[9]=-a*l,n[2]=E-f*u,n[6]=m+_*u,n[10]=o*l}else if(e.order==="YXZ"){const f=l*d,_=l*h,m=u*d,E=u*h;n[0]=f+E*a,n[4]=m*a-_,n[8]=o*u,n[1]=o*h,n[5]=o*d,n[9]=-a,n[2]=_*a-m,n[6]=E+f*a,n[10]=o*l}else if(e.order==="ZXY"){const f=l*d,_=l*h,m=u*d,E=u*h;n[0]=f-E*a,n[4]=-o*h,n[8]=m+_*a,n[1]=_+m*a,n[5]=o*d,n[9]=E-f*a,n[2]=-o*u,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const f=o*d,_=o*h,m=a*d,E=a*h;n[0]=l*d,n[4]=m*u-_,n[8]=f*u+E,n[1]=l*h,n[5]=E*u+f,n[9]=_*u-m,n[2]=-u,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const f=o*l,_=o*u,m=a*l,E=a*u;n[0]=l*d,n[4]=E-f*h,n[8]=m*h+_,n[1]=h,n[5]=o*d,n[9]=-a*d,n[2]=-u*d,n[6]=_*h+m,n[10]=f-E*h}else if(e.order==="XZY"){const f=o*l,_=o*u,m=a*l,E=a*u;n[0]=l*d,n[4]=-h,n[8]=u*d,n[1]=f*h+E,n[5]=o*d,n[9]=_*h-m,n[2]=m*h-_,n[6]=a*d,n[10]=E*h+f}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(ZRt,e,JRt)}lookAt(e,n,i){const s=this.elements;return ii.subVectors(e,n),ii.lengthSq()===0&&(ii.z=1),ii.normalize(),or.crossVectors(i,ii),or.lengthSq()===0&&(Math.abs(i.z)===1?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),or.crossVectors(i,ii)),or.normalize(),sd.crossVectors(ii,or),s[0]=or.x,s[4]=sd.x,s[8]=ii.x,s[1]=or.y,s[5]=sd.y,s[9]=ii.y,s[2]=or.z,s[6]=sd.z,s[10]=ii.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,s=n.elements,r=this.elements,o=i[0],a=i[4],l=i[8],u=i[12],d=i[1],h=i[5],f=i[9],_=i[13],m=i[2],E=i[6],b=i[10],g=i[14],y=i[3],v=i[7],T=i[11],C=i[15],x=s[0],O=s[4],w=s[8],S=s[12],R=s[1],U=s[5],F=s[9],Q=s[13],L=s[2],Y=s[6],V=s[10],P=s[14],X=s[3],W=s[7],Z=s[11],ae=s[15];return r[0]=o*x+a*R+l*L+u*X,r[4]=o*O+a*U+l*Y+u*W,r[8]=o*w+a*F+l*V+u*Z,r[12]=o*S+a*Q+l*P+u*ae,r[1]=d*x+h*R+f*L+_*X,r[5]=d*O+h*U+f*Y+_*W,r[9]=d*w+h*F+f*V+_*Z,r[13]=d*S+h*Q+f*P+_*ae,r[2]=m*x+E*R+b*L+g*X,r[6]=m*O+E*U+b*Y+g*W,r[10]=m*w+E*F+b*V+g*Z,r[14]=m*S+E*Q+b*P+g*ae,r[3]=y*x+v*R+T*L+C*X,r[7]=y*O+v*U+T*Y+C*W,r[11]=y*w+v*F+T*V+C*Z,r[15]=y*S+v*Q+T*P+C*ae,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],u=e[13],d=e[2],h=e[6],f=e[10],_=e[14],m=e[3],E=e[7],b=e[11],g=e[15];return m*(+r*l*h-s*u*h-r*a*f+i*u*f+s*a*_-i*l*_)+E*(+n*l*_-n*u*f+r*o*f-s*o*_+s*u*d-r*l*d)+b*(+n*u*h-n*a*_-r*o*h+i*o*_+r*a*d-i*u*d)+g*(-s*a*d-n*l*h+n*a*f+s*o*h-i*o*f+i*l*d)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=n,s[14]=i),this}invert(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8],h=e[9],f=e[10],_=e[11],m=e[12],E=e[13],b=e[14],g=e[15],y=h*b*u-E*f*u+E*l*_-a*b*_-h*l*g+a*f*g,v=m*f*u-d*b*u-m*l*_+o*b*_+d*l*g-o*f*g,T=d*E*u-m*h*u+m*a*_-o*E*_-d*a*g+o*h*g,C=m*h*l-d*E*l-m*a*f+o*E*f+d*a*b-o*h*b,x=n*y+i*v+s*T+r*C;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const O=1/x;return e[0]=y*O,e[1]=(E*f*r-h*b*r-E*s*_+i*b*_+h*s*g-i*f*g)*O,e[2]=(a*b*r-E*l*r+E*s*u-i*b*u-a*s*g+i*l*g)*O,e[3]=(h*l*r-a*f*r-h*s*u+i*f*u+a*s*_-i*l*_)*O,e[4]=v*O,e[5]=(d*b*r-m*f*r+m*s*_-n*b*_-d*s*g+n*f*g)*O,e[6]=(m*l*r-o*b*r-m*s*u+n*b*u+o*s*g-n*l*g)*O,e[7]=(o*f*r-d*l*r+d*s*u-n*f*u-o*s*_+n*l*_)*O,e[8]=T*O,e[9]=(m*h*r-d*E*r-m*i*_+n*E*_+d*i*g-n*h*g)*O,e[10]=(o*E*r-m*a*r+m*i*u-n*E*u-o*i*g+n*a*g)*O,e[11]=(d*a*r-o*h*r-d*i*u+n*h*u+o*i*_-n*a*_)*O,e[12]=C*O,e[13]=(d*E*s-m*h*s+m*i*f-n*E*f-d*i*b+n*h*b)*O,e[14]=(m*a*s-o*E*s-m*i*l+n*E*l+o*i*b-n*a*b)*O,e[15]=(o*h*s-d*a*s+d*i*l-n*h*l-o*i*f+n*a*f)*O,this}scale(e){const n=this.elements,i=e.x,s=e.y,r=e.z;return n[0]*=i,n[4]*=s,n[8]*=r,n[1]*=i,n[5]*=s,n[9]*=r,n[2]*=i,n[6]*=s,n[10]*=r,n[3]*=i,n[7]*=s,n[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,i,s))}makeTranslation(e,n,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const i=Math.cos(n),s=Math.sin(n),r=1-i,o=e.x,a=e.y,l=e.z,u=r*o,d=r*a;return this.set(u*o+i,u*a-s*l,u*l+s*a,0,u*a+s*l,d*a+i,d*l-s*o,0,u*l-s*a,d*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,n,i){return this.set(e,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,n,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,n,s,1,0,0,0,0,1),this}compose(e,n,i){const s=this.elements,r=n._x,o=n._y,a=n._z,l=n._w,u=r+r,d=o+o,h=a+a,f=r*u,_=r*d,m=r*h,E=o*d,b=o*h,g=a*h,y=l*u,v=l*d,T=l*h,C=i.x,x=i.y,O=i.z;return s[0]=(1-(E+g))*C,s[1]=(_+T)*C,s[2]=(m-v)*C,s[3]=0,s[4]=(_-T)*x,s[5]=(1-(f+g))*x,s[6]=(b+y)*x,s[7]=0,s[8]=(m+v)*O,s[9]=(b-y)*O,s[10]=(1-(f+E))*O,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,n,i){const s=this.elements;let r=Po.set(s[0],s[1],s[2]).length();const o=Po.set(s[4],s[5],s[6]).length(),a=Po.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Mi.copy(this);const u=1/r,d=1/o,h=1/a;return Mi.elements[0]*=u,Mi.elements[1]*=u,Mi.elements[2]*=u,Mi.elements[4]*=d,Mi.elements[5]*=d,Mi.elements[6]*=d,Mi.elements[8]*=h,Mi.elements[9]*=h,Mi.elements[10]*=h,n.setFromRotationMatrix(Mi),i.x=r,i.y=o,i.z=a,this}makePerspective(e,n,i,s,r,o,a=Us){const l=this.elements,u=2*r/(n-e),d=2*r/(i-s),h=(n+e)/(n-e),f=(i+s)/(i-s);let _,m;if(a===Us)_=-(o+r)/(o-r),m=-2*o*r/(o-r);else if(a===yu)_=-o/(o-r),m=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=u,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=d,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=_,l[14]=m,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,i,s,r,o,a=Us){const l=this.elements,u=1/(n-e),d=1/(i-s),h=1/(o-r),f=(n+e)*u,_=(i+s)*d;let m,E;if(a===Us)m=(o+r)*h,E=-2*h;else if(a===yu)m=r*h,E=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-f,l[1]=0,l[5]=2*d,l[9]=0,l[13]=-_,l[2]=0,l[6]=0,l[10]=E,l[14]=-m,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,i=e.elements;for(let s=0;s<16;s++)if(n[s]!==i[s])return!1;return!0}fromArray(e,n=0){for(let i=0;i<16;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e[n+9]=i[9],e[n+10]=i[10],e[n+11]=i[11],e[n+12]=i[12],e[n+13]=i[13],e[n+14]=i[14],e[n+15]=i[15],e}}const Po=new be,Mi=new Rt,ZRt=new be(0,0,0),JRt=new be(1,1,1),or=new be,sd=new be,ii=new be,I1=new Rt,M1=new kr;class pp{constructor(e=0,n=0,i=0,s=pp.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,i,s=this._order){return this._x=e,this._y=n,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],u=s[5],d=s[9],h=s[2],f=s[6],_=s[10];switch(n){case"XYZ":this._y=Math.asin(Ln(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,_),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Ln(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,_),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Ln(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,_),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-Ln(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,_),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(Ln(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,u),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,_));break;case"XZY":this._z=Math.asin(-Ln(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-d,_),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,i){return I1.makeRotationFromQuaternion(e),this.setFromRotationMatrix(I1,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return M1.setFromEuler(this),this.setFromQuaternion(M1,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}pp.DEFAULT_ORDER="XYZ";class cI{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let i=0;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),s.maxGeometryCount=this._maxGeometryCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),this.boundingBox!==null&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()}));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let u=0,d=l.length;u0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),d.length>0&&(i.images=d),h.length>0&&(i.shapes=h),f.length>0&&(i.skeletons=f),_.length>0&&(i.animations=_),m.length>0&&(i.nodes=m)}return i.object=s,i;function o(a){const l=[];for(const u in a){const d=a[u];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,n,i,s,r){Di.subVectors(s,n),As.subVectors(i,n),Zm.subVectors(e,n);const o=Di.dot(Di),a=Di.dot(As),l=Di.dot(Zm),u=As.dot(As),d=As.dot(Zm),h=o*u-a*a;if(h===0)return r.set(-2,-1,-1);const f=1/h,_=(u*l-a*d)*f,m=(o*d-a*l)*f;return r.set(1-_-m,m,_)}static containsPoint(e,n,i,s){return this.getBarycoord(e,n,i,s,Ns),Ns.x>=0&&Ns.y>=0&&Ns.x+Ns.y<=1}static getUV(e,n,i,s,r,o,a,l){return od===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),od=!0),this.getInterpolation(e,n,i,s,r,o,a,l)}static getInterpolation(e,n,i,s,r,o,a,l){return this.getBarycoord(e,n,i,s,Ns),l.setScalar(0),l.addScaledVector(r,Ns.x),l.addScaledVector(o,Ns.y),l.addScaledVector(a,Ns.z),l}static isFrontFacing(e,n,i,s){return Di.subVectors(i,n),As.subVectors(e,n),Di.cross(As).dot(s)<0}set(e,n,i){return this.a.copy(e),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(e,n,i,s){return this.a.copy(e[n]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,n,i,s){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Di.subVectors(this.c,this.b),As.subVectors(this.a,this.b),Di.cross(As).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ui.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Ui.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,i,s,r){return od===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),od=!0),Ui.getInterpolation(e,this.a,this.b,this.c,n,i,s,r)}getInterpolation(e,n,i,s,r){return Ui.getInterpolation(e,this.a,this.b,this.c,n,i,s,r)}containsPoint(e){return Ui.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ui.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const i=this.a,s=this.b,r=this.c;let o,a;Fo.subVectors(s,i),Bo.subVectors(r,i),Jm.subVectors(e,i);const l=Fo.dot(Jm),u=Bo.dot(Jm);if(l<=0&&u<=0)return n.copy(i);eg.subVectors(e,s);const d=Fo.dot(eg),h=Bo.dot(eg);if(d>=0&&h<=d)return n.copy(s);const f=l*h-d*u;if(f<=0&&l>=0&&d<=0)return o=l/(l-d),n.copy(i).addScaledVector(Fo,o);tg.subVectors(e,r);const _=Fo.dot(tg),m=Bo.dot(tg);if(m>=0&&_<=m)return n.copy(r);const E=_*u-l*m;if(E<=0&&u>=0&&m<=0)return a=u/(u-m),n.copy(i).addScaledVector(Bo,a);const b=d*m-_*h;if(b<=0&&h-d>=0&&_-m>=0)return U1.subVectors(r,s),a=(h-d)/(h-d+(_-m)),n.copy(s).addScaledVector(U1,a);const g=1/(b+E+f);return o=E*g,a=f*g,n.copy(i).addScaledVector(Fo,o).addScaledVector(Bo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const dI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ar={h:0,s:0,l:0},ad={h:0,s:0,l:0};function ng(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class gt{constructor(e,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,i)}set(e,n,i){if(n===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,n,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=on){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.toWorkingColorSpace(this,n),this}setRGB(e,n,i,s=Gt.workingColorSpace){return this.r=e,this.g=n,this.b=i,Gt.toWorkingColorSpace(this,s),this}setHSL(e,n,i,s=Gt.workingColorSpace){if(e=ey(e,1),n=Ln(n,0,1),i=Ln(i,0,1),n===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+n):i+n-i*n,o=2*i-r;this.r=ng(o,r,e+1/3),this.g=ng(o,r,e),this.b=ng(o,r,e-1/3)}return Gt.toWorkingColorSpace(this,s),this}setStyle(e,n=on){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,n);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,n);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=on){const i=dI[e.toLowerCase()];return i!==void 0?this.setHex(i,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ca(e.r),this.g=ca(e.g),this.b=ca(e.b),this}copyLinearToSRGB(e){return this.r=qm(e.r),this.g=qm(e.g),this.b=qm(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=on){return Gt.fromWorkingColorSpace(Dn.copy(this),e),Math.round(Ln(Dn.r*255,0,255))*65536+Math.round(Ln(Dn.g*255,0,255))*256+Math.round(Ln(Dn.b*255,0,255))}getHexString(e=on){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Gt.workingColorSpace){Gt.fromWorkingColorSpace(Dn.copy(this),n);const i=Dn.r,s=Dn.g,r=Dn.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,u;const d=(a+o)/2;if(a===o)l=0,u=0;else{const h=o-a;switch(u=d<=.5?h/(o+a):h/(2-o-a),o){case i:l=(s-r)/h+(s0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const i=e[n];if(i===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const s=this[n];if(s===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[n]=i}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==la&&(i.blending=this.blending),this.side!==Ys&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==rb&&(i.blendSrc=this.blendSrc),this.blendDst!==ob&&(i.blendDst=this.blendDst),this.blendEquation!==eo&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==fu&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==x1&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Io&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Io&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Io&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(n){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let i=null;if(n!==null){const s=n.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=n[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class vr extends Hi{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=QE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const dn=new be,ld=new It;class Yn{constructor(e,n,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=i,this.usage=ub,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ps,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,i){e*=this.itemSize,i*=n.itemSize;for(let s=0,r=this.itemSize;s0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const u=i[l];e.data.attributes[l]=u.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],d=[];for(let h=0,f=u.length;h0&&(s[l]=d,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(n));const s=e.attributes;for(const u in s){const d=s[u];this.setAttribute(u,d.clone(n))}const r=e.morphAttributes;for(const u in r){const d=[],h=r[u];for(let f=0,_=h.length;f<_;f++)d.push(h[f].clone(n));this.morphAttributes[u]=d}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let u=0,d=o.length;u0){const s=n[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(F1.copy(r).invert(),Hr.copy(e.ray).applyMatrix4(F1),!(i.boundingBox!==null&&Hr.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,Hr)))}_computeIntersections(e,n,i){let s;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,u=r.attributes.uv,d=r.attributes.uv1,h=r.attributes.normal,f=r.groups,_=r.drawRange;if(a!==null)if(Array.isArray(o))for(let m=0,E=f.length;mn.far?null:{distance:u,point:fd.clone(),object:t}}function md(t,e,n,i,s,r,o,a,l,u){t.getVertexPosition(a,Vo),t.getVertexPosition(l,zo),t.getVertexPosition(u,Ho);const d=aAt(t,e,n,i,Vo,zo,Ho,hd);if(d){s&&(ud.fromBufferAttribute(s,a),pd.fromBufferAttribute(s,l),_d.fromBufferAttribute(s,u),d.uv=Ui.getInterpolation(hd,Vo,zo,Ho,ud,pd,_d,new It)),r&&(ud.fromBufferAttribute(r,a),pd.fromBufferAttribute(r,l),_d.fromBufferAttribute(r,u),d.uv1=Ui.getInterpolation(hd,Vo,zo,Ho,ud,pd,_d,new It),d.uv2=d.uv1),o&&(G1.fromBufferAttribute(o,a),V1.fromBufferAttribute(o,l),z1.fromBufferAttribute(o,u),d.normal=Ui.getInterpolation(hd,Vo,zo,Ho,G1,V1,z1,new be),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c:u,normal:new be,materialIndex:0};Ui.getNormal(Vo,zo,Ho,h.normal),d.face=h}return d}class Rr extends ms{constructor(e=1,n=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],u=[],d=[],h=[];let f=0,_=0;m("z","y","x",-1,-1,i,n,e,o,r,0),m("z","y","x",1,-1,i,n,-e,o,r,1),m("x","z","y",1,1,e,i,n,s,o,2),m("x","z","y",1,-1,e,i,-n,s,o,3),m("x","y","z",1,-1,e,n,i,s,r,4),m("x","y","z",-1,-1,e,n,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new Bs(u,3)),this.setAttribute("normal",new Bs(d,3)),this.setAttribute("uv",new Bs(h,2));function m(E,b,g,y,v,T,C,x,O,w,S){const R=T/O,U=C/w,F=T/2,Q=C/2,L=x/2,Y=O+1,V=w+1;let P=0,X=0;const W=new be;for(let Z=0;Z0?1:-1,d.push(W.x,W.y,W.z),h.push(ie/O),h.push(1-Z/w),P+=1}}for(let Z=0;Z0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(n.extensions=i),n}}class hI extends rn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Rt,this.projectionMatrix=new Rt,this.projectionMatrixInverse=new Rt,this.coordinateSystem=Us}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class zn extends hI{constructor(e=50,n=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=Na*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Fl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Na*2*Math.atan(Math.tan(Fl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,i,s,r,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Fl*.5*this.fov)/this.zoom,i=2*n,s=this.aspect*i,r=-.5*s;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,u=o.fullHeight;r+=o.offsetX*s/l,n-=o.offsetY*i/u,s*=o.width/l,i*=o.height/u}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,n,n-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const qo=-90,Yo=1;class hAt extends rn{constructor(e,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new zn(qo,Yo,e,n);s.layers=this.layers,this.add(s);const r=new zn(qo,Yo,e,n);r.layers=this.layers,this.add(r);const o=new zn(qo,Yo,e,n);o.layers=this.layers,this.add(o);const a=new zn(qo,Yo,e,n);a.layers=this.layers,this.add(a);const l=new zn(qo,Yo,e,n);l.layers=this.layers,this.add(l);const u=new zn(qo,Yo,e,n);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[i,s,r,o,a,l]=n;for(const u of n)this.remove(u);if(e===Us)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===yu)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of n)this.add(u),u.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,l,u,d]=this.children,h=e.getRenderTarget(),f=e.getActiveCubeFace(),_=e.getActiveMipmapLevel(),m=e.xr.enabled;e.xr.enabled=!1;const E=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,s),e.render(n,r),e.setRenderTarget(i,1,s),e.render(n,o),e.setRenderTarget(i,2,s),e.render(n,a),e.setRenderTarget(i,3,s),e.render(n,l),e.setRenderTarget(i,4,s),e.render(n,u),i.texture.generateMipmaps=E,e.setRenderTarget(i,5,s),e.render(n,d),e.setRenderTarget(h,f,_),e.xr.enabled=m,i.texture.needsPMREMUpdate=!0}}class fI extends Nn{constructor(e,n,i,s,r,o,a,l,u,d){e=e!==void 0?e:[],n=n!==void 0?n:xa,super(e,n,i,s,r,o,a,l,u,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class fAt extends Eo{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},s=[i,i,i,i,i,i];n.encoding!==void 0&&(Gl("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===po?on:bi),this.texture=new fI(s,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:jn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class yo extends Hi{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=dAt,this.fragmentShader=uAt,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Oa(e.uniforms),this.uniformsGroups=lAt(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const s in this.uniforms){const o=this.uniforms[s].value;o&&o.isTexture?n.uniforms[s]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?n.uniforms[s]={type:"c",value:o.getHex()}:o&&o.isVector2?n.uniforms[s]={type:"v2",value:o.toArray()}:o&&o.isVector3?n.uniforms[s]={type:"v3",value:o.toArray()}:o&&o.isVector4?n.uniforms[s]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?n.uniforms[s]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?n.uniforms[s]={type:"m4",value:o.toArray()}:n.uniforms[s]={value:o}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(n.extensions=i),n}}class hI extends rn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Rt,this.projectionMatrix=new Rt,this.projectionMatrixInverse=new Rt,this.coordinateSystem=Us}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class zn extends hI{constructor(e=50,n=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=Na*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Fl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Na*2*Math.atan(Math.tan(Fl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,i,s,r,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Fl*.5*this.fov)/this.zoom,i=2*n,s=this.aspect*i,r=-.5*s;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,u=o.fullHeight;r+=o.offsetX*s/l,n-=o.offsetY*i/u,s*=o.width/l,i*=o.height/u}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,n,n-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const qo=-90,Yo=1;class pAt extends rn{constructor(e,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new zn(qo,Yo,e,n);s.layers=this.layers,this.add(s);const r=new zn(qo,Yo,e,n);r.layers=this.layers,this.add(r);const o=new zn(qo,Yo,e,n);o.layers=this.layers,this.add(o);const a=new zn(qo,Yo,e,n);a.layers=this.layers,this.add(a);const l=new zn(qo,Yo,e,n);l.layers=this.layers,this.add(l);const u=new zn(qo,Yo,e,n);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[i,s,r,o,a,l]=n;for(const u of n)this.remove(u);if(e===Us)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===yu)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of n)this.add(u),u.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,l,u,d]=this.children,h=e.getRenderTarget(),f=e.getActiveCubeFace(),_=e.getActiveMipmapLevel(),m=e.xr.enabled;e.xr.enabled=!1;const E=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,s),e.render(n,r),e.setRenderTarget(i,1,s),e.render(n,o),e.setRenderTarget(i,2,s),e.render(n,a),e.setRenderTarget(i,3,s),e.render(n,l),e.setRenderTarget(i,4,s),e.render(n,u),i.texture.generateMipmaps=E,e.setRenderTarget(i,5,s),e.render(n,d),e.setRenderTarget(h,f,_),e.xr.enabled=m,i.texture.needsPMREMUpdate=!0}}class fI extends Nn{constructor(e,n,i,s,r,o,a,l,u,d){e=e!==void 0?e:[],n=n!==void 0?n:xa,super(e,n,i,s,r,o,a,l,u,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class _At extends Eo{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},s=[i,i,i,i,i,i];n.encoding!==void 0&&(Gl("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===po?on:bi),this.texture=new fI(s,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:jn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -254,9 +254,9 @@ ${l}`;navigator.clipboard.writeText(u)}else navigator.clipboard.writeText(e);thi gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},s=new Rr(5,5,5),r=new yo({name:"CubemapFromEquirect",uniforms:Oa(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Zn,blending:xr});r.uniforms.tEquirect.value=n;const o=new Hn(s,r),a=n.minFilter;return n.minFilter===bo&&(n.minFilter=jn),new hAt(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,i,s){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,i,s);e.setRenderTarget(r)}}const rg=new be,mAt=new be,gAt=new wt;class Kr{constructor(e=new be(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,i,s){return this.normal.set(e,n,i),this.constant=s,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,i){const s=rg.subVectors(i,n).cross(mAt.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(s,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const i=e.delta(rg),s=this.normal.dot(i);if(s===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/s;return r<0||r>1?null:n.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const n=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return n<0&&i>0||i<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const i=n||gAt.getNormalMatrix(e),s=this.coplanarPoint(rg).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const qr=new fs,gd=new be;class ty{constructor(e=new Kr,n=new Kr,i=new Kr,s=new Kr,r=new Kr,o=new Kr){this.planes=[e,n,i,s,r,o]}set(e,n,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const n=this.planes;for(let i=0;i<6;i++)n[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,n=Us){const i=this.planes,s=e.elements,r=s[0],o=s[1],a=s[2],l=s[3],u=s[4],d=s[5],h=s[6],f=s[7],_=s[8],m=s[9],E=s[10],b=s[11],g=s[12],y=s[13],v=s[14],T=s[15];if(i[0].setComponents(l-r,f-u,b-_,T-g).normalize(),i[1].setComponents(l+r,f+u,b+_,T+g).normalize(),i[2].setComponents(l+o,f+d,b+m,T+y).normalize(),i[3].setComponents(l-o,f-d,b-m,T-y).normalize(),i[4].setComponents(l-a,f-h,b-E,T-v).normalize(),n===Us)i[5].setComponents(l+a,f+h,b+E,T+v).normalize();else if(n===yu)i[5].setComponents(a,h,E,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),qr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),qr.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(qr)}intersectsSprite(e){return qr.center.set(0,0,0),qr.radius=.7071067811865476,qr.applyMatrix4(e.matrixWorld),this.intersectsSphere(qr)}intersectsSphere(e){const n=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(n[r].distanceToPoint(i)0?e.max.x:e.min.x,gd.y=s.normal.y>0?e.max.y:e.min.y,gd.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(gd)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let i=0;i<6;i++)if(n[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function mI(){let t=null,e=!1,n=null,i=null;function s(r,o){n(r,o),i=t.requestAnimationFrame(s)}return{start:function(){e!==!0&&n!==null&&(i=t.requestAnimationFrame(s),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(r){n=r},setContext:function(r){t=r}}}function bAt(t,e){const n=e.isWebGL2,i=new WeakMap;function s(u,d){const h=u.array,f=u.usage,_=h.byteLength,m=t.createBuffer();t.bindBuffer(d,m),t.bufferData(d,h,f),u.onUploadCallback();let E;if(h instanceof Float32Array)E=t.FLOAT;else if(h instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(n)E=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else E=t.UNSIGNED_SHORT;else if(h instanceof Int16Array)E=t.SHORT;else if(h instanceof Uint32Array)E=t.UNSIGNED_INT;else if(h instanceof Int32Array)E=t.INT;else if(h instanceof Int8Array)E=t.BYTE;else if(h instanceof Uint8Array)E=t.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)E=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:m,type:E,bytesPerElement:h.BYTES_PER_ELEMENT,version:u.version,size:_}}function r(u,d,h){const f=d.array,_=d._updateRange,m=d.updateRanges;if(t.bindBuffer(h,u),_.count===-1&&m.length===0&&t.bufferSubData(h,0,f),m.length!==0){for(let E=0,b=m.length;E1?null:n.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const n=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return n<0&&i>0||i<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const i=n||fAt.getNormalMatrix(e),s=this.coplanarPoint(rg).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const qr=new fs,gd=new be;class ty{constructor(e=new Kr,n=new Kr,i=new Kr,s=new Kr,r=new Kr,o=new Kr){this.planes=[e,n,i,s,r,o]}set(e,n,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const n=this.planes;for(let i=0;i<6;i++)n[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,n=Us){const i=this.planes,s=e.elements,r=s[0],o=s[1],a=s[2],l=s[3],u=s[4],d=s[5],h=s[6],f=s[7],_=s[8],m=s[9],E=s[10],b=s[11],g=s[12],y=s[13],v=s[14],T=s[15];if(i[0].setComponents(l-r,f-u,b-_,T-g).normalize(),i[1].setComponents(l+r,f+u,b+_,T+g).normalize(),i[2].setComponents(l+o,f+d,b+m,T+y).normalize(),i[3].setComponents(l-o,f-d,b-m,T-y).normalize(),i[4].setComponents(l-a,f-h,b-E,T-v).normalize(),n===Us)i[5].setComponents(l+a,f+h,b+E,T+v).normalize();else if(n===yu)i[5].setComponents(a,h,E,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),qr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),qr.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(qr)}intersectsSprite(e){return qr.center.set(0,0,0),qr.radius=.7071067811865476,qr.applyMatrix4(e.matrixWorld),this.intersectsSphere(qr)}intersectsSphere(e){const n=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(n[r].distanceToPoint(i)0?e.max.x:e.min.x,gd.y=s.normal.y>0?e.max.y:e.min.y,gd.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(gd)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let i=0;i<6;i++)if(n[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function mI(){let t=null,e=!1,n=null,i=null;function s(r,o){n(r,o),i=t.requestAnimationFrame(s)}return{start:function(){e!==!0&&n!==null&&(i=t.requestAnimationFrame(s),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(r){n=r},setContext:function(r){t=r}}}function mAt(t,e){const n=e.isWebGL2,i=new WeakMap;function s(u,d){const h=u.array,f=u.usage,_=h.byteLength,m=t.createBuffer();t.bindBuffer(d,m),t.bufferData(d,h,f),u.onUploadCallback();let E;if(h instanceof Float32Array)E=t.FLOAT;else if(h instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(n)E=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else E=t.UNSIGNED_SHORT;else if(h instanceof Int16Array)E=t.SHORT;else if(h instanceof Uint32Array)E=t.UNSIGNED_INT;else if(h instanceof Int32Array)E=t.INT;else if(h instanceof Int8Array)E=t.BYTE;else if(h instanceof Uint8Array)E=t.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)E=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:m,type:E,bytesPerElement:h.BYTES_PER_ELEMENT,version:u.version,size:_}}function r(u,d,h){const f=d.array,_=d._updateRange,m=d.updateRanges;if(t.bindBuffer(h,u),_.count===-1&&m.length===0&&t.bufferSubData(h,0,f),m.length!==0){for(let E=0,b=m.length;E 0 +#endif`,MAt=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -453,26 +453,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,LAt=`#if NUM_CLIPPING_PLANES > 0 +#endif`,DAt=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,PAt=`#if NUM_CLIPPING_PLANES > 0 +#endif`,kAt=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,UAt=`#if NUM_CLIPPING_PLANES > 0 +#endif`,LAt=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,FAt=`#if defined( USE_COLOR_ALPHA ) +#endif`,PAt=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,BAt=`#if defined( USE_COLOR_ALPHA ) +#endif`,UAt=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,GAt=`#if defined( USE_COLOR_ALPHA ) +#endif`,FAt=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,VAt=`#if defined( USE_COLOR_ALPHA ) +#endif`,BAt=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -482,7 +482,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,zAt=`#define PI 3.141592653589793 +#endif`,GAt=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -560,7 +560,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,HAt=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,VAt=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -658,7 +658,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,qAt=`vec3 transformedNormal = objectNormal; +#endif`,zAt=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -687,18 +687,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,YAt=`#ifdef USE_DISPLACEMENTMAP +#endif`,HAt=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,$At=`#ifdef USE_DISPLACEMENTMAP +#endif`,qAt=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,WAt=`#ifdef USE_EMISSIVEMAP +#endif`,YAt=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,KAt=`#ifdef USE_EMISSIVEMAP +#endif`,$At=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,jAt="gl_FragColor = linearToOutputTexel( gl_FragColor );",QAt=` +#endif`,WAt="gl_FragColor = linearToOutputTexel( gl_FragColor );",KAt=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -726,7 +726,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,XAt=`#ifdef USE_ENVMAP +}`,jAt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -755,7 +755,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,ZAt=`#ifdef USE_ENVMAP +#endif`,QAt=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -764,7 +764,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,JAt=`#ifdef USE_ENVMAP +#endif`,XAt=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -775,7 +775,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,eNt=`#ifdef USE_ENVMAP +#endif`,ZAt=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -786,7 +786,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,tNt=`#ifdef USE_ENVMAP +#endif`,JAt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -803,18 +803,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,nNt=`#ifdef USE_FOG +#endif`,eNt=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,iNt=`#ifdef USE_FOG +#endif`,tNt=`#ifdef USE_FOG varying float vFogDepth; -#endif`,sNt=`#ifdef USE_FOG +#endif`,nNt=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,rNt=`#ifdef USE_FOG +#endif`,iNt=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -823,7 +823,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,oNt=`#ifdef USE_GRADIENTMAP +#endif`,sNt=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -835,16 +835,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,aNt=`#ifdef USE_LIGHTMAP +}`,rNt=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,lNt=`#ifdef USE_LIGHTMAP +#endif`,oNt=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,cNt=`LambertMaterial material; +#endif`,aNt=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,dNt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,lNt=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -858,7 +858,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,uNt=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,cNt=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -981,7 +981,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,pNt=`#ifdef USE_ENVMAP +#endif`,dNt=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -1014,8 +1014,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,_Nt=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,hNt=`varying vec3 vViewPosition; +#endif`,uNt=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,pNt=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1027,11 +1027,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,fNt=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,_Nt=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,mNt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,hNt=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1048,7 +1048,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,gNt=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,fNt=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -1131,7 +1131,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,bNt=`struct PhysicalMaterial { +#endif`,mNt=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1431,7 +1431,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,ENt=` +}`,gNt=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1546,7 +1546,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,yNt=`#if defined( RE_IndirectDiffuse ) +#endif`,bNt=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1565,25 +1565,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,vNt=`#if defined( RE_IndirectDiffuse ) +#endif`,ENt=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,SNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,yNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,TNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,vNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,xNt=`#ifdef USE_LOGDEPTHBUF +#endif`,SNt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,CNt=`#ifdef USE_LOGDEPTHBUF +#endif`,TNt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1593,16 +1593,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,wNt=`#ifdef USE_MAP +#endif`,xNt=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,RNt=`#ifdef USE_MAP +#endif`,CNt=`#ifdef USE_MAP uniform sampler2D map; -#endif`,ANt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,wNt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1614,7 +1614,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,NNt=`#if defined( USE_POINTS_UV ) +#endif`,RNt=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1626,13 +1626,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,ONt=`float metalnessFactor = metalness; +#endif`,ANt=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,INt=`#ifdef USE_METALNESSMAP +#endif`,NNt=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,MNt=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,ONt=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1641,7 +1641,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,DNt=`#ifdef USE_MORPHNORMALS +#endif`,INt=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1653,7 +1653,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,kNt=`#ifdef USE_MORPHTARGETS +#endif`,MNt=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1673,7 +1673,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,LNt=`#ifdef USE_MORPHTARGETS +#endif`,DNt=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1691,7 +1691,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,PNt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,kNt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1732,7 +1732,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,UNt=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,LNt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1747,25 +1747,25 @@ vec3 nonPerturbedNormal = normal;`,UNt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,PNt=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,UNt=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif #endif`,FNt=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,BNt=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,GNt=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,VNt=`#ifdef USE_NORMALMAP +#endif`,BNt=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1787,13 +1787,13 @@ vec3 nonPerturbedNormal = normal;`,UNt=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,zNt=`#ifdef USE_CLEARCOAT +#endif`,GNt=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,HNt=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,VNt=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,qNt=`#ifdef USE_CLEARCOATMAP +#endif`,zNt=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1802,18 +1802,18 @@ vec3 nonPerturbedNormal = normal;`,UNt=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,YNt=`#ifdef USE_IRIDESCENCEMAP +#endif`,HNt=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,$Nt=`#ifdef OPAQUE +#endif`,qNt=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,WNt=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,YNt=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1854,9 +1854,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,KNt=`#ifdef PREMULTIPLIED_ALPHA +}`,$Nt=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,jNt=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,WNt=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1864,22 +1864,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,QNt=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,KNt=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,XNt=`#ifdef DITHERING +#endif`,jNt=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,ZNt=`float roughnessFactor = roughness; +#endif`,QNt=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,JNt=`#ifdef USE_ROUGHNESSMAP +#endif`,XNt=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,eOt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,ZNt=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2056,7 +2056,7 @@ gl_Position = projectionMatrix * mvPosition;`,QNt=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,tOt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,JNt=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2094,7 +2094,7 @@ gl_Position = projectionMatrix * mvPosition;`,QNt=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,nOt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,eOt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -2126,7 +2126,7 @@ gl_Position = projectionMatrix * mvPosition;`,QNt=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,iOt=`float getShadowMask() { +#endif`,tOt=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2158,12 +2158,12 @@ gl_Position = projectionMatrix * mvPosition;`,QNt=`#ifdef DITHERING #endif #endif return shadow; -}`,sOt=`#ifdef USE_SKINNING +}`,nOt=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,rOt=`#ifdef USE_SKINNING +#endif`,iOt=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2178,7 +2178,7 @@ gl_Position = projectionMatrix * mvPosition;`,QNt=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,oOt=`#ifdef USE_SKINNING +#endif`,sOt=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2186,7 +2186,7 @@ gl_Position = projectionMatrix * mvPosition;`,QNt=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,aOt=`#ifdef USE_SKINNING +#endif`,rOt=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2197,17 +2197,17 @@ gl_Position = projectionMatrix * mvPosition;`,QNt=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,lOt=`float specularStrength; +#endif`,oOt=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,cOt=`#ifdef USE_SPECULARMAP +#endif`,aOt=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,dOt=`#if defined( TONE_MAPPING ) +#endif`,lOt=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,uOt=`#ifndef saturate +#endif`,cOt=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2243,7 +2243,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,pOt=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,dOt=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2264,7 +2264,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pOt=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,_Ot=`#ifdef USE_TRANSMISSION +#endif`,uOt=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2370,7 +2370,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pOt=`#ifdef USE_TRANSMIS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,hOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,pOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2440,7 +2440,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pOt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,fOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,_Ot=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2534,7 +2534,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pOt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,mOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,hOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2605,7 +2605,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pOt=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,gOt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,fOt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2614,12 +2614,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pOt=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const bOt=`varying vec2 vUv; +#endif`;const mOt=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,EOt=`uniform sampler2D t2D; +}`,gOt=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2631,14 +2631,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,yOt=`varying vec3 vWorldDirection; +}`,bOt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,vOt=`#ifdef ENVMAP_TYPE_CUBE +}`,EOt=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2660,14 +2660,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,SOt=`varying vec3 vWorldDirection; +}`,yOt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,TOt=`uniform samplerCube tCube; +}`,vOt=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2677,7 +2677,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,xOt=`#include +}`,SOt=`#include #include #include #include @@ -2703,7 +2703,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,COt=`#if DEPTH_PACKING == 3200 +}`,TOt=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2733,7 +2733,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,wOt=`#define DISTANCE +}`,xOt=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2759,7 +2759,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,ROt=`#define DISTANCE +}`,COt=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2783,13 +2783,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,AOt=`varying vec3 vWorldDirection; +}`,wOt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,NOt=`uniform sampler2D tEquirect; +}`,ROt=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2798,7 +2798,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,OOt=`uniform float scale; +}`,AOt=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2819,7 +2819,7 @@ void main() { #include #include #include -}`,IOt=`uniform vec3 diffuse; +}`,NOt=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2847,7 +2847,7 @@ void main() { #include #include #include -}`,MOt=`#include +}`,OOt=`#include #include #include #include @@ -2878,7 +2878,7 @@ void main() { #include #include #include -}`,DOt=`uniform vec3 diffuse; +}`,IOt=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2926,7 +2926,7 @@ void main() { #include #include #include -}`,kOt=`#define LAMBERT +}`,MOt=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2964,7 +2964,7 @@ void main() { #include #include #include -}`,LOt=`#define LAMBERT +}`,DOt=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3021,7 +3021,7 @@ void main() { #include #include #include -}`,POt=`#define MATCAP +}`,kOt=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3054,7 +3054,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,UOt=`#define MATCAP +}`,LOt=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3100,7 +3100,7 @@ void main() { #include #include #include -}`,FOt=`#define NORMAL +}`,POt=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3132,7 +3132,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,BOt=`#define NORMAL +}`,UOt=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3153,7 +3153,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,GOt=`#define PHONG +}`,FOt=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3191,7 +3191,7 @@ void main() { #include #include #include -}`,VOt=`#define PHONG +}`,BOt=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3250,7 +3250,7 @@ void main() { #include #include #include -}`,zOt=`#define STANDARD +}`,GOt=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3292,7 +3292,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,HOt=`#define STANDARD +}`,VOt=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3414,7 +3414,7 @@ void main() { #include #include #include -}`,qOt=`#define TOON +}`,zOt=`#define TOON varying vec3 vViewPosition; #include #include @@ -3450,7 +3450,7 @@ void main() { #include #include #include -}`,YOt=`#define TOON +}`,HOt=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3503,7 +3503,7 @@ void main() { #include #include #include -}`,$Ot=`uniform float size; +}`,qOt=`uniform float size; uniform float scale; #include #include @@ -3533,7 +3533,7 @@ void main() { #include #include #include -}`,WOt=`uniform vec3 diffuse; +}`,YOt=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3558,7 +3558,7 @@ void main() { #include #include #include -}`,KOt=`#include +}`,$Ot=`#include #include #include #include @@ -3580,7 +3580,7 @@ void main() { #include #include #include -}`,jOt=`uniform vec3 color; +}`,WOt=`uniform vec3 color; uniform float opacity; #include #include @@ -3596,7 +3596,7 @@ void main() { #include #include #include -}`,QOt=`uniform float rotation; +}`,KOt=`uniform float rotation; uniform vec2 center; #include #include @@ -3622,7 +3622,7 @@ void main() { #include #include #include -}`,XOt=`uniform vec3 diffuse; +}`,jOt=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3647,7 +3647,7 @@ void main() { #include #include #include -}`,Tt={alphahash_fragment:EAt,alphahash_pars_fragment:yAt,alphamap_fragment:vAt,alphamap_pars_fragment:SAt,alphatest_fragment:TAt,alphatest_pars_fragment:xAt,aomap_fragment:CAt,aomap_pars_fragment:wAt,batching_pars_vertex:RAt,batching_vertex:AAt,begin_vertex:NAt,beginnormal_vertex:OAt,bsdfs:IAt,iridescence_fragment:MAt,bumpmap_pars_fragment:DAt,clipping_planes_fragment:kAt,clipping_planes_pars_fragment:LAt,clipping_planes_pars_vertex:PAt,clipping_planes_vertex:UAt,color_fragment:FAt,color_pars_fragment:BAt,color_pars_vertex:GAt,color_vertex:VAt,common:zAt,cube_uv_reflection_fragment:HAt,defaultnormal_vertex:qAt,displacementmap_pars_vertex:YAt,displacementmap_vertex:$At,emissivemap_fragment:WAt,emissivemap_pars_fragment:KAt,colorspace_fragment:jAt,colorspace_pars_fragment:QAt,envmap_fragment:XAt,envmap_common_pars_fragment:ZAt,envmap_pars_fragment:JAt,envmap_pars_vertex:eNt,envmap_physical_pars_fragment:pNt,envmap_vertex:tNt,fog_vertex:nNt,fog_pars_vertex:iNt,fog_fragment:sNt,fog_pars_fragment:rNt,gradientmap_pars_fragment:oNt,lightmap_fragment:aNt,lightmap_pars_fragment:lNt,lights_lambert_fragment:cNt,lights_lambert_pars_fragment:dNt,lights_pars_begin:uNt,lights_toon_fragment:_Nt,lights_toon_pars_fragment:hNt,lights_phong_fragment:fNt,lights_phong_pars_fragment:mNt,lights_physical_fragment:gNt,lights_physical_pars_fragment:bNt,lights_fragment_begin:ENt,lights_fragment_maps:yNt,lights_fragment_end:vNt,logdepthbuf_fragment:SNt,logdepthbuf_pars_fragment:TNt,logdepthbuf_pars_vertex:xNt,logdepthbuf_vertex:CNt,map_fragment:wNt,map_pars_fragment:RNt,map_particle_fragment:ANt,map_particle_pars_fragment:NNt,metalnessmap_fragment:ONt,metalnessmap_pars_fragment:INt,morphcolor_vertex:MNt,morphnormal_vertex:DNt,morphtarget_pars_vertex:kNt,morphtarget_vertex:LNt,normal_fragment_begin:PNt,normal_fragment_maps:UNt,normal_pars_fragment:FNt,normal_pars_vertex:BNt,normal_vertex:GNt,normalmap_pars_fragment:VNt,clearcoat_normal_fragment_begin:zNt,clearcoat_normal_fragment_maps:HNt,clearcoat_pars_fragment:qNt,iridescence_pars_fragment:YNt,opaque_fragment:$Nt,packing:WNt,premultiplied_alpha_fragment:KNt,project_vertex:jNt,dithering_fragment:QNt,dithering_pars_fragment:XNt,roughnessmap_fragment:ZNt,roughnessmap_pars_fragment:JNt,shadowmap_pars_fragment:eOt,shadowmap_pars_vertex:tOt,shadowmap_vertex:nOt,shadowmask_pars_fragment:iOt,skinbase_vertex:sOt,skinning_pars_vertex:rOt,skinning_vertex:oOt,skinnormal_vertex:aOt,specularmap_fragment:lOt,specularmap_pars_fragment:cOt,tonemapping_fragment:dOt,tonemapping_pars_fragment:uOt,transmission_fragment:pOt,transmission_pars_fragment:_Ot,uv_pars_fragment:hOt,uv_pars_vertex:fOt,uv_vertex:mOt,worldpos_vertex:gOt,background_vert:bOt,background_frag:EOt,backgroundCube_vert:yOt,backgroundCube_frag:vOt,cube_vert:SOt,cube_frag:TOt,depth_vert:xOt,depth_frag:COt,distanceRGBA_vert:wOt,distanceRGBA_frag:ROt,equirect_vert:AOt,equirect_frag:NOt,linedashed_vert:OOt,linedashed_frag:IOt,meshbasic_vert:MOt,meshbasic_frag:DOt,meshlambert_vert:kOt,meshlambert_frag:LOt,meshmatcap_vert:POt,meshmatcap_frag:UOt,meshnormal_vert:FOt,meshnormal_frag:BOt,meshphong_vert:GOt,meshphong_frag:VOt,meshphysical_vert:zOt,meshphysical_frag:HOt,meshtoon_vert:qOt,meshtoon_frag:YOt,points_vert:$Ot,points_frag:WOt,shadow_vert:KOt,shadow_frag:jOt,sprite_vert:QOt,sprite_frag:XOt},Qe={common:{diffuse:{value:new gt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wt},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wt},normalScale:{value:new It(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new gt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0},uvTransform:{value:new wt}},sprite:{diffuse:{value:new gt(16777215)},opacity:{value:1},center:{value:new It(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wt},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0}}},Zi={basic:{uniforms:Vn([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Tt.meshbasic_vert,fragmentShader:Tt.meshbasic_frag},lambert:{uniforms:Vn([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new gt(0)}}]),vertexShader:Tt.meshlambert_vert,fragmentShader:Tt.meshlambert_frag},phong:{uniforms:Vn([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new gt(0)},specular:{value:new gt(1118481)},shininess:{value:30}}]),vertexShader:Tt.meshphong_vert,fragmentShader:Tt.meshphong_frag},standard:{uniforms:Vn([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new gt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Tt.meshphysical_vert,fragmentShader:Tt.meshphysical_frag},toon:{uniforms:Vn([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new gt(0)}}]),vertexShader:Tt.meshtoon_vert,fragmentShader:Tt.meshtoon_frag},matcap:{uniforms:Vn([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Tt.meshmatcap_vert,fragmentShader:Tt.meshmatcap_frag},points:{uniforms:Vn([Qe.points,Qe.fog]),vertexShader:Tt.points_vert,fragmentShader:Tt.points_frag},dashed:{uniforms:Vn([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Tt.linedashed_vert,fragmentShader:Tt.linedashed_frag},depth:{uniforms:Vn([Qe.common,Qe.displacementmap]),vertexShader:Tt.depth_vert,fragmentShader:Tt.depth_frag},normal:{uniforms:Vn([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Tt.meshnormal_vert,fragmentShader:Tt.meshnormal_frag},sprite:{uniforms:Vn([Qe.sprite,Qe.fog]),vertexShader:Tt.sprite_vert,fragmentShader:Tt.sprite_frag},background:{uniforms:{uvTransform:{value:new wt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Tt.background_vert,fragmentShader:Tt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Tt.backgroundCube_vert,fragmentShader:Tt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Tt.cube_vert,fragmentShader:Tt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Tt.equirect_vert,fragmentShader:Tt.equirect_frag},distanceRGBA:{uniforms:Vn([Qe.common,Qe.displacementmap,{referencePosition:{value:new be},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Tt.distanceRGBA_vert,fragmentShader:Tt.distanceRGBA_frag},shadow:{uniforms:Vn([Qe.lights,Qe.fog,{color:{value:new gt(0)},opacity:{value:1}}]),vertexShader:Tt.shadow_vert,fragmentShader:Tt.shadow_frag}};Zi.physical={uniforms:Vn([Zi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wt},clearcoatNormalScale:{value:new It(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wt},sheen:{value:0},sheenColor:{value:new gt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wt},transmissionSamplerSize:{value:new It},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wt},attenuationDistance:{value:0},attenuationColor:{value:new gt(0)},specularColor:{value:new gt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wt},anisotropyVector:{value:new It},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wt}}]),vertexShader:Tt.meshphysical_vert,fragmentShader:Tt.meshphysical_frag};const bd={r:0,b:0,g:0};function ZOt(t,e,n,i,s,r,o){const a=new gt(0);let l=r===!0?0:1,u,d,h=null,f=0,_=null;function m(b,g){let y=!1,v=g.isScene===!0?g.background:null;v&&v.isTexture&&(v=(g.backgroundBlurriness>0?n:e).get(v)),v===null?E(a,l):v&&v.isColor&&(E(v,1),y=!0);const T=t.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(t.autoClear||y)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),v&&(v.isCubeTexture||v.mapping===cp)?(d===void 0&&(d=new Hn(new Rr(1,1,1),new yo({name:"BackgroundCubeMaterial",uniforms:Oa(Zi.backgroundCube.uniforms),vertexShader:Zi.backgroundCube.vertexShader,fragmentShader:Zi.backgroundCube.fragmentShader,side:Zn,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(C,x,O){this.matrixWorld.copyPosition(O.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(d)),d.material.uniforms.envMap.value=v,d.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,d.material.toneMapped=Gt.getTransfer(v.colorSpace)!==Zt,(h!==v||f!==v.version||_!==t.toneMapping)&&(d.material.needsUpdate=!0,h=v,f=v.version,_=t.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null)):v&&v.isTexture&&(u===void 0&&(u=new Hn(new ny(2,2),new yo({name:"BackgroundMaterial",uniforms:Oa(Zi.background.uniforms),vertexShader:Zi.background.vertexShader,fragmentShader:Zi.background.fragmentShader,side:Ys,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(u)),u.material.uniforms.t2D.value=v,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.toneMapped=Gt.getTransfer(v.colorSpace)!==Zt,v.matrixAutoUpdate===!0&&v.updateMatrix(),u.material.uniforms.uvTransform.value.copy(v.matrix),(h!==v||f!==v.version||_!==t.toneMapping)&&(u.material.needsUpdate=!0,h=v,f=v.version,_=t.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null))}function E(b,g){b.getRGB(bd,_I(t)),i.buffers.color.setClear(bd.r,bd.g,bd.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(b,g=1){a.set(b),l=g,E(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,E(a,l)},render:m}}function JOt(t,e,n,i){const s=t.getParameter(t.MAX_VERTEX_ATTRIBS),r=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||r!==null,a={},l=b(null);let u=l,d=!1;function h(L,Y,V,P,X){let W=!1;if(o){const Z=E(P,V,Y);u!==Z&&(u=Z,_(u.object)),W=g(L,P,V,X),W&&y(L,P,V,X)}else{const Z=Y.wireframe===!0;(u.geometry!==P.id||u.program!==V.id||u.wireframe!==Z)&&(u.geometry=P.id,u.program=V.id,u.wireframe=Z,W=!0)}X!==null&&n.update(X,t.ELEMENT_ARRAY_BUFFER),(W||d)&&(d=!1,w(L,Y,V,P),X!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(X).buffer))}function f(){return i.isWebGL2?t.createVertexArray():r.createVertexArrayOES()}function _(L){return i.isWebGL2?t.bindVertexArray(L):r.bindVertexArrayOES(L)}function m(L){return i.isWebGL2?t.deleteVertexArray(L):r.deleteVertexArrayOES(L)}function E(L,Y,V){const P=V.wireframe===!0;let X=a[L.id];X===void 0&&(X={},a[L.id]=X);let W=X[Y.id];W===void 0&&(W={},X[Y.id]=W);let Z=W[P];return Z===void 0&&(Z=b(f()),W[P]=Z),Z}function b(L){const Y=[],V=[],P=[];for(let X=0;X=0){const fe=X[ie];let ye=W[ie];if(ye===void 0&&(ie==="instanceMatrix"&&L.instanceMatrix&&(ye=L.instanceMatrix),ie==="instanceColor"&&L.instanceColor&&(ye=L.instanceColor)),fe===void 0||fe.attribute!==ye||ye&&fe.data!==ye.data)return!0;Z++}return u.attributesNum!==Z||u.index!==P}function y(L,Y,V,P){const X={},W=Y.attributes;let Z=0;const ae=V.getAttributes();for(const ie in ae)if(ae[ie].location>=0){let fe=W[ie];fe===void 0&&(ie==="instanceMatrix"&&L.instanceMatrix&&(fe=L.instanceMatrix),ie==="instanceColor"&&L.instanceColor&&(fe=L.instanceColor));const ye={};ye.attribute=fe,fe&&fe.data&&(ye.data=fe.data),X[ie]=ye,Z++}u.attributes=X,u.attributesNum=Z,u.index=P}function v(){const L=u.newAttributes;for(let Y=0,V=L.length;Y=0){let ee=X[ae];if(ee===void 0&&(ae==="instanceMatrix"&&L.instanceMatrix&&(ee=L.instanceMatrix),ae==="instanceColor"&&L.instanceColor&&(ee=L.instanceColor)),ee!==void 0){const fe=ee.normalized,ye=ee.itemSize,Ne=n.get(ee);if(Ne===void 0)continue;const te=Ne.buffer,me=Ne.type,ne=Ne.bytesPerElement,Se=i.isWebGL2===!0&&(me===t.INT||me===t.UNSIGNED_INT||ee.gpuType===jO);if(ee.isInterleavedBufferAttribute){const De=ee.data,k=De.stride,G=ee.offset;if(De.isInstancedInterleavedBuffer){for(let K=0;K0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";O="mediump"}return O==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=r(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const u=o||e.has("WEBGL_draw_buffers"),d=n.logarithmicDepthBuffer===!0,h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=t.getParameter(t.MAX_TEXTURE_SIZE),m=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),E=t.getParameter(t.MAX_VERTEX_ATTRIBS),b=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),y=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=f>0,T=o||e.has("OES_texture_float"),C=v&&T,x=o?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:s,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:d,maxTextures:h,maxVertexTextures:f,maxTextureSize:_,maxCubemapSize:m,maxAttributes:E,maxVertexUniforms:b,maxVaryings:g,maxFragmentUniforms:y,vertexTextures:v,floatFragmentTextures:T,floatVertexTextures:C,maxSamples:x}}function nIt(t){const e=this;let n=null,i=0,s=!1,r=!1;const o=new Kr,a=new wt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,f){const _=h.length!==0||f||i!==0||s;return s=f,i=h.length,_},this.beginShadows=function(){r=!0,d(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(h,f){n=d(h,f,0)},this.setState=function(h,f,_){const m=h.clippingPlanes,E=h.clipIntersection,b=h.clipShadows,g=t.get(h);if(!s||m===null||m.length===0||r&&!b)r?d(null):u();else{const y=r?0:i,v=y*4;let T=g.clippingState||null;l.value=T,T=d(m,f,v,_);for(let C=0;C!==v;++C)T[C]=n[C];g.clippingState=T,this.numIntersection=E?this.numPlanes:0,this.numPlanes+=y}};function u(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function d(h,f,_,m){const E=h!==null?h.length:0;let b=null;if(E!==0){if(b=l.value,m!==!0||b===null){const g=_+E*4,y=f.matrixWorldInverse;a.getNormalMatrix(y),(b===null||b.length0){const u=new fAt(l.height/2);return u.fromEquirectangularTexture(t,o),e.set(o,u),o.addEventListener("dispose",s),n(u.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}class iy extends hI{constructor(e=-1,n=1,i=1,s=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=i,this.bottom=s,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,i,s,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let r=i-e,o=i+e,a=s+n,l=s-n;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=u*this.view.offsetX,o=r+u*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Zo=4,H1=[.125,.215,.35,.446,.526,.582],to=20,og=new iy,q1=new gt;let ag=null,lg=0,cg=0;const jr=(1+Math.sqrt(5))/2,$o=1/jr,Y1=[new be(1,1,1),new be(-1,1,1),new be(1,1,-1),new be(-1,1,-1),new be(0,jr,$o),new be(0,jr,-$o),new be($o,0,jr),new be(-$o,0,jr),new be(jr,$o,0),new be(-jr,$o,0)];class $1{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,i=.1,s=100){ag=this._renderer.getRenderTarget(),lg=this._renderer.getActiveCubeFace(),cg=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,i,s,r),n>0&&this._blur(r,0,0,n),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=j1(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=K1(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?v:0,v,v),d.setRenderTarget(s),E&&d.render(m,a),d.render(e,a)}m.geometry.dispose(),m.material.dispose(),d.toneMapping=f,d.autoClear=h,e.background=b}_textureToCubeUV(e,n){const i=this._renderer,s=e.mapping===xa||e.mapping===Ca;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=j1()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=K1());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new Hn(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;Ed(n,0,0,3*l,2*l),i.setRenderTarget(n),i.render(o,og)}_applyPMREM(e){const n=this._renderer,i=n.autoClear;n.autoClear=!1;for(let s=1;sto&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${to}`);const g=[];let y=0;for(let O=0;Ov-Zo?s-v+Zo:0),x=4*(this._cubeSize-T);Ed(n,C,x,3*T,2*T),l.setRenderTarget(n),l.render(h,og)}}function sIt(t){const e=[],n=[],i=[];let s=t;const r=t-Zo+1+H1.length;for(let o=0;ot-Zo?l=H1[o-t+Zo-1]:o===0&&(l=0),i.push(l);const u=1/(a-2),d=-u,h=1+u,f=[d,d,h,d,h,h,d,d,h,h,d,h],_=6,m=6,E=3,b=2,g=1,y=new Float32Array(E*m*_),v=new Float32Array(b*m*_),T=new Float32Array(g*m*_);for(let x=0;x<_;x++){const O=x%3*2/3-1,w=x>2?0:-1,S=[O,w,0,O+2/3,w,0,O+2/3,w+1,0,O,w,0,O+2/3,w+1,0,O,w+1,0];y.set(S,E*m*x),v.set(f,b*m*x);const R=[x,x,x,x,x,x];T.set(R,g*m*x)}const C=new ms;C.setAttribute("position",new Yn(y,E)),C.setAttribute("uv",new Yn(v,b)),C.setAttribute("faceIndex",new Yn(T,g)),e.push(C),s>Zo&&s--}return{lodPlanes:e,sizeLods:n,sigmas:i}}function W1(t,e,n){const i=new Eo(t,e,n);return i.texture.mapping=cp,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Ed(t,e,n,i,s){t.viewport.set(e,n,i,s),t.scissor.set(e,n,i,s)}function rIt(t,e,n){const i=new Float32Array(to),s=new be(0,1,0);return new yo({name:"SphericalGaussianBlur",defines:{n:to,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:sy(),fragmentShader:` +}`,Tt={alphahash_fragment:gAt,alphahash_pars_fragment:bAt,alphamap_fragment:EAt,alphamap_pars_fragment:yAt,alphatest_fragment:vAt,alphatest_pars_fragment:SAt,aomap_fragment:TAt,aomap_pars_fragment:xAt,batching_pars_vertex:CAt,batching_vertex:wAt,begin_vertex:RAt,beginnormal_vertex:AAt,bsdfs:NAt,iridescence_fragment:OAt,bumpmap_pars_fragment:IAt,clipping_planes_fragment:MAt,clipping_planes_pars_fragment:DAt,clipping_planes_pars_vertex:kAt,clipping_planes_vertex:LAt,color_fragment:PAt,color_pars_fragment:UAt,color_pars_vertex:FAt,color_vertex:BAt,common:GAt,cube_uv_reflection_fragment:VAt,defaultnormal_vertex:zAt,displacementmap_pars_vertex:HAt,displacementmap_vertex:qAt,emissivemap_fragment:YAt,emissivemap_pars_fragment:$At,colorspace_fragment:WAt,colorspace_pars_fragment:KAt,envmap_fragment:jAt,envmap_common_pars_fragment:QAt,envmap_pars_fragment:XAt,envmap_pars_vertex:ZAt,envmap_physical_pars_fragment:dNt,envmap_vertex:JAt,fog_vertex:eNt,fog_pars_vertex:tNt,fog_fragment:nNt,fog_pars_fragment:iNt,gradientmap_pars_fragment:sNt,lightmap_fragment:rNt,lightmap_pars_fragment:oNt,lights_lambert_fragment:aNt,lights_lambert_pars_fragment:lNt,lights_pars_begin:cNt,lights_toon_fragment:uNt,lights_toon_pars_fragment:pNt,lights_phong_fragment:_Nt,lights_phong_pars_fragment:hNt,lights_physical_fragment:fNt,lights_physical_pars_fragment:mNt,lights_fragment_begin:gNt,lights_fragment_maps:bNt,lights_fragment_end:ENt,logdepthbuf_fragment:yNt,logdepthbuf_pars_fragment:vNt,logdepthbuf_pars_vertex:SNt,logdepthbuf_vertex:TNt,map_fragment:xNt,map_pars_fragment:CNt,map_particle_fragment:wNt,map_particle_pars_fragment:RNt,metalnessmap_fragment:ANt,metalnessmap_pars_fragment:NNt,morphcolor_vertex:ONt,morphnormal_vertex:INt,morphtarget_pars_vertex:MNt,morphtarget_vertex:DNt,normal_fragment_begin:kNt,normal_fragment_maps:LNt,normal_pars_fragment:PNt,normal_pars_vertex:UNt,normal_vertex:FNt,normalmap_pars_fragment:BNt,clearcoat_normal_fragment_begin:GNt,clearcoat_normal_fragment_maps:VNt,clearcoat_pars_fragment:zNt,iridescence_pars_fragment:HNt,opaque_fragment:qNt,packing:YNt,premultiplied_alpha_fragment:$Nt,project_vertex:WNt,dithering_fragment:KNt,dithering_pars_fragment:jNt,roughnessmap_fragment:QNt,roughnessmap_pars_fragment:XNt,shadowmap_pars_fragment:ZNt,shadowmap_pars_vertex:JNt,shadowmap_vertex:eOt,shadowmask_pars_fragment:tOt,skinbase_vertex:nOt,skinning_pars_vertex:iOt,skinning_vertex:sOt,skinnormal_vertex:rOt,specularmap_fragment:oOt,specularmap_pars_fragment:aOt,tonemapping_fragment:lOt,tonemapping_pars_fragment:cOt,transmission_fragment:dOt,transmission_pars_fragment:uOt,uv_pars_fragment:pOt,uv_pars_vertex:_Ot,uv_vertex:hOt,worldpos_vertex:fOt,background_vert:mOt,background_frag:gOt,backgroundCube_vert:bOt,backgroundCube_frag:EOt,cube_vert:yOt,cube_frag:vOt,depth_vert:SOt,depth_frag:TOt,distanceRGBA_vert:xOt,distanceRGBA_frag:COt,equirect_vert:wOt,equirect_frag:ROt,linedashed_vert:AOt,linedashed_frag:NOt,meshbasic_vert:OOt,meshbasic_frag:IOt,meshlambert_vert:MOt,meshlambert_frag:DOt,meshmatcap_vert:kOt,meshmatcap_frag:LOt,meshnormal_vert:POt,meshnormal_frag:UOt,meshphong_vert:FOt,meshphong_frag:BOt,meshphysical_vert:GOt,meshphysical_frag:VOt,meshtoon_vert:zOt,meshtoon_frag:HOt,points_vert:qOt,points_frag:YOt,shadow_vert:$Ot,shadow_frag:WOt,sprite_vert:KOt,sprite_frag:jOt},Qe={common:{diffuse:{value:new gt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wt},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wt},normalScale:{value:new It(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new gt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0},uvTransform:{value:new wt}},sprite:{diffuse:{value:new gt(16777215)},opacity:{value:1},center:{value:new It(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wt},alphaMap:{value:null},alphaMapTransform:{value:new wt},alphaTest:{value:0}}},Zi={basic:{uniforms:Vn([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:Tt.meshbasic_vert,fragmentShader:Tt.meshbasic_frag},lambert:{uniforms:Vn([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new gt(0)}}]),vertexShader:Tt.meshlambert_vert,fragmentShader:Tt.meshlambert_frag},phong:{uniforms:Vn([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new gt(0)},specular:{value:new gt(1118481)},shininess:{value:30}}]),vertexShader:Tt.meshphong_vert,fragmentShader:Tt.meshphong_frag},standard:{uniforms:Vn([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new gt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Tt.meshphysical_vert,fragmentShader:Tt.meshphysical_frag},toon:{uniforms:Vn([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new gt(0)}}]),vertexShader:Tt.meshtoon_vert,fragmentShader:Tt.meshtoon_frag},matcap:{uniforms:Vn([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:Tt.meshmatcap_vert,fragmentShader:Tt.meshmatcap_frag},points:{uniforms:Vn([Qe.points,Qe.fog]),vertexShader:Tt.points_vert,fragmentShader:Tt.points_frag},dashed:{uniforms:Vn([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Tt.linedashed_vert,fragmentShader:Tt.linedashed_frag},depth:{uniforms:Vn([Qe.common,Qe.displacementmap]),vertexShader:Tt.depth_vert,fragmentShader:Tt.depth_frag},normal:{uniforms:Vn([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:Tt.meshnormal_vert,fragmentShader:Tt.meshnormal_frag},sprite:{uniforms:Vn([Qe.sprite,Qe.fog]),vertexShader:Tt.sprite_vert,fragmentShader:Tt.sprite_frag},background:{uniforms:{uvTransform:{value:new wt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Tt.background_vert,fragmentShader:Tt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Tt.backgroundCube_vert,fragmentShader:Tt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Tt.cube_vert,fragmentShader:Tt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Tt.equirect_vert,fragmentShader:Tt.equirect_frag},distanceRGBA:{uniforms:Vn([Qe.common,Qe.displacementmap,{referencePosition:{value:new be},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Tt.distanceRGBA_vert,fragmentShader:Tt.distanceRGBA_frag},shadow:{uniforms:Vn([Qe.lights,Qe.fog,{color:{value:new gt(0)},opacity:{value:1}}]),vertexShader:Tt.shadow_vert,fragmentShader:Tt.shadow_frag}};Zi.physical={uniforms:Vn([Zi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wt},clearcoatNormalScale:{value:new It(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wt},sheen:{value:0},sheenColor:{value:new gt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wt},transmissionSamplerSize:{value:new It},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wt},attenuationDistance:{value:0},attenuationColor:{value:new gt(0)},specularColor:{value:new gt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wt},anisotropyVector:{value:new It},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wt}}]),vertexShader:Tt.meshphysical_vert,fragmentShader:Tt.meshphysical_frag};const bd={r:0,b:0,g:0};function QOt(t,e,n,i,s,r,o){const a=new gt(0);let l=r===!0?0:1,u,d,h=null,f=0,_=null;function m(b,g){let y=!1,v=g.isScene===!0?g.background:null;v&&v.isTexture&&(v=(g.backgroundBlurriness>0?n:e).get(v)),v===null?E(a,l):v&&v.isColor&&(E(v,1),y=!0);const T=t.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(t.autoClear||y)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),v&&(v.isCubeTexture||v.mapping===cp)?(d===void 0&&(d=new Hn(new Rr(1,1,1),new yo({name:"BackgroundCubeMaterial",uniforms:Oa(Zi.backgroundCube.uniforms),vertexShader:Zi.backgroundCube.vertexShader,fragmentShader:Zi.backgroundCube.fragmentShader,side:Zn,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(C,x,O){this.matrixWorld.copyPosition(O.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(d)),d.material.uniforms.envMap.value=v,d.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,d.material.toneMapped=Gt.getTransfer(v.colorSpace)!==Zt,(h!==v||f!==v.version||_!==t.toneMapping)&&(d.material.needsUpdate=!0,h=v,f=v.version,_=t.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null)):v&&v.isTexture&&(u===void 0&&(u=new Hn(new ny(2,2),new yo({name:"BackgroundMaterial",uniforms:Oa(Zi.background.uniforms),vertexShader:Zi.background.vertexShader,fragmentShader:Zi.background.fragmentShader,side:Ys,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(u)),u.material.uniforms.t2D.value=v,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.toneMapped=Gt.getTransfer(v.colorSpace)!==Zt,v.matrixAutoUpdate===!0&&v.updateMatrix(),u.material.uniforms.uvTransform.value.copy(v.matrix),(h!==v||f!==v.version||_!==t.toneMapping)&&(u.material.needsUpdate=!0,h=v,f=v.version,_=t.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null))}function E(b,g){b.getRGB(bd,_I(t)),i.buffers.color.setClear(bd.r,bd.g,bd.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(b,g=1){a.set(b),l=g,E(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,E(a,l)},render:m}}function XOt(t,e,n,i){const s=t.getParameter(t.MAX_VERTEX_ATTRIBS),r=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||r!==null,a={},l=b(null);let u=l,d=!1;function h(L,Y,V,P,X){let W=!1;if(o){const Z=E(P,V,Y);u!==Z&&(u=Z,_(u.object)),W=g(L,P,V,X),W&&y(L,P,V,X)}else{const Z=Y.wireframe===!0;(u.geometry!==P.id||u.program!==V.id||u.wireframe!==Z)&&(u.geometry=P.id,u.program=V.id,u.wireframe=Z,W=!0)}X!==null&&n.update(X,t.ELEMENT_ARRAY_BUFFER),(W||d)&&(d=!1,w(L,Y,V,P),X!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(X).buffer))}function f(){return i.isWebGL2?t.createVertexArray():r.createVertexArrayOES()}function _(L){return i.isWebGL2?t.bindVertexArray(L):r.bindVertexArrayOES(L)}function m(L){return i.isWebGL2?t.deleteVertexArray(L):r.deleteVertexArrayOES(L)}function E(L,Y,V){const P=V.wireframe===!0;let X=a[L.id];X===void 0&&(X={},a[L.id]=X);let W=X[Y.id];W===void 0&&(W={},X[Y.id]=W);let Z=W[P];return Z===void 0&&(Z=b(f()),W[P]=Z),Z}function b(L){const Y=[],V=[],P=[];for(let X=0;X=0){const fe=X[ie];let ye=W[ie];if(ye===void 0&&(ie==="instanceMatrix"&&L.instanceMatrix&&(ye=L.instanceMatrix),ie==="instanceColor"&&L.instanceColor&&(ye=L.instanceColor)),fe===void 0||fe.attribute!==ye||ye&&fe.data!==ye.data)return!0;Z++}return u.attributesNum!==Z||u.index!==P}function y(L,Y,V,P){const X={},W=Y.attributes;let Z=0;const ae=V.getAttributes();for(const ie in ae)if(ae[ie].location>=0){let fe=W[ie];fe===void 0&&(ie==="instanceMatrix"&&L.instanceMatrix&&(fe=L.instanceMatrix),ie==="instanceColor"&&L.instanceColor&&(fe=L.instanceColor));const ye={};ye.attribute=fe,fe&&fe.data&&(ye.data=fe.data),X[ie]=ye,Z++}u.attributes=X,u.attributesNum=Z,u.index=P}function v(){const L=u.newAttributes;for(let Y=0,V=L.length;Y=0){let ee=X[ae];if(ee===void 0&&(ae==="instanceMatrix"&&L.instanceMatrix&&(ee=L.instanceMatrix),ae==="instanceColor"&&L.instanceColor&&(ee=L.instanceColor)),ee!==void 0){const fe=ee.normalized,ye=ee.itemSize,Ne=n.get(ee);if(Ne===void 0)continue;const te=Ne.buffer,me=Ne.type,ne=Ne.bytesPerElement,Se=i.isWebGL2===!0&&(me===t.INT||me===t.UNSIGNED_INT||ee.gpuType===jO);if(ee.isInterleavedBufferAttribute){const De=ee.data,k=De.stride,G=ee.offset;if(De.isInstancedInterleavedBuffer){for(let K=0;K0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";O="mediump"}return O==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=r(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const u=o||e.has("WEBGL_draw_buffers"),d=n.logarithmicDepthBuffer===!0,h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=t.getParameter(t.MAX_TEXTURE_SIZE),m=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),E=t.getParameter(t.MAX_VERTEX_ATTRIBS),b=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),y=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=f>0,T=o||e.has("OES_texture_float"),C=v&&T,x=o?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:s,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:d,maxTextures:h,maxVertexTextures:f,maxTextureSize:_,maxCubemapSize:m,maxAttributes:E,maxVertexUniforms:b,maxVaryings:g,maxFragmentUniforms:y,vertexTextures:v,floatFragmentTextures:T,floatVertexTextures:C,maxSamples:x}}function eIt(t){const e=this;let n=null,i=0,s=!1,r=!1;const o=new Kr,a=new wt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,f){const _=h.length!==0||f||i!==0||s;return s=f,i=h.length,_},this.beginShadows=function(){r=!0,d(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(h,f){n=d(h,f,0)},this.setState=function(h,f,_){const m=h.clippingPlanes,E=h.clipIntersection,b=h.clipShadows,g=t.get(h);if(!s||m===null||m.length===0||r&&!b)r?d(null):u();else{const y=r?0:i,v=y*4;let T=g.clippingState||null;l.value=T,T=d(m,f,v,_);for(let C=0;C!==v;++C)T[C]=n[C];g.clippingState=T,this.numIntersection=E?this.numPlanes:0,this.numPlanes+=y}};function u(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function d(h,f,_,m){const E=h!==null?h.length:0;let b=null;if(E!==0){if(b=l.value,m!==!0||b===null){const g=_+E*4,y=f.matrixWorldInverse;a.getNormalMatrix(y),(b===null||b.length0){const u=new _At(l.height/2);return u.fromEquirectangularTexture(t,o),e.set(o,u),o.addEventListener("dispose",s),n(u.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}class iy extends hI{constructor(e=-1,n=1,i=1,s=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=i,this.bottom=s,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,i,s,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let r=i-e,o=i+e,a=s+n,l=s-n;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=u*this.view.offsetX,o=r+u*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Zo=4,H1=[.125,.215,.35,.446,.526,.582],to=20,og=new iy,q1=new gt;let ag=null,lg=0,cg=0;const jr=(1+Math.sqrt(5))/2,$o=1/jr,Y1=[new be(1,1,1),new be(-1,1,1),new be(1,1,-1),new be(-1,1,-1),new be(0,jr,$o),new be(0,jr,-$o),new be($o,0,jr),new be(-$o,0,jr),new be(jr,$o,0),new be(-jr,$o,0)];class $1{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,i=.1,s=100){ag=this._renderer.getRenderTarget(),lg=this._renderer.getActiveCubeFace(),cg=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,i,s,r),n>0&&this._blur(r,0,0,n),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=j1(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=K1(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?v:0,v,v),d.setRenderTarget(s),E&&d.render(m,a),d.render(e,a)}m.geometry.dispose(),m.material.dispose(),d.toneMapping=f,d.autoClear=h,e.background=b}_textureToCubeUV(e,n){const i=this._renderer,s=e.mapping===xa||e.mapping===Ca;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=j1()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=K1());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new Hn(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;Ed(n,0,0,3*l,2*l),i.setRenderTarget(n),i.render(o,og)}_applyPMREM(e){const n=this._renderer,i=n.autoClear;n.autoClear=!1;for(let s=1;sto&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${to}`);const g=[];let y=0;for(let O=0;Ov-Zo?s-v+Zo:0),x=4*(this._cubeSize-T);Ed(n,C,x,3*T,2*T),l.setRenderTarget(n),l.render(h,og)}}function nIt(t){const e=[],n=[],i=[];let s=t;const r=t-Zo+1+H1.length;for(let o=0;ot-Zo?l=H1[o-t+Zo-1]:o===0&&(l=0),i.push(l);const u=1/(a-2),d=-u,h=1+u,f=[d,d,h,d,h,h,d,d,h,h,d,h],_=6,m=6,E=3,b=2,g=1,y=new Float32Array(E*m*_),v=new Float32Array(b*m*_),T=new Float32Array(g*m*_);for(let x=0;x<_;x++){const O=x%3*2/3-1,w=x>2?0:-1,S=[O,w,0,O+2/3,w,0,O+2/3,w+1,0,O,w,0,O+2/3,w+1,0,O,w+1,0];y.set(S,E*m*x),v.set(f,b*m*x);const R=[x,x,x,x,x,x];T.set(R,g*m*x)}const C=new ms;C.setAttribute("position",new Yn(y,E)),C.setAttribute("uv",new Yn(v,b)),C.setAttribute("faceIndex",new Yn(T,g)),e.push(C),s>Zo&&s--}return{lodPlanes:e,sizeLods:n,sigmas:i}}function W1(t,e,n){const i=new Eo(t,e,n);return i.texture.mapping=cp,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Ed(t,e,n,i,s){t.viewport.set(e,n,i,s),t.scissor.set(e,n,i,s)}function iIt(t,e,n){const i=new Float32Array(to),s=new be(0,1,0);return new yo({name:"SphericalGaussianBlur",defines:{n:to,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:sy(),fragmentShader:` precision mediump float; precision mediump int; @@ -3797,26 +3797,26 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function oIt(t){let e=new WeakMap,n=null;function i(a){if(a&&a.isTexture){const l=a.mapping,u=l===ab||l===lb,d=l===xa||l===Ca;if(u||d)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let h=e.get(a);return n===null&&(n=new $1(t)),h=u?n.fromEquirectangular(a,h):n.fromCubemap(a,h),e.set(a,h),h.texture}else{if(e.has(a))return e.get(a).texture;{const h=a.image;if(u&&h&&h.height>0||d&&h&&s(h)){n===null&&(n=new $1(t));const f=u?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,f),a.addEventListener("dispose",r),f.texture}else return null}}}return a}function s(a){let l=0;const u=6;for(let d=0;de.maxTextureSize&&(U=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const F=new Float32Array(R*U*4*E),Q=new lI(F,R,U,E);Q.type=Ps,Q.needsUpdate=!0;const L=S*4;for(let V=0;V0)return t;const s=e*n;let r=Q1[s];if(r===void 0&&(r=new Float32Array(s),Q1[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(r,a)}return r}function mn(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n0||d&&h&&s(h)){n===null&&(n=new $1(t));const f=u?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,f),a.addEventListener("dispose",r),f.texture}else return null}}}return a}function s(a){let l=0;const u=6;for(let d=0;de.maxTextureSize&&(U=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const F=new Float32Array(R*U*4*E),Q=new lI(F,R,U,E);Q.type=Ps,Q.needsUpdate=!0;const L=S*4;for(let V=0;V0)return t;const s=e*n;let r=Q1[s];if(r===void 0&&(r=new Float32Array(s),Q1[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(r,a)}return r}function mn(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n":" "} ${a}: ${n[o]}`)}return i.join(` -`)}function lMt(t){const e=Gt.getPrimaries(Gt.workingColorSpace),n=Gt.getPrimaries(t);let i;switch(e===n?i="":e===Eu&&n===bu?i="LinearDisplayP3ToLinearSRGB":e===bu&&n===Eu&&(i="LinearSRGBToLinearDisplayP3"),t){case On:case dp:return[i,"LinearTransferOETF"];case on:case JE:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[i,"LinearTransferOETF"]}}function iw(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),s=t.getShaderInfoLog(e).trim();if(i&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const o=parseInt(r[1]);return n.toUpperCase()+` +`)}function oMt(t){const e=Gt.getPrimaries(Gt.workingColorSpace),n=Gt.getPrimaries(t);let i;switch(e===n?i="":e===Eu&&n===bu?i="LinearDisplayP3ToLinearSRGB":e===bu&&n===Eu&&(i="LinearSRGBToLinearDisplayP3"),t){case On:case dp:return[i,"LinearTransferOETF"];case on:case JE:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[i,"LinearTransferOETF"]}}function iw(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),s=t.getShaderInfoLog(e).trim();if(i&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const o=parseInt(r[1]);return n.toUpperCase()+` `+s+` -`+aMt(t.getShaderSource(e),o)}else return s}function cMt(t,e){const n=lMt(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function dMt(t,e){let n;switch(e){case oRt:n="Linear";break;case aRt:n="Reinhard";break;case lRt:n="OptimizedCineon";break;case cRt:n="ACESFilmic";break;case dRt:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function uMt(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.normalMapTangentSpace||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Al).join(` -`)}function pMt(t){const e=[];for(const n in t){const i=t[n];i!==!1&&e.push("#define "+n+" "+i)}return e.join(` -`)}function _Mt(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let s=0;s/gm;function hb(t){return t.replace(hMt,mMt)}const fMt=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function mMt(t,e){let n=Tt[e];if(n===void 0){const i=fMt.get(e);if(i!==void 0)n=Tt[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return hb(n)}const gMt=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function ow(t){return t.replace(gMt,bMt)}function bMt(t,e,n,i){let s="";for(let r=parseInt(e);r/gm;function hb(t){return t.replace(pMt,hMt)}const _Mt=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function hMt(t,e){let n=Tt[e];if(n===void 0){const i=_Mt.get(e);if(i!==void 0)n=Tt[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return hb(n)}const fMt=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function ow(t){return t.replace(fMt,mMt)}function mMt(t,e,n,i){let s="";for(let r=parseInt(e);r0&&(b+=` `),g=[_,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m].filter(Al).join(` `),g.length>0&&(g+=` `)):(b=[aw(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(Al).join(` -`),g=[_,aw(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",n.envMap?"#define "+h:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Cr?"#define TONE_MAPPING":"",n.toneMapping!==Cr?Tt.tonemapping_pars_fragment:"",n.toneMapping!==Cr?dMt("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Tt.colorspace_pars_fragment,cMt("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`),g=[_,aw(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",n.envMap?"#define "+h:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Cr?"#define TONE_MAPPING":"",n.toneMapping!==Cr?Tt.tonemapping_pars_fragment:"",n.toneMapping!==Cr?lMt("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Tt.colorspace_pars_fragment,aMt("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` `].filter(Al).join(` `)),o=hb(o),o=sw(o,n),o=rw(o,n),a=hb(a),a=sw(a,n),a=rw(a,n),o=ow(o),a=ow(a),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(y=`#version 300 es `,b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` @@ -3827,9 +3827,9 @@ precision `+t.precision+" int;";return t.precision==="highp"?e+=` Program Info Log: `+F+` `+P+` -`+X)}else F!==""?console.warn("THREE.WebGLProgram: Program Info Log:",F):(Q===""||L==="")&&(V=!1);V&&(U.diagnostics={runnable:Y,programLog:F,vertexShader:{log:Q,prefix:b},fragmentShader:{log:L,prefix:g}})}s.deleteShader(C),s.deleteShader(x),w=new zd(s,E),S=_Mt(s,E)}let w;this.getUniforms=function(){return w===void 0&&O(this),w};let S;this.getAttributes=function(){return S===void 0&&O(this),S};let R=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return R===!1&&(R=s.getProgramParameter(E,rMt)),R},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(E),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=oMt++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=C,this.fragmentShader=x,this}let CMt=0;class wMt{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(n),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const i of n)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let i=n.get(e);return i===void 0&&(i=new Set,n.set(e,i)),i}_getShaderStage(e){const n=this.shaderCache;let i=n.get(e);return i===void 0&&(i=new RMt(e),n.set(e,i)),i}}class RMt{constructor(e){this.id=CMt++,this.code=e,this.usedTimes=0}}function AMt(t,e,n,i,s,r,o){const a=new cI,l=new wMt,u=[],d=s.isWebGL2,h=s.logarithmicDepthBuffer,f=s.vertexTextures;let _=s.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function E(S){return S===0?"uv":`uv${S}`}function b(S,R,U,F,Q){const L=F.fog,Y=Q.geometry,V=S.isMeshStandardMaterial?F.environment:null,P=(S.isMeshStandardMaterial?n:e).get(S.envMap||V),X=P&&P.mapping===cp?P.image.height:null,W=m[S.type];S.precision!==null&&(_=s.getMaxPrecision(S.precision),_!==S.precision&&console.warn("THREE.WebGLProgram.getParameters:",S.precision,"not supported, using",_,"instead."));const Z=Y.morphAttributes.position||Y.morphAttributes.normal||Y.morphAttributes.color,ae=Z!==void 0?Z.length:0;let ie=0;Y.morphAttributes.position!==void 0&&(ie=1),Y.morphAttributes.normal!==void 0&&(ie=2),Y.morphAttributes.color!==void 0&&(ie=3);let ee,fe,ye,Ne;if(W){const cn=Zi[W];ee=cn.vertexShader,fe=cn.fragmentShader}else ee=S.vertexShader,fe=S.fragmentShader,l.update(S),ye=l.getVertexShaderID(S),Ne=l.getFragmentShaderID(S);const te=t.getRenderTarget(),me=Q.isInstancedMesh===!0,ne=Q.isBatchedMesh===!0,Se=!!S.map,De=!!S.matcap,k=!!P,G=!!S.aoMap,K=!!S.lightMap,de=!!S.bumpMap,se=!!S.normalMap,we=!!S.displacementMap,Ie=!!S.emissiveMap,q=!!S.metalnessMap,_e=!!S.roughnessMap,re=S.anisotropy>0,ce=S.clearcoat>0,D=S.iridescence>0,I=S.sheen>0,H=S.transmission>0,he=re&&!!S.anisotropyMap,J=ce&&!!S.clearcoatMap,oe=ce&&!!S.clearcoatNormalMap,Ae=ce&&!!S.clearcoatRoughnessMap,xe=D&&!!S.iridescenceMap,ke=D&&!!S.iridescenceThicknessMap,ze=I&&!!S.sheenColorMap,rt=I&&!!S.sheenRoughnessMap,Le=!!S.specularMap,dt=!!S.specularColorMap,Xe=!!S.specularIntensityMap,Ye=H&&!!S.transmissionMap,tt=H&&!!S.thicknessMap,Fe=!!S.gradientMap,pt=!!S.alphaMap,pe=S.alphaTest>0,je=!!S.alphaHash,Ue=!!S.extensions,Me=!!Y.attributes.uv1,Be=!!Y.attributes.uv2,ut=!!Y.attributes.uv3;let Et=Cr;return S.toneMapped&&(te===null||te.isXRRenderTarget===!0)&&(Et=t.toneMapping),{isWebGL2:d,shaderID:W,shaderType:S.type,shaderName:S.name,vertexShader:ee,fragmentShader:fe,defines:S.defines,customVertexShaderID:ye,customFragmentShaderID:Ne,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:_,batching:ne,instancing:me,instancingColor:me&&Q.instanceColor!==null,supportsVertexTextures:f,outputColorSpace:te===null?t.outputColorSpace:te.isXRRenderTarget===!0?te.texture.colorSpace:On,map:Se,matcap:De,envMap:k,envMapMode:k&&P.mapping,envMapCubeUVHeight:X,aoMap:G,lightMap:K,bumpMap:de,normalMap:se,displacementMap:f&&we,emissiveMap:Ie,normalMapObjectSpace:se&&S.normalMapType===xRt,normalMapTangentSpace:se&&S.normalMapType===ZE,metalnessMap:q,roughnessMap:_e,anisotropy:re,anisotropyMap:he,clearcoat:ce,clearcoatMap:J,clearcoatNormalMap:oe,clearcoatRoughnessMap:Ae,iridescence:D,iridescenceMap:xe,iridescenceThicknessMap:ke,sheen:I,sheenColorMap:ze,sheenRoughnessMap:rt,specularMap:Le,specularColorMap:dt,specularIntensityMap:Xe,transmission:H,transmissionMap:Ye,thicknessMap:tt,gradientMap:Fe,opaque:S.transparent===!1&&S.blending===la,alphaMap:pt,alphaTest:pe,alphaHash:je,combine:S.combine,mapUv:Se&&E(S.map.channel),aoMapUv:G&&E(S.aoMap.channel),lightMapUv:K&&E(S.lightMap.channel),bumpMapUv:de&&E(S.bumpMap.channel),normalMapUv:se&&E(S.normalMap.channel),displacementMapUv:we&&E(S.displacementMap.channel),emissiveMapUv:Ie&&E(S.emissiveMap.channel),metalnessMapUv:q&&E(S.metalnessMap.channel),roughnessMapUv:_e&&E(S.roughnessMap.channel),anisotropyMapUv:he&&E(S.anisotropyMap.channel),clearcoatMapUv:J&&E(S.clearcoatMap.channel),clearcoatNormalMapUv:oe&&E(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ae&&E(S.clearcoatRoughnessMap.channel),iridescenceMapUv:xe&&E(S.iridescenceMap.channel),iridescenceThicknessMapUv:ke&&E(S.iridescenceThicknessMap.channel),sheenColorMapUv:ze&&E(S.sheenColorMap.channel),sheenRoughnessMapUv:rt&&E(S.sheenRoughnessMap.channel),specularMapUv:Le&&E(S.specularMap.channel),specularColorMapUv:dt&&E(S.specularColorMap.channel),specularIntensityMapUv:Xe&&E(S.specularIntensityMap.channel),transmissionMapUv:Ye&&E(S.transmissionMap.channel),thicknessMapUv:tt&&E(S.thicknessMap.channel),alphaMapUv:pt&&E(S.alphaMap.channel),vertexTangents:!!Y.attributes.tangent&&(se||re),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0&&!!Y.attributes.color&&Y.attributes.color.itemSize===4,vertexUv1s:Me,vertexUv2s:Be,vertexUv3s:ut,pointsUvs:Q.isPoints===!0&&!!Y.attributes.uv&&(Se||pt),fog:!!L,useFog:S.fog===!0,fogExp2:L&&L.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:Q.isSkinnedMesh===!0,morphTargets:Y.morphAttributes.position!==void 0,morphNormals:Y.morphAttributes.normal!==void 0,morphColors:Y.morphAttributes.color!==void 0,morphTargetsCount:ae,morphTextureStride:ie,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numLightProbes:R.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:S.dithering,shadowMapEnabled:t.shadowMap.enabled&&U.length>0,shadowMapType:t.shadowMap.type,toneMapping:Et,useLegacyLights:t._useLegacyLights,decodeVideoTexture:Se&&S.map.isVideoTexture===!0&&Gt.getTransfer(S.map.colorSpace)===Zt,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===es,flipSided:S.side===Zn,useDepthPacking:S.depthPacking>=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionDerivatives:Ue&&S.extensions.derivatives===!0,extensionFragDepth:Ue&&S.extensions.fragDepth===!0,extensionDrawBuffers:Ue&&S.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ue&&S.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:d||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:S.customProgramCacheKey()}}function g(S){const R=[];if(S.shaderID?R.push(S.shaderID):(R.push(S.customVertexShaderID),R.push(S.customFragmentShaderID)),S.defines!==void 0)for(const U in S.defines)R.push(U),R.push(S.defines[U]);return S.isRawShaderMaterial===!1&&(y(R,S),v(R,S),R.push(t.outputColorSpace)),R.push(S.customProgramCacheKey),R.join()}function y(S,R){S.push(R.precision),S.push(R.outputColorSpace),S.push(R.envMapMode),S.push(R.envMapCubeUVHeight),S.push(R.mapUv),S.push(R.alphaMapUv),S.push(R.lightMapUv),S.push(R.aoMapUv),S.push(R.bumpMapUv),S.push(R.normalMapUv),S.push(R.displacementMapUv),S.push(R.emissiveMapUv),S.push(R.metalnessMapUv),S.push(R.roughnessMapUv),S.push(R.anisotropyMapUv),S.push(R.clearcoatMapUv),S.push(R.clearcoatNormalMapUv),S.push(R.clearcoatRoughnessMapUv),S.push(R.iridescenceMapUv),S.push(R.iridescenceThicknessMapUv),S.push(R.sheenColorMapUv),S.push(R.sheenRoughnessMapUv),S.push(R.specularMapUv),S.push(R.specularColorMapUv),S.push(R.specularIntensityMapUv),S.push(R.transmissionMapUv),S.push(R.thicknessMapUv),S.push(R.combine),S.push(R.fogExp2),S.push(R.sizeAttenuation),S.push(R.morphTargetsCount),S.push(R.morphAttributeCount),S.push(R.numDirLights),S.push(R.numPointLights),S.push(R.numSpotLights),S.push(R.numSpotLightMaps),S.push(R.numHemiLights),S.push(R.numRectAreaLights),S.push(R.numDirLightShadows),S.push(R.numPointLightShadows),S.push(R.numSpotLightShadows),S.push(R.numSpotLightShadowsWithMaps),S.push(R.numLightProbes),S.push(R.shadowMapType),S.push(R.toneMapping),S.push(R.numClippingPlanes),S.push(R.numClipIntersection),S.push(R.depthPacking)}function v(S,R){a.disableAll(),R.isWebGL2&&a.enable(0),R.supportsVertexTextures&&a.enable(1),R.instancing&&a.enable(2),R.instancingColor&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUv1s&&a.enable(13),R.vertexUv2s&&a.enable(14),R.vertexUv3s&&a.enable(15),R.vertexTangents&&a.enable(16),R.anisotropy&&a.enable(17),R.alphaHash&&a.enable(18),R.batching&&a.enable(19),S.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.skinning&&a.enable(4),R.morphTargets&&a.enable(5),R.morphNormals&&a.enable(6),R.morphColors&&a.enable(7),R.premultipliedAlpha&&a.enable(8),R.shadowMapEnabled&&a.enable(9),R.useLegacyLights&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.opaque&&a.enable(17),R.pointsUvs&&a.enable(18),R.decodeVideoTexture&&a.enable(19),S.push(a.mask)}function T(S){const R=m[S.type];let U;if(R){const F=Zi[R];U=uAt.clone(F.uniforms)}else U=S.uniforms;return U}function C(S,R){let U;for(let F=0,Q=u.length;F0?i.push(g):_.transparent===!0?s.push(g):n.push(g)}function l(h,f,_,m,E,b){const g=o(h,f,_,m,E,b);_.transmission>0?i.unshift(g):_.transparent===!0?s.unshift(g):n.unshift(g)}function u(h,f){n.length>1&&n.sort(h||OMt),i.length>1&&i.sort(f||lw),s.length>1&&s.sort(f||lw)}function d(){for(let h=e,f=t.length;h=r.length?(o=new cw,r.push(o)):o=r[s],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function MMt(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new be,color:new gt};break;case"SpotLight":n={position:new be,direction:new be,color:new gt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new be,color:new gt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new be,skyColor:new gt,groundColor:new gt};break;case"RectAreaLight":n={color:new gt,position:new be,halfWidth:new be,halfHeight:new be};break}return t[e.id]=n,n}}}function DMt(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new It};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new It};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new It,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let kMt=0;function LMt(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function PMt(t,e){const n=new MMt,i=DMt(),s={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let d=0;d<9;d++)s.probe.push(new be);const r=new be,o=new Rt,a=new Rt;function l(d,h){let f=0,_=0,m=0;for(let F=0;F<9;F++)s.probe[F].set(0,0,0);let E=0,b=0,g=0,y=0,v=0,T=0,C=0,x=0,O=0,w=0,S=0;d.sort(LMt);const R=h===!0?Math.PI:1;for(let F=0,Q=d.length;F0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(s.rectAreaLTC1=Qe.LTC_FLOAT_1,s.rectAreaLTC2=Qe.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(s.rectAreaLTC1=Qe.LTC_HALF_1,s.rectAreaLTC2=Qe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),s.ambient[0]=f,s.ambient[1]=_,s.ambient[2]=m;const U=s.hash;(U.directionalLength!==E||U.pointLength!==b||U.spotLength!==g||U.rectAreaLength!==y||U.hemiLength!==v||U.numDirectionalShadows!==T||U.numPointShadows!==C||U.numSpotShadows!==x||U.numSpotMaps!==O||U.numLightProbes!==S)&&(s.directional.length=E,s.spot.length=g,s.rectArea.length=y,s.point.length=b,s.hemi.length=v,s.directionalShadow.length=T,s.directionalShadowMap.length=T,s.pointShadow.length=C,s.pointShadowMap.length=C,s.spotShadow.length=x,s.spotShadowMap.length=x,s.directionalShadowMatrix.length=T,s.pointShadowMatrix.length=C,s.spotLightMatrix.length=x+O-w,s.spotLightMap.length=O,s.numSpotLightShadowsWithMaps=w,s.numLightProbes=S,U.directionalLength=E,U.pointLength=b,U.spotLength=g,U.rectAreaLength=y,U.hemiLength=v,U.numDirectionalShadows=T,U.numPointShadows=C,U.numSpotShadows=x,U.numSpotMaps=O,U.numLightProbes=S,s.version=kMt++)}function u(d,h){let f=0,_=0,m=0,E=0,b=0;const g=h.matrixWorldInverse;for(let y=0,v=d.length;y=a.length?(l=new dw(t,e),a.push(l)):l=a[o],l}function s(){n=new WeakMap}return{get:i,dispose:s}}class FMt extends Hi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=SRt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class BMt extends Hi{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const GMt=`void main() { +`+X)}else F!==""?console.warn("THREE.WebGLProgram: Program Info Log:",F):(Q===""||L==="")&&(V=!1);V&&(U.diagnostics={runnable:Y,programLog:F,vertexShader:{log:Q,prefix:b},fragmentShader:{log:L,prefix:g}})}s.deleteShader(C),s.deleteShader(x),w=new zd(s,E),S=uMt(s,E)}let w;this.getUniforms=function(){return w===void 0&&O(this),w};let S;this.getAttributes=function(){return S===void 0&&O(this),S};let R=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return R===!1&&(R=s.getProgramParameter(E,iMt)),R},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(E),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=sMt++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=C,this.fragmentShader=x,this}let TMt=0;class xMt{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(n),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const i of n)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let i=n.get(e);return i===void 0&&(i=new Set,n.set(e,i)),i}_getShaderStage(e){const n=this.shaderCache;let i=n.get(e);return i===void 0&&(i=new CMt(e),n.set(e,i)),i}}class CMt{constructor(e){this.id=TMt++,this.code=e,this.usedTimes=0}}function wMt(t,e,n,i,s,r,o){const a=new cI,l=new xMt,u=[],d=s.isWebGL2,h=s.logarithmicDepthBuffer,f=s.vertexTextures;let _=s.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function E(S){return S===0?"uv":`uv${S}`}function b(S,R,U,F,Q){const L=F.fog,Y=Q.geometry,V=S.isMeshStandardMaterial?F.environment:null,P=(S.isMeshStandardMaterial?n:e).get(S.envMap||V),X=P&&P.mapping===cp?P.image.height:null,W=m[S.type];S.precision!==null&&(_=s.getMaxPrecision(S.precision),_!==S.precision&&console.warn("THREE.WebGLProgram.getParameters:",S.precision,"not supported, using",_,"instead."));const Z=Y.morphAttributes.position||Y.morphAttributes.normal||Y.morphAttributes.color,ae=Z!==void 0?Z.length:0;let ie=0;Y.morphAttributes.position!==void 0&&(ie=1),Y.morphAttributes.normal!==void 0&&(ie=2),Y.morphAttributes.color!==void 0&&(ie=3);let ee,fe,ye,Ne;if(W){const cn=Zi[W];ee=cn.vertexShader,fe=cn.fragmentShader}else ee=S.vertexShader,fe=S.fragmentShader,l.update(S),ye=l.getVertexShaderID(S),Ne=l.getFragmentShaderID(S);const te=t.getRenderTarget(),me=Q.isInstancedMesh===!0,ne=Q.isBatchedMesh===!0,Se=!!S.map,De=!!S.matcap,k=!!P,G=!!S.aoMap,K=!!S.lightMap,de=!!S.bumpMap,se=!!S.normalMap,we=!!S.displacementMap,Ie=!!S.emissiveMap,q=!!S.metalnessMap,_e=!!S.roughnessMap,re=S.anisotropy>0,ce=S.clearcoat>0,D=S.iridescence>0,I=S.sheen>0,H=S.transmission>0,he=re&&!!S.anisotropyMap,J=ce&&!!S.clearcoatMap,oe=ce&&!!S.clearcoatNormalMap,Ae=ce&&!!S.clearcoatRoughnessMap,xe=D&&!!S.iridescenceMap,ke=D&&!!S.iridescenceThicknessMap,ze=I&&!!S.sheenColorMap,rt=I&&!!S.sheenRoughnessMap,Le=!!S.specularMap,dt=!!S.specularColorMap,Xe=!!S.specularIntensityMap,Ye=H&&!!S.transmissionMap,tt=H&&!!S.thicknessMap,Fe=!!S.gradientMap,pt=!!S.alphaMap,pe=S.alphaTest>0,je=!!S.alphaHash,Ue=!!S.extensions,Me=!!Y.attributes.uv1,Be=!!Y.attributes.uv2,ut=!!Y.attributes.uv3;let Et=Cr;return S.toneMapped&&(te===null||te.isXRRenderTarget===!0)&&(Et=t.toneMapping),{isWebGL2:d,shaderID:W,shaderType:S.type,shaderName:S.name,vertexShader:ee,fragmentShader:fe,defines:S.defines,customVertexShaderID:ye,customFragmentShaderID:Ne,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:_,batching:ne,instancing:me,instancingColor:me&&Q.instanceColor!==null,supportsVertexTextures:f,outputColorSpace:te===null?t.outputColorSpace:te.isXRRenderTarget===!0?te.texture.colorSpace:On,map:Se,matcap:De,envMap:k,envMapMode:k&&P.mapping,envMapCubeUVHeight:X,aoMap:G,lightMap:K,bumpMap:de,normalMap:se,displacementMap:f&&we,emissiveMap:Ie,normalMapObjectSpace:se&&S.normalMapType===SRt,normalMapTangentSpace:se&&S.normalMapType===ZE,metalnessMap:q,roughnessMap:_e,anisotropy:re,anisotropyMap:he,clearcoat:ce,clearcoatMap:J,clearcoatNormalMap:oe,clearcoatRoughnessMap:Ae,iridescence:D,iridescenceMap:xe,iridescenceThicknessMap:ke,sheen:I,sheenColorMap:ze,sheenRoughnessMap:rt,specularMap:Le,specularColorMap:dt,specularIntensityMap:Xe,transmission:H,transmissionMap:Ye,thicknessMap:tt,gradientMap:Fe,opaque:S.transparent===!1&&S.blending===la,alphaMap:pt,alphaTest:pe,alphaHash:je,combine:S.combine,mapUv:Se&&E(S.map.channel),aoMapUv:G&&E(S.aoMap.channel),lightMapUv:K&&E(S.lightMap.channel),bumpMapUv:de&&E(S.bumpMap.channel),normalMapUv:se&&E(S.normalMap.channel),displacementMapUv:we&&E(S.displacementMap.channel),emissiveMapUv:Ie&&E(S.emissiveMap.channel),metalnessMapUv:q&&E(S.metalnessMap.channel),roughnessMapUv:_e&&E(S.roughnessMap.channel),anisotropyMapUv:he&&E(S.anisotropyMap.channel),clearcoatMapUv:J&&E(S.clearcoatMap.channel),clearcoatNormalMapUv:oe&&E(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ae&&E(S.clearcoatRoughnessMap.channel),iridescenceMapUv:xe&&E(S.iridescenceMap.channel),iridescenceThicknessMapUv:ke&&E(S.iridescenceThicknessMap.channel),sheenColorMapUv:ze&&E(S.sheenColorMap.channel),sheenRoughnessMapUv:rt&&E(S.sheenRoughnessMap.channel),specularMapUv:Le&&E(S.specularMap.channel),specularColorMapUv:dt&&E(S.specularColorMap.channel),specularIntensityMapUv:Xe&&E(S.specularIntensityMap.channel),transmissionMapUv:Ye&&E(S.transmissionMap.channel),thicknessMapUv:tt&&E(S.thicknessMap.channel),alphaMapUv:pt&&E(S.alphaMap.channel),vertexTangents:!!Y.attributes.tangent&&(se||re),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0&&!!Y.attributes.color&&Y.attributes.color.itemSize===4,vertexUv1s:Me,vertexUv2s:Be,vertexUv3s:ut,pointsUvs:Q.isPoints===!0&&!!Y.attributes.uv&&(Se||pt),fog:!!L,useFog:S.fog===!0,fogExp2:L&&L.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:Q.isSkinnedMesh===!0,morphTargets:Y.morphAttributes.position!==void 0,morphNormals:Y.morphAttributes.normal!==void 0,morphColors:Y.morphAttributes.color!==void 0,morphTargetsCount:ae,morphTextureStride:ie,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numLightProbes:R.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:S.dithering,shadowMapEnabled:t.shadowMap.enabled&&U.length>0,shadowMapType:t.shadowMap.type,toneMapping:Et,useLegacyLights:t._useLegacyLights,decodeVideoTexture:Se&&S.map.isVideoTexture===!0&&Gt.getTransfer(S.map.colorSpace)===Zt,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===es,flipSided:S.side===Zn,useDepthPacking:S.depthPacking>=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionDerivatives:Ue&&S.extensions.derivatives===!0,extensionFragDepth:Ue&&S.extensions.fragDepth===!0,extensionDrawBuffers:Ue&&S.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ue&&S.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:d||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:S.customProgramCacheKey()}}function g(S){const R=[];if(S.shaderID?R.push(S.shaderID):(R.push(S.customVertexShaderID),R.push(S.customFragmentShaderID)),S.defines!==void 0)for(const U in S.defines)R.push(U),R.push(S.defines[U]);return S.isRawShaderMaterial===!1&&(y(R,S),v(R,S),R.push(t.outputColorSpace)),R.push(S.customProgramCacheKey),R.join()}function y(S,R){S.push(R.precision),S.push(R.outputColorSpace),S.push(R.envMapMode),S.push(R.envMapCubeUVHeight),S.push(R.mapUv),S.push(R.alphaMapUv),S.push(R.lightMapUv),S.push(R.aoMapUv),S.push(R.bumpMapUv),S.push(R.normalMapUv),S.push(R.displacementMapUv),S.push(R.emissiveMapUv),S.push(R.metalnessMapUv),S.push(R.roughnessMapUv),S.push(R.anisotropyMapUv),S.push(R.clearcoatMapUv),S.push(R.clearcoatNormalMapUv),S.push(R.clearcoatRoughnessMapUv),S.push(R.iridescenceMapUv),S.push(R.iridescenceThicknessMapUv),S.push(R.sheenColorMapUv),S.push(R.sheenRoughnessMapUv),S.push(R.specularMapUv),S.push(R.specularColorMapUv),S.push(R.specularIntensityMapUv),S.push(R.transmissionMapUv),S.push(R.thicknessMapUv),S.push(R.combine),S.push(R.fogExp2),S.push(R.sizeAttenuation),S.push(R.morphTargetsCount),S.push(R.morphAttributeCount),S.push(R.numDirLights),S.push(R.numPointLights),S.push(R.numSpotLights),S.push(R.numSpotLightMaps),S.push(R.numHemiLights),S.push(R.numRectAreaLights),S.push(R.numDirLightShadows),S.push(R.numPointLightShadows),S.push(R.numSpotLightShadows),S.push(R.numSpotLightShadowsWithMaps),S.push(R.numLightProbes),S.push(R.shadowMapType),S.push(R.toneMapping),S.push(R.numClippingPlanes),S.push(R.numClipIntersection),S.push(R.depthPacking)}function v(S,R){a.disableAll(),R.isWebGL2&&a.enable(0),R.supportsVertexTextures&&a.enable(1),R.instancing&&a.enable(2),R.instancingColor&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUv1s&&a.enable(13),R.vertexUv2s&&a.enable(14),R.vertexUv3s&&a.enable(15),R.vertexTangents&&a.enable(16),R.anisotropy&&a.enable(17),R.alphaHash&&a.enable(18),R.batching&&a.enable(19),S.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.skinning&&a.enable(4),R.morphTargets&&a.enable(5),R.morphNormals&&a.enable(6),R.morphColors&&a.enable(7),R.premultipliedAlpha&&a.enable(8),R.shadowMapEnabled&&a.enable(9),R.useLegacyLights&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.opaque&&a.enable(17),R.pointsUvs&&a.enable(18),R.decodeVideoTexture&&a.enable(19),S.push(a.mask)}function T(S){const R=m[S.type];let U;if(R){const F=Zi[R];U=cAt.clone(F.uniforms)}else U=S.uniforms;return U}function C(S,R){let U;for(let F=0,Q=u.length;F0?i.push(g):_.transparent===!0?s.push(g):n.push(g)}function l(h,f,_,m,E,b){const g=o(h,f,_,m,E,b);_.transmission>0?i.unshift(g):_.transparent===!0?s.unshift(g):n.unshift(g)}function u(h,f){n.length>1&&n.sort(h||AMt),i.length>1&&i.sort(f||lw),s.length>1&&s.sort(f||lw)}function d(){for(let h=e,f=t.length;h=r.length?(o=new cw,r.push(o)):o=r[s],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function OMt(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new be,color:new gt};break;case"SpotLight":n={position:new be,direction:new be,color:new gt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new be,color:new gt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new be,skyColor:new gt,groundColor:new gt};break;case"RectAreaLight":n={color:new gt,position:new be,halfWidth:new be,halfHeight:new be};break}return t[e.id]=n,n}}}function IMt(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new It};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new It};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new It,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let MMt=0;function DMt(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function kMt(t,e){const n=new OMt,i=IMt(),s={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let d=0;d<9;d++)s.probe.push(new be);const r=new be,o=new Rt,a=new Rt;function l(d,h){let f=0,_=0,m=0;for(let F=0;F<9;F++)s.probe[F].set(0,0,0);let E=0,b=0,g=0,y=0,v=0,T=0,C=0,x=0,O=0,w=0,S=0;d.sort(DMt);const R=h===!0?Math.PI:1;for(let F=0,Q=d.length;F0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(s.rectAreaLTC1=Qe.LTC_FLOAT_1,s.rectAreaLTC2=Qe.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(s.rectAreaLTC1=Qe.LTC_HALF_1,s.rectAreaLTC2=Qe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),s.ambient[0]=f,s.ambient[1]=_,s.ambient[2]=m;const U=s.hash;(U.directionalLength!==E||U.pointLength!==b||U.spotLength!==g||U.rectAreaLength!==y||U.hemiLength!==v||U.numDirectionalShadows!==T||U.numPointShadows!==C||U.numSpotShadows!==x||U.numSpotMaps!==O||U.numLightProbes!==S)&&(s.directional.length=E,s.spot.length=g,s.rectArea.length=y,s.point.length=b,s.hemi.length=v,s.directionalShadow.length=T,s.directionalShadowMap.length=T,s.pointShadow.length=C,s.pointShadowMap.length=C,s.spotShadow.length=x,s.spotShadowMap.length=x,s.directionalShadowMatrix.length=T,s.pointShadowMatrix.length=C,s.spotLightMatrix.length=x+O-w,s.spotLightMap.length=O,s.numSpotLightShadowsWithMaps=w,s.numLightProbes=S,U.directionalLength=E,U.pointLength=b,U.spotLength=g,U.rectAreaLength=y,U.hemiLength=v,U.numDirectionalShadows=T,U.numPointShadows=C,U.numSpotShadows=x,U.numSpotMaps=O,U.numLightProbes=S,s.version=MMt++)}function u(d,h){let f=0,_=0,m=0,E=0,b=0;const g=h.matrixWorldInverse;for(let y=0,v=d.length;y=a.length?(l=new dw(t,e),a.push(l)):l=a[o],l}function s(){n=new WeakMap}return{get:i,dispose:s}}class PMt extends Hi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=yRt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class UMt extends Hi{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const FMt=`void main() { gl_Position = vec4( position, 1.0 ); -}`,VMt=`uniform sampler2D shadow_pass; +}`,BMt=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3855,8 +3855,8 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function zMt(t,e,n){let i=new ty;const s=new It,r=new It,o=new Wt,a=new FMt({depthPacking:TRt}),l=new BMt,u={},d=n.maxTextureSize,h={[Ys]:Zn,[Zn]:Ys,[es]:es},f=new yo({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new It},radius:{value:4}},vertexShader:GMt,fragmentShader:VMt}),_=f.clone();_.defines.HORIZONTAL_PASS=1;const m=new ms;m.setAttribute("position",new Yn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Hn(m,f),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=$O;let g=this.type;this.render=function(C,x,O){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||C.length===0)return;const w=t.getRenderTarget(),S=t.getActiveCubeFace(),R=t.getActiveMipmapLevel(),U=t.state;U.setBlending(xr),U.buffers.color.setClear(1,1,1,1),U.buffers.depth.setTest(!0),U.setScissorTest(!1);const F=g!==Ms&&this.type===Ms,Q=g===Ms&&this.type!==Ms;for(let L=0,Y=C.length;Ld||s.y>d)&&(s.x>d&&(r.x=Math.floor(d/X.x),s.x=r.x*X.x,P.mapSize.x=r.x),s.y>d&&(r.y=Math.floor(d/X.y),s.y=r.y*X.y,P.mapSize.y=r.y)),P.map===null||F===!0||Q===!0){const Z=this.type!==Ms?{minFilter:yn,magFilter:yn}:{};P.map!==null&&P.map.dispose(),P.map=new Eo(s.x,s.y,Z),P.map.texture.name=V.name+".shadowMap",P.camera.updateProjectionMatrix()}t.setRenderTarget(P.map),t.clear();const W=P.getViewportCount();for(let Z=0;Z0||x.map&&x.alphaTest>0){const U=S.uuid,F=x.uuid;let Q=u[U];Q===void 0&&(Q={},u[U]=Q);let L=Q[F];L===void 0&&(L=S.clone(),Q[F]=L),S=L}if(S.visible=x.visible,S.wireframe=x.wireframe,w===Ms?S.side=x.shadowSide!==null?x.shadowSide:x.side:S.side=x.shadowSide!==null?x.shadowSide:h[x.side],S.alphaMap=x.alphaMap,S.alphaTest=x.alphaTest,S.map=x.map,S.clipShadows=x.clipShadows,S.clippingPlanes=x.clippingPlanes,S.clipIntersection=x.clipIntersection,S.displacementMap=x.displacementMap,S.displacementScale=x.displacementScale,S.displacementBias=x.displacementBias,S.wireframeLinewidth=x.wireframeLinewidth,S.linewidth=x.linewidth,O.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const U=t.properties.get(S);U.light=O}return S}function T(C,x,O,w,S){if(C.visible===!1)return;if(C.layers.test(x.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&S===Ms)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(O.matrixWorldInverse,C.matrixWorld);const F=e.update(C),Q=C.material;if(Array.isArray(Q)){const L=F.groups;for(let Y=0,V=L.length;Y=1):Z.indexOf("OpenGL ES")!==-1&&(W=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),X=W>=2);let ae=null,ie={};const ee=t.getParameter(t.SCISSOR_BOX),fe=t.getParameter(t.VIEWPORT),ye=new Wt().fromArray(ee),Ne=new Wt().fromArray(fe);function te(pe,je,Ue,Me){const Be=new Uint8Array(4),ut=t.createTexture();t.bindTexture(pe,ut),t.texParameteri(pe,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(pe,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Et=0;Et"u"?!1:/OculusBrowser/g.test(navigator.userAgent),m=new WeakMap;let E;const b=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(D,I){return g?new OffscreenCanvas(D,I):lc("canvas")}function v(D,I,H,he){let J=1;if((D.width>he||D.height>he)&&(J=he/Math.max(D.width,D.height)),J<1||I===!0)if(typeof HTMLImageElement<"u"&&D instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&D instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&D instanceof ImageBitmap){const oe=I?vu:Math.floor,Ae=oe(J*D.width),xe=oe(J*D.height);E===void 0&&(E=y(Ae,xe));const ke=H?y(Ae,xe):E;return ke.width=Ae,ke.height=xe,ke.getContext("2d").drawImage(D,0,0,Ae,xe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+D.width+"x"+D.height+") to ("+Ae+"x"+xe+")."),ke}else return"data"in D&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+D.width+"x"+D.height+")."),D;return D}function T(D){return _b(D.width)&&_b(D.height)}function C(D){return a?!1:D.wrapS!==mi||D.wrapT!==mi||D.minFilter!==yn&&D.minFilter!==jn}function x(D,I){return D.generateMipmaps&&I&&D.minFilter!==yn&&D.minFilter!==jn}function O(D){t.generateMipmap(D)}function w(D,I,H,he,J=!1){if(a===!1)return I;if(D!==null){if(t[D]!==void 0)return t[D];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+D+"'")}let oe=I;if(I===t.RED&&(H===t.FLOAT&&(oe=t.R32F),H===t.HALF_FLOAT&&(oe=t.R16F),H===t.UNSIGNED_BYTE&&(oe=t.R8)),I===t.RED_INTEGER&&(H===t.UNSIGNED_BYTE&&(oe=t.R8UI),H===t.UNSIGNED_SHORT&&(oe=t.R16UI),H===t.UNSIGNED_INT&&(oe=t.R32UI),H===t.BYTE&&(oe=t.R8I),H===t.SHORT&&(oe=t.R16I),H===t.INT&&(oe=t.R32I)),I===t.RG&&(H===t.FLOAT&&(oe=t.RG32F),H===t.HALF_FLOAT&&(oe=t.RG16F),H===t.UNSIGNED_BYTE&&(oe=t.RG8)),I===t.RGBA){const Ae=J?gu:Gt.getTransfer(he);H===t.FLOAT&&(oe=t.RGBA32F),H===t.HALF_FLOAT&&(oe=t.RGBA16F),H===t.UNSIGNED_BYTE&&(oe=Ae===Zt?t.SRGB8_ALPHA8:t.RGBA8),H===t.UNSIGNED_SHORT_4_4_4_4&&(oe=t.RGBA4),H===t.UNSIGNED_SHORT_5_5_5_1&&(oe=t.RGB5_A1)}return(oe===t.R16F||oe===t.R32F||oe===t.RG16F||oe===t.RG32F||oe===t.RGBA16F||oe===t.RGBA32F)&&e.get("EXT_color_buffer_float"),oe}function S(D,I,H){return x(D,H)===!0||D.isFramebufferTexture&&D.minFilter!==yn&&D.minFilter!==jn?Math.log2(Math.max(I.width,I.height))+1:D.mipmaps!==void 0&&D.mipmaps.length>0?D.mipmaps.length:D.isCompressedTexture&&Array.isArray(D.image)?I.mipmaps.length:1}function R(D){return D===yn||D===cb||D===Vd?t.NEAREST:t.LINEAR}function U(D){const I=D.target;I.removeEventListener("dispose",U),Q(I),I.isVideoTexture&&m.delete(I)}function F(D){const I=D.target;I.removeEventListener("dispose",F),Y(I)}function Q(D){const I=i.get(D);if(I.__webglInit===void 0)return;const H=D.source,he=b.get(H);if(he){const J=he[I.__cacheKey];J.usedTimes--,J.usedTimes===0&&L(D),Object.keys(he).length===0&&b.delete(H)}i.remove(D)}function L(D){const I=i.get(D);t.deleteTexture(I.__webglTexture);const H=D.source,he=b.get(H);delete he[I.__cacheKey],o.memory.textures--}function Y(D){const I=D.texture,H=i.get(D),he=i.get(I);if(he.__webglTexture!==void 0&&(t.deleteTexture(he.__webglTexture),o.memory.textures--),D.depthTexture&&D.depthTexture.dispose(),D.isWebGLCubeRenderTarget)for(let J=0;J<6;J++){if(Array.isArray(H.__webglFramebuffer[J]))for(let oe=0;oe=l&&console.warn("THREE.WebGLTextures: Trying to use "+D+" texture units while this GPU supports only "+l),V+=1,D}function W(D){const I=[];return I.push(D.wrapS),I.push(D.wrapT),I.push(D.wrapR||0),I.push(D.magFilter),I.push(D.minFilter),I.push(D.anisotropy),I.push(D.internalFormat),I.push(D.format),I.push(D.type),I.push(D.generateMipmaps),I.push(D.premultiplyAlpha),I.push(D.flipY),I.push(D.unpackAlignment),I.push(D.colorSpace),I.join()}function Z(D,I){const H=i.get(D);if(D.isVideoTexture&&re(D),D.isRenderTargetTexture===!1&&D.version>0&&H.__version!==D.version){const he=D.image;if(he===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(he.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ne(H,D,I);return}}n.bindTexture(t.TEXTURE_2D,H.__webglTexture,t.TEXTURE0+I)}function ae(D,I){const H=i.get(D);if(D.version>0&&H.__version!==D.version){ne(H,D,I);return}n.bindTexture(t.TEXTURE_2D_ARRAY,H.__webglTexture,t.TEXTURE0+I)}function ie(D,I){const H=i.get(D);if(D.version>0&&H.__version!==D.version){ne(H,D,I);return}n.bindTexture(t.TEXTURE_3D,H.__webglTexture,t.TEXTURE0+I)}function ee(D,I){const H=i.get(D);if(D.version>0&&H.__version!==D.version){Se(H,D,I);return}n.bindTexture(t.TEXTURE_CUBE_MAP,H.__webglTexture,t.TEXTURE0+I)}const fe={[wa]:t.REPEAT,[mi]:t.CLAMP_TO_EDGE,[mu]:t.MIRRORED_REPEAT},ye={[yn]:t.NEAREST,[cb]:t.NEAREST_MIPMAP_NEAREST,[Vd]:t.NEAREST_MIPMAP_LINEAR,[jn]:t.LINEAR,[KO]:t.LINEAR_MIPMAP_NEAREST,[bo]:t.LINEAR_MIPMAP_LINEAR},Ne={[CRt]:t.NEVER,[IRt]:t.ALWAYS,[wRt]:t.LESS,[sI]:t.LEQUAL,[RRt]:t.EQUAL,[ORt]:t.GEQUAL,[ARt]:t.GREATER,[NRt]:t.NOTEQUAL};function te(D,I,H){if(H?(t.texParameteri(D,t.TEXTURE_WRAP_S,fe[I.wrapS]),t.texParameteri(D,t.TEXTURE_WRAP_T,fe[I.wrapT]),(D===t.TEXTURE_3D||D===t.TEXTURE_2D_ARRAY)&&t.texParameteri(D,t.TEXTURE_WRAP_R,fe[I.wrapR]),t.texParameteri(D,t.TEXTURE_MAG_FILTER,ye[I.magFilter]),t.texParameteri(D,t.TEXTURE_MIN_FILTER,ye[I.minFilter])):(t.texParameteri(D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(D===t.TEXTURE_3D||D===t.TEXTURE_2D_ARRAY)&&t.texParameteri(D,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(I.wrapS!==mi||I.wrapT!==mi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(D,t.TEXTURE_MAG_FILTER,R(I.magFilter)),t.texParameteri(D,t.TEXTURE_MIN_FILTER,R(I.minFilter)),I.minFilter!==yn&&I.minFilter!==jn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(t.texParameteri(D,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(D,t.TEXTURE_COMPARE_FUNC,Ne[I.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const he=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===yn||I.minFilter!==Vd&&I.minFilter!==bo||I.type===Ps&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===oc&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(t.texParameterf(D,he.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,s.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function me(D,I){let H=!1;D.__webglInit===void 0&&(D.__webglInit=!0,I.addEventListener("dispose",U));const he=I.source;let J=b.get(he);J===void 0&&(J={},b.set(he,J));const oe=W(I);if(oe!==D.__cacheKey){J[oe]===void 0&&(J[oe]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,H=!0),J[oe].usedTimes++;const Ae=J[D.__cacheKey];Ae!==void 0&&(J[D.__cacheKey].usedTimes--,Ae.usedTimes===0&&L(I)),D.__cacheKey=oe,D.__webglTexture=J[oe].texture}return H}function ne(D,I,H){let he=t.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(he=t.TEXTURE_2D_ARRAY),I.isData3DTexture&&(he=t.TEXTURE_3D);const J=me(D,I),oe=I.source;n.bindTexture(he,D.__webglTexture,t.TEXTURE0+H);const Ae=i.get(oe);if(oe.version!==Ae.__version||J===!0){n.activeTexture(t.TEXTURE0+H);const xe=Gt.getPrimaries(Gt.workingColorSpace),ke=I.colorSpace===bi?null:Gt.getPrimaries(I.colorSpace),ze=I.colorSpace===bi||xe===ke?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,I.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,I.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,ze);const rt=C(I)&&T(I.image)===!1;let Le=v(I.image,rt,!1,d);Le=ce(I,Le);const dt=T(Le)||a,Xe=r.convert(I.format,I.colorSpace);let Ye=r.convert(I.type),tt=w(I.internalFormat,Xe,Ye,I.colorSpace,I.isVideoTexture);te(he,I,dt);let Fe;const pt=I.mipmaps,pe=a&&I.isVideoTexture!==!0&&tt!==tI,je=Ae.__version===void 0||J===!0,Ue=S(I,Le,dt);if(I.isDepthTexture)tt=t.DEPTH_COMPONENT,a?I.type===Ps?tt=t.DEPTH_COMPONENT32F:I.type===yr?tt=t.DEPTH_COMPONENT24:I.type===co?tt=t.DEPTH24_STENCIL8:tt=t.DEPTH_COMPONENT16:I.type===Ps&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===uo&&tt===t.DEPTH_COMPONENT&&I.type!==XE&&I.type!==yr&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=yr,Ye=r.convert(I.type)),I.format===Ra&&tt===t.DEPTH_COMPONENT&&(tt=t.DEPTH_STENCIL,I.type!==co&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=co,Ye=r.convert(I.type))),je&&(pe?n.texStorage2D(t.TEXTURE_2D,1,tt,Le.width,Le.height):n.texImage2D(t.TEXTURE_2D,0,tt,Le.width,Le.height,0,Xe,Ye,null));else if(I.isDataTexture)if(pt.length>0&&dt){pe&&je&&n.texStorage2D(t.TEXTURE_2D,Ue,tt,pt[0].width,pt[0].height);for(let Me=0,Be=pt.length;Me>=1,Be>>=1}}else if(pt.length>0&&dt){pe&&je&&n.texStorage2D(t.TEXTURE_2D,Ue,tt,pt[0].width,pt[0].height);for(let Me=0,Be=pt.length;Me0&&je++,n.texStorage2D(t.TEXTURE_CUBE_MAP,je,Fe,Le[0].width,Le[0].height));for(let Me=0;Me<6;Me++)if(rt){pt?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,0,0,Le[Me].width,Le[Me].height,Ye,tt,Le[Me].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,Fe,Le[Me].width,Le[Me].height,0,Ye,tt,Le[Me].data);for(let Be=0;Be>oe),Le=Math.max(1,I.height>>oe);J===t.TEXTURE_3D||J===t.TEXTURE_2D_ARRAY?n.texImage3D(J,oe,ke,rt,Le,I.depth,0,Ae,xe,null):n.texImage2D(J,oe,ke,rt,Le,0,Ae,xe,null)}n.bindFramebuffer(t.FRAMEBUFFER,D),_e(I)?f.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,he,J,i.get(H).__webglTexture,0,q(I)):(J===t.TEXTURE_2D||J>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&J<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,he,J,i.get(H).__webglTexture,oe),n.bindFramebuffer(t.FRAMEBUFFER,null)}function k(D,I,H){if(t.bindRenderbuffer(t.RENDERBUFFER,D),I.depthBuffer&&!I.stencilBuffer){let he=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(H||_e(I)){const J=I.depthTexture;J&&J.isDepthTexture&&(J.type===Ps?he=t.DEPTH_COMPONENT32F:J.type===yr&&(he=t.DEPTH_COMPONENT24));const oe=q(I);_e(I)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,oe,he,I.width,I.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,oe,he,I.width,I.height)}else t.renderbufferStorage(t.RENDERBUFFER,he,I.width,I.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,D)}else if(I.depthBuffer&&I.stencilBuffer){const he=q(I);H&&_e(I)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,he,t.DEPTH24_STENCIL8,I.width,I.height):_e(I)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,he,t.DEPTH24_STENCIL8,I.width,I.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,I.width,I.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,D)}else{const he=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let J=0;J0){H.__webglFramebuffer[xe]=[];for(let ke=0;ke0){H.__webglFramebuffer=[];for(let xe=0;xe0&&_e(D)===!1){const xe=oe?I:[I];H.__webglMultisampledFramebuffer=t.createFramebuffer(),H.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,H.__webglMultisampledFramebuffer);for(let ke=0;ke0)for(let ke=0;ke0)for(let ke=0;ke0&&_e(D)===!1){const I=D.isWebGLMultipleRenderTargets?D.texture:[D.texture],H=D.width,he=D.height;let J=t.COLOR_BUFFER_BIT;const oe=[],Ae=D.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,xe=i.get(D),ke=D.isWebGLMultipleRenderTargets===!0;if(ke)for(let ze=0;ze0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function re(D){const I=o.render.frame;m.get(D)!==I&&(m.set(D,I),D.update())}function ce(D,I){const H=D.colorSpace,he=D.format,J=D.type;return D.isCompressedTexture===!0||D.isVideoTexture===!0||D.format===pb||H!==On&&H!==bi&&(Gt.getTransfer(H)===Zt?a===!1?e.has("EXT_sRGB")===!0&&he===gi?(D.format=pb,D.minFilter=jn,D.generateMipmaps=!1):I=oI.sRGBToLinear(I):(he!==gi||J!==wr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",H)),I}this.allocateTextureUnit=X,this.resetTextureUnits=P,this.setTexture2D=Z,this.setTexture2DArray=ae,this.setTexture3D=ie,this.setTextureCube=ee,this.rebindTextures=de,this.setupRenderTarget=se,this.updateRenderTargetMipmap=we,this.updateMultisampleRenderTarget=Ie,this.setupDepthRenderbuffer=K,this.setupFrameBufferTexture=De,this.useMultisampledRTT=_e}function YMt(t,e,n){const i=n.isWebGL2;function s(r,o=bi){let a;const l=Gt.getTransfer(o);if(r===wr)return t.UNSIGNED_BYTE;if(r===QO)return t.UNSIGNED_SHORT_4_4_4_4;if(r===XO)return t.UNSIGNED_SHORT_5_5_5_1;if(r===pRt)return t.BYTE;if(r===_Rt)return t.SHORT;if(r===XE)return t.UNSIGNED_SHORT;if(r===jO)return t.INT;if(r===yr)return t.UNSIGNED_INT;if(r===Ps)return t.FLOAT;if(r===oc)return i?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(r===hRt)return t.ALPHA;if(r===gi)return t.RGBA;if(r===fRt)return t.LUMINANCE;if(r===mRt)return t.LUMINANCE_ALPHA;if(r===uo)return t.DEPTH_COMPONENT;if(r===Ra)return t.DEPTH_STENCIL;if(r===pb)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(r===gRt)return t.RED;if(r===ZO)return t.RED_INTEGER;if(r===bRt)return t.RG;if(r===JO)return t.RG_INTEGER;if(r===eI)return t.RGBA_INTEGER;if(r===Um||r===Fm||r===Bm||r===Gm)if(l===Zt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===Um)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Fm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Bm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Gm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===Um)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Fm)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Bm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Gm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===QC||r===XC||r===ZC||r===JC)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===QC)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===XC)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===ZC)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===JC)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===tI)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===e1||r===t1)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===e1)return l===Zt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===t1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===n1||r===i1||r===s1||r===r1||r===o1||r===a1||r===l1||r===c1||r===d1||r===u1||r===p1||r===_1||r===h1||r===f1)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===n1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===i1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===s1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===r1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===o1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===a1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===l1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===c1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===d1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===u1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===p1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===_1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===h1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===f1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Vm||r===m1||r===g1)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===Vm)return l===Zt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===m1)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===g1)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===ERt||r===b1||r===E1||r===y1)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===Vm)return a.COMPRESSED_RED_RGTC1_EXT;if(r===b1)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===E1)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===y1)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===co?i?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[r]!==void 0?t[r]:null}return{convert:s}}class $Mt extends zn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class so extends rn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const WMt={type:"move"};class ug{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new so,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new so,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new be,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new be),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new so,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new be,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new be),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const i of e.hand.values())this._getHandJoint(n,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,u=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const E of e.hand.values()){const b=n.getJointPose(E,i),g=this._getHandJoint(u,E);b!==null&&(g.matrix.fromArray(b.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=b.radius),g.visible=b!==null}const d=u.joints["index-finger-tip"],h=u.joints["thumb-tip"],f=d.position.distanceTo(h.position),_=.02,m=.005;u.inputState.pinching&&f>_+m?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&f<=_-m&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=n.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=n.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(WMt)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const i=new so;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[n.jointName]=i,e.add(i)}return e.joints[n.jointName]}}class KMt extends ja{constructor(e,n){super();const i=this;let s=null,r=1,o=null,a="local-floor",l=1,u=null,d=null,h=null,f=null,_=null,m=null;const E=n.getContextAttributes();let b=null,g=null;const y=[],v=[],T=new It;let C=null;const x=new zn;x.layers.enable(1),x.viewport=new Wt;const O=new zn;O.layers.enable(2),O.viewport=new Wt;const w=[x,O],S=new $Mt;S.layers.enable(1),S.layers.enable(2);let R=null,U=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ee){let fe=y[ee];return fe===void 0&&(fe=new ug,y[ee]=fe),fe.getTargetRaySpace()},this.getControllerGrip=function(ee){let fe=y[ee];return fe===void 0&&(fe=new ug,y[ee]=fe),fe.getGripSpace()},this.getHand=function(ee){let fe=y[ee];return fe===void 0&&(fe=new ug,y[ee]=fe),fe.getHandSpace()};function F(ee){const fe=v.indexOf(ee.inputSource);if(fe===-1)return;const ye=y[fe];ye!==void 0&&(ye.update(ee.inputSource,ee.frame,u||o),ye.dispatchEvent({type:ee.type,data:ee.inputSource}))}function Q(){s.removeEventListener("select",F),s.removeEventListener("selectstart",F),s.removeEventListener("selectend",F),s.removeEventListener("squeeze",F),s.removeEventListener("squeezestart",F),s.removeEventListener("squeezeend",F),s.removeEventListener("end",Q),s.removeEventListener("inputsourceschange",L);for(let ee=0;ee=0&&(v[Ne]=null,y[Ne].disconnect(ye))}for(let fe=0;fe=v.length){v.push(ye),Ne=me;break}else if(v[me]===null){v[me]=ye,Ne=me;break}if(Ne===-1)break}const te=y[Ne];te&&te.connect(ye)}}const Y=new be,V=new be;function P(ee,fe,ye){Y.setFromMatrixPosition(fe.matrixWorld),V.setFromMatrixPosition(ye.matrixWorld);const Ne=Y.distanceTo(V),te=fe.projectionMatrix.elements,me=ye.projectionMatrix.elements,ne=te[14]/(te[10]-1),Se=te[14]/(te[10]+1),De=(te[9]+1)/te[5],k=(te[9]-1)/te[5],G=(te[8]-1)/te[0],K=(me[8]+1)/me[0],de=ne*G,se=ne*K,we=Ne/(-G+K),Ie=we*-G;fe.matrixWorld.decompose(ee.position,ee.quaternion,ee.scale),ee.translateX(Ie),ee.translateZ(we),ee.matrixWorld.compose(ee.position,ee.quaternion,ee.scale),ee.matrixWorldInverse.copy(ee.matrixWorld).invert();const q=ne+we,_e=Se+we,re=de-Ie,ce=se+(Ne-Ie),D=De*Se/_e*q,I=k*Se/_e*q;ee.projectionMatrix.makePerspective(re,ce,D,I,q,_e),ee.projectionMatrixInverse.copy(ee.projectionMatrix).invert()}function X(ee,fe){fe===null?ee.matrixWorld.copy(ee.matrix):ee.matrixWorld.multiplyMatrices(fe.matrixWorld,ee.matrix),ee.matrixWorldInverse.copy(ee.matrixWorld).invert()}this.updateCamera=function(ee){if(s===null)return;S.near=O.near=x.near=ee.near,S.far=O.far=x.far=ee.far,(R!==S.near||U!==S.far)&&(s.updateRenderState({depthNear:S.near,depthFar:S.far}),R=S.near,U=S.far);const fe=ee.parent,ye=S.cameras;X(S,fe);for(let Ne=0;Ne0&&(b.alphaTest.value=g.alphaTest);const y=e.get(g).envMap;if(y&&(b.envMap.value=y,b.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=g.reflectivity,b.ior.value=g.ior,b.refractionRatio.value=g.refractionRatio),g.lightMap){b.lightMap.value=g.lightMap;const v=t._useLegacyLights===!0?Math.PI:1;b.lightMapIntensity.value=g.lightMapIntensity*v,n(g.lightMap,b.lightMapTransform)}g.aoMap&&(b.aoMap.value=g.aoMap,b.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,b.aoMapTransform))}function o(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform))}function a(b,g){b.dashSize.value=g.dashSize,b.totalSize.value=g.dashSize+g.gapSize,b.scale.value=g.scale}function l(b,g,y,v){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.size.value=g.size*y,b.scale.value=v*.5,g.map&&(b.map.value=g.map,n(g.map,b.uvTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function u(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.rotation.value=g.rotation,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function d(b,g){b.specular.value.copy(g.specular),b.shininess.value=Math.max(g.shininess,1e-4)}function h(b,g){g.gradientMap&&(b.gradientMap.value=g.gradientMap)}function f(b,g){b.metalness.value=g.metalness,g.metalnessMap&&(b.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,b.metalnessMapTransform)),b.roughness.value=g.roughness,g.roughnessMap&&(b.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,b.roughnessMapTransform)),e.get(g).envMap&&(b.envMapIntensity.value=g.envMapIntensity)}function _(b,g,y){b.ior.value=g.ior,g.sheen>0&&(b.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),b.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(b.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,b.sheenColorMapTransform)),g.sheenRoughnessMap&&(b.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,b.sheenRoughnessMapTransform))),g.clearcoat>0&&(b.clearcoat.value=g.clearcoat,b.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(b.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,b.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(b.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Zn&&b.clearcoatNormalScale.value.negate())),g.iridescence>0&&(b.iridescence.value=g.iridescence,b.iridescenceIOR.value=g.iridescenceIOR,b.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(b.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,b.iridescenceMapTransform)),g.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),g.transmission>0&&(b.transmission.value=g.transmission,b.transmissionSamplerMap.value=y.texture,b.transmissionSamplerSize.value.set(y.width,y.height),g.transmissionMap&&(b.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,b.transmissionMapTransform)),b.thickness.value=g.thickness,g.thicknessMap&&(b.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=g.attenuationDistance,b.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(b.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(b.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=g.specularIntensity,b.specularColor.value.copy(g.specularColor),g.specularColorMap&&(b.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,b.specularColorMapTransform)),g.specularIntensityMap&&(b.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,b.specularIntensityMapTransform))}function m(b,g){g.matcap&&(b.matcap.value=g.matcap)}function E(b,g){const y=e.get(g).light;b.referencePosition.value.setFromMatrixPosition(y.matrixWorld),b.nearDistance.value=y.shadow.camera.near,b.farDistance.value=y.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function QMt(t,e,n,i){let s={},r={},o=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(y,v){const T=v.program;i.uniformBlockBinding(y,T)}function u(y,v){let T=s[y.id];T===void 0&&(m(y),T=d(y),s[y.id]=T,y.addEventListener("dispose",b));const C=v.program;i.updateUBOMapping(y,C);const x=e.render.frame;r[y.id]!==x&&(f(y),r[y.id]=x)}function d(y){const v=h();y.__bindingPointIndex=v;const T=t.createBuffer(),C=y.__size,x=y.usage;return t.bindBuffer(t.UNIFORM_BUFFER,T),t.bufferData(t.UNIFORM_BUFFER,C,x),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,v,T),T}function h(){for(let y=0;y0){x=T%C;const F=C-x;x!==0&&F-R.boundary<0&&(T+=C-x,S.__offset=T)}T+=R.storage}return x=T%C,x>0&&(T+=C-x),y.__size=T,y.__cache={},this}function E(y){const v={boundary:0,storage:0};return typeof y=="number"?(v.boundary=4,v.storage=4):y.isVector2?(v.boundary=8,v.storage=8):y.isVector3||y.isColor?(v.boundary=16,v.storage=12):y.isVector4?(v.boundary=16,v.storage=16):y.isMatrix3?(v.boundary=48,v.storage=48):y.isMatrix4?(v.boundary=64,v.storage=64):y.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",y),v}function b(y){const v=y.target;v.removeEventListener("dispose",b);const T=o.indexOf(v.__bindingPointIndex);o.splice(T,1),t.deleteBuffer(s[v.id]),delete s[v.id],delete r[v.id]}function g(){for(const y in s)t.deleteBuffer(s[y]);o=[],s={},r={}}return{bind:l,update:u,dispose:g}}class TI{constructor(e={}){const{canvas:n=WRt(),context:i=null,depth:s=!0,stencil:r=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:h=!1}=e;this.isWebGLRenderer=!0;let f;i!==null?f=i.getContextAttributes().alpha:f=o;const _=new Uint32Array(4),m=new Int32Array(4);let E=null,b=null;const g=[],y=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=on,this._useLegacyLights=!1,this.toneMapping=Cr,this.toneMappingExposure=1;const v=this;let T=!1,C=0,x=0,O=null,w=-1,S=null;const R=new Wt,U=new Wt;let F=null;const Q=new gt(0);let L=0,Y=n.width,V=n.height,P=1,X=null,W=null;const Z=new Wt(0,0,Y,V),ae=new Wt(0,0,Y,V);let ie=!1;const ee=new ty;let fe=!1,ye=!1,Ne=null;const te=new Rt,me=new It,ne=new be,Se={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function De(){return O===null?P:1}let k=i;function G(N,j){for(let le=0;le{function Ve(){if(ve.forEach(function(Ze){Ie.get(Ze).currentProgram.isReady()&&ve.delete(Ze)}),ve.size===0){Ee(N);return}setTimeout(Ve,10)}K.get("KHR_parallel_shader_compile")!==null?Ve():setTimeout(Ve,10)})};let Et=null;function Qt(N){Et&&Et(N)}function cn(){$t.stop()}function Ct(){$t.start()}const $t=new mI;$t.setAnimationLoop(Qt),typeof self<"u"&&$t.setContext(self),this.setAnimationLoop=function(N){Et=N,Fe.setAnimationLoop(N),N===null?$t.stop():$t.start()},Fe.addEventListener("sessionstart",cn),Fe.addEventListener("sessionend",Ct),this.render=function(N,j){if(j!==void 0&&j.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;N.matrixWorldAutoUpdate===!0&&N.updateMatrixWorld(),j.parent===null&&j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),Fe.enabled===!0&&Fe.isPresenting===!0&&(Fe.cameraAutoUpdate===!0&&Fe.updateCamera(j),j=Fe.getCamera()),N.isScene===!0&&N.onBeforeRender(v,N,j,O),b=oe.get(N,y.length),b.init(),y.push(b),te.multiplyMatrices(j.projectionMatrix,j.matrixWorldInverse),ee.setFromProjectionMatrix(te),ye=this.localClippingEnabled,fe=Ae.init(this.clippingPlanes,ye),E=J.get(N,g.length),E.init(),g.push(E),Sn(N,j,0,v.sortObjects),E.finish(),v.sortObjects===!0&&E.sort(X,W),this.info.render.frame++,fe===!0&&Ae.beginShadows();const le=b.state.shadowsArray;if(xe.render(le,N,j),fe===!0&&Ae.endShadows(),this.info.autoReset===!0&&this.info.reset(),ke.render(E,N),b.setupLights(v._useLegacyLights),j.isArrayCamera){const ve=j.cameras;for(let Ee=0,Ve=ve.length;Ee0?b=y[y.length-1]:b=null,g.pop(),g.length>0?E=g[g.length-1]:E=null};function Sn(N,j,le,ve){if(N.visible===!1)return;if(N.layers.test(j.layers)){if(N.isGroup)le=N.renderOrder;else if(N.isLOD)N.autoUpdate===!0&&N.update(j);else if(N.isLight)b.pushLight(N),N.castShadow&&b.pushShadow(N);else if(N.isSprite){if(!N.frustumCulled||ee.intersectsSprite(N)){ve&&ne.setFromMatrixPosition(N.matrixWorld).applyMatrix4(te);const Ze=I.update(N),it=N.material;it.visible&&E.push(N,Ze,it,le,ne.z,null)}}else if((N.isMesh||N.isLine||N.isPoints)&&(!N.frustumCulled||ee.intersectsObject(N))){const Ze=I.update(N),it=N.material;if(ve&&(N.boundingSphere!==void 0?(N.boundingSphere===null&&N.computeBoundingSphere(),ne.copy(N.boundingSphere.center)):(Ze.boundingSphere===null&&Ze.computeBoundingSphere(),ne.copy(Ze.boundingSphere.center)),ne.applyMatrix4(N.matrixWorld).applyMatrix4(te)),Array.isArray(it)){const lt=Ze.groups;for(let ot=0,_t=lt.length;ot<_t;ot++){const ht=lt[ot],Kt=it[ht.materialIndex];Kt&&Kt.visible&&E.push(N,Ze,Kt,le,ne.z,ht)}}else it.visible&&E.push(N,Ze,it,le,ne.z,null)}}const Ve=N.children;for(let Ze=0,it=Ve.length;Ze0&&Lr(Ee,Ve,j,le),ve&&se.viewport(R.copy(ve)),Ee.length>0&&ci(Ee,j,le),Ve.length>0&&ci(Ve,j,le),Ze.length>0&&ci(Ze,j,le),se.buffers.depth.setTest(!0),se.buffers.depth.setMask(!0),se.buffers.color.setMask(!0),se.setPolygonOffset(!1)}function Lr(N,j,le,ve){if((le.isScene===!0?le.overrideMaterial:null)!==null)return;const Ve=de.isWebGL2;Ne===null&&(Ne=new Eo(1,1,{generateMipmaps:!0,type:K.has("EXT_color_buffer_half_float")?oc:wr,minFilter:bo,samples:Ve?4:0})),v.getDrawingBufferSize(me),Ve?Ne.setSize(me.x,me.y):Ne.setSize(vu(me.x),vu(me.y));const Ze=v.getRenderTarget();v.setRenderTarget(Ne),v.getClearColor(Q),L=v.getClearAlpha(),L<1&&v.setClearColor(16777215,.5),v.clear();const it=v.toneMapping;v.toneMapping=Cr,ci(N,le,ve),q.updateMultisampleRenderTarget(Ne),q.updateRenderTargetMipmap(Ne);let lt=!1;for(let ot=0,_t=j.length;ot<_t;ot++){const ht=j[ot],Kt=ht.object,xn=ht.geometry,sn=ht.material,In=ht.group;if(sn.side===es&&Kt.layers.test(ve.layers)){const Xt=sn.side;sn.side=Zn,sn.needsUpdate=!0,Tn(Kt,le,ve,xn,sn,In),sn.side=Xt,sn.needsUpdate=!0,lt=!0}}lt===!0&&(q.updateMultisampleRenderTarget(Ne),q.updateRenderTargetMipmap(Ne)),v.setRenderTarget(Ze),v.setClearColor(Q,L),v.toneMapping=it}function ci(N,j,le){const ve=j.isScene===!0?j.overrideMaterial:null;for(let Ee=0,Ve=N.length;Ee0),ht=!!le.morphAttributes.position,Kt=!!le.morphAttributes.normal,xn=!!le.morphAttributes.color;let sn=Cr;ve.toneMapped&&(O===null||O.isXRRenderTarget===!0)&&(sn=v.toneMapping);const In=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,Xt=In!==void 0?In.length:0,St=Ie.get(ve),tl=b.state.lights;if(fe===!0&&(ye===!0||N!==S)){const Wn=N===S&&ve.id===w;Ae.setState(ve,N,Wn)}let tn=!1;ve.version===St.__version?(St.needsLights&&St.lightsStateVersion!==tl.state.version||St.outputColorSpace!==it||Ee.isBatchedMesh&&St.batching===!1||!Ee.isBatchedMesh&&St.batching===!0||Ee.isInstancedMesh&&St.instancing===!1||!Ee.isInstancedMesh&&St.instancing===!0||Ee.isSkinnedMesh&&St.skinning===!1||!Ee.isSkinnedMesh&&St.skinning===!0||Ee.isInstancedMesh&&St.instancingColor===!0&&Ee.instanceColor===null||Ee.isInstancedMesh&&St.instancingColor===!1&&Ee.instanceColor!==null||St.envMap!==lt||ve.fog===!0&&St.fog!==Ve||St.numClippingPlanes!==void 0&&(St.numClippingPlanes!==Ae.numPlanes||St.numIntersection!==Ae.numIntersection)||St.vertexAlphas!==ot||St.vertexTangents!==_t||St.morphTargets!==ht||St.morphNormals!==Kt||St.morphColors!==xn||St.toneMapping!==sn||de.isWebGL2===!0&&St.morphTargetsCount!==Xt)&&(tn=!0):(tn=!0,St.__version=ve.version);let Ss=St.currentProgram;tn===!0&&(Ss=di(ve,j,Ee));let wc=!1,Pr=!1,nl=!1;const bn=Ss.getUniforms(),Ts=St.uniforms;if(se.useProgram(Ss.program)&&(wc=!0,Pr=!0,nl=!0),ve.id!==w&&(w=ve.id,Pr=!0),wc||S!==N){bn.setValue(k,"projectionMatrix",N.projectionMatrix),bn.setValue(k,"viewMatrix",N.matrixWorldInverse);const Wn=bn.map.cameraPosition;Wn!==void 0&&Wn.setValue(k,ne.setFromMatrixPosition(N.matrixWorld)),de.logarithmicDepthBuffer&&bn.setValue(k,"logDepthBufFC",2/(Math.log(N.far+1)/Math.LN2)),(ve.isMeshPhongMaterial||ve.isMeshToonMaterial||ve.isMeshLambertMaterial||ve.isMeshBasicMaterial||ve.isMeshStandardMaterial||ve.isShaderMaterial)&&bn.setValue(k,"isOrthographic",N.isOrthographicCamera===!0),S!==N&&(S=N,Pr=!0,nl=!0)}if(Ee.isSkinnedMesh){bn.setOptional(k,Ee,"bindMatrix"),bn.setOptional(k,Ee,"bindMatrixInverse");const Wn=Ee.skeleton;Wn&&(de.floatVertexTextures?(Wn.boneTexture===null&&Wn.computeBoneTexture(),bn.setValue(k,"boneTexture",Wn.boneTexture,q)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Ee.isBatchedMesh&&(bn.setOptional(k,Ee,"batchingTexture"),bn.setValue(k,"batchingTexture",Ee._matricesTexture,q));const il=le.morphAttributes;if((il.position!==void 0||il.normal!==void 0||il.color!==void 0&&de.isWebGL2===!0)&&ze.update(Ee,le,Ss),(Pr||St.receiveShadow!==Ee.receiveShadow)&&(St.receiveShadow=Ee.receiveShadow,bn.setValue(k,"receiveShadow",Ee.receiveShadow)),ve.isMeshGouraudMaterial&&ve.envMap!==null&&(Ts.envMap.value=lt,Ts.flipEnvMap.value=lt.isCubeTexture&<.isRenderTargetTexture===!1?-1:1),Pr&&(bn.setValue(k,"toneMappingExposure",v.toneMappingExposure),St.needsLights&&vs(Ts,nl),Ve&&ve.fog===!0&&he.refreshFogUniforms(Ts,Ve),he.refreshMaterialUniforms(Ts,ve,P,V,Ne),zd.upload(k,ji(St),Ts,q)),ve.isShaderMaterial&&ve.uniformsNeedUpdate===!0&&(zd.upload(k,ji(St),Ts,q),ve.uniformsNeedUpdate=!1),ve.isSpriteMaterial&&bn.setValue(k,"center",Ee.center),bn.setValue(k,"modelViewMatrix",Ee.modelViewMatrix),bn.setValue(k,"normalMatrix",Ee.normalMatrix),bn.setValue(k,"modelMatrix",Ee.matrixWorld),ve.isShaderMaterial||ve.isRawShaderMaterial){const Wn=ve.uniformsGroups;for(let sl=0,gp=Wn.length;sl0&&q.useMultisampledRTT(N)===!1?Ee=Ie.get(N).__webglMultisampledFramebuffer:Array.isArray(_t)?Ee=_t[le]:Ee=_t,R.copy(N.viewport),U.copy(N.scissor),F=N.scissorTest}else R.copy(Z).multiplyScalar(P).floor(),U.copy(ae).multiplyScalar(P).floor(),F=ie;if(se.bindFramebuffer(k.FRAMEBUFFER,Ee)&&de.drawBuffers&&ve&&se.drawBuffers(N,Ee),se.viewport(R),se.scissor(U),se.setScissorTest(F),Ve){const lt=Ie.get(N.texture);k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,k.TEXTURE_CUBE_MAP_POSITIVE_X+j,lt.__webglTexture,le)}else if(Ze){const lt=Ie.get(N.texture),ot=j||0;k.framebufferTextureLayer(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,lt.__webglTexture,le||0,ot)}w=-1},this.readRenderTargetPixels=function(N,j,le,ve,Ee,Ve,Ze){if(!(N&&N.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let it=Ie.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&Ze!==void 0&&(it=it[Ze]),it){se.bindFramebuffer(k.FRAMEBUFFER,it);try{const lt=N.texture,ot=lt.format,_t=lt.type;if(ot!==gi&&dt.convert(ot)!==k.getParameter(k.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ht=_t===oc&&(K.has("EXT_color_buffer_half_float")||de.isWebGL2&&K.has("EXT_color_buffer_float"));if(_t!==wr&&dt.convert(_t)!==k.getParameter(k.IMPLEMENTATION_COLOR_READ_TYPE)&&!(_t===Ps&&(de.isWebGL2||K.has("OES_texture_float")||K.has("WEBGL_color_buffer_float")))&&!ht){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}j>=0&&j<=N.width-ve&&le>=0&&le<=N.height-Ee&&k.readPixels(j,le,ve,Ee,dt.convert(ot),dt.convert(_t),Ve)}finally{const lt=O!==null?Ie.get(O).__webglFramebuffer:null;se.bindFramebuffer(k.FRAMEBUFFER,lt)}}},this.copyFramebufferToTexture=function(N,j,le=0){const ve=Math.pow(2,-le),Ee=Math.floor(j.image.width*ve),Ve=Math.floor(j.image.height*ve);q.setTexture2D(j,0),k.copyTexSubImage2D(k.TEXTURE_2D,le,0,0,N.x,N.y,Ee,Ve),se.unbindTexture()},this.copyTextureToTexture=function(N,j,le,ve=0){const Ee=j.image.width,Ve=j.image.height,Ze=dt.convert(le.format),it=dt.convert(le.type);q.setTexture2D(le,0),k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,le.flipY),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,le.premultiplyAlpha),k.pixelStorei(k.UNPACK_ALIGNMENT,le.unpackAlignment),j.isDataTexture?k.texSubImage2D(k.TEXTURE_2D,ve,N.x,N.y,Ee,Ve,Ze,it,j.image.data):j.isCompressedTexture?k.compressedTexSubImage2D(k.TEXTURE_2D,ve,N.x,N.y,j.mipmaps[0].width,j.mipmaps[0].height,Ze,j.mipmaps[0].data):k.texSubImage2D(k.TEXTURE_2D,ve,N.x,N.y,Ze,it,j.image),ve===0&&le.generateMipmaps&&k.generateMipmap(k.TEXTURE_2D),se.unbindTexture()},this.copyTextureToTexture3D=function(N,j,le,ve,Ee=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Ve=N.max.x-N.min.x+1,Ze=N.max.y-N.min.y+1,it=N.max.z-N.min.z+1,lt=dt.convert(ve.format),ot=dt.convert(ve.type);let _t;if(ve.isData3DTexture)q.setTexture3D(ve,0),_t=k.TEXTURE_3D;else if(ve.isDataArrayTexture)q.setTexture2DArray(ve,0),_t=k.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,ve.flipY),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ve.premultiplyAlpha),k.pixelStorei(k.UNPACK_ALIGNMENT,ve.unpackAlignment);const ht=k.getParameter(k.UNPACK_ROW_LENGTH),Kt=k.getParameter(k.UNPACK_IMAGE_HEIGHT),xn=k.getParameter(k.UNPACK_SKIP_PIXELS),sn=k.getParameter(k.UNPACK_SKIP_ROWS),In=k.getParameter(k.UNPACK_SKIP_IMAGES),Xt=le.isCompressedTexture?le.mipmaps[0]:le.image;k.pixelStorei(k.UNPACK_ROW_LENGTH,Xt.width),k.pixelStorei(k.UNPACK_IMAGE_HEIGHT,Xt.height),k.pixelStorei(k.UNPACK_SKIP_PIXELS,N.min.x),k.pixelStorei(k.UNPACK_SKIP_ROWS,N.min.y),k.pixelStorei(k.UNPACK_SKIP_IMAGES,N.min.z),le.isDataTexture||le.isData3DTexture?k.texSubImage3D(_t,Ee,j.x,j.y,j.z,Ve,Ze,it,lt,ot,Xt.data):le.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),k.compressedTexSubImage3D(_t,Ee,j.x,j.y,j.z,Ve,Ze,it,lt,Xt.data)):k.texSubImage3D(_t,Ee,j.x,j.y,j.z,Ve,Ze,it,lt,ot,Xt),k.pixelStorei(k.UNPACK_ROW_LENGTH,ht),k.pixelStorei(k.UNPACK_IMAGE_HEIGHT,Kt),k.pixelStorei(k.UNPACK_SKIP_PIXELS,xn),k.pixelStorei(k.UNPACK_SKIP_ROWS,sn),k.pixelStorei(k.UNPACK_SKIP_IMAGES,In),Ee===0&&ve.generateMipmaps&&k.generateMipmap(_t),se.unbindTexture()},this.initTexture=function(N){N.isCubeTexture?q.setTextureCube(N,0):N.isData3DTexture?q.setTexture3D(N,0):N.isDataArrayTexture||N.isCompressedArrayTexture?q.setTexture2DArray(N,0):q.setTexture2D(N,0),se.unbindTexture()},this.resetState=function(){C=0,x=0,O=null,se.reset(),Xe.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Us}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===JE?"display-p3":"srgb",n.unpackColorSpace=Gt.workingColorSpace===dp?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===on?po:iI}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===po?on:On}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class XMt extends TI{}XMt.prototype.isWebGL1Renderer=!0;class ZMt extends rn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class JMt{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=ub,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=zi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,i){e*=this.stride,i*=n.stride;for(let s=0,r=this.stride;sl)continue;f.applyMatrix4(this.matrixWorld);const w=e.ray.origin.distanceTo(f);we.far||n.push({distance:w,point:h.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),y=Math.min(b.count,o.start+o.count);for(let v=g,T=y-1;vl)continue;f.applyMatrix4(this.matrixWorld);const x=e.ray.origin.distanceTo(f);xe.far||n.push({distance:x,point:h.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const s=n[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r0){const s=n[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class ly extends Hi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ZE,this.normalScale=new It(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Zs extends ly{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new It(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Ln(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new gt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new gt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new gt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class ww extends Hi{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new gt(16777215),this.specular=new gt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ZE,this.normalScale=new It(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=QE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function Cd(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function c2t(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function d2t(t){function e(s,r){return t[s]-t[r]}const n=t.length,i=new Array(n);for(let s=0;s!==n;++s)i[s]=s;return i.sort(e),i}function Rw(t,e,n){const i=t.length,s=new t.constructor(i);for(let r=0,o=0;o!==i;++r){const a=n[r]*e;for(let l=0;l!==e;++l)s[o++]=t[a+l]}return s}function RI(t,e,n,i){let s=1,r=t[0];for(;r!==void 0&&r[i]===void 0;)r=t[s++];if(r===void 0)return;let o=r[i];if(o!==void 0)if(Array.isArray(o))do o=r[i],o!==void 0&&(e.push(r.time),n.push.apply(n,o)),r=t[s++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[i],o!==void 0&&(e.push(r.time),o.toArray(n,n.length)),r=t[s++];while(r!==void 0);else do o=r[i],o!==void 0&&(e.push(r.time),n.push(o)),r=t[s++];while(r!==void 0)}class Tc{constructor(e,n,i,s){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new n.constructor(i),this.sampleValues=n,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let i=this._cachedIndex,s=n[i],r=n[i-1];e:{t:{let o;n:{i:if(!(e=r)){const a=n[1];e=r)break t}o=i,i=0;break n}break e}for(;i>>1;en;)--o;if(++o,r!==0||o!==s){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=i.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,r=i.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(s!==void 0&&c2t(s))for(let a=0,l=s.length;a!==l;++a){const u=s[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===zm,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*i,l=o*i,u=0;u!==i;++u)n[l+u]=n[a+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*i)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),i=this.constructor,s=new i(this.name,e,n);return s.createInterpolant=this.createInterpolant,s}}gs.prototype.TimeBufferType=Float32Array;gs.prototype.ValueBufferType=Float32Array;gs.prototype.DefaultInterpolation=Aa;class Xa extends gs{}Xa.prototype.ValueTypeName="bool";Xa.prototype.ValueBufferType=Array;Xa.prototype.DefaultInterpolation=ac;Xa.prototype.InterpolantFactoryMethodLinear=void 0;Xa.prototype.InterpolantFactoryMethodSmooth=void 0;class AI extends gs{}AI.prototype.ValueTypeName="color";class Ia extends gs{}Ia.prototype.ValueTypeName="number";class h2t extends Tc{constructor(e,n,i,s){super(e,n,i,s)}interpolate_(e,n,i,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-n)/(s-n);let u=e*a;for(let d=u+a;u!==d;u+=4)kr.slerpFlat(r,0,o,u-a,o,u,l);return r}}class vo extends gs{InterpolantFactoryMethodLinear(e){return new h2t(this.times,this.values,this.getValueSize(),e)}}vo.prototype.ValueTypeName="quaternion";vo.prototype.DefaultInterpolation=Aa;vo.prototype.InterpolantFactoryMethodSmooth=void 0;class Za extends gs{}Za.prototype.ValueTypeName="string";Za.prototype.ValueBufferType=Array;Za.prototype.DefaultInterpolation=ac;Za.prototype.InterpolantFactoryMethodLinear=void 0;Za.prototype.InterpolantFactoryMethodSmooth=void 0;class Ma extends gs{}Ma.prototype.ValueTypeName="vector";class f2t{constructor(e,n=-1,i,s=yRt){this.name=e,this.tracks=i,this.duration=n,this.blendMode=s,this.uuid=zi(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],i=e.tracks,s=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)n.push(g2t(i[o]).scale(s));const r=new this(e.name,e.duration,n,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const n=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=i.length;r!==o;++r)n.push(gs.toJSON(i[r]));return s}static CreateFromMorphTargetSequence(e,n,i,s){const r=n.length,o=[];for(let a=0;a1){const h=d[1];let f=s[h];f||(s[h]=f=[]),f.push(u)}}const o=[];for(const a in s)o.push(this.CreateFromMorphTargetSequence(a,s[a],n,i));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(h,f,_,m,E){if(_.length!==0){const b=[],g=[];RI(_,b,g,m),b.length!==0&&E.push(new h(f,b,g))}},s=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let h=0;h{n&&n(r),this.manager.itemEnd(e)},0),r;if(Os[e]!==void 0){Os[e].push({onLoad:n,onProgress:i,onError:s});return}Os[e]=[],Os[e].push({onLoad:n,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const d=Os[e],h=u.body.getReader(),f=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),_=f?parseInt(f):0,m=_!==0;let E=0;const b=new ReadableStream({start(g){y();function y(){h.read().then(({done:v,value:T})=>{if(v)g.close();else{E+=T.byteLength;const C=new ProgressEvent("progress",{lengthComputable:m,loaded:E,total:_});for(let x=0,O=d.length;x{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(d=>new DOMParser().parseFromString(d,a));case"json":return u.json();default:if(a===void 0)return u.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),f=h&&h[1]?h[1].toLowerCase():void 0,_=new TextDecoder(f);return u.arrayBuffer().then(m=>_.decode(m))}}}).then(u=>{Da.add(e,u);const d=Os[e];delete Os[e];for(let h=0,f=d.length;h{const d=Os[e];if(d===void 0)throw this.manager.itemError(e),u;delete Os[e];for(let h=0,f=d.length;h{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class v2t extends Ja{constructor(e){super(e)}load(e,n,i,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Da.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(o),r.manager.itemEnd(e)},0),o;const a=lc("img");function l(){d(),Da.add(e,this),n&&n(this),r.manager.itemEnd(e)}function u(h){d(),s&&s(h),r.manager.itemError(e),r.manager.itemEnd(e)}function d(){a.removeEventListener("load",l,!1),a.removeEventListener("error",u,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class OI extends Ja{constructor(e){super(e)}load(e,n,i,s){const r=new Nn,o=new v2t(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,n!==void 0&&n(r)},i,s),r}}class hp extends rn{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new gt(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}const fg=new Rt,Aw=new be,Nw=new be;class cy{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new It(512,512),this.map=null,this.mapPass=null,this.matrix=new Rt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ty,this._frameExtents=new It(1,1),this._viewportCount=1,this._viewports=[new Wt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,i=this.matrix;Aw.setFromMatrixPosition(e.matrixWorld),n.position.copy(Aw),Nw.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(Nw),n.updateMatrixWorld(),fg.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(fg),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(fg)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class S2t extends cy{constructor(){super(new zn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,i=Na*2*e.angle*this.focus,s=this.mapSize.width/this.mapSize.height,r=e.distance||n.far;(i!==n.fov||s!==n.aspect||r!==n.far)&&(n.fov=i,n.aspect=s,n.far=r,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class T2t extends hp{constructor(e,n,i=0,s=Math.PI/3,r=0,o=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(rn.DEFAULT_UP),this.updateMatrix(),this.target=new rn,this.distance=i,this.angle=s,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new S2t}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Ow=new Rt,Sl=new be,mg=new be;class x2t extends cy{constructor(){super(new zn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new It(4,2),this._viewportCount=6,this._viewports=[new Wt(2,1,1,1),new Wt(0,1,1,1),new Wt(3,1,1,1),new Wt(1,1,1,1),new Wt(3,0,1,1),new Wt(1,0,1,1)],this._cubeDirections=[new be(1,0,0),new be(-1,0,0),new be(0,0,1),new be(0,0,-1),new be(0,1,0),new be(0,-1,0)],this._cubeUps=[new be(0,1,0),new be(0,1,0),new be(0,1,0),new be(0,1,0),new be(0,0,1),new be(0,0,-1)]}updateMatrices(e,n=0){const i=this.camera,s=this.matrix,r=e.distance||i.far;r!==i.far&&(i.far=r,i.updateProjectionMatrix()),Sl.setFromMatrixPosition(e.matrixWorld),i.position.copy(Sl),mg.copy(i.position),mg.add(this._cubeDirections[n]),i.up.copy(this._cubeUps[n]),i.lookAt(mg),i.updateMatrixWorld(),s.makeTranslation(-Sl.x,-Sl.y,-Sl.z),Ow.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ow)}}class C2t extends hp{constructor(e,n,i=0,s=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new x2t}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class w2t extends cy{constructor(){super(new iy(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class II extends hp{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(rn.DEFAULT_UP),this.updateMatrix(),this.target=new rn,this.shadow=new w2t}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class R2t extends hp{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class Vl{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let i=0,s=e.length;i"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Da.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(o),r.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(l){Da.add(e,l),n&&n(l),r.manager.itemEnd(e)}).catch(function(l){s&&s(l),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}const dy="\\[\\]\\.:\\/",N2t=new RegExp("["+dy+"]","g"),uy="[^"+dy+"]",O2t="[^"+dy.replace("\\.","")+"]",I2t=/((?:WC+[\/:])*)/.source.replace("WC",uy),M2t=/(WCOD+)?/.source.replace("WCOD",O2t),D2t=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uy),k2t=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uy),L2t=new RegExp("^"+I2t+M2t+D2t+k2t+"$"),P2t=["material","materials","bones","map"];class U2t{constructor(e,n,i){const s=i||zt.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,s)}getValue(e,n){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,n)}setValue(e,n){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].unbind()}}class zt{constructor(e,n,i){this.path=n,this.parsedPath=i||zt.parseTrackName(n),this.node=zt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,i){return e&&e.isAnimationObjectGroup?new zt.Composite(e,n,i):new zt(e,n,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(N2t,"")}static parseTrackName(e){const n=L2t.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=i.nodeName.substring(s+1);P2t.indexOf(r)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=r)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(n);if(i!==void 0)return i}if(e.children){const i=function(r){for(let o=0;o=2.0 are supported."));return}const u=new mDt(r,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}u.setExtensions(o),u.setPlugins(a),u.parse(i,s)}parseAsync(e,n){const i=this;return new Promise(function(s,r){i.parse(e,n,s,r)})}}function B2t(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Ot={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class G2t{constructor(e){this.parser=e,this.name=Ot.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let i=0,s=n.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,r.source,o)}}class J2t{constructor(e){this.parser=e,this.name=Ot.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,i=this.parser,s=i.json,r=s.textures[e];if(!r.extensions||!r.extensions[n])return null;const o=r.extensions[n],a=s.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class eDt{constructor(e){this.parser=e,this.name=Ot.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,i=this.parser,s=i.json,r=s.textures[e];if(!r.extensions||!r.extensions[n])return null;const o=r.extensions[n],a=s.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class tDt{constructor(e){this.name=Ot.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,i=n.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const s=i.extensions[this.name],r=this.parser.getDependency("buffer",s.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const l=s.byteOffset||0,u=s.byteLength||0,d=s.count,h=s.byteStride,f=new Uint8Array(a,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,f,s.mode,s.filter).then(function(_){return _.buffer}):o.ready.then(function(){const _=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(_),d,h,f,s.mode,s.filter),_})})}else return null}}class nDt{constructor(e){this.name=Ot.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,i=n.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const s=n.meshes[i.mesh];for(const u of s.primitives)if(u.mode!==hi.TRIANGLES&&u.mode!==hi.TRIANGLE_STRIP&&u.mode!==hi.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const u in o)a.push(this.parser.getDependency("accessor",o[u]).then(d=>(l[u]=d,l[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(u=>{const d=u.pop(),h=d.isGroup?d.children:[d],f=u[0].count,_=[];for(const m of h){const E=new Rt,b=new be,g=new kr,y=new be(1,1,1),v=new r2t(m.geometry,m.material,f);for(let T=0;T0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const fDt=new Rt;class mDt{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new B2t,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,s=!1,r=-1;typeof navigator<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,s=navigator.userAgent.indexOf("Firefox")>-1,r=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||s&&r<98?this.textureLoader=new OI(this.options.manager):this.textureLoader=new A2t(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new NI(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const i=this,s=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][s.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:s.asset,parser:i,userData:{}};return Yr(r,a,s),gr(a,s),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],i=this.json.meshes||[];for(let s=0,r=n.length;s{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[u,d]of o.children.entries())r(d,a.children[u])};return r(i,s),s.name+="_instance_"+e.uses[n]++,s}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let i=0;i=2&&b.setY(S,x[O*l+1]),l>=3&&b.setZ(S,x[O*l+2]),l>=4&&b.setW(S,x[O*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const n=this.json,i=this.options,r=n.textures[e].source,o=n.images[r];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,n,i){const s=this,r=this.json,o=r.textures[e],a=r.images[n],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(n,i).then(function(d){d.flipY=!1,d.name=o.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(r.samplers||{})[o.sampler]||{};return d.magFilter=Dw[f.magFilter]||jn,d.minFilter=Dw[f.minFilter]||bo,d.wrapS=kw[f.wrapS]||wa,d.wrapT=kw[f.wrapT]||wa,s.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,n){const i=this,s=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const o=s.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(h){u=!0;const f=new Blob([h],{type:o.mimeType});return l=a.createObjectURL(f),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(l).then(function(h){return new Promise(function(f,_){let m=f;n.isImageBitmapLoader===!0&&(m=function(E){const b=new Nn(E);b.needsUpdate=!0,f(b)}),n.load(Vl.resolveURL(h,r.path),m,void 0,_)})}).then(function(h){return u===!0&&a.revokeObjectURL(l),h.userData.mimeType=o.mimeType||hDt(o.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),h});return this.sourceCache[e]=d,d}assignTexture(e,n,i,s){const r=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),r.extensions[Ot.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[Ot.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=r.associations.get(o);o=r.extensions[Ot.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,l)}}return s!==void 0&&(o.colorSpace=s),e[n]=o,o})}assignFinalMaterial(e){const n=e.geometry;let i=e.material;const s=n.attributes.tangent===void 0,r=n.attributes.color!==void 0,o=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new wI,Hi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new CI,Hi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(s||r||o){let a="ClonedMaterial:"+i.uuid+":";s&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),r&&(l.vertexColors=!0),o&&(l.flatShading=!0),s&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return ly}loadMaterial(e){const n=this,i=this.json,s=this.extensions,r=i.materials[e];let o;const a={},l=r.extensions||{},u=[];if(l[Ot.KHR_MATERIALS_UNLIT]){const h=s[Ot.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),u.push(h.extendParams(a,r,n))}else{const h=r.pbrMetallicRoughness||{};if(a.color=new gt(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const f=h.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],On),a.opacity=f[3]}h.baseColorTexture!==void 0&&u.push(n.assignTexture(a,"map",h.baseColorTexture,on)),a.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,a.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),u.push(n.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=es);const d=r.alphaMode||bg.OPAQUE;if(d===bg.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===bg.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==vr&&(u.push(n.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new It(1,1),r.normalTexture.scale!==void 0)){const h=r.normalTexture.scale;a.normalScale.set(h,h)}if(r.occlusionTexture!==void 0&&o!==vr&&(u.push(n.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==vr){const h=r.emissiveFactor;a.emissive=new gt().setRGB(h[0],h[1],h[2],On)}return r.emissiveTexture!==void 0&&o!==vr&&u.push(n.assignTexture(a,"emissiveMap",r.emissiveTexture,on)),Promise.all(u).then(function(){const h=new o(a);return r.name&&(h.name=r.name),gr(h,r),n.associations.set(h,{materials:e}),r.extensions&&Yr(s,h,r),h})}createUniqueName(e){const n=zt.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,i=this.extensions,s=this.primitiveCache;function r(a){return i[Ot.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return Lw(l,a,n)})}const o=[];for(let a=0,l=e.length;a0&&pDt(g,r),g.name=n.createUniqueName(r.name||"mesh_"+e),gr(g,r),b.extensions&&Yr(s,g,b),n.assignFinalMaterial(g),h.push(g)}for(let _=0,m=h.length;_1?d=new so:u.length===1?d=u[0]:d=new rn,d!==u[0])for(let h=0,f=u.length;h{const h=new Map;for(const[f,_]of s.associations)(f instanceof Hi||f instanceof Nn)&&h.set(f,_);return d.traverse(f=>{const _=s.associations.get(f);_!=null&&h.set(f,_)}),h};return s.associations=u(r),r})}_createAnimationTracks(e,n,i,s,r){const o=[],a=e.name?e.name:e.uuid,l=[];lr[r.path]===lr.weights?e.traverse(function(f){f.morphTargetInfluences&&l.push(f.name?f.name:f.uuid)}):l.push(a);let u;switch(lr[r.path]){case lr.weights:u=Ia;break;case lr.rotation:u=vo;break;case lr.position:case lr.scale:u=Ma;break;default:switch(i.itemSize){case 1:u=Ia;break;case 2:case 3:default:u=Ma;break}break}const d=s.interpolation!==void 0?cDt[s.interpolation]:Aa,h=this._getArrayFromAccessor(i);for(let f=0,_=l.length;f<_;f++){const m=new u(l[f]+"."+lr[r.path],n.array,h,d);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(m),o.push(m)}return o}_getArrayFromAccessor(e){let n=e.array;if(e.normalized){const i=bb(n.constructor),s=new Float32Array(n.length);for(let r=0,o=n.length;r{He.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,Ke.emit("stop_webcam_video_stream"),Ge(()=>{He.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){He.replace(),Ke.on("video_stream_image",t=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},EDt=["src"],yDt=["src"],vDt={class:"controls"},SDt=c("i",{"data-feather":"video"},null,-1),TDt=[SDt],xDt=c("i",{"data-feather":"video"},null,-1),CDt=[xDt],wDt={key:2};function RDt(t,e,n,i,s,r){return A(),M("div",{class:"floating-frame bg-white",style:en({bottom:s.position.bottom+"px",right:s.position.right+"px","z-index":s.zIndex}),onMousedown:e[4]||(e[4]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[c("div",{class:"handle",onMousedown:e[0]||(e[0]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),s.isVideoActive&&s.imageDataUrl!=null?(A(),M("img",{key:0,src:s.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,EDt)):$("",!0),s.isVideoActive&&s.imageDataUrl==null?(A(),M("p",{key:1,src:s.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,yDt)):$("",!0),c("div",vDt,[s.isVideoActive?$("",!0):(A(),M("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startVideoStream&&r.startVideoStream(...o))},TDt)),s.isVideoActive?(A(),M("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopVideoStream&&r.stopVideoStream(...o))},CDt)):$("",!0),s.isVideoActive?(A(),M("span",wDt,"FPS: "+ge(s.frameRate),1)):$("",!0)])],36)}const ADt=bt(bDt,[["render",RDt]]);const NDt={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){Ke.emit("start_audio_stream",()=>{this.isAudioActive=!0}),Ge(()=>{He.replace()})},stopAudioStream(){Ke.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),Ge(()=>{He.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){He.replace(),Ke.on("update_spectrogram",t=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},ODt=["src"],IDt={class:"controls"},MDt=c("i",{"data-feather":"mic"},null,-1),DDt=[MDt],kDt=c("i",{"data-feather":"mic"},null,-1),LDt=[kDt];function PDt(t,e,n,i,s,r){return A(),M("div",{class:"floating-frame bg-white",style:en({bottom:s.position.bottom+"px",right:s.position.right+"px","z-index":s.zIndex}),onMousedown:e[4]||(e[4]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[c("div",{class:"handle",onMousedown:e[0]||(e[0]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),s.isAudioActive&&s.imageDataUrl!=null?(A(),M("img",{key:0,src:s.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,ODt)):$("",!0),c("div",IDt,[s.isAudioActive?$("",!0):(A(),M("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startAudioStream&&r.startAudioStream(...o))},DDt)),s.isAudioActive?(A(),M("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopAudioStream&&r.stopAudioStream(...o))},LDt)):$("",!0)])],36)}const UDt=bt(NDt,[["render",PDt]]);const FDt={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:ADt,AudioFrame:UDt},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),Ge(()=>{He.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new ZMt,this.camera=new zn(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new TI,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const t=new Rr,e=new ww({color:65280});this.cube=new Hn(t,e),this.scene.add(this.cube);const n=new R2t(4210752),i=new II(16777215,.5);i.position.set(0,1,0),this.scene.add(n),this.scene.add(i),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:t,config:e}=this.$store.state;this.activePersonality=t[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(t){new F2t().load(t,n=>{this.scene.remove(this.cube),this.cube=n.scene,this.scene.add(this.cube)})},showBoxWithAvatar(t){this.cube&&this.scene.remove(this.cube);const e=new Rr,n=new OI().load(t),i=new vr({map:n});this.cube=new Hn(e,i),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const t=new Rr,e=new ww({color:65280});this.cube=new Hn(t,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},BDt={ref:"webglContainer"},GDt={class:"flex-col y-overflow 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"},VDt={key:0,class:"text-center"},zDt={key:1,class:"text-center"},HDt={class:"floating-frame2"},qDt=["innerHTML"];function YDt(t,e,n,i,s,r){const o=ft("VideoFrame"),a=ft("AudioFrame");return A(),M(We,null,[c("div",BDt,null,512),c("div",GDt,[!s.activePersonality||!s.activePersonality.scene_path?(A(),M("div",VDt," Personality does not have a 3d avatar. ")):$("",!0),!s.activePersonality||!s.activePersonality.avatar||s.activePersonality.avatar===""?(A(),M("div",zDt," Personality does not have an avatar. ")):$("",!0),c("div",HDt,[c("div",{innerHTML:t.htmlContent},null,8,qDt)])]),Re(o,{ref:"video_frame"},null,512),Re(a,{ref:"audio_frame"},null,512)],64)}const $Dt=bt(FDt,[["render",YDt]]);let wd;const WDt=new Uint8Array(16);function KDt(){if(!wd&&(wd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!wd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wd(WDt)}const Cn=[];for(let t=0;t<256;++t)Cn.push((t+256).toString(16).slice(1));function jDt(t,e=0){return Cn[t[e+0]]+Cn[t[e+1]]+Cn[t[e+2]]+Cn[t[e+3]]+"-"+Cn[t[e+4]]+Cn[t[e+5]]+"-"+Cn[t[e+6]]+Cn[t[e+7]]+"-"+Cn[t[e+8]]+Cn[t[e+9]]+"-"+Cn[t[e+10]]+Cn[t[e+11]]+Cn[t[e+12]]+Cn[t[e+13]]+Cn[t[e+14]]+Cn[t[e+15]]}const QDt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pw={randomUUID:QDt};function Gs(t,e,n){if(Pw.randomUUID&&!e&&!t)return Pw.randomUUID();t=t||{};const i=t.random||(t.rng||KDt)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){n=n||0;for(let s=0;s<16;++s)e[n+s]=i[s];return e}return jDt(i)}class _o{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,n){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. +}`;function GMt(t,e,n){let i=new ty;const s=new It,r=new It,o=new Wt,a=new PMt({depthPacking:vRt}),l=new UMt,u={},d=n.maxTextureSize,h={[Ys]:Zn,[Zn]:Ys,[es]:es},f=new yo({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new It},radius:{value:4}},vertexShader:FMt,fragmentShader:BMt}),_=f.clone();_.defines.HORIZONTAL_PASS=1;const m=new ms;m.setAttribute("position",new Yn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Hn(m,f),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=$O;let g=this.type;this.render=function(C,x,O){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||C.length===0)return;const w=t.getRenderTarget(),S=t.getActiveCubeFace(),R=t.getActiveMipmapLevel(),U=t.state;U.setBlending(xr),U.buffers.color.setClear(1,1,1,1),U.buffers.depth.setTest(!0),U.setScissorTest(!1);const F=g!==Ms&&this.type===Ms,Q=g===Ms&&this.type!==Ms;for(let L=0,Y=C.length;Ld||s.y>d)&&(s.x>d&&(r.x=Math.floor(d/X.x),s.x=r.x*X.x,P.mapSize.x=r.x),s.y>d&&(r.y=Math.floor(d/X.y),s.y=r.y*X.y,P.mapSize.y=r.y)),P.map===null||F===!0||Q===!0){const Z=this.type!==Ms?{minFilter:yn,magFilter:yn}:{};P.map!==null&&P.map.dispose(),P.map=new Eo(s.x,s.y,Z),P.map.texture.name=V.name+".shadowMap",P.camera.updateProjectionMatrix()}t.setRenderTarget(P.map),t.clear();const W=P.getViewportCount();for(let Z=0;Z0||x.map&&x.alphaTest>0){const U=S.uuid,F=x.uuid;let Q=u[U];Q===void 0&&(Q={},u[U]=Q);let L=Q[F];L===void 0&&(L=S.clone(),Q[F]=L),S=L}if(S.visible=x.visible,S.wireframe=x.wireframe,w===Ms?S.side=x.shadowSide!==null?x.shadowSide:x.side:S.side=x.shadowSide!==null?x.shadowSide:h[x.side],S.alphaMap=x.alphaMap,S.alphaTest=x.alphaTest,S.map=x.map,S.clipShadows=x.clipShadows,S.clippingPlanes=x.clippingPlanes,S.clipIntersection=x.clipIntersection,S.displacementMap=x.displacementMap,S.displacementScale=x.displacementScale,S.displacementBias=x.displacementBias,S.wireframeLinewidth=x.wireframeLinewidth,S.linewidth=x.linewidth,O.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const U=t.properties.get(S);U.light=O}return S}function T(C,x,O,w,S){if(C.visible===!1)return;if(C.layers.test(x.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&S===Ms)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(O.matrixWorldInverse,C.matrixWorld);const F=e.update(C),Q=C.material;if(Array.isArray(Q)){const L=F.groups;for(let Y=0,V=L.length;Y=1):Z.indexOf("OpenGL ES")!==-1&&(W=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),X=W>=2);let ae=null,ie={};const ee=t.getParameter(t.SCISSOR_BOX),fe=t.getParameter(t.VIEWPORT),ye=new Wt().fromArray(ee),Ne=new Wt().fromArray(fe);function te(pe,je,Ue,Me){const Be=new Uint8Array(4),ut=t.createTexture();t.bindTexture(pe,ut),t.texParameteri(pe,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(pe,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Et=0;Et"u"?!1:/OculusBrowser/g.test(navigator.userAgent),m=new WeakMap;let E;const b=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(D,I){return g?new OffscreenCanvas(D,I):lc("canvas")}function v(D,I,H,he){let J=1;if((D.width>he||D.height>he)&&(J=he/Math.max(D.width,D.height)),J<1||I===!0)if(typeof HTMLImageElement<"u"&&D instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&D instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&D instanceof ImageBitmap){const oe=I?vu:Math.floor,Ae=oe(J*D.width),xe=oe(J*D.height);E===void 0&&(E=y(Ae,xe));const ke=H?y(Ae,xe):E;return ke.width=Ae,ke.height=xe,ke.getContext("2d").drawImage(D,0,0,Ae,xe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+D.width+"x"+D.height+") to ("+Ae+"x"+xe+")."),ke}else return"data"in D&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+D.width+"x"+D.height+")."),D;return D}function T(D){return _b(D.width)&&_b(D.height)}function C(D){return a?!1:D.wrapS!==mi||D.wrapT!==mi||D.minFilter!==yn&&D.minFilter!==jn}function x(D,I){return D.generateMipmaps&&I&&D.minFilter!==yn&&D.minFilter!==jn}function O(D){t.generateMipmap(D)}function w(D,I,H,he,J=!1){if(a===!1)return I;if(D!==null){if(t[D]!==void 0)return t[D];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+D+"'")}let oe=I;if(I===t.RED&&(H===t.FLOAT&&(oe=t.R32F),H===t.HALF_FLOAT&&(oe=t.R16F),H===t.UNSIGNED_BYTE&&(oe=t.R8)),I===t.RED_INTEGER&&(H===t.UNSIGNED_BYTE&&(oe=t.R8UI),H===t.UNSIGNED_SHORT&&(oe=t.R16UI),H===t.UNSIGNED_INT&&(oe=t.R32UI),H===t.BYTE&&(oe=t.R8I),H===t.SHORT&&(oe=t.R16I),H===t.INT&&(oe=t.R32I)),I===t.RG&&(H===t.FLOAT&&(oe=t.RG32F),H===t.HALF_FLOAT&&(oe=t.RG16F),H===t.UNSIGNED_BYTE&&(oe=t.RG8)),I===t.RGBA){const Ae=J?gu:Gt.getTransfer(he);H===t.FLOAT&&(oe=t.RGBA32F),H===t.HALF_FLOAT&&(oe=t.RGBA16F),H===t.UNSIGNED_BYTE&&(oe=Ae===Zt?t.SRGB8_ALPHA8:t.RGBA8),H===t.UNSIGNED_SHORT_4_4_4_4&&(oe=t.RGBA4),H===t.UNSIGNED_SHORT_5_5_5_1&&(oe=t.RGB5_A1)}return(oe===t.R16F||oe===t.R32F||oe===t.RG16F||oe===t.RG32F||oe===t.RGBA16F||oe===t.RGBA32F)&&e.get("EXT_color_buffer_float"),oe}function S(D,I,H){return x(D,H)===!0||D.isFramebufferTexture&&D.minFilter!==yn&&D.minFilter!==jn?Math.log2(Math.max(I.width,I.height))+1:D.mipmaps!==void 0&&D.mipmaps.length>0?D.mipmaps.length:D.isCompressedTexture&&Array.isArray(D.image)?I.mipmaps.length:1}function R(D){return D===yn||D===cb||D===Vd?t.NEAREST:t.LINEAR}function U(D){const I=D.target;I.removeEventListener("dispose",U),Q(I),I.isVideoTexture&&m.delete(I)}function F(D){const I=D.target;I.removeEventListener("dispose",F),Y(I)}function Q(D){const I=i.get(D);if(I.__webglInit===void 0)return;const H=D.source,he=b.get(H);if(he){const J=he[I.__cacheKey];J.usedTimes--,J.usedTimes===0&&L(D),Object.keys(he).length===0&&b.delete(H)}i.remove(D)}function L(D){const I=i.get(D);t.deleteTexture(I.__webglTexture);const H=D.source,he=b.get(H);delete he[I.__cacheKey],o.memory.textures--}function Y(D){const I=D.texture,H=i.get(D),he=i.get(I);if(he.__webglTexture!==void 0&&(t.deleteTexture(he.__webglTexture),o.memory.textures--),D.depthTexture&&D.depthTexture.dispose(),D.isWebGLCubeRenderTarget)for(let J=0;J<6;J++){if(Array.isArray(H.__webglFramebuffer[J]))for(let oe=0;oe=l&&console.warn("THREE.WebGLTextures: Trying to use "+D+" texture units while this GPU supports only "+l),V+=1,D}function W(D){const I=[];return I.push(D.wrapS),I.push(D.wrapT),I.push(D.wrapR||0),I.push(D.magFilter),I.push(D.minFilter),I.push(D.anisotropy),I.push(D.internalFormat),I.push(D.format),I.push(D.type),I.push(D.generateMipmaps),I.push(D.premultiplyAlpha),I.push(D.flipY),I.push(D.unpackAlignment),I.push(D.colorSpace),I.join()}function Z(D,I){const H=i.get(D);if(D.isVideoTexture&&re(D),D.isRenderTargetTexture===!1&&D.version>0&&H.__version!==D.version){const he=D.image;if(he===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(he.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ne(H,D,I);return}}n.bindTexture(t.TEXTURE_2D,H.__webglTexture,t.TEXTURE0+I)}function ae(D,I){const H=i.get(D);if(D.version>0&&H.__version!==D.version){ne(H,D,I);return}n.bindTexture(t.TEXTURE_2D_ARRAY,H.__webglTexture,t.TEXTURE0+I)}function ie(D,I){const H=i.get(D);if(D.version>0&&H.__version!==D.version){ne(H,D,I);return}n.bindTexture(t.TEXTURE_3D,H.__webglTexture,t.TEXTURE0+I)}function ee(D,I){const H=i.get(D);if(D.version>0&&H.__version!==D.version){Se(H,D,I);return}n.bindTexture(t.TEXTURE_CUBE_MAP,H.__webglTexture,t.TEXTURE0+I)}const fe={[wa]:t.REPEAT,[mi]:t.CLAMP_TO_EDGE,[mu]:t.MIRRORED_REPEAT},ye={[yn]:t.NEAREST,[cb]:t.NEAREST_MIPMAP_NEAREST,[Vd]:t.NEAREST_MIPMAP_LINEAR,[jn]:t.LINEAR,[KO]:t.LINEAR_MIPMAP_NEAREST,[bo]:t.LINEAR_MIPMAP_LINEAR},Ne={[TRt]:t.NEVER,[NRt]:t.ALWAYS,[xRt]:t.LESS,[sI]:t.LEQUAL,[CRt]:t.EQUAL,[ARt]:t.GEQUAL,[wRt]:t.GREATER,[RRt]:t.NOTEQUAL};function te(D,I,H){if(H?(t.texParameteri(D,t.TEXTURE_WRAP_S,fe[I.wrapS]),t.texParameteri(D,t.TEXTURE_WRAP_T,fe[I.wrapT]),(D===t.TEXTURE_3D||D===t.TEXTURE_2D_ARRAY)&&t.texParameteri(D,t.TEXTURE_WRAP_R,fe[I.wrapR]),t.texParameteri(D,t.TEXTURE_MAG_FILTER,ye[I.magFilter]),t.texParameteri(D,t.TEXTURE_MIN_FILTER,ye[I.minFilter])):(t.texParameteri(D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(D===t.TEXTURE_3D||D===t.TEXTURE_2D_ARRAY)&&t.texParameteri(D,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(I.wrapS!==mi||I.wrapT!==mi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(D,t.TEXTURE_MAG_FILTER,R(I.magFilter)),t.texParameteri(D,t.TEXTURE_MIN_FILTER,R(I.minFilter)),I.minFilter!==yn&&I.minFilter!==jn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(t.texParameteri(D,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(D,t.TEXTURE_COMPARE_FUNC,Ne[I.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const he=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===yn||I.minFilter!==Vd&&I.minFilter!==bo||I.type===Ps&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===oc&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(t.texParameterf(D,he.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,s.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function me(D,I){let H=!1;D.__webglInit===void 0&&(D.__webglInit=!0,I.addEventListener("dispose",U));const he=I.source;let J=b.get(he);J===void 0&&(J={},b.set(he,J));const oe=W(I);if(oe!==D.__cacheKey){J[oe]===void 0&&(J[oe]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,H=!0),J[oe].usedTimes++;const Ae=J[D.__cacheKey];Ae!==void 0&&(J[D.__cacheKey].usedTimes--,Ae.usedTimes===0&&L(I)),D.__cacheKey=oe,D.__webglTexture=J[oe].texture}return H}function ne(D,I,H){let he=t.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(he=t.TEXTURE_2D_ARRAY),I.isData3DTexture&&(he=t.TEXTURE_3D);const J=me(D,I),oe=I.source;n.bindTexture(he,D.__webglTexture,t.TEXTURE0+H);const Ae=i.get(oe);if(oe.version!==Ae.__version||J===!0){n.activeTexture(t.TEXTURE0+H);const xe=Gt.getPrimaries(Gt.workingColorSpace),ke=I.colorSpace===bi?null:Gt.getPrimaries(I.colorSpace),ze=I.colorSpace===bi||xe===ke?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,I.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,I.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,ze);const rt=C(I)&&T(I.image)===!1;let Le=v(I.image,rt,!1,d);Le=ce(I,Le);const dt=T(Le)||a,Xe=r.convert(I.format,I.colorSpace);let Ye=r.convert(I.type),tt=w(I.internalFormat,Xe,Ye,I.colorSpace,I.isVideoTexture);te(he,I,dt);let Fe;const pt=I.mipmaps,pe=a&&I.isVideoTexture!==!0&&tt!==tI,je=Ae.__version===void 0||J===!0,Ue=S(I,Le,dt);if(I.isDepthTexture)tt=t.DEPTH_COMPONENT,a?I.type===Ps?tt=t.DEPTH_COMPONENT32F:I.type===yr?tt=t.DEPTH_COMPONENT24:I.type===co?tt=t.DEPTH24_STENCIL8:tt=t.DEPTH_COMPONENT16:I.type===Ps&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===uo&&tt===t.DEPTH_COMPONENT&&I.type!==XE&&I.type!==yr&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=yr,Ye=r.convert(I.type)),I.format===Ra&&tt===t.DEPTH_COMPONENT&&(tt=t.DEPTH_STENCIL,I.type!==co&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=co,Ye=r.convert(I.type))),je&&(pe?n.texStorage2D(t.TEXTURE_2D,1,tt,Le.width,Le.height):n.texImage2D(t.TEXTURE_2D,0,tt,Le.width,Le.height,0,Xe,Ye,null));else if(I.isDataTexture)if(pt.length>0&&dt){pe&&je&&n.texStorage2D(t.TEXTURE_2D,Ue,tt,pt[0].width,pt[0].height);for(let Me=0,Be=pt.length;Me>=1,Be>>=1}}else if(pt.length>0&&dt){pe&&je&&n.texStorage2D(t.TEXTURE_2D,Ue,tt,pt[0].width,pt[0].height);for(let Me=0,Be=pt.length;Me0&&je++,n.texStorage2D(t.TEXTURE_CUBE_MAP,je,Fe,Le[0].width,Le[0].height));for(let Me=0;Me<6;Me++)if(rt){pt?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,0,0,Le[Me].width,Le[Me].height,Ye,tt,Le[Me].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,Fe,Le[Me].width,Le[Me].height,0,Ye,tt,Le[Me].data);for(let Be=0;Be>oe),Le=Math.max(1,I.height>>oe);J===t.TEXTURE_3D||J===t.TEXTURE_2D_ARRAY?n.texImage3D(J,oe,ke,rt,Le,I.depth,0,Ae,xe,null):n.texImage2D(J,oe,ke,rt,Le,0,Ae,xe,null)}n.bindFramebuffer(t.FRAMEBUFFER,D),_e(I)?f.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,he,J,i.get(H).__webglTexture,0,q(I)):(J===t.TEXTURE_2D||J>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&J<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,he,J,i.get(H).__webglTexture,oe),n.bindFramebuffer(t.FRAMEBUFFER,null)}function k(D,I,H){if(t.bindRenderbuffer(t.RENDERBUFFER,D),I.depthBuffer&&!I.stencilBuffer){let he=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(H||_e(I)){const J=I.depthTexture;J&&J.isDepthTexture&&(J.type===Ps?he=t.DEPTH_COMPONENT32F:J.type===yr&&(he=t.DEPTH_COMPONENT24));const oe=q(I);_e(I)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,oe,he,I.width,I.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,oe,he,I.width,I.height)}else t.renderbufferStorage(t.RENDERBUFFER,he,I.width,I.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,D)}else if(I.depthBuffer&&I.stencilBuffer){const he=q(I);H&&_e(I)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,he,t.DEPTH24_STENCIL8,I.width,I.height):_e(I)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,he,t.DEPTH24_STENCIL8,I.width,I.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,I.width,I.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,D)}else{const he=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let J=0;J0){H.__webglFramebuffer[xe]=[];for(let ke=0;ke0){H.__webglFramebuffer=[];for(let xe=0;xe0&&_e(D)===!1){const xe=oe?I:[I];H.__webglMultisampledFramebuffer=t.createFramebuffer(),H.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,H.__webglMultisampledFramebuffer);for(let ke=0;ke0)for(let ke=0;ke0)for(let ke=0;ke0&&_e(D)===!1){const I=D.isWebGLMultipleRenderTargets?D.texture:[D.texture],H=D.width,he=D.height;let J=t.COLOR_BUFFER_BIT;const oe=[],Ae=D.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,xe=i.get(D),ke=D.isWebGLMultipleRenderTargets===!0;if(ke)for(let ze=0;ze0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function re(D){const I=o.render.frame;m.get(D)!==I&&(m.set(D,I),D.update())}function ce(D,I){const H=D.colorSpace,he=D.format,J=D.type;return D.isCompressedTexture===!0||D.isVideoTexture===!0||D.format===pb||H!==On&&H!==bi&&(Gt.getTransfer(H)===Zt?a===!1?e.has("EXT_sRGB")===!0&&he===gi?(D.format=pb,D.minFilter=jn,D.generateMipmaps=!1):I=oI.sRGBToLinear(I):(he!==gi||J!==wr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",H)),I}this.allocateTextureUnit=X,this.resetTextureUnits=P,this.setTexture2D=Z,this.setTexture2DArray=ae,this.setTexture3D=ie,this.setTextureCube=ee,this.rebindTextures=de,this.setupRenderTarget=se,this.updateRenderTargetMipmap=we,this.updateMultisampleRenderTarget=Ie,this.setupDepthRenderbuffer=K,this.setupFrameBufferTexture=De,this.useMultisampledRTT=_e}function HMt(t,e,n){const i=n.isWebGL2;function s(r,o=bi){let a;const l=Gt.getTransfer(o);if(r===wr)return t.UNSIGNED_BYTE;if(r===QO)return t.UNSIGNED_SHORT_4_4_4_4;if(r===XO)return t.UNSIGNED_SHORT_5_5_5_1;if(r===dRt)return t.BYTE;if(r===uRt)return t.SHORT;if(r===XE)return t.UNSIGNED_SHORT;if(r===jO)return t.INT;if(r===yr)return t.UNSIGNED_INT;if(r===Ps)return t.FLOAT;if(r===oc)return i?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(r===pRt)return t.ALPHA;if(r===gi)return t.RGBA;if(r===_Rt)return t.LUMINANCE;if(r===hRt)return t.LUMINANCE_ALPHA;if(r===uo)return t.DEPTH_COMPONENT;if(r===Ra)return t.DEPTH_STENCIL;if(r===pb)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(r===fRt)return t.RED;if(r===ZO)return t.RED_INTEGER;if(r===mRt)return t.RG;if(r===JO)return t.RG_INTEGER;if(r===eI)return t.RGBA_INTEGER;if(r===Um||r===Fm||r===Bm||r===Gm)if(l===Zt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===Um)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Fm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Bm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Gm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===Um)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Fm)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Bm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Gm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===QC||r===XC||r===ZC||r===JC)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===QC)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===XC)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===ZC)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===JC)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===tI)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===e1||r===t1)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===e1)return l===Zt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===t1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===n1||r===i1||r===s1||r===r1||r===o1||r===a1||r===l1||r===c1||r===d1||r===u1||r===p1||r===_1||r===h1||r===f1)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===n1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===i1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===s1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===r1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===o1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===a1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===l1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===c1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===d1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===u1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===p1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===_1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===h1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===f1)return l===Zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Vm||r===m1||r===g1)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===Vm)return l===Zt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===m1)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===g1)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===gRt||r===b1||r===E1||r===y1)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===Vm)return a.COMPRESSED_RED_RGTC1_EXT;if(r===b1)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===E1)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===y1)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===co?i?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[r]!==void 0?t[r]:null}return{convert:s}}class qMt extends zn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class so extends rn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const YMt={type:"move"};class ug{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new so,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new so,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new be,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new be),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new so,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new be,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new be),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const i of e.hand.values())this._getHandJoint(n,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,u=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const E of e.hand.values()){const b=n.getJointPose(E,i),g=this._getHandJoint(u,E);b!==null&&(g.matrix.fromArray(b.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=b.radius),g.visible=b!==null}const d=u.joints["index-finger-tip"],h=u.joints["thumb-tip"],f=d.position.distanceTo(h.position),_=.02,m=.005;u.inputState.pinching&&f>_+m?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&f<=_-m&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=n.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=n.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(YMt)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const i=new so;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[n.jointName]=i,e.add(i)}return e.joints[n.jointName]}}class $Mt extends ja{constructor(e,n){super();const i=this;let s=null,r=1,o=null,a="local-floor",l=1,u=null,d=null,h=null,f=null,_=null,m=null;const E=n.getContextAttributes();let b=null,g=null;const y=[],v=[],T=new It;let C=null;const x=new zn;x.layers.enable(1),x.viewport=new Wt;const O=new zn;O.layers.enable(2),O.viewport=new Wt;const w=[x,O],S=new qMt;S.layers.enable(1),S.layers.enable(2);let R=null,U=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ee){let fe=y[ee];return fe===void 0&&(fe=new ug,y[ee]=fe),fe.getTargetRaySpace()},this.getControllerGrip=function(ee){let fe=y[ee];return fe===void 0&&(fe=new ug,y[ee]=fe),fe.getGripSpace()},this.getHand=function(ee){let fe=y[ee];return fe===void 0&&(fe=new ug,y[ee]=fe),fe.getHandSpace()};function F(ee){const fe=v.indexOf(ee.inputSource);if(fe===-1)return;const ye=y[fe];ye!==void 0&&(ye.update(ee.inputSource,ee.frame,u||o),ye.dispatchEvent({type:ee.type,data:ee.inputSource}))}function Q(){s.removeEventListener("select",F),s.removeEventListener("selectstart",F),s.removeEventListener("selectend",F),s.removeEventListener("squeeze",F),s.removeEventListener("squeezestart",F),s.removeEventListener("squeezeend",F),s.removeEventListener("end",Q),s.removeEventListener("inputsourceschange",L);for(let ee=0;ee=0&&(v[Ne]=null,y[Ne].disconnect(ye))}for(let fe=0;fe=v.length){v.push(ye),Ne=me;break}else if(v[me]===null){v[me]=ye,Ne=me;break}if(Ne===-1)break}const te=y[Ne];te&&te.connect(ye)}}const Y=new be,V=new be;function P(ee,fe,ye){Y.setFromMatrixPosition(fe.matrixWorld),V.setFromMatrixPosition(ye.matrixWorld);const Ne=Y.distanceTo(V),te=fe.projectionMatrix.elements,me=ye.projectionMatrix.elements,ne=te[14]/(te[10]-1),Se=te[14]/(te[10]+1),De=(te[9]+1)/te[5],k=(te[9]-1)/te[5],G=(te[8]-1)/te[0],K=(me[8]+1)/me[0],de=ne*G,se=ne*K,we=Ne/(-G+K),Ie=we*-G;fe.matrixWorld.decompose(ee.position,ee.quaternion,ee.scale),ee.translateX(Ie),ee.translateZ(we),ee.matrixWorld.compose(ee.position,ee.quaternion,ee.scale),ee.matrixWorldInverse.copy(ee.matrixWorld).invert();const q=ne+we,_e=Se+we,re=de-Ie,ce=se+(Ne-Ie),D=De*Se/_e*q,I=k*Se/_e*q;ee.projectionMatrix.makePerspective(re,ce,D,I,q,_e),ee.projectionMatrixInverse.copy(ee.projectionMatrix).invert()}function X(ee,fe){fe===null?ee.matrixWorld.copy(ee.matrix):ee.matrixWorld.multiplyMatrices(fe.matrixWorld,ee.matrix),ee.matrixWorldInverse.copy(ee.matrixWorld).invert()}this.updateCamera=function(ee){if(s===null)return;S.near=O.near=x.near=ee.near,S.far=O.far=x.far=ee.far,(R!==S.near||U!==S.far)&&(s.updateRenderState({depthNear:S.near,depthFar:S.far}),R=S.near,U=S.far);const fe=ee.parent,ye=S.cameras;X(S,fe);for(let Ne=0;Ne0&&(b.alphaTest.value=g.alphaTest);const y=e.get(g).envMap;if(y&&(b.envMap.value=y,b.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=g.reflectivity,b.ior.value=g.ior,b.refractionRatio.value=g.refractionRatio),g.lightMap){b.lightMap.value=g.lightMap;const v=t._useLegacyLights===!0?Math.PI:1;b.lightMapIntensity.value=g.lightMapIntensity*v,n(g.lightMap,b.lightMapTransform)}g.aoMap&&(b.aoMap.value=g.aoMap,b.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,b.aoMapTransform))}function o(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform))}function a(b,g){b.dashSize.value=g.dashSize,b.totalSize.value=g.dashSize+g.gapSize,b.scale.value=g.scale}function l(b,g,y,v){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.size.value=g.size*y,b.scale.value=v*.5,g.map&&(b.map.value=g.map,n(g.map,b.uvTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function u(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.rotation.value=g.rotation,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function d(b,g){b.specular.value.copy(g.specular),b.shininess.value=Math.max(g.shininess,1e-4)}function h(b,g){g.gradientMap&&(b.gradientMap.value=g.gradientMap)}function f(b,g){b.metalness.value=g.metalness,g.metalnessMap&&(b.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,b.metalnessMapTransform)),b.roughness.value=g.roughness,g.roughnessMap&&(b.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,b.roughnessMapTransform)),e.get(g).envMap&&(b.envMapIntensity.value=g.envMapIntensity)}function _(b,g,y){b.ior.value=g.ior,g.sheen>0&&(b.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),b.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(b.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,b.sheenColorMapTransform)),g.sheenRoughnessMap&&(b.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,b.sheenRoughnessMapTransform))),g.clearcoat>0&&(b.clearcoat.value=g.clearcoat,b.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(b.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,b.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(b.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Zn&&b.clearcoatNormalScale.value.negate())),g.iridescence>0&&(b.iridescence.value=g.iridescence,b.iridescenceIOR.value=g.iridescenceIOR,b.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(b.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,b.iridescenceMapTransform)),g.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),g.transmission>0&&(b.transmission.value=g.transmission,b.transmissionSamplerMap.value=y.texture,b.transmissionSamplerSize.value.set(y.width,y.height),g.transmissionMap&&(b.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,b.transmissionMapTransform)),b.thickness.value=g.thickness,g.thicknessMap&&(b.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=g.attenuationDistance,b.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(b.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(b.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=g.specularIntensity,b.specularColor.value.copy(g.specularColor),g.specularColorMap&&(b.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,b.specularColorMapTransform)),g.specularIntensityMap&&(b.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,b.specularIntensityMapTransform))}function m(b,g){g.matcap&&(b.matcap.value=g.matcap)}function E(b,g){const y=e.get(g).light;b.referencePosition.value.setFromMatrixPosition(y.matrixWorld),b.nearDistance.value=y.shadow.camera.near,b.farDistance.value=y.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function KMt(t,e,n,i){let s={},r={},o=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(y,v){const T=v.program;i.uniformBlockBinding(y,T)}function u(y,v){let T=s[y.id];T===void 0&&(m(y),T=d(y),s[y.id]=T,y.addEventListener("dispose",b));const C=v.program;i.updateUBOMapping(y,C);const x=e.render.frame;r[y.id]!==x&&(f(y),r[y.id]=x)}function d(y){const v=h();y.__bindingPointIndex=v;const T=t.createBuffer(),C=y.__size,x=y.usage;return t.bindBuffer(t.UNIFORM_BUFFER,T),t.bufferData(t.UNIFORM_BUFFER,C,x),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,v,T),T}function h(){for(let y=0;y0){x=T%C;const F=C-x;x!==0&&F-R.boundary<0&&(T+=C-x,S.__offset=T)}T+=R.storage}return x=T%C,x>0&&(T+=C-x),y.__size=T,y.__cache={},this}function E(y){const v={boundary:0,storage:0};return typeof y=="number"?(v.boundary=4,v.storage=4):y.isVector2?(v.boundary=8,v.storage=8):y.isVector3||y.isColor?(v.boundary=16,v.storage=12):y.isVector4?(v.boundary=16,v.storage=16):y.isMatrix3?(v.boundary=48,v.storage=48):y.isMatrix4?(v.boundary=64,v.storage=64):y.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",y),v}function b(y){const v=y.target;v.removeEventListener("dispose",b);const T=o.indexOf(v.__bindingPointIndex);o.splice(T,1),t.deleteBuffer(s[v.id]),delete s[v.id],delete r[v.id]}function g(){for(const y in s)t.deleteBuffer(s[y]);o=[],s={},r={}}return{bind:l,update:u,dispose:g}}class TI{constructor(e={}){const{canvas:n=YRt(),context:i=null,depth:s=!0,stencil:r=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:h=!1}=e;this.isWebGLRenderer=!0;let f;i!==null?f=i.getContextAttributes().alpha:f=o;const _=new Uint32Array(4),m=new Int32Array(4);let E=null,b=null;const g=[],y=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=on,this._useLegacyLights=!1,this.toneMapping=Cr,this.toneMappingExposure=1;const v=this;let T=!1,C=0,x=0,O=null,w=-1,S=null;const R=new Wt,U=new Wt;let F=null;const Q=new gt(0);let L=0,Y=n.width,V=n.height,P=1,X=null,W=null;const Z=new Wt(0,0,Y,V),ae=new Wt(0,0,Y,V);let ie=!1;const ee=new ty;let fe=!1,ye=!1,Ne=null;const te=new Rt,me=new It,ne=new be,Se={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function De(){return O===null?P:1}let k=i;function G(N,j){for(let le=0;le{function Ve(){if(ve.forEach(function(Ze){Ie.get(Ze).currentProgram.isReady()&&ve.delete(Ze)}),ve.size===0){Ee(N);return}setTimeout(Ve,10)}K.get("KHR_parallel_shader_compile")!==null?Ve():setTimeout(Ve,10)})};let Et=null;function Qt(N){Et&&Et(N)}function cn(){$t.stop()}function Ct(){$t.start()}const $t=new mI;$t.setAnimationLoop(Qt),typeof self<"u"&&$t.setContext(self),this.setAnimationLoop=function(N){Et=N,Fe.setAnimationLoop(N),N===null?$t.stop():$t.start()},Fe.addEventListener("sessionstart",cn),Fe.addEventListener("sessionend",Ct),this.render=function(N,j){if(j!==void 0&&j.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;N.matrixWorldAutoUpdate===!0&&N.updateMatrixWorld(),j.parent===null&&j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),Fe.enabled===!0&&Fe.isPresenting===!0&&(Fe.cameraAutoUpdate===!0&&Fe.updateCamera(j),j=Fe.getCamera()),N.isScene===!0&&N.onBeforeRender(v,N,j,O),b=oe.get(N,y.length),b.init(),y.push(b),te.multiplyMatrices(j.projectionMatrix,j.matrixWorldInverse),ee.setFromProjectionMatrix(te),ye=this.localClippingEnabled,fe=Ae.init(this.clippingPlanes,ye),E=J.get(N,g.length),E.init(),g.push(E),Sn(N,j,0,v.sortObjects),E.finish(),v.sortObjects===!0&&E.sort(X,W),this.info.render.frame++,fe===!0&&Ae.beginShadows();const le=b.state.shadowsArray;if(xe.render(le,N,j),fe===!0&&Ae.endShadows(),this.info.autoReset===!0&&this.info.reset(),ke.render(E,N),b.setupLights(v._useLegacyLights),j.isArrayCamera){const ve=j.cameras;for(let Ee=0,Ve=ve.length;Ee0?b=y[y.length-1]:b=null,g.pop(),g.length>0?E=g[g.length-1]:E=null};function Sn(N,j,le,ve){if(N.visible===!1)return;if(N.layers.test(j.layers)){if(N.isGroup)le=N.renderOrder;else if(N.isLOD)N.autoUpdate===!0&&N.update(j);else if(N.isLight)b.pushLight(N),N.castShadow&&b.pushShadow(N);else if(N.isSprite){if(!N.frustumCulled||ee.intersectsSprite(N)){ve&&ne.setFromMatrixPosition(N.matrixWorld).applyMatrix4(te);const Ze=I.update(N),it=N.material;it.visible&&E.push(N,Ze,it,le,ne.z,null)}}else if((N.isMesh||N.isLine||N.isPoints)&&(!N.frustumCulled||ee.intersectsObject(N))){const Ze=I.update(N),it=N.material;if(ve&&(N.boundingSphere!==void 0?(N.boundingSphere===null&&N.computeBoundingSphere(),ne.copy(N.boundingSphere.center)):(Ze.boundingSphere===null&&Ze.computeBoundingSphere(),ne.copy(Ze.boundingSphere.center)),ne.applyMatrix4(N.matrixWorld).applyMatrix4(te)),Array.isArray(it)){const lt=Ze.groups;for(let ot=0,_t=lt.length;ot<_t;ot++){const ht=lt[ot],Kt=it[ht.materialIndex];Kt&&Kt.visible&&E.push(N,Ze,Kt,le,ne.z,ht)}}else it.visible&&E.push(N,Ze,it,le,ne.z,null)}}const Ve=N.children;for(let Ze=0,it=Ve.length;Ze0&&Lr(Ee,Ve,j,le),ve&&se.viewport(R.copy(ve)),Ee.length>0&&ci(Ee,j,le),Ve.length>0&&ci(Ve,j,le),Ze.length>0&&ci(Ze,j,le),se.buffers.depth.setTest(!0),se.buffers.depth.setMask(!0),se.buffers.color.setMask(!0),se.setPolygonOffset(!1)}function Lr(N,j,le,ve){if((le.isScene===!0?le.overrideMaterial:null)!==null)return;const Ve=de.isWebGL2;Ne===null&&(Ne=new Eo(1,1,{generateMipmaps:!0,type:K.has("EXT_color_buffer_half_float")?oc:wr,minFilter:bo,samples:Ve?4:0})),v.getDrawingBufferSize(me),Ve?Ne.setSize(me.x,me.y):Ne.setSize(vu(me.x),vu(me.y));const Ze=v.getRenderTarget();v.setRenderTarget(Ne),v.getClearColor(Q),L=v.getClearAlpha(),L<1&&v.setClearColor(16777215,.5),v.clear();const it=v.toneMapping;v.toneMapping=Cr,ci(N,le,ve),q.updateMultisampleRenderTarget(Ne),q.updateRenderTargetMipmap(Ne);let lt=!1;for(let ot=0,_t=j.length;ot<_t;ot++){const ht=j[ot],Kt=ht.object,xn=ht.geometry,sn=ht.material,In=ht.group;if(sn.side===es&&Kt.layers.test(ve.layers)){const Xt=sn.side;sn.side=Zn,sn.needsUpdate=!0,Tn(Kt,le,ve,xn,sn,In),sn.side=Xt,sn.needsUpdate=!0,lt=!0}}lt===!0&&(q.updateMultisampleRenderTarget(Ne),q.updateRenderTargetMipmap(Ne)),v.setRenderTarget(Ze),v.setClearColor(Q,L),v.toneMapping=it}function ci(N,j,le){const ve=j.isScene===!0?j.overrideMaterial:null;for(let Ee=0,Ve=N.length;Ee0),ht=!!le.morphAttributes.position,Kt=!!le.morphAttributes.normal,xn=!!le.morphAttributes.color;let sn=Cr;ve.toneMapped&&(O===null||O.isXRRenderTarget===!0)&&(sn=v.toneMapping);const In=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,Xt=In!==void 0?In.length:0,St=Ie.get(ve),tl=b.state.lights;if(fe===!0&&(ye===!0||N!==S)){const Wn=N===S&&ve.id===w;Ae.setState(ve,N,Wn)}let tn=!1;ve.version===St.__version?(St.needsLights&&St.lightsStateVersion!==tl.state.version||St.outputColorSpace!==it||Ee.isBatchedMesh&&St.batching===!1||!Ee.isBatchedMesh&&St.batching===!0||Ee.isInstancedMesh&&St.instancing===!1||!Ee.isInstancedMesh&&St.instancing===!0||Ee.isSkinnedMesh&&St.skinning===!1||!Ee.isSkinnedMesh&&St.skinning===!0||Ee.isInstancedMesh&&St.instancingColor===!0&&Ee.instanceColor===null||Ee.isInstancedMesh&&St.instancingColor===!1&&Ee.instanceColor!==null||St.envMap!==lt||ve.fog===!0&&St.fog!==Ve||St.numClippingPlanes!==void 0&&(St.numClippingPlanes!==Ae.numPlanes||St.numIntersection!==Ae.numIntersection)||St.vertexAlphas!==ot||St.vertexTangents!==_t||St.morphTargets!==ht||St.morphNormals!==Kt||St.morphColors!==xn||St.toneMapping!==sn||de.isWebGL2===!0&&St.morphTargetsCount!==Xt)&&(tn=!0):(tn=!0,St.__version=ve.version);let Ss=St.currentProgram;tn===!0&&(Ss=di(ve,j,Ee));let wc=!1,Pr=!1,nl=!1;const bn=Ss.getUniforms(),Ts=St.uniforms;if(se.useProgram(Ss.program)&&(wc=!0,Pr=!0,nl=!0),ve.id!==w&&(w=ve.id,Pr=!0),wc||S!==N){bn.setValue(k,"projectionMatrix",N.projectionMatrix),bn.setValue(k,"viewMatrix",N.matrixWorldInverse);const Wn=bn.map.cameraPosition;Wn!==void 0&&Wn.setValue(k,ne.setFromMatrixPosition(N.matrixWorld)),de.logarithmicDepthBuffer&&bn.setValue(k,"logDepthBufFC",2/(Math.log(N.far+1)/Math.LN2)),(ve.isMeshPhongMaterial||ve.isMeshToonMaterial||ve.isMeshLambertMaterial||ve.isMeshBasicMaterial||ve.isMeshStandardMaterial||ve.isShaderMaterial)&&bn.setValue(k,"isOrthographic",N.isOrthographicCamera===!0),S!==N&&(S=N,Pr=!0,nl=!0)}if(Ee.isSkinnedMesh){bn.setOptional(k,Ee,"bindMatrix"),bn.setOptional(k,Ee,"bindMatrixInverse");const Wn=Ee.skeleton;Wn&&(de.floatVertexTextures?(Wn.boneTexture===null&&Wn.computeBoneTexture(),bn.setValue(k,"boneTexture",Wn.boneTexture,q)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Ee.isBatchedMesh&&(bn.setOptional(k,Ee,"batchingTexture"),bn.setValue(k,"batchingTexture",Ee._matricesTexture,q));const il=le.morphAttributes;if((il.position!==void 0||il.normal!==void 0||il.color!==void 0&&de.isWebGL2===!0)&&ze.update(Ee,le,Ss),(Pr||St.receiveShadow!==Ee.receiveShadow)&&(St.receiveShadow=Ee.receiveShadow,bn.setValue(k,"receiveShadow",Ee.receiveShadow)),ve.isMeshGouraudMaterial&&ve.envMap!==null&&(Ts.envMap.value=lt,Ts.flipEnvMap.value=lt.isCubeTexture&<.isRenderTargetTexture===!1?-1:1),Pr&&(bn.setValue(k,"toneMappingExposure",v.toneMappingExposure),St.needsLights&&vs(Ts,nl),Ve&&ve.fog===!0&&he.refreshFogUniforms(Ts,Ve),he.refreshMaterialUniforms(Ts,ve,P,V,Ne),zd.upload(k,ji(St),Ts,q)),ve.isShaderMaterial&&ve.uniformsNeedUpdate===!0&&(zd.upload(k,ji(St),Ts,q),ve.uniformsNeedUpdate=!1),ve.isSpriteMaterial&&bn.setValue(k,"center",Ee.center),bn.setValue(k,"modelViewMatrix",Ee.modelViewMatrix),bn.setValue(k,"normalMatrix",Ee.normalMatrix),bn.setValue(k,"modelMatrix",Ee.matrixWorld),ve.isShaderMaterial||ve.isRawShaderMaterial){const Wn=ve.uniformsGroups;for(let sl=0,gp=Wn.length;sl0&&q.useMultisampledRTT(N)===!1?Ee=Ie.get(N).__webglMultisampledFramebuffer:Array.isArray(_t)?Ee=_t[le]:Ee=_t,R.copy(N.viewport),U.copy(N.scissor),F=N.scissorTest}else R.copy(Z).multiplyScalar(P).floor(),U.copy(ae).multiplyScalar(P).floor(),F=ie;if(se.bindFramebuffer(k.FRAMEBUFFER,Ee)&&de.drawBuffers&&ve&&se.drawBuffers(N,Ee),se.viewport(R),se.scissor(U),se.setScissorTest(F),Ve){const lt=Ie.get(N.texture);k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,k.TEXTURE_CUBE_MAP_POSITIVE_X+j,lt.__webglTexture,le)}else if(Ze){const lt=Ie.get(N.texture),ot=j||0;k.framebufferTextureLayer(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,lt.__webglTexture,le||0,ot)}w=-1},this.readRenderTargetPixels=function(N,j,le,ve,Ee,Ve,Ze){if(!(N&&N.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let it=Ie.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&Ze!==void 0&&(it=it[Ze]),it){se.bindFramebuffer(k.FRAMEBUFFER,it);try{const lt=N.texture,ot=lt.format,_t=lt.type;if(ot!==gi&&dt.convert(ot)!==k.getParameter(k.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ht=_t===oc&&(K.has("EXT_color_buffer_half_float")||de.isWebGL2&&K.has("EXT_color_buffer_float"));if(_t!==wr&&dt.convert(_t)!==k.getParameter(k.IMPLEMENTATION_COLOR_READ_TYPE)&&!(_t===Ps&&(de.isWebGL2||K.has("OES_texture_float")||K.has("WEBGL_color_buffer_float")))&&!ht){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}j>=0&&j<=N.width-ve&&le>=0&&le<=N.height-Ee&&k.readPixels(j,le,ve,Ee,dt.convert(ot),dt.convert(_t),Ve)}finally{const lt=O!==null?Ie.get(O).__webglFramebuffer:null;se.bindFramebuffer(k.FRAMEBUFFER,lt)}}},this.copyFramebufferToTexture=function(N,j,le=0){const ve=Math.pow(2,-le),Ee=Math.floor(j.image.width*ve),Ve=Math.floor(j.image.height*ve);q.setTexture2D(j,0),k.copyTexSubImage2D(k.TEXTURE_2D,le,0,0,N.x,N.y,Ee,Ve),se.unbindTexture()},this.copyTextureToTexture=function(N,j,le,ve=0){const Ee=j.image.width,Ve=j.image.height,Ze=dt.convert(le.format),it=dt.convert(le.type);q.setTexture2D(le,0),k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,le.flipY),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,le.premultiplyAlpha),k.pixelStorei(k.UNPACK_ALIGNMENT,le.unpackAlignment),j.isDataTexture?k.texSubImage2D(k.TEXTURE_2D,ve,N.x,N.y,Ee,Ve,Ze,it,j.image.data):j.isCompressedTexture?k.compressedTexSubImage2D(k.TEXTURE_2D,ve,N.x,N.y,j.mipmaps[0].width,j.mipmaps[0].height,Ze,j.mipmaps[0].data):k.texSubImage2D(k.TEXTURE_2D,ve,N.x,N.y,Ze,it,j.image),ve===0&&le.generateMipmaps&&k.generateMipmap(k.TEXTURE_2D),se.unbindTexture()},this.copyTextureToTexture3D=function(N,j,le,ve,Ee=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Ve=N.max.x-N.min.x+1,Ze=N.max.y-N.min.y+1,it=N.max.z-N.min.z+1,lt=dt.convert(ve.format),ot=dt.convert(ve.type);let _t;if(ve.isData3DTexture)q.setTexture3D(ve,0),_t=k.TEXTURE_3D;else if(ve.isDataArrayTexture)q.setTexture2DArray(ve,0),_t=k.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,ve.flipY),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ve.premultiplyAlpha),k.pixelStorei(k.UNPACK_ALIGNMENT,ve.unpackAlignment);const ht=k.getParameter(k.UNPACK_ROW_LENGTH),Kt=k.getParameter(k.UNPACK_IMAGE_HEIGHT),xn=k.getParameter(k.UNPACK_SKIP_PIXELS),sn=k.getParameter(k.UNPACK_SKIP_ROWS),In=k.getParameter(k.UNPACK_SKIP_IMAGES),Xt=le.isCompressedTexture?le.mipmaps[0]:le.image;k.pixelStorei(k.UNPACK_ROW_LENGTH,Xt.width),k.pixelStorei(k.UNPACK_IMAGE_HEIGHT,Xt.height),k.pixelStorei(k.UNPACK_SKIP_PIXELS,N.min.x),k.pixelStorei(k.UNPACK_SKIP_ROWS,N.min.y),k.pixelStorei(k.UNPACK_SKIP_IMAGES,N.min.z),le.isDataTexture||le.isData3DTexture?k.texSubImage3D(_t,Ee,j.x,j.y,j.z,Ve,Ze,it,lt,ot,Xt.data):le.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),k.compressedTexSubImage3D(_t,Ee,j.x,j.y,j.z,Ve,Ze,it,lt,Xt.data)):k.texSubImage3D(_t,Ee,j.x,j.y,j.z,Ve,Ze,it,lt,ot,Xt),k.pixelStorei(k.UNPACK_ROW_LENGTH,ht),k.pixelStorei(k.UNPACK_IMAGE_HEIGHT,Kt),k.pixelStorei(k.UNPACK_SKIP_PIXELS,xn),k.pixelStorei(k.UNPACK_SKIP_ROWS,sn),k.pixelStorei(k.UNPACK_SKIP_IMAGES,In),Ee===0&&ve.generateMipmaps&&k.generateMipmap(_t),se.unbindTexture()},this.initTexture=function(N){N.isCubeTexture?q.setTextureCube(N,0):N.isData3DTexture?q.setTexture3D(N,0):N.isDataArrayTexture||N.isCompressedArrayTexture?q.setTexture2DArray(N,0):q.setTexture2D(N,0),se.unbindTexture()},this.resetState=function(){C=0,x=0,O=null,se.reset(),Xe.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Us}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===JE?"display-p3":"srgb",n.unpackColorSpace=Gt.workingColorSpace===dp?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===on?po:iI}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===po?on:On}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class jMt extends TI{}jMt.prototype.isWebGL1Renderer=!0;class QMt extends rn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class XMt{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=ub,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=zi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,i){e*=this.stride,i*=n.stride;for(let s=0,r=this.stride;sl)continue;f.applyMatrix4(this.matrixWorld);const w=e.ray.origin.distanceTo(f);we.far||n.push({distance:w,point:h.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),y=Math.min(b.count,o.start+o.count);for(let v=g,T=y-1;vl)continue;f.applyMatrix4(this.matrixWorld);const x=e.ray.origin.distanceTo(f);xe.far||n.push({distance:x,point:h.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const s=n[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r0){const s=n[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class ly extends Hi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ZE,this.normalScale=new It(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Zs extends ly{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new It(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Ln(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new gt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new gt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new gt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class ww extends Hi{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new gt(16777215),this.specular=new gt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ZE,this.normalScale=new It(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=QE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function Cd(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function a2t(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function l2t(t){function e(s,r){return t[s]-t[r]}const n=t.length,i=new Array(n);for(let s=0;s!==n;++s)i[s]=s;return i.sort(e),i}function Rw(t,e,n){const i=t.length,s=new t.constructor(i);for(let r=0,o=0;o!==i;++r){const a=n[r]*e;for(let l=0;l!==e;++l)s[o++]=t[a+l]}return s}function RI(t,e,n,i){let s=1,r=t[0];for(;r!==void 0&&r[i]===void 0;)r=t[s++];if(r===void 0)return;let o=r[i];if(o!==void 0)if(Array.isArray(o))do o=r[i],o!==void 0&&(e.push(r.time),n.push.apply(n,o)),r=t[s++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[i],o!==void 0&&(e.push(r.time),o.toArray(n,n.length)),r=t[s++];while(r!==void 0);else do o=r[i],o!==void 0&&(e.push(r.time),n.push(o)),r=t[s++];while(r!==void 0)}class Tc{constructor(e,n,i,s){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new n.constructor(i),this.sampleValues=n,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let i=this._cachedIndex,s=n[i],r=n[i-1];e:{t:{let o;n:{i:if(!(e=r)){const a=n[1];e=r)break t}o=i,i=0;break n}break e}for(;i>>1;en;)--o;if(++o,r!==0||o!==s){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=i.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,r=i.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(s!==void 0&&a2t(s))for(let a=0,l=s.length;a!==l;++a){const u=s[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===zm,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*i,l=o*i,u=0;u!==i;++u)n[l+u]=n[a+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*i)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),i=this.constructor,s=new i(this.name,e,n);return s.createInterpolant=this.createInterpolant,s}}gs.prototype.TimeBufferType=Float32Array;gs.prototype.ValueBufferType=Float32Array;gs.prototype.DefaultInterpolation=Aa;class Xa extends gs{}Xa.prototype.ValueTypeName="bool";Xa.prototype.ValueBufferType=Array;Xa.prototype.DefaultInterpolation=ac;Xa.prototype.InterpolantFactoryMethodLinear=void 0;Xa.prototype.InterpolantFactoryMethodSmooth=void 0;class AI extends gs{}AI.prototype.ValueTypeName="color";class Ia extends gs{}Ia.prototype.ValueTypeName="number";class p2t extends Tc{constructor(e,n,i,s){super(e,n,i,s)}interpolate_(e,n,i,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-n)/(s-n);let u=e*a;for(let d=u+a;u!==d;u+=4)kr.slerpFlat(r,0,o,u-a,o,u,l);return r}}class vo extends gs{InterpolantFactoryMethodLinear(e){return new p2t(this.times,this.values,this.getValueSize(),e)}}vo.prototype.ValueTypeName="quaternion";vo.prototype.DefaultInterpolation=Aa;vo.prototype.InterpolantFactoryMethodSmooth=void 0;class Za extends gs{}Za.prototype.ValueTypeName="string";Za.prototype.ValueBufferType=Array;Za.prototype.DefaultInterpolation=ac;Za.prototype.InterpolantFactoryMethodLinear=void 0;Za.prototype.InterpolantFactoryMethodSmooth=void 0;class Ma extends gs{}Ma.prototype.ValueTypeName="vector";class _2t{constructor(e,n=-1,i,s=bRt){this.name=e,this.tracks=i,this.duration=n,this.blendMode=s,this.uuid=zi(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],i=e.tracks,s=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)n.push(f2t(i[o]).scale(s));const r=new this(e.name,e.duration,n,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const n=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=i.length;r!==o;++r)n.push(gs.toJSON(i[r]));return s}static CreateFromMorphTargetSequence(e,n,i,s){const r=n.length,o=[];for(let a=0;a1){const h=d[1];let f=s[h];f||(s[h]=f=[]),f.push(u)}}const o=[];for(const a in s)o.push(this.CreateFromMorphTargetSequence(a,s[a],n,i));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(h,f,_,m,E){if(_.length!==0){const b=[],g=[];RI(_,b,g,m),b.length!==0&&E.push(new h(f,b,g))}},s=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let h=0;h{n&&n(r),this.manager.itemEnd(e)},0),r;if(Os[e]!==void 0){Os[e].push({onLoad:n,onProgress:i,onError:s});return}Os[e]=[],Os[e].push({onLoad:n,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const d=Os[e],h=u.body.getReader(),f=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),_=f?parseInt(f):0,m=_!==0;let E=0;const b=new ReadableStream({start(g){y();function y(){h.read().then(({done:v,value:T})=>{if(v)g.close();else{E+=T.byteLength;const C=new ProgressEvent("progress",{lengthComputable:m,loaded:E,total:_});for(let x=0,O=d.length;x{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(d=>new DOMParser().parseFromString(d,a));case"json":return u.json();default:if(a===void 0)return u.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),f=h&&h[1]?h[1].toLowerCase():void 0,_=new TextDecoder(f);return u.arrayBuffer().then(m=>_.decode(m))}}}).then(u=>{Da.add(e,u);const d=Os[e];delete Os[e];for(let h=0,f=d.length;h{const d=Os[e];if(d===void 0)throw this.manager.itemError(e),u;delete Os[e];for(let h=0,f=d.length;h{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class E2t extends Ja{constructor(e){super(e)}load(e,n,i,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Da.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(o),r.manager.itemEnd(e)},0),o;const a=lc("img");function l(){d(),Da.add(e,this),n&&n(this),r.manager.itemEnd(e)}function u(h){d(),s&&s(h),r.manager.itemError(e),r.manager.itemEnd(e)}function d(){a.removeEventListener("load",l,!1),a.removeEventListener("error",u,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class OI extends Ja{constructor(e){super(e)}load(e,n,i,s){const r=new Nn,o=new E2t(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,n!==void 0&&n(r)},i,s),r}}class hp extends rn{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new gt(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}const fg=new Rt,Aw=new be,Nw=new be;class cy{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new It(512,512),this.map=null,this.mapPass=null,this.matrix=new Rt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ty,this._frameExtents=new It(1,1),this._viewportCount=1,this._viewports=[new Wt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,i=this.matrix;Aw.setFromMatrixPosition(e.matrixWorld),n.position.copy(Aw),Nw.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(Nw),n.updateMatrixWorld(),fg.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(fg),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(fg)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class y2t extends cy{constructor(){super(new zn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,i=Na*2*e.angle*this.focus,s=this.mapSize.width/this.mapSize.height,r=e.distance||n.far;(i!==n.fov||s!==n.aspect||r!==n.far)&&(n.fov=i,n.aspect=s,n.far=r,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class v2t extends hp{constructor(e,n,i=0,s=Math.PI/3,r=0,o=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(rn.DEFAULT_UP),this.updateMatrix(),this.target=new rn,this.distance=i,this.angle=s,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new y2t}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Ow=new Rt,Sl=new be,mg=new be;class S2t extends cy{constructor(){super(new zn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new It(4,2),this._viewportCount=6,this._viewports=[new Wt(2,1,1,1),new Wt(0,1,1,1),new Wt(3,1,1,1),new Wt(1,1,1,1),new Wt(3,0,1,1),new Wt(1,0,1,1)],this._cubeDirections=[new be(1,0,0),new be(-1,0,0),new be(0,0,1),new be(0,0,-1),new be(0,1,0),new be(0,-1,0)],this._cubeUps=[new be(0,1,0),new be(0,1,0),new be(0,1,0),new be(0,1,0),new be(0,0,1),new be(0,0,-1)]}updateMatrices(e,n=0){const i=this.camera,s=this.matrix,r=e.distance||i.far;r!==i.far&&(i.far=r,i.updateProjectionMatrix()),Sl.setFromMatrixPosition(e.matrixWorld),i.position.copy(Sl),mg.copy(i.position),mg.add(this._cubeDirections[n]),i.up.copy(this._cubeUps[n]),i.lookAt(mg),i.updateMatrixWorld(),s.makeTranslation(-Sl.x,-Sl.y,-Sl.z),Ow.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ow)}}class T2t extends hp{constructor(e,n,i=0,s=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new S2t}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class x2t extends cy{constructor(){super(new iy(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class II extends hp{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(rn.DEFAULT_UP),this.updateMatrix(),this.target=new rn,this.shadow=new x2t}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class C2t extends hp{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class Vl{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let i=0,s=e.length;i"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Da.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(o),r.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(l){Da.add(e,l),n&&n(l),r.manager.itemEnd(e)}).catch(function(l){s&&s(l),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}const dy="\\[\\]\\.:\\/",R2t=new RegExp("["+dy+"]","g"),uy="[^"+dy+"]",A2t="[^"+dy.replace("\\.","")+"]",N2t=/((?:WC+[\/:])*)/.source.replace("WC",uy),O2t=/(WCOD+)?/.source.replace("WCOD",A2t),I2t=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uy),M2t=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uy),D2t=new RegExp("^"+N2t+O2t+I2t+M2t+"$"),k2t=["material","materials","bones","map"];class L2t{constructor(e,n,i){const s=i||zt.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,s)}getValue(e,n){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,n)}setValue(e,n){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].unbind()}}class zt{constructor(e,n,i){this.path=n,this.parsedPath=i||zt.parseTrackName(n),this.node=zt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,i){return e&&e.isAnimationObjectGroup?new zt.Composite(e,n,i):new zt(e,n,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(R2t,"")}static parseTrackName(e){const n=D2t.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=i.nodeName.substring(s+1);k2t.indexOf(r)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=r)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(n);if(i!==void 0)return i}if(e.children){const i=function(r){for(let o=0;o=2.0 are supported."));return}const u=new hDt(r,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}u.setExtensions(o),u.setPlugins(a),u.parse(i,s)}parseAsync(e,n){const i=this;return new Promise(function(s,r){i.parse(e,n,s,r)})}}function U2t(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Ot={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class F2t{constructor(e){this.parser=e,this.name=Ot.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let i=0,s=n.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,r.source,o)}}class X2t{constructor(e){this.parser=e,this.name=Ot.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,i=this.parser,s=i.json,r=s.textures[e];if(!r.extensions||!r.extensions[n])return null;const o=r.extensions[n],a=s.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class Z2t{constructor(e){this.parser=e,this.name=Ot.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,i=this.parser,s=i.json,r=s.textures[e];if(!r.extensions||!r.extensions[n])return null;const o=r.extensions[n],a=s.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class J2t{constructor(e){this.name=Ot.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,i=n.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const s=i.extensions[this.name],r=this.parser.getDependency("buffer",s.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const l=s.byteOffset||0,u=s.byteLength||0,d=s.count,h=s.byteStride,f=new Uint8Array(a,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,f,s.mode,s.filter).then(function(_){return _.buffer}):o.ready.then(function(){const _=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(_),d,h,f,s.mode,s.filter),_})})}else return null}}class eDt{constructor(e){this.name=Ot.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,i=n.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const s=n.meshes[i.mesh];for(const u of s.primitives)if(u.mode!==hi.TRIANGLES&&u.mode!==hi.TRIANGLE_STRIP&&u.mode!==hi.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const u in o)a.push(this.parser.getDependency("accessor",o[u]).then(d=>(l[u]=d,l[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(u=>{const d=u.pop(),h=d.isGroup?d.children:[d],f=u[0].count,_=[];for(const m of h){const E=new Rt,b=new be,g=new kr,y=new be(1,1,1),v=new i2t(m.geometry,m.material,f);for(let T=0;T0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const _Dt=new Rt;class hDt{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new U2t,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,s=!1,r=-1;typeof navigator<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,s=navigator.userAgent.indexOf("Firefox")>-1,r=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||s&&r<98?this.textureLoader=new OI(this.options.manager):this.textureLoader=new w2t(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new NI(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const i=this,s=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][s.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:s.asset,parser:i,userData:{}};return Yr(r,a,s),gr(a,s),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],i=this.json.meshes||[];for(let s=0,r=n.length;s{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[u,d]of o.children.entries())r(d,a.children[u])};return r(i,s),s.name+="_instance_"+e.uses[n]++,s}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let i=0;i=2&&b.setY(S,x[O*l+1]),l>=3&&b.setZ(S,x[O*l+2]),l>=4&&b.setW(S,x[O*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const n=this.json,i=this.options,r=n.textures[e].source,o=n.images[r];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,n,i){const s=this,r=this.json,o=r.textures[e],a=r.images[n],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(n,i).then(function(d){d.flipY=!1,d.name=o.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(r.samplers||{})[o.sampler]||{};return d.magFilter=Dw[f.magFilter]||jn,d.minFilter=Dw[f.minFilter]||bo,d.wrapS=kw[f.wrapS]||wa,d.wrapT=kw[f.wrapT]||wa,s.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,n){const i=this,s=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const o=s.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(h){u=!0;const f=new Blob([h],{type:o.mimeType});return l=a.createObjectURL(f),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(l).then(function(h){return new Promise(function(f,_){let m=f;n.isImageBitmapLoader===!0&&(m=function(E){const b=new Nn(E);b.needsUpdate=!0,f(b)}),n.load(Vl.resolveURL(h,r.path),m,void 0,_)})}).then(function(h){return u===!0&&a.revokeObjectURL(l),h.userData.mimeType=o.mimeType||pDt(o.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),h});return this.sourceCache[e]=d,d}assignTexture(e,n,i,s){const r=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),r.extensions[Ot.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[Ot.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=r.associations.get(o);o=r.extensions[Ot.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,l)}}return s!==void 0&&(o.colorSpace=s),e[n]=o,o})}assignFinalMaterial(e){const n=e.geometry;let i=e.material;const s=n.attributes.tangent===void 0,r=n.attributes.color!==void 0,o=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new wI,Hi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new CI,Hi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(s||r||o){let a="ClonedMaterial:"+i.uuid+":";s&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),r&&(l.vertexColors=!0),o&&(l.flatShading=!0),s&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return ly}loadMaterial(e){const n=this,i=this.json,s=this.extensions,r=i.materials[e];let o;const a={},l=r.extensions||{},u=[];if(l[Ot.KHR_MATERIALS_UNLIT]){const h=s[Ot.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),u.push(h.extendParams(a,r,n))}else{const h=r.pbrMetallicRoughness||{};if(a.color=new gt(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const f=h.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],On),a.opacity=f[3]}h.baseColorTexture!==void 0&&u.push(n.assignTexture(a,"map",h.baseColorTexture,on)),a.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,a.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),u.push(n.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=es);const d=r.alphaMode||bg.OPAQUE;if(d===bg.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===bg.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==vr&&(u.push(n.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new It(1,1),r.normalTexture.scale!==void 0)){const h=r.normalTexture.scale;a.normalScale.set(h,h)}if(r.occlusionTexture!==void 0&&o!==vr&&(u.push(n.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==vr){const h=r.emissiveFactor;a.emissive=new gt().setRGB(h[0],h[1],h[2],On)}return r.emissiveTexture!==void 0&&o!==vr&&u.push(n.assignTexture(a,"emissiveMap",r.emissiveTexture,on)),Promise.all(u).then(function(){const h=new o(a);return r.name&&(h.name=r.name),gr(h,r),n.associations.set(h,{materials:e}),r.extensions&&Yr(s,h,r),h})}createUniqueName(e){const n=zt.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,i=this.extensions,s=this.primitiveCache;function r(a){return i[Ot.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return Lw(l,a,n)})}const o=[];for(let a=0,l=e.length;a0&&dDt(g,r),g.name=n.createUniqueName(r.name||"mesh_"+e),gr(g,r),b.extensions&&Yr(s,g,b),n.assignFinalMaterial(g),h.push(g)}for(let _=0,m=h.length;_1?d=new so:u.length===1?d=u[0]:d=new rn,d!==u[0])for(let h=0,f=u.length;h{const h=new Map;for(const[f,_]of s.associations)(f instanceof Hi||f instanceof Nn)&&h.set(f,_);return d.traverse(f=>{const _=s.associations.get(f);_!=null&&h.set(f,_)}),h};return s.associations=u(r),r})}_createAnimationTracks(e,n,i,s,r){const o=[],a=e.name?e.name:e.uuid,l=[];lr[r.path]===lr.weights?e.traverse(function(f){f.morphTargetInfluences&&l.push(f.name?f.name:f.uuid)}):l.push(a);let u;switch(lr[r.path]){case lr.weights:u=Ia;break;case lr.rotation:u=vo;break;case lr.position:case lr.scale:u=Ma;break;default:switch(i.itemSize){case 1:u=Ia;break;case 2:case 3:default:u=Ma;break}break}const d=s.interpolation!==void 0?aDt[s.interpolation]:Aa,h=this._getArrayFromAccessor(i);for(let f=0,_=l.length;f<_;f++){const m=new u(l[f]+"."+lr[r.path],n.array,h,d);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(m),o.push(m)}return o}_getArrayFromAccessor(e){let n=e.array;if(e.normalized){const i=bb(n.constructor),s=new Float32Array(n.length);for(let r=0,o=n.length;r{He.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,Ke.emit("stop_webcam_video_stream"),Ge(()=>{He.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){He.replace(),Ke.on("video_stream_image",t=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},gDt=["src"],bDt=["src"],EDt={class:"controls"},yDt=c("i",{"data-feather":"video"},null,-1),vDt=[yDt],SDt=c("i",{"data-feather":"video"},null,-1),TDt=[SDt],xDt={key:2};function CDt(t,e,n,i,s,r){return A(),M("div",{class:"floating-frame bg-white",style:en({bottom:s.position.bottom+"px",right:s.position.right+"px","z-index":s.zIndex}),onMousedown:e[4]||(e[4]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[c("div",{class:"handle",onMousedown:e[0]||(e[0]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),s.isVideoActive&&s.imageDataUrl!=null?(A(),M("img",{key:0,src:s.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,gDt)):$("",!0),s.isVideoActive&&s.imageDataUrl==null?(A(),M("p",{key:1,src:s.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,bDt)):$("",!0),c("div",EDt,[s.isVideoActive?$("",!0):(A(),M("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startVideoStream&&r.startVideoStream(...o))},vDt)),s.isVideoActive?(A(),M("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopVideoStream&&r.stopVideoStream(...o))},TDt)):$("",!0),s.isVideoActive?(A(),M("span",xDt,"FPS: "+ge(s.frameRate),1)):$("",!0)])],36)}const wDt=bt(mDt,[["render",CDt]]);const RDt={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){Ke.emit("start_audio_stream",()=>{this.isAudioActive=!0}),Ge(()=>{He.replace()})},stopAudioStream(){Ke.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),Ge(()=>{He.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){He.replace(),Ke.on("update_spectrogram",t=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},ADt=["src"],NDt={class:"controls"},ODt=c("i",{"data-feather":"mic"},null,-1),IDt=[ODt],MDt=c("i",{"data-feather":"mic"},null,-1),DDt=[MDt];function kDt(t,e,n,i,s,r){return A(),M("div",{class:"floating-frame bg-white",style:en({bottom:s.position.bottom+"px",right:s.position.right+"px","z-index":s.zIndex}),onMousedown:e[4]||(e[4]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[c("div",{class:"handle",onMousedown:e[0]||(e[0]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),s.isAudioActive&&s.imageDataUrl!=null?(A(),M("img",{key:0,src:s.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,ADt)):$("",!0),c("div",NDt,[s.isAudioActive?$("",!0):(A(),M("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startAudioStream&&r.startAudioStream(...o))},IDt)),s.isAudioActive?(A(),M("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopAudioStream&&r.stopAudioStream(...o))},DDt)):$("",!0)])],36)}const LDt=bt(RDt,[["render",kDt]]);const PDt={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:wDt,AudioFrame:LDt},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),Ge(()=>{He.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new QMt,this.camera=new zn(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new TI,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const t=new Rr,e=new ww({color:65280});this.cube=new Hn(t,e),this.scene.add(this.cube);const n=new C2t(4210752),i=new II(16777215,.5);i.position.set(0,1,0),this.scene.add(n),this.scene.add(i),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:t,config:e}=this.$store.state;this.activePersonality=t[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(t){new P2t().load(t,n=>{this.scene.remove(this.cube),this.cube=n.scene,this.scene.add(this.cube)})},showBoxWithAvatar(t){this.cube&&this.scene.remove(this.cube);const e=new Rr,n=new OI().load(t),i=new vr({map:n});this.cube=new Hn(e,i),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const t=new Rr,e=new ww({color:65280});this.cube=new Hn(t,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},UDt={ref:"webglContainer"},FDt={class:"flex-col y-overflow 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"},BDt={key:0,class:"text-center"},GDt={key:1,class:"text-center"},VDt={class:"floating-frame2"},zDt=["innerHTML"];function HDt(t,e,n,i,s,r){const o=ft("VideoFrame"),a=ft("AudioFrame");return A(),M(We,null,[c("div",UDt,null,512),c("div",FDt,[!s.activePersonality||!s.activePersonality.scene_path?(A(),M("div",BDt," Personality does not have a 3d avatar. ")):$("",!0),!s.activePersonality||!s.activePersonality.avatar||s.activePersonality.avatar===""?(A(),M("div",GDt," Personality does not have an avatar. ")):$("",!0),c("div",VDt,[c("div",{innerHTML:t.htmlContent},null,8,zDt)])]),Re(o,{ref:"video_frame"},null,512),Re(a,{ref:"audio_frame"},null,512)],64)}const qDt=bt(PDt,[["render",HDt]]);let wd;const YDt=new Uint8Array(16);function $Dt(){if(!wd&&(wd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!wd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wd(YDt)}const Cn=[];for(let t=0;t<256;++t)Cn.push((t+256).toString(16).slice(1));function WDt(t,e=0){return Cn[t[e+0]]+Cn[t[e+1]]+Cn[t[e+2]]+Cn[t[e+3]]+"-"+Cn[t[e+4]]+Cn[t[e+5]]+"-"+Cn[t[e+6]]+Cn[t[e+7]]+"-"+Cn[t[e+8]]+Cn[t[e+9]]+"-"+Cn[t[e+10]]+Cn[t[e+11]]+Cn[t[e+12]]+Cn[t[e+13]]+Cn[t[e+14]]+Cn[t[e+15]]}const KDt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pw={randomUUID:KDt};function Gs(t,e,n){if(Pw.randomUUID&&!e&&!t)return Pw.randomUUID();t=t||{};const i=t.random||(t.rng||$Dt)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){n=n||0;for(let s=0;s<16;++s)e[n+s]=i[s];return e}return WDt(i)}class _o{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,n){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. Please check that you don't accidentally use the same token twice to register two different handlers for the same event/hook.`),this.unsubscribe(e)),this.listenerMap.set(e,n),this._listeners.push(n)}unsubscribe(e){if(this.listenerMap.has(e)){const n=this.listenerMap.get(e);this.listenerMap.delete(e);const i=this._listeners.indexOf(n);i>=0&&this._listeners.splice(i,1)}}registerProxy(e,n){this.proxyMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. -Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,n),this.proxies.push(n)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const n=this.proxyMap.get(e);this.proxyMap.delete(e);const i=this.proxies.indexOf(n);i>=0&&this.proxies.splice(i,1)}}class qt extends _o{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(n=>n(e,this.entity))}}class Un extends _o{constructor(e){super(),this.entity=e}emit(e){let n=!1;const i=()=>[n=!0];for(const s of Array.from(this.listeners.values()))if(s(e,i,this.entity),n)return{prevented:!0};return{prevented:!1}}}class kI extends _o{execute(e,n){let i=e;for(const s of this.listeners)i=s(i,n);return i}}class li extends kI{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class XDt extends _o{constructor(e){super(),this.entity=e}execute(e){const n=[];for(const i of this.listeners)n.push(i(e,this.entity));return n}}function Qi(){const t=Symbol(),e=new Map,n=new Set,i=(l,u)=>{u instanceof _o&&u.registerProxy(t,()=>{var d,h;return(h=(d=e.get(l))===null||d===void 0?void 0:d.listeners)!==null&&h!==void 0?h:[]})},s=l=>{const u=new _o;e.set(l,u),n.forEach(d=>i(l,d[l]))},r=l=>{n.add(l);for(const u of e.keys())i(u,l[u])},o=l=>{for(const u of e.keys())l[u]instanceof _o&&l[u].unregisterProxy(t);n.delete(l)},a=()=>{n.forEach(l=>o(l)),e.clear()};return new Proxy({},{get(l,u){return u==="addTarget"?r:u==="removeTarget"?o:u==="destroy"?a:typeof u!="string"||u.startsWith("_")?l[u]:(e.has(u)||s(u),e.get(u))}})}class Uw{constructor(e,n){if(this.destructed=!1,this.events={destruct:new qt(this)},!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Gs(),this.from=e,this.to=n,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class LI{constructor(e,n){if(!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Gs(),this.from=e,this.to=n}}function Eb(t,e){return Object.fromEntries(Object.entries(t).map(([n,i])=>[n,e(i)]))}class PI{constructor(){this._title="",this.id=Gs(),this.events={loaded:new qt(this),beforeAddInput:new Un(this),addInput:new qt(this),beforeRemoveInput:new Un(this),removeInput:new qt(this),beforeAddOutput:new Un(this),addOutput:new qt(this),beforeRemoveOutput:new Un(this),removeOutput:new qt(this),beforeTitleChanged:new Un(this),titleChanged:new qt(this),update:new qt(this)},this.hooks={beforeLoad:new li(this),afterSave:new li(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,n){return this.addInterface("input",e,n)}addOutput(e,n){return this.addInterface("output",e,n)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([n,i])=>{this.inputs[n]&&(this.inputs[n].load(i),this.inputs[n].nodeId=this.id)}),Object.entries(e.outputs).forEach(([n,i])=>{this.outputs[n]&&(this.outputs[n].load(i),this.outputs[n].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=Eb(this.inputs,s=>s.save()),n=Eb(this.outputs,s=>s.save()),i={type:this.type,id:this.id,title:this.title,inputs:e,outputs:n};return this.hooks.afterSave.execute(i)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,n])=>this.initializeIntf("input",e,n)),Object.entries(this.outputs).forEach(([e,n])=>this.initializeIntf("output",e,n))}initializeIntf(e,n,i){i.isInput=e==="input",i.nodeId=this.id,i.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:n,intf:i}))}addInterface(e,n,i){const s=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,r=e==="input"?this.events.addInput:this.events.addOutput,o=e==="input"?this.inputs:this.outputs;return s.emit(i).prevented?!1:(o[n]=i,this.initializeIntf(e,n,i),r.emit(i),!0)}removeInterface(e,n){const i=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,s=e==="input"?this.events.removeInput:this.events.removeOutput,r=e==="input"?this.inputs[n]:this.outputs[n];if(!r||i.emit(r).prevented)return!1;if(r.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===r||a.to===r).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return r.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[n]:delete this.outputs[n],s.emit(r),!0}}let UI=class extends PI{load(e){super.load(e)}save(){return super.save()}};function el(t){return class extends UI{constructor(){var e,n;super(),this.type=t.type,this.inputs={},this.outputs={},this.calculate=t.calculate?(i,s)=>t.calculate.call(this,i,s):void 0,this._title=(e=t.title)!==null&&e!==void 0?e:t.type,this.executeFactory("input",t.inputs),this.executeFactory("output",t.outputs),(n=t.onCreate)===null||n===void 0||n.call(this)}onPlaced(){var e;(e=t.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=t.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,n){Object.keys(n||{}).forEach(i=>{const s=n[i]();e==="input"?this.addInput(i,s):this.addOutput(i,s)})}}}class nn{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,n){this.id=Gs(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new qt(this),beforeSetValue:new Un(this),setValue:new qt(this),updated:new qt(this)},this.hooks={load:new li(this),save:new li(this)},this._connectionCount=0,this.name=e,this._value=n}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...n){return e(this,...n),this}}const ka="__baklava_SubgraphInputNode",La="__baklava_SubgraphOutputNode";class FI extends UI{constructor(){super(),this.graphInterfaceId=Gs()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class BI extends FI{constructor(){super(...arguments),this.type=ka,this.inputs={name:new nn("Name","Input")},this.outputs={placeholder:new nn("Value",void 0)}}static isGraphInputNode(e){return e.type===ka}}class GI extends FI{constructor(){super(...arguments),this.type=La,this.inputs={name:new nn("Name","Output"),placeholder:new nn("Value",void 0)},this.outputs={output:new nn("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===La}}class xc{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(n=>n.type===ka).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===La).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Gs(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new Un(this),addNode:new qt(this),beforeRemoveNode:new Un(this),removeNode:new qt(this),beforeAddConnection:new Un(this),addConnection:new qt(this),checkConnection:new Un(this),beforeRemoveConnection:new Un(this),removeConnection:new qt(this)},this.hooks={save:new li(this),load:new li(this),checkConnection:new XDt(this)},this.nodeEvents=Qi(),this.nodeHooks=Qi(),this.connectionEvents=Qi(),this.editor=e,this.template=n,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(n=>n.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const n=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(i=>n.includes(i.from)||n.includes(i.to)).forEach(i=>this.removeConnection(i)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,n){const i=this.checkConnection(e,n);if(!i.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:n}).prevented)return;for(const r of i.connectionsInDanger){const o=this.connections.find(a=>a.id===r.id);o&&this.removeConnection(o)}const s=new Uw(i.dummyConnection.from,i.dummyConnection.to);return this.internalAddConnection(s),s}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,n){if(!e||!n)return{connectionAllowed:!1};const i=this.findNodeById(e.nodeId),s=this.findNodeById(n.nodeId);if(i&&s&&i===s)return{connectionAllowed:!1};if(e.isInput&&!n.isInput){const a=e;e=n,n=a}if(e.isInput||!n.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===n))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:n}).prevented)return{connectionAllowed:!1};const r=this.hooks.checkConnection.execute({from:e,to:n});if(r.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const o=Array.from(new Set(r.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new LI(e,n),connectionsInDanger:o}}findNodeInterface(e){for(const n of this.nodes){for(const i in n.inputs){const s=n.inputs[i];if(s.id===e)return s}for(const i in n.outputs){const s=n.outputs[i];if(s.id===e)return s}}}findNodeById(e){return this.nodes.find(n=>n.id===e)}load(e){try{this._loading=!0;const n=[];for(let i=this.connections.length-1;i>=0;i--)this.removeConnection(this.connections[i]);for(let i=this.nodes.length-1;i>=0;i--)this.removeNode(this.nodes[i]);this.id=e.id;for(const i of e.nodes){const s=this.editor.nodeTypes.get(i.type);if(!s){n.push(`Node type ${i.type} is not registered`);continue}const r=new s.type;this.addNode(r),r.load(i)}for(const i of e.connections){const s=this.findNodeInterface(i.from),r=this.findNodeInterface(i.to);if(s)if(r){const o=new Uw(s,r);o.id=i.id,this.internalAddConnection(o)}else{n.push(`Could not find interface with id ${i.to}`);continue}else{n.push(`Could not find interface with id ${i.from}`);continue}}return this.hooks.load.execute(e),n}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(n=>n.save()),connections:this.connections.map(n=>({id:n.id,from:n.from.id,to:n.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const cc="__baklava_GraphNode-";function Pa(t){return cc+t.id}function ZDt(t){return class extends PI{constructor(){super(...arguments),this.type=Pa(t),this.inputs={},this.outputs={},this.template=t,this.calculate=async(n,i)=>{var s;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!i.engine||typeof i.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const r=i.engine.getInputValues(this.subgraph);for(const l of this.subgraph.inputs)r.set(l.nodeInterfaceId,n[l.id]);const o=await i.engine.runGraph(this.subgraph,r,i.globalValues),a={};for(const l of this.subgraph.outputs)a[l.id]=(s=o.get(l.nodeId))===null||s===void 0?void 0:s.get("output");return a._calculationResults=o,a}}get title(){return this._title}set title(n){this.template.name=n}load(n){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(n.graphState),super.load(n)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,n=>{this._title=n}),this.initialize()}onDestroy(){var n;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(n=this.subgraph)===null||n===void 0||n.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const n of this.subgraph.inputs)n.id in this.inputs?this.inputs[n.id].name=n.name:this.addInput(n.id,new nn(n.name,void 0));for(const n of Object.keys(this.inputs))this.subgraph.inputs.some(i=>i.id===n)||this.removeInput(n);for(const n of this.subgraph.outputs)n.id in this.outputs?this.outputs[n.id].name=n.name:this.addOutput(n.id,new nn(n.name,void 0));for(const n of Object.keys(this.outputs))this.subgraph.outputs.some(i=>i.id===n)||this.removeOutput(n);this.addOutput("_calculationResults",new nn("_calculationResults",void 0).setHidden(!0))}}}class fp{static fromGraph(e,n){return new fp(e.save(),n)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const n=this.editor.nodeTypes.get(Pa(this));n&&(n.title=e)}get inputs(){return this.nodes.filter(n=>n.type===ka).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===La).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Gs(),this._name="Subgraph",this.events={nameChanged:new qt(this),updated:new qt(this)},this.hooks={beforeLoad:new li(this),afterSave:new li(this)},this.editor=n,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const n=new Map,i=f=>{const _=Gs();return n.set(f,_),_},s=f=>{const _=n.get(f);if(!_)throw new Error(`Unable to create graph from template: Could not map old id ${f} to new id`);return _},r=f=>Eb(f,_=>({id:i(_.id),templateId:_.id,value:_.value})),o=this.nodes.map(f=>({...f,id:i(f.id),inputs:r(f.inputs),outputs:r(f.outputs)})),a=this.connections.map(f=>({id:i(f.id),from:s(f.from),to:s(f.to)})),l=this.inputs.map(f=>({id:f.id,name:f.name,nodeId:s(f.nodeId),nodeInterfaceId:s(f.nodeInterfaceId)})),u=this.outputs.map(f=>({id:f.id,name:f.name,nodeId:s(f.nodeId),nodeInterfaceId:s(f.nodeInterfaceId)})),d={id:Gs(),nodes:o,connections:a,inputs:l,outputs:u};return e||(e=new xc(this.editor)),e.load(d).forEach(f=>console.warn(f)),e.template=this,e}}class JDt{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new qt(this),beforeRegisterNodeType:new Un(this),registerNodeType:new qt(this),beforeUnregisterNodeType:new Un(this),unregisterNodeType:new qt(this),beforeAddGraphTemplate:new Un(this),addGraphTemplate:new qt(this),beforeRemoveGraphTemplate:new Un(this),removeGraphTemplate:new qt(this),registerGraph:new qt(this),unregisterGraph:new qt(this)},this.hooks={save:new li(this),load:new li(this)},this.graphTemplateEvents=Qi(),this.graphTemplateHooks=Qi(),this.graphEvents=Qi(),this.graphHooks=Qi(),this.nodeEvents=Qi(),this.nodeHooks=Qi(),this.connectionEvents=Qi(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new xc(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(BI),this.registerNodeType(GI)}registerNodeType(e,n){var i,s;if(this.events.beforeRegisterNodeType.emit({type:e,options:n}).prevented)return;const r=new e;this._nodeTypes.set(r.type,{type:e,category:(i=n==null?void 0:n.category)!==null&&i!==void 0?i:"default",title:(s=n==null?void 0:n.title)!==null&&s!==void 0?s:r.title}),this.events.registerNodeType.emit({type:e,options:n})}unregisterNodeType(e){const n=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(n)){if(this.events.beforeUnregisterNodeType.emit(n).prevented)return;this._nodeTypes.delete(n),this.events.unregisterNodeType.emit(n)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const n=ZDt(e);this.registerNodeType(n,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const n=Pa(e);for(const i of[this.graph,...this.graphs.values()]){const s=i.nodes.filter(r=>r.type===n);for(const r of s)i.removeNode(r)}this.unregisterNodeType(n),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{this._loading=!0,e=this.hooks.load.execute(e),e.graphTemplates.forEach(i=>{const s=new fp(i,this);this.addGraphTemplate(s)});const n=this._graph.load(e.graph);return this.events.loaded.emit(),n.forEach(i=>console.warn(i)),n}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(n=>n.save())};return this.hooks.save.execute(e)}}function ekt(t,e){const n=new Map;e.graphs.forEach(i=>{i.nodes.forEach(s=>n.set(s.id,s))}),t.forEach((i,s)=>{const r=n.get(s);r&&i.forEach((o,a)=>{const l=r.outputs[a];l&&(l.value=o)})})}class VI extends Error{constructor(){super("Cycle detected")}}function tkt(t){return typeof t=="string"}function zI(t,e){const n=new Map,i=new Map,s=new Map;let r,o;if(t instanceof xc)r=t.nodes,o=t.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");r=t,o=e}r.forEach(u=>{Object.values(u.inputs).forEach(d=>n.set(d.id,u.id)),Object.values(u.outputs).forEach(d=>n.set(d.id,u.id))}),r.forEach(u=>{const d=o.filter(f=>f.from&&n.get(f.from.id)===u.id),h=new Set(d.map(f=>n.get(f.to.id)).filter(tkt));i.set(u.id,h),s.set(u,d)});const a=r.slice();o.forEach(u=>{const d=a.findIndex(h=>n.get(u.to.id)===h.id);d>=0&&a.splice(d,1)});const l=[];for(;a.length>0;){const u=a.pop();l.push(u);const d=i.get(u.id);for(;d.size>0;){const h=d.values().next().value;if(d.delete(h),Array.from(i.values()).every(f=>!f.has(h))){const f=r.find(_=>_.id===h);a.push(f)}}}if(Array.from(i.values()).some(u=>u.size>0))throw new VI;return{calculationOrder:l,connectionsFromNode:s,interfaceIdToNodeId:n}}function nkt(t,e){try{return zI(t,e),!1}catch(n){if(n instanceof VI)return!0;throw n}}var Kn;(function(t){t.Running="Running",t.Idle="Idle",t.Paused="Paused",t.Stopped="Stopped"})(Kn||(Kn={}));class ikt{get status(){return this.isRunning?Kn.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new Un(this),afterRun:new qt(this),statusChange:new qt(this),beforeNodeCalculation:new qt(this),afterNodeCalculation:new qt(this)},this.hooks={gatherCalculationData:new li(this),transferData:new kI},this.recalculateOrder=!0,this.internalStatus=Kn.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(n,i)=>{i.graph&&!i.graph.loading&&i.graph.activeTransactions===0&&this.internalOnChange(i,n??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(n,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(n,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(n,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(n,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,n=>this.checkConnection(n.from,n.to))}start(){this.internalStatus===Kn.Stopped&&(this.internalStatus=Kn.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===Kn.Idle&&(this.internalStatus=Kn.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===Kn.Paused&&(this.internalStatus=Kn.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===Kn.Idle||this.internalStatus===Kn.Paused)&&(this.internalStatus=Kn.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...n){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const i=await this.execute(e,...n);return this.events.afterRun.emit(i),i}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,n){if(e.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};e=r}if(n.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,n.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};n=r}const i=new LI(e,n);let s=this.editor.graph.connections.slice();return n.allowMultipleConnections||(s=s.filter(r=>r.to!==n)),s.push(i),nkt(this.editor.graph.nodes,s)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:n.allowMultipleConnections?[]:this.editor.graph.connections.filter(r=>r.to===n)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const n=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(n,...e)}validateNodeCalculationOutput(e,n){if(typeof n!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(i=>{if(!(i in n))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${i}"`)})}internalOnChange(e,n){this.internalStatus===Kn.Idle&&this.onChange(this.recalculateOrder,e,n)}findInterfaceByTemplateId(e,n){for(const i of e)for(const s of[...Object.values(i.inputs),...Object.values(i.outputs)])if(s.templateId===n)return s;return null}}class skt extends ikt{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,n,i){this.order.has(e.id)||this.order.set(e.id,zI(e));const{calculationOrder:s,connectionsFromNode:r}=this.order.get(e.id),o=new Map;for(const a of s){const l={};Object.entries(a.inputs).forEach(([d,h])=>{l[d]=this.getInterfaceValue(n,h.id)}),this.events.beforeNodeCalculation.emit({inputValues:l,node:a});let u;if(a.calculate)u=await a.calculate(l,{globalValues:i,engine:this});else{u={};for(const[d,h]of Object.entries(a.outputs))u[d]=this.getInterfaceValue(n,h.id)}this.validateNodeCalculationOutput(a,u),this.events.afterNodeCalculation.emit({outputValues:u,node:a}),o.set(a.id,new Map(Object.entries(u))),r.has(a)&&r.get(a).forEach(d=>{var h;const f=(h=Object.entries(a.outputs).find(([,m])=>m.id===d.from.id))===null||h===void 0?void 0:h[0];if(!f)throw new Error(`Could not find key for interface ${d.from.id} +Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,n),this.proxies.push(n)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const n=this.proxyMap.get(e);this.proxyMap.delete(e);const i=this.proxies.indexOf(n);i>=0&&this.proxies.splice(i,1)}}class qt extends _o{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(n=>n(e,this.entity))}}class Un extends _o{constructor(e){super(),this.entity=e}emit(e){let n=!1;const i=()=>[n=!0];for(const s of Array.from(this.listeners.values()))if(s(e,i,this.entity),n)return{prevented:!0};return{prevented:!1}}}class kI extends _o{execute(e,n){let i=e;for(const s of this.listeners)i=s(i,n);return i}}class li extends kI{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class jDt extends _o{constructor(e){super(),this.entity=e}execute(e){const n=[];for(const i of this.listeners)n.push(i(e,this.entity));return n}}function Qi(){const t=Symbol(),e=new Map,n=new Set,i=(l,u)=>{u instanceof _o&&u.registerProxy(t,()=>{var d,h;return(h=(d=e.get(l))===null||d===void 0?void 0:d.listeners)!==null&&h!==void 0?h:[]})},s=l=>{const u=new _o;e.set(l,u),n.forEach(d=>i(l,d[l]))},r=l=>{n.add(l);for(const u of e.keys())i(u,l[u])},o=l=>{for(const u of e.keys())l[u]instanceof _o&&l[u].unregisterProxy(t);n.delete(l)},a=()=>{n.forEach(l=>o(l)),e.clear()};return new Proxy({},{get(l,u){return u==="addTarget"?r:u==="removeTarget"?o:u==="destroy"?a:typeof u!="string"||u.startsWith("_")?l[u]:(e.has(u)||s(u),e.get(u))}})}class Uw{constructor(e,n){if(this.destructed=!1,this.events={destruct:new qt(this)},!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Gs(),this.from=e,this.to=n,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class LI{constructor(e,n){if(!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Gs(),this.from=e,this.to=n}}function Eb(t,e){return Object.fromEntries(Object.entries(t).map(([n,i])=>[n,e(i)]))}class PI{constructor(){this._title="",this.id=Gs(),this.events={loaded:new qt(this),beforeAddInput:new Un(this),addInput:new qt(this),beforeRemoveInput:new Un(this),removeInput:new qt(this),beforeAddOutput:new Un(this),addOutput:new qt(this),beforeRemoveOutput:new Un(this),removeOutput:new qt(this),beforeTitleChanged:new Un(this),titleChanged:new qt(this),update:new qt(this)},this.hooks={beforeLoad:new li(this),afterSave:new li(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,n){return this.addInterface("input",e,n)}addOutput(e,n){return this.addInterface("output",e,n)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([n,i])=>{this.inputs[n]&&(this.inputs[n].load(i),this.inputs[n].nodeId=this.id)}),Object.entries(e.outputs).forEach(([n,i])=>{this.outputs[n]&&(this.outputs[n].load(i),this.outputs[n].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=Eb(this.inputs,s=>s.save()),n=Eb(this.outputs,s=>s.save()),i={type:this.type,id:this.id,title:this.title,inputs:e,outputs:n};return this.hooks.afterSave.execute(i)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,n])=>this.initializeIntf("input",e,n)),Object.entries(this.outputs).forEach(([e,n])=>this.initializeIntf("output",e,n))}initializeIntf(e,n,i){i.isInput=e==="input",i.nodeId=this.id,i.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:n,intf:i}))}addInterface(e,n,i){const s=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,r=e==="input"?this.events.addInput:this.events.addOutput,o=e==="input"?this.inputs:this.outputs;return s.emit(i).prevented?!1:(o[n]=i,this.initializeIntf(e,n,i),r.emit(i),!0)}removeInterface(e,n){const i=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,s=e==="input"?this.events.removeInput:this.events.removeOutput,r=e==="input"?this.inputs[n]:this.outputs[n];if(!r||i.emit(r).prevented)return!1;if(r.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===r||a.to===r).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return r.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[n]:delete this.outputs[n],s.emit(r),!0}}let UI=class extends PI{load(e){super.load(e)}save(){return super.save()}};function el(t){return class extends UI{constructor(){var e,n;super(),this.type=t.type,this.inputs={},this.outputs={},this.calculate=t.calculate?(i,s)=>t.calculate.call(this,i,s):void 0,this._title=(e=t.title)!==null&&e!==void 0?e:t.type,this.executeFactory("input",t.inputs),this.executeFactory("output",t.outputs),(n=t.onCreate)===null||n===void 0||n.call(this)}onPlaced(){var e;(e=t.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=t.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,n){Object.keys(n||{}).forEach(i=>{const s=n[i]();e==="input"?this.addInput(i,s):this.addOutput(i,s)})}}}class nn{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,n){this.id=Gs(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new qt(this),beforeSetValue:new Un(this),setValue:new qt(this),updated:new qt(this)},this.hooks={load:new li(this),save:new li(this)},this._connectionCount=0,this.name=e,this._value=n}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...n){return e(this,...n),this}}const ka="__baklava_SubgraphInputNode",La="__baklava_SubgraphOutputNode";class FI extends UI{constructor(){super(),this.graphInterfaceId=Gs()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class BI extends FI{constructor(){super(...arguments),this.type=ka,this.inputs={name:new nn("Name","Input")},this.outputs={placeholder:new nn("Value",void 0)}}static isGraphInputNode(e){return e.type===ka}}class GI extends FI{constructor(){super(...arguments),this.type=La,this.inputs={name:new nn("Name","Output"),placeholder:new nn("Value",void 0)},this.outputs={output:new nn("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===La}}class xc{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(n=>n.type===ka).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===La).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Gs(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new Un(this),addNode:new qt(this),beforeRemoveNode:new Un(this),removeNode:new qt(this),beforeAddConnection:new Un(this),addConnection:new qt(this),checkConnection:new Un(this),beforeRemoveConnection:new Un(this),removeConnection:new qt(this)},this.hooks={save:new li(this),load:new li(this),checkConnection:new jDt(this)},this.nodeEvents=Qi(),this.nodeHooks=Qi(),this.connectionEvents=Qi(),this.editor=e,this.template=n,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(n=>n.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const n=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(i=>n.includes(i.from)||n.includes(i.to)).forEach(i=>this.removeConnection(i)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,n){const i=this.checkConnection(e,n);if(!i.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:n}).prevented)return;for(const r of i.connectionsInDanger){const o=this.connections.find(a=>a.id===r.id);o&&this.removeConnection(o)}const s=new Uw(i.dummyConnection.from,i.dummyConnection.to);return this.internalAddConnection(s),s}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,n){if(!e||!n)return{connectionAllowed:!1};const i=this.findNodeById(e.nodeId),s=this.findNodeById(n.nodeId);if(i&&s&&i===s)return{connectionAllowed:!1};if(e.isInput&&!n.isInput){const a=e;e=n,n=a}if(e.isInput||!n.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===n))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:n}).prevented)return{connectionAllowed:!1};const r=this.hooks.checkConnection.execute({from:e,to:n});if(r.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const o=Array.from(new Set(r.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new LI(e,n),connectionsInDanger:o}}findNodeInterface(e){for(const n of this.nodes){for(const i in n.inputs){const s=n.inputs[i];if(s.id===e)return s}for(const i in n.outputs){const s=n.outputs[i];if(s.id===e)return s}}}findNodeById(e){return this.nodes.find(n=>n.id===e)}load(e){try{this._loading=!0;const n=[];for(let i=this.connections.length-1;i>=0;i--)this.removeConnection(this.connections[i]);for(let i=this.nodes.length-1;i>=0;i--)this.removeNode(this.nodes[i]);this.id=e.id;for(const i of e.nodes){const s=this.editor.nodeTypes.get(i.type);if(!s){n.push(`Node type ${i.type} is not registered`);continue}const r=new s.type;this.addNode(r),r.load(i)}for(const i of e.connections){const s=this.findNodeInterface(i.from),r=this.findNodeInterface(i.to);if(s)if(r){const o=new Uw(s,r);o.id=i.id,this.internalAddConnection(o)}else{n.push(`Could not find interface with id ${i.to}`);continue}else{n.push(`Could not find interface with id ${i.from}`);continue}}return this.hooks.load.execute(e),n}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(n=>n.save()),connections:this.connections.map(n=>({id:n.id,from:n.from.id,to:n.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const cc="__baklava_GraphNode-";function Pa(t){return cc+t.id}function QDt(t){return class extends PI{constructor(){super(...arguments),this.type=Pa(t),this.inputs={},this.outputs={},this.template=t,this.calculate=async(n,i)=>{var s;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!i.engine||typeof i.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const r=i.engine.getInputValues(this.subgraph);for(const l of this.subgraph.inputs)r.set(l.nodeInterfaceId,n[l.id]);const o=await i.engine.runGraph(this.subgraph,r,i.globalValues),a={};for(const l of this.subgraph.outputs)a[l.id]=(s=o.get(l.nodeId))===null||s===void 0?void 0:s.get("output");return a._calculationResults=o,a}}get title(){return this._title}set title(n){this.template.name=n}load(n){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(n.graphState),super.load(n)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,n=>{this._title=n}),this.initialize()}onDestroy(){var n;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(n=this.subgraph)===null||n===void 0||n.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const n of this.subgraph.inputs)n.id in this.inputs?this.inputs[n.id].name=n.name:this.addInput(n.id,new nn(n.name,void 0));for(const n of Object.keys(this.inputs))this.subgraph.inputs.some(i=>i.id===n)||this.removeInput(n);for(const n of this.subgraph.outputs)n.id in this.outputs?this.outputs[n.id].name=n.name:this.addOutput(n.id,new nn(n.name,void 0));for(const n of Object.keys(this.outputs))this.subgraph.outputs.some(i=>i.id===n)||this.removeOutput(n);this.addOutput("_calculationResults",new nn("_calculationResults",void 0).setHidden(!0))}}}class fp{static fromGraph(e,n){return new fp(e.save(),n)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const n=this.editor.nodeTypes.get(Pa(this));n&&(n.title=e)}get inputs(){return this.nodes.filter(n=>n.type===ka).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===La).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Gs(),this._name="Subgraph",this.events={nameChanged:new qt(this),updated:new qt(this)},this.hooks={beforeLoad:new li(this),afterSave:new li(this)},this.editor=n,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const n=new Map,i=f=>{const _=Gs();return n.set(f,_),_},s=f=>{const _=n.get(f);if(!_)throw new Error(`Unable to create graph from template: Could not map old id ${f} to new id`);return _},r=f=>Eb(f,_=>({id:i(_.id),templateId:_.id,value:_.value})),o=this.nodes.map(f=>({...f,id:i(f.id),inputs:r(f.inputs),outputs:r(f.outputs)})),a=this.connections.map(f=>({id:i(f.id),from:s(f.from),to:s(f.to)})),l=this.inputs.map(f=>({id:f.id,name:f.name,nodeId:s(f.nodeId),nodeInterfaceId:s(f.nodeInterfaceId)})),u=this.outputs.map(f=>({id:f.id,name:f.name,nodeId:s(f.nodeId),nodeInterfaceId:s(f.nodeInterfaceId)})),d={id:Gs(),nodes:o,connections:a,inputs:l,outputs:u};return e||(e=new xc(this.editor)),e.load(d).forEach(f=>console.warn(f)),e.template=this,e}}class XDt{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new qt(this),beforeRegisterNodeType:new Un(this),registerNodeType:new qt(this),beforeUnregisterNodeType:new Un(this),unregisterNodeType:new qt(this),beforeAddGraphTemplate:new Un(this),addGraphTemplate:new qt(this),beforeRemoveGraphTemplate:new Un(this),removeGraphTemplate:new qt(this),registerGraph:new qt(this),unregisterGraph:new qt(this)},this.hooks={save:new li(this),load:new li(this)},this.graphTemplateEvents=Qi(),this.graphTemplateHooks=Qi(),this.graphEvents=Qi(),this.graphHooks=Qi(),this.nodeEvents=Qi(),this.nodeHooks=Qi(),this.connectionEvents=Qi(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new xc(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(BI),this.registerNodeType(GI)}registerNodeType(e,n){var i,s;if(this.events.beforeRegisterNodeType.emit({type:e,options:n}).prevented)return;const r=new e;this._nodeTypes.set(r.type,{type:e,category:(i=n==null?void 0:n.category)!==null&&i!==void 0?i:"default",title:(s=n==null?void 0:n.title)!==null&&s!==void 0?s:r.title}),this.events.registerNodeType.emit({type:e,options:n})}unregisterNodeType(e){const n=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(n)){if(this.events.beforeUnregisterNodeType.emit(n).prevented)return;this._nodeTypes.delete(n),this.events.unregisterNodeType.emit(n)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const n=QDt(e);this.registerNodeType(n,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const n=Pa(e);for(const i of[this.graph,...this.graphs.values()]){const s=i.nodes.filter(r=>r.type===n);for(const r of s)i.removeNode(r)}this.unregisterNodeType(n),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{this._loading=!0,e=this.hooks.load.execute(e),e.graphTemplates.forEach(i=>{const s=new fp(i,this);this.addGraphTemplate(s)});const n=this._graph.load(e.graph);return this.events.loaded.emit(),n.forEach(i=>console.warn(i)),n}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(n=>n.save())};return this.hooks.save.execute(e)}}function ZDt(t,e){const n=new Map;e.graphs.forEach(i=>{i.nodes.forEach(s=>n.set(s.id,s))}),t.forEach((i,s)=>{const r=n.get(s);r&&i.forEach((o,a)=>{const l=r.outputs[a];l&&(l.value=o)})})}class VI extends Error{constructor(){super("Cycle detected")}}function JDt(t){return typeof t=="string"}function zI(t,e){const n=new Map,i=new Map,s=new Map;let r,o;if(t instanceof xc)r=t.nodes,o=t.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");r=t,o=e}r.forEach(u=>{Object.values(u.inputs).forEach(d=>n.set(d.id,u.id)),Object.values(u.outputs).forEach(d=>n.set(d.id,u.id))}),r.forEach(u=>{const d=o.filter(f=>f.from&&n.get(f.from.id)===u.id),h=new Set(d.map(f=>n.get(f.to.id)).filter(JDt));i.set(u.id,h),s.set(u,d)});const a=r.slice();o.forEach(u=>{const d=a.findIndex(h=>n.get(u.to.id)===h.id);d>=0&&a.splice(d,1)});const l=[];for(;a.length>0;){const u=a.pop();l.push(u);const d=i.get(u.id);for(;d.size>0;){const h=d.values().next().value;if(d.delete(h),Array.from(i.values()).every(f=>!f.has(h))){const f=r.find(_=>_.id===h);a.push(f)}}}if(Array.from(i.values()).some(u=>u.size>0))throw new VI;return{calculationOrder:l,connectionsFromNode:s,interfaceIdToNodeId:n}}function ekt(t,e){try{return zI(t,e),!1}catch(n){if(n instanceof VI)return!0;throw n}}var Kn;(function(t){t.Running="Running",t.Idle="Idle",t.Paused="Paused",t.Stopped="Stopped"})(Kn||(Kn={}));class tkt{get status(){return this.isRunning?Kn.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new Un(this),afterRun:new qt(this),statusChange:new qt(this),beforeNodeCalculation:new qt(this),afterNodeCalculation:new qt(this)},this.hooks={gatherCalculationData:new li(this),transferData:new kI},this.recalculateOrder=!0,this.internalStatus=Kn.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(n,i)=>{i.graph&&!i.graph.loading&&i.graph.activeTransactions===0&&this.internalOnChange(i,n??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(n,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(n,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(n,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(n,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,n=>this.checkConnection(n.from,n.to))}start(){this.internalStatus===Kn.Stopped&&(this.internalStatus=Kn.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===Kn.Idle&&(this.internalStatus=Kn.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===Kn.Paused&&(this.internalStatus=Kn.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===Kn.Idle||this.internalStatus===Kn.Paused)&&(this.internalStatus=Kn.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...n){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const i=await this.execute(e,...n);return this.events.afterRun.emit(i),i}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,n){if(e.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};e=r}if(n.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,n.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};n=r}const i=new LI(e,n);let s=this.editor.graph.connections.slice();return n.allowMultipleConnections||(s=s.filter(r=>r.to!==n)),s.push(i),ekt(this.editor.graph.nodes,s)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:n.allowMultipleConnections?[]:this.editor.graph.connections.filter(r=>r.to===n)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const n=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(n,...e)}validateNodeCalculationOutput(e,n){if(typeof n!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(i=>{if(!(i in n))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${i}"`)})}internalOnChange(e,n){this.internalStatus===Kn.Idle&&this.onChange(this.recalculateOrder,e,n)}findInterfaceByTemplateId(e,n){for(const i of e)for(const s of[...Object.values(i.inputs),...Object.values(i.outputs)])if(s.templateId===n)return s;return null}}class nkt extends tkt{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,n,i){this.order.has(e.id)||this.order.set(e.id,zI(e));const{calculationOrder:s,connectionsFromNode:r}=this.order.get(e.id),o=new Map;for(const a of s){const l={};Object.entries(a.inputs).forEach(([d,h])=>{l[d]=this.getInterfaceValue(n,h.id)}),this.events.beforeNodeCalculation.emit({inputValues:l,node:a});let u;if(a.calculate)u=await a.calculate(l,{globalValues:i,engine:this});else{u={};for(const[d,h]of Object.entries(a.outputs))u[d]=this.getInterfaceValue(n,h.id)}this.validateNodeCalculationOutput(a,u),this.events.afterNodeCalculation.emit({outputValues:u,node:a}),o.set(a.id,new Map(Object.entries(u))),r.has(a)&&r.get(a).forEach(d=>{var h;const f=(h=Object.entries(a.outputs).find(([,m])=>m.id===d.from.id))===null||h===void 0?void 0:h[0];if(!f)throw new Error(`Could not find key for interface ${d.from.id} This is likely a Baklava internal issue. Please report it on GitHub.`);const _=this.hooks.transferData.execute(u[f],d);d.to.allowMultipleConnections?n.has(d.to.id)?n.get(d.to.id).push(_):n.set(d.to.id,[_]):n.set(d.to.id,_)})}return o}async execute(e){this.recalculateOrder&&(this.order.clear(),this.recalculateOrder=!1);const n=this.getInputValues(this.editor.graph);return await this.runGraph(this.editor.graph,n,e)}getInputValues(e){const n=new Map;for(const i of e.nodes)Object.values(i.inputs).forEach(s=>{s.connectionCount===0&&n.set(s.id,s.value)}),i.calculate||Object.values(i.outputs).forEach(s=>{n.set(s.id,s.value)});return n}onChange(e){this.recalculateOrder=e||this.recalculateOrder,this.calculateWithoutData()}getInterfaceValue(e,n){if(!e.has(n))throw new Error(`Could not find value for interface ${n} -This is likely a Baklava internal issue. Please report it on GitHub.`);return e.get(n)}}let yb=null;function rkt(t){yb=t}function Oi(){if(!yb)throw new Error("providePlugin() must be called before usePlugin()");return{viewModel:yb}}function Ki(){const{viewModel:t}=Oi();return{graph:Kd(t.value,"displayedGraph"),switchGraph:t.value.switchGraph}}function HI(t){const{graph:e}=Ki(),n=mt(null),i=mt(null);return{dragging:st(()=>!!n.value),onPointerDown:l=>{n.value={x:l.pageX,y:l.pageY},i.value={x:t.value.x,y:t.value.y}},onPointerMove:l=>{if(n.value){const u=l.pageX-n.value.x,d=l.pageY-n.value.y;t.value.x=i.value.x+u/e.value.scaling,t.value.y=i.value.y+d/e.value.scaling}},onPointerUp:()=>{n.value=null,i.value=null}}}function qI(t,e,n){if(!e.template)return!1;if(Pa(e.template)===n)return!0;const i=t.graphTemplates.find(r=>Pa(r)===n);return i?i.nodes.filter(r=>r.type.startsWith(cc)).some(r=>qI(t,e,r.type)):!1}function YI(t){return st(()=>{const e=Array.from(t.value.editor.nodeTypes.entries()),n=new Set(e.map(([,s])=>s.category)),i=[];for(const s of n.values()){let r=e.filter(([,o])=>o.category===s);t.value.displayedGraph.template?r=r.filter(([o])=>!qI(t.value.editor,t.value.displayedGraph,o)):r=r.filter(([o])=>![ka,La].includes(o)),r.length>0&&i.push({name:s,nodeTypes:Object.fromEntries(r)})}return i.sort((s,r)=>s.name==="default"?-1:r.name==="default"||s.name>r.name?1:-1),i})}function $I(){const{graph:t}=Ki();return{transform:(n,i)=>{const s=n/t.value.scaling-t.value.panning.x,r=i/t.value.scaling-t.value.panning.y;return[s,r]}}}function okt(){const{graph:t}=Ki();let e=[],n=-1,i={x:0,y:0};const s=st(()=>t.value.panning),r=HI(s),o=st(()=>({"transform-origin":"0 0",transform:`scale(${t.value.scaling}) translate(${t.value.panning.x}px, ${t.value.panning.y}px)`})),a=(_,m,E)=>{const b=[_/t.value.scaling-t.value.panning.x,m/t.value.scaling-t.value.panning.y],g=[_/E-t.value.panning.x,m/E-t.value.panning.y],y=[g[0]-b[0],g[1]-b[1]];t.value.panning.x+=y[0],t.value.panning.y+=y[1],t.value.scaling=E},l=_=>{_.preventDefault();let m=_.deltaY;_.deltaMode===1&&(m*=32);const E=t.value.scaling*(1-m/3e3);a(_.offsetX,_.offsetY,E)},u=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:o,...r,onPointerDown:_=>{if(e.push(_),r.onPointerDown(_),e.length===2){const{ax:m,ay:E,bx:b,by:g}=u();i={x:m+(b-m)/2,y:E+(g-E)/2}}},onPointerMove:_=>{for(let m=0;m0){const C=t.value.scaling*(1+(T-n)/500);a(i.x,i.y,C)}n=T}else r.onPointerMove(_)},onPointerUp:_=>{e=e.filter(m=>m.pointerId!==_.pointerId),n=-1,r.onPointerUp()},onMouseWheel:l}}var Ei=(t=>(t[t.NONE=0]="NONE",t[t.ALLOWED=1]="ALLOWED",t[t.FORBIDDEN=2]="FORBIDDEN",t))(Ei||{});const WI=Symbol();function akt(){const{graph:t}=Ki(),e=mt(null),n=mt(null),i=a=>{e.value&&(e.value.mx=a.offsetX/t.value.scaling-t.value.panning.x,e.value.my=a.offsetY/t.value.scaling-t.value.panning.y)},s=()=>{if(n.value){if(e.value)return;const a=t.value.connections.find(l=>l.to===n.value);n.value.isInput&&a?(e.value={status:Ei.NONE,from:a.from},t.value.removeConnection(a)):e.value={status:Ei.NONE,from:n.value},e.value.mx=void 0,e.value.my=void 0}},r=()=>{if(e.value&&n.value){if(e.value.from===n.value)return;t.value.addConnection(e.value.from,e.value.to)}e.value=null},o=a=>{if(n.value=a??null,a&&e.value){e.value.to=a;const l=t.value.checkConnection(e.value.from,e.value.to);if(e.value.status=l.connectionAllowed?Ei.ALLOWED:Ei.FORBIDDEN,l.connectionAllowed){const u=l.connectionsInDanger.map(d=>d.id);t.value.connections.forEach(d=>{u.includes(d.id)&&(d.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=Ei.NONE,t.value.connections.forEach(l=>{l.isInDanger=!1}))};return ra(WI,{temporaryConnection:e,hoveredOver:o}),{temporaryConnection:e,onMouseMove:i,onMouseDown:s,onMouseUp:r,hoveredOver:o}}function lkt(t){const e=mt(!1),n=mt(0),i=mt(0),s=YI(t),{transform:r}=$I(),o=st(()=>{let d=[];const h={};for(const _ of s.value){const m=Object.entries(_.nodeTypes).map(([E,b])=>({label:b.title,value:"addNode:"+E}));_.name==="default"?d=m:h[_.name]=m}const f=[...Object.entries(h).map(([_,m])=>({label:_,submenu:m}))];return f.length>0&&d.length>0&&f.push({isDivider:!0}),f.push(...d),f}),a=st(()=>t.value.settings.contextMenu.additionalItems.length===0?o.value:[{label:"Add node",submenu:o.value},...t.value.settings.contextMenu.additionalItems.map(d=>"isDivider"in d||"submenu"in d?d:{label:d.label,value:"command:"+d.command,disabled:!t.value.commandHandler.canExecuteCommand(d.command)})]);function l(d){e.value=!0,n.value=d.offsetX,i.value=d.offsetY}function u(d){if(d.startsWith("addNode:")){const h=d.substring(8),f=t.value.editor.nodeTypes.get(h);if(!f)return;const _=ei(new f.type);t.value.displayedGraph.addNode(_);const[m,E]=r(n.value,i.value);_.position.x=m,_.position.y=E}else if(d.startsWith("command:")){const h=d.substring(8);t.value.commandHandler.canExecuteCommand(h)&&t.value.commandHandler.executeCommand(h)}}return{show:e,x:n,y:i,items:a,open:l,onClick:u}}const ckt=_n({setup(){const{viewModel:t}=Oi(),{graph:e}=Ki();return{styles:st(()=>{const i=t.value.settings.background,s=e.value.panning.x*e.value.scaling,r=e.value.panning.y*e.value.scaling,o=e.value.scaling*i.gridSize,a=o/i.gridDivision,l=`${o}px ${o}px, ${o}px ${o}px`,u=e.value.scaling>i.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${s}px top ${r}px`,backgroundSize:`${l} ${u}`}})}}}),hn=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n};function dkt(t,e,n,i,s,r){return A(),M("div",{class:"background",style:en(t.styles)},null,4)}const ukt=hn(ckt,[["render",dkt]]);function pkt(t){return nR()?(MM(t),!0):!1}function py(t){return typeof t=="function"?t():yt(t)}const KI=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _kt=Object.prototype.toString,hkt=t=>_kt.call(t)==="[object Object]",Hd=()=>{},fkt=mkt();function mkt(){var t,e;return KI&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function gkt(t,e,n=!1){return e.reduce((i,s)=>(s in t&&(!n||t[s]!==void 0)&&(i[s]=t[s]),i),{})}function bkt(t,e={}){if(!fn(t))return _2(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const i in t.value)n[i]=p2(()=>({get(){return t.value[i]},set(s){var r;if((r=py(e.replaceRef))!=null?r:!0)if(Array.isArray(t.value)){const a=[...t.value];a[i]=s,t.value=a}else{const a={...t.value,[i]:s};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[i]=s}}));return n}function Nl(t){var e;const n=py(t);return(e=n==null?void 0:n.$el)!=null?e:n}const _y=KI?window:void 0;function zl(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=_y):[e,n,i,s]=t,!e)return Hd;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(d=>d()),r.length=0},a=(d,h,f,_)=>(d.addEventListener(h,f,_),()=>d.removeEventListener(h,f,_)),l=qn(()=>[Nl(e),py(s)],([d,h])=>{if(o(),!d)return;const f=hkt(h)?{...h}:h;r.push(...n.flatMap(_=>i.map(m=>a(d,_,m,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),o()};return pkt(u),u}let Fw=!1;function jI(t,e,n={}){const{window:i=_y,ignore:s=[],capture:r=!0,detectIframe:o=!1}=n;if(!i)return Hd;fkt&&!Fw&&(Fw=!0,Array.from(i.document.body.children).forEach(f=>f.addEventListener("click",Hd)),i.document.documentElement.addEventListener("click",Hd));let a=!0;const l=f=>s.some(_=>{if(typeof _=="string")return Array.from(i.document.querySelectorAll(_)).some(m=>m===f.target||f.composedPath().includes(m));{const m=Nl(_);return m&&(f.target===m||f.composedPath().includes(m))}}),d=[zl(i,"click",f=>{const _=Nl(t);if(!(!_||_===f.target||f.composedPath().includes(_))){if(f.detail===0&&(a=!l(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:r}),zl(i,"pointerdown",f=>{const _=Nl(t);a=!l(f)&&!!(_&&!f.composedPath().includes(_))},{passive:!0}),o&&zl(i,"blur",f=>{setTimeout(()=>{var _;const m=Nl(t);((_=i.document.activeElement)==null?void 0:_.tagName)==="IFRAME"&&!(m!=null&&m.contains(i.document.activeElement))&&e(f)},0)})].filter(Boolean);return()=>d.forEach(f=>f())}const QI={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},Ekt=Object.keys(QI);function ykt(t={}){const{target:e=_y}=t,n=mt(!1),i=mt(t.initialValue||{});Object.assign(i.value,QI,i.value);const s=r=>{n.value=!0,!(t.pointerTypes&&!t.pointerTypes.includes(r.pointerType))&&(i.value=gkt(r,Ekt,!1))};if(e){const r={passive:!0};zl(e,["pointerdown","pointermove","pointerup"],s,r),zl(e,"pointerleave",()=>n.value=!1,r)}return{...bkt(i),isInside:n}}const vkt=["onMouseenter","onMouseleave","onClick"],Skt={class:"flex-fill"},Tkt={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},xkt=c("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[c("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),Ckt=[xkt],hy=_n({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(t,{emit:e}){const n=t,i=e;let s=null;const r=mt(null),o=mt(-1),a=mt(0),l=mt({x:!1,y:!1}),u=st(()=>n.flippable&&(l.value.x||n.isFlipped.x)),d=st(()=>n.flippable&&(l.value.y||n.isFlipped.y)),h=st(()=>{const y={};return n.isNested||(y.top=(d.value?n.y-a.value:n.y)+"px",y.left=n.x+"px"),y}),f=st(()=>({"--flipped-x":u.value,"--flipped-y":d.value,"--nested":n.isNested})),_=st(()=>n.items.map(y=>({...y,hover:!1})));qn([()=>n.y,()=>n.items],()=>{var y,v,T,C;a.value=n.items.length*30;const x=((v=(y=r.value)==null?void 0:y.parentElement)==null?void 0:v.offsetWidth)??0,O=((C=(T=r.value)==null?void 0:T.parentElement)==null?void 0:C.offsetHeight)??0;l.value.x=!n.isNested&&n.x>x*.75,l.value.y=!n.isNested&&n.y+a.value>O-20}),jI(r,()=>{n.modelValue&&i("update:modelValue",!1)});const m=y=>{!y.submenu&&y.value&&(i("click",y.value),i("update:modelValue",!1))},E=y=>{i("click",y),o.value=-1,n.isNested||i("update:modelValue",!1)},b=(y,v)=>{n.items[v].submenu&&(o.value=v,s!==null&&(clearTimeout(s),s=null))},g=(y,v)=>{n.items[v].submenu&&(s=window.setTimeout(()=>{o.value=-1,s=null},200))};return(y,v)=>{const T=ft("ContextMenu",!0);return A(),xt(cs,{name:"slide-fade"},{default:$e(()=>[z(c("div",{ref_key:"el",ref:r,class:qe(["baklava-context-menu",f.value]),style:en(h.value)},[(A(!0),M(We,null,ct(_.value,(C,x)=>(A(),M(We,null,[C.isDivider?(A(),M("div",{key:`d-${x}`,class:"divider"})):(A(),M("div",{key:`i-${x}`,class:qe(["item",{submenu:!!C.submenu,"--disabled":!!C.disabled}]),onMouseenter:O=>b(O,x),onMouseleave:O=>g(O,x),onClick:Te(O=>m(C),["stop","prevent"])},[c("div",Skt,ge(C.label),1),C.submenu?(A(),M("div",Tkt,Ckt)):$("",!0),C.submenu?(A(),xt(T,{key:1,"model-value":o.value===x,items:C.submenu,"is-nested":!0,"is-flipped":{x:u.value,y:d.value},flippable:y.flippable,onClick:E},null,8,["model-value","items","is-flipped","flippable"])):$("",!0)],42,vkt))],64))),256))],6),[[Mt,y.modelValue]])]),_:1})}}}),wkt={},Rkt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Akt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Nkt=c("circle",{cx:"12",cy:"12",r:"1"},null,-1),Okt=c("circle",{cx:"12",cy:"19",r:"1"},null,-1),Ikt=c("circle",{cx:"12",cy:"5",r:"1"},null,-1),Mkt=[Akt,Nkt,Okt,Ikt];function Dkt(t,e){return A(),M("svg",Rkt,Mkt)}const XI=hn(wkt,[["render",Dkt]]),kkt=["id"],Lkt={key:0,class:"__tooltip"},Pkt={key:2,class:"align-middle"},Bw=_n({__name:"NodeInterface",props:{node:{},intf:{}},setup(t){const e=(b,g=100)=>{const y=b!=null&&b.toString?b.toString():"";return y.length>g?y.slice(0,g)+"...":y},n=t,{viewModel:i}=Oi(),{hoveredOver:s,temporaryConnection:r}=Vi(WI),o=mt(null),a=st(()=>n.intf.connectionCount>0),l=mt(!1),u=st(()=>i.value.settings.displayValueOnHover&&l.value),d=st(()=>({"--input":n.intf.isInput,"--output":!n.intf.isInput,"--connected":a.value})),h=st(()=>n.intf.component&&(!n.intf.isInput||!n.intf.port||n.intf.connectionCount===0)),f=()=>{l.value=!0,s(n.intf)},_=()=>{l.value=!1,s(void 0)},m=()=>{o.value&&i.value.hooks.renderInterface.execute({intf:n.intf,el:o.value})},E=()=>{const b=i.value.displayedGraph.sidebar;b.nodeId=n.node.id,b.optionName=n.intf.name,b.visible=!0};return Ws(m),pc(m),(b,g)=>{var y;return A(),M("div",{id:b.intf.id,ref_key:"el",ref:o,class:qe(["baklava-node-interface",d.value])},[b.intf.port?(A(),M("div",{key:0,class:qe(["__port",{"--selected":((y=yt(r))==null?void 0:y.from)===b.intf}]),onPointerover:f,onPointerout:_},[kn(b.$slots,"portTooltip",{showTooltip:u.value},()=>[u.value===!0?(A(),M("span",Lkt,ge(e(b.intf.value)),1)):$("",!0)])],34)):$("",!0),h.value?(A(),xt(Uu(b.intf.component),{key:1,modelValue:b.intf.value,"onUpdate:modelValue":g[0]||(g[0]=v=>b.intf.value=v),node:b.node,intf:b.intf,onOpenSidebar:E},null,40,["modelValue","node","intf"])):(A(),M("span",Pkt,ge(b.intf.name),1))],10,kkt)}}}),Ukt=["id","data-node-type"],Fkt={class:"__title-label"},Bkt={class:"__menu"},Gkt={class:"__outputs"},Vkt={class:"__inputs"},zkt=_n({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(t,{emit:e}){const n=t,i=e,{viewModel:s}=Oi(),{graph:r,switchGraph:o}=Ki(),a=mt(null),l=mt(!1),u=mt(""),d=mt(null),h=mt(!1),f=mt(!1),_=st(()=>{const U=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return n.node.type.startsWith(cc)&&U.push({value:"editSubgraph",label:"Edit Subgraph"}),U}),m=st(()=>({"--selected":n.selected,"--dragging":n.dragging,"--two-column":!!n.node.twoColumn})),E=st(()=>{var U,F;return{top:`${((U=n.node.position)==null?void 0:U.y)??0}px`,left:`${((F=n.node.position)==null?void 0:F.x)??0}px`,"--width":`${n.node.width??s.value.settings.nodes.defaultWidth}px`}}),b=st(()=>Object.values(n.node.inputs).filter(U=>!U.hidden)),g=st(()=>Object.values(n.node.outputs).filter(U=>!U.hidden)),y=()=>{i("select")},v=U=>{n.selected||y(),i("start-drag",U)},T=()=>{f.value=!0},C=async U=>{var F;switch(U){case"delete":r.value.removeNode(n.node);break;case"rename":u.value=n.node.title,l.value=!0,await Ge(),(F=d.value)==null||F.focus();break;case"editSubgraph":o(n.node.template);break}},x=()=>{n.node.title=u.value,l.value=!1},O=()=>{a.value&&s.value.hooks.renderNode.execute({node:n.node,el:a.value})},w=U=>{h.value=!0,U.preventDefault()},S=U=>{if(!h.value)return;const F=n.node.width+U.movementX/r.value.scaling,Q=s.value.settings.nodes.minWidth,L=s.value.settings.nodes.maxWidth;n.node.width=Math.max(Q,Math.min(L,F))},R=()=>{h.value=!1};return Ws(()=>{O(),window.addEventListener("mousemove",S),window.addEventListener("mouseup",R)}),pc(O),za(()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",R)}),(U,F)=>(A(),M("div",{id:U.node.id,ref_key:"el",ref:a,class:qe(["baklava-node",m.value]),style:en(E.value),"data-node-type":U.node.type,onPointerdown:y},[yt(s).settings.nodes.resizable?(A(),M("div",{key:0,class:"__resize-handle",onMousedown:w},null,32)):$("",!0),kn(U.$slots,"title",{},()=>[c("div",{class:"__title",onPointerdown:Te(v,["self","stop"])},[l.value?z((A(),M("input",{key:1,ref_key:"renameInputEl",ref:d,"onUpdate:modelValue":F[1]||(F[1]=Q=>u.value=Q),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:x,onKeydown:Hs(x,["enter"])},null,544)),[[Oe,u.value]]):(A(),M(We,{key:0},[c("div",Fkt,ge(U.node.title),1),c("div",Bkt,[Re(XI,{class:"--clickable",onClick:T}),Re(hy,{modelValue:f.value,"onUpdate:modelValue":F[0]||(F[0]=Q=>f.value=Q),x:0,y:0,items:_.value,onClick:C},null,8,["modelValue","items"])])],64))],32)]),kn(U.$slots,"content",{},()=>[c("div",{class:"__content",onKeydown:F[2]||(F[2]=Hs(Te(()=>{},["stop"]),["delete"]))},[c("div",Gkt,[(A(!0),M(We,null,ct(g.value,Q=>kn(U.$slots,"nodeInterface",{key:Q.id,type:"output",node:U.node,intf:Q},()=>[Re(Bw,{node:U.node,intf:Q},null,8,["node","intf"])])),128))]),c("div",Vkt,[(A(!0),M(We,null,ct(b.value,Q=>kn(U.$slots,"nodeInterface",{key:Q.id,type:"input",node:U.node,intf:Q},()=>[Re(Bw,{node:U.node,intf:Q},null,8,["node","intf"])])),128))])],32)])],46,Ukt))}}),Hkt=_n({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:Ei.NONE},isTemporary:{type:Boolean,default:!1}},setup(t){const{viewModel:e}=Oi(),{graph:n}=Ki(),i=(o,a)=>{const l=(o+n.value.panning.x)*n.value.scaling,u=(a+n.value.panning.y)*n.value.scaling;return[l,u]},s=st(()=>{const[o,a]=i(t.x1,t.y1),[l,u]=i(t.x2,t.y2);if(e.value.settings.useStraightConnections)return`M ${o} ${a} L ${l} ${u}`;{const d=.3*Math.abs(o-l);return`M ${o} ${a} C ${o+d} ${a}, ${l-d} ${u}, ${l} ${u}`}}),r=st(()=>({"--temporary":t.isTemporary,"--allowed":t.state===Ei.ALLOWED,"--forbidden":t.state===Ei.FORBIDDEN}));return{d:s,classes:r}}}),qkt=["d"];function Ykt(t,e,n,i,s,r){return A(),M("path",{class:qe(["baklava-connection",t.classes]),d:t.d},null,10,qkt)}const ZI=hn(Hkt,[["render",Ykt]]);function $kt(t){return document.getElementById(t.id)}function Ua(t){const e=document.getElementById(t.id),n=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:n&&n.length>0?n[0]:null}}const Wkt=_n({components:{"connection-view":ZI},props:{connection:{type:Object,required:!0}},setup(t){const{graph:e}=Ki();let n;const i=mt({x1:0,y1:0,x2:0,y2:0}),s=st(()=>t.connection.isInDanger?Ei.FORBIDDEN:Ei.NONE),r=st(()=>{var u;return(u=e.value.findNodeById(t.connection.from.nodeId))==null?void 0:u.position}),o=st(()=>{var u;return(u=e.value.findNodeById(t.connection.to.nodeId))==null?void 0:u.position}),a=u=>u.node&&u.interface&&u.port?[u.node.offsetLeft+u.interface.offsetLeft+u.port.offsetLeft+u.port.clientWidth/2,u.node.offsetTop+u.interface.offsetTop+u.port.offsetTop+u.port.clientHeight/2]:[0,0],l=()=>{const u=Ua(t.connection.from),d=Ua(t.connection.to);u.node&&d.node&&(n||(n=new ResizeObserver(()=>{l()}),n.observe(u.node),n.observe(d.node)));const[h,f]=a(u),[_,m]=a(d);i.value={x1:h,y1:f,x2:_,y2:m}};return Ws(async()=>{await Ge(),l()}),za(()=>{n&&n.disconnect()}),qn([r,o],()=>l(),{deep:!0}),{d:i,state:s}}});function Kkt(t,e,n,i,s,r){const o=ft("connection-view");return A(),xt(o,{x1:t.d.x1,y1:t.d.y1,x2:t.d.x2,y2:t.d.y2,state:t.state},null,8,["x1","y1","x2","y2","state"])}const jkt=hn(Wkt,[["render",Kkt]]);function Su(t){return t.node&&t.interface&&t.port?[t.node.offsetLeft+t.interface.offsetLeft+t.port.offsetLeft+t.port.clientWidth/2,t.node.offsetTop+t.interface.offsetTop+t.port.offsetTop+t.port.clientHeight/2]:[0,0]}const Qkt=_n({components:{"connection-view":ZI},props:{connection:{type:Object,required:!0}},setup(t){const e=st(()=>t.connection?t.connection.status:Ei.NONE);return{d:st(()=>{if(!t.connection)return{input:[0,0],output:[0,0]};const i=Su(Ua(t.connection.from)),s=t.connection.to?Su(Ua(t.connection.to)):[t.connection.mx||i[0],t.connection.my||i[1]];return t.connection.from.isInput?{input:s,output:i}:{input:i,output:s}}),status:e}}});function Xkt(t,e,n,i,s,r){const o=ft("connection-view");return A(),xt(o,{x1:t.d.input[0],y1:t.d.input[1],x2:t.d.output[0],y2:t.d.output[1],state:t.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const Zkt=hn(Qkt,[["render",Xkt]]),Jkt=_n({setup(){const{viewModel:t}=Oi(),{graph:e}=Ki(),n=mt(null),i=Kd(t.value.settings.sidebar,"width"),s=st(()=>t.value.settings.sidebar.resizable),r=st(()=>{const h=e.value.sidebar.nodeId;return e.value.nodes.find(f=>f.id===h)}),o=st(()=>({width:`${i.value}px`})),a=st(()=>r.value?[...Object.values(r.value.inputs),...Object.values(r.value.outputs)].filter(f=>f.displayInSidebar&&f.component):[]),l=()=>{e.value.sidebar.visible=!1},u=()=>{window.addEventListener("mousemove",d),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",d)},{once:!0})},d=h=>{var f,_;const m=((_=(f=n.value)==null?void 0:f.parentElement)==null?void 0:_.getBoundingClientRect().width)??500;let E=i.value-h.movementX;E<300?E=300:E>.9*m&&(E=.9*m),i.value=E};return{el:n,graph:e,resizable:s,node:r,styles:o,displayedInterfaces:a,startResize:u,close:l}}}),eLt={class:"__header"},tLt={class:"__node-name"};function nLt(t,e,n,i,s,r){return A(),M("div",{ref:"el",class:qe(["baklava-sidebar",{"--open":t.graph.sidebar.visible}]),style:en(t.styles)},[t.resizable?(A(),M("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...o)=>t.startResize&&t.startResize(...o))},null,32)):$("",!0),c("div",eLt,[c("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...o)=>t.close&&t.close(...o))},"×"),c("div",tLt,[c("b",null,ge(t.node?t.node.title:""),1)])]),(A(!0),M(We,null,ct(t.displayedInterfaces,o=>(A(),M("div",{key:o.id,class:"__interface"},[(A(),xt(Uu(o.component),{modelValue:o.value,"onUpdate:modelValue":a=>o.value=a,node:t.node,intf:o},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const iLt=hn(Jkt,[["render",nLt]]),sLt=_n({__name:"Minimap",setup(t){const{viewModel:e}=Oi(),{graph:n}=Ki(),i=mt(null),s=mt(!1);let r,o=!1,a={x1:0,y1:0,x2:0,y2:0},l;const u=()=>{var x,O;if(!r)return;r.canvas.width=i.value.offsetWidth,r.canvas.height=i.value.offsetHeight;const w=new Map,S=new Map;for(const L of n.value.nodes){const Y=$kt(L),V=(Y==null?void 0:Y.offsetWidth)??0,P=(Y==null?void 0:Y.offsetHeight)??0,X=((x=L.position)==null?void 0:x.x)??0,W=((O=L.position)==null?void 0:O.y)??0;w.set(L,{x1:X,y1:W,x2:X+V,y2:W+P}),S.set(L,Y)}const R={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const L of w.values())L.x1R.x2&&(R.x2=L.x2),L.y2>R.y2&&(R.y2=L.y2);const U=50;R.x1-=U,R.y1-=U,R.x2+=U,R.y2+=U,a=R;const F=r.canvas.width/r.canvas.height,Q=(a.x2-a.x1)/(a.y2-a.y1);if(F>Q){const L=(F-Q)*(a.y2-a.y1)*.5;a.x1-=L,a.x2+=L}else{const L=a.x2-a.x1,Y=a.y2-a.y1,V=(L-F*Y)/F*.5;a.y1-=V,a.y2+=V}r.clearRect(0,0,r.canvas.width,r.canvas.height),r.strokeStyle="white";for(const L of n.value.connections){const[Y,V]=Su(Ua(L.from)),[P,X]=Su(Ua(L.to)),[W,Z]=d(Y,V),[ae,ie]=d(P,X);if(r.beginPath(),r.moveTo(W,Z),e.value.settings.useStraightConnections)r.lineTo(ae,ie);else{const ee=.3*Math.abs(W-ae);r.bezierCurveTo(W+ee,Z,ae-ee,ie,ae,ie)}r.stroke()}r.strokeStyle="lightgray";for(const[L,Y]of w.entries()){const[V,P]=d(Y.x1,Y.y1),[X,W]=d(Y.x2,Y.y2);r.fillStyle=f(S.get(L)),r.beginPath(),r.rect(V,P,X-V,W-P),r.fill(),r.stroke()}if(s.value){const L=m(),[Y,V]=d(L.x1,L.y1),[P,X]=d(L.x2,L.y2);r.fillStyle="rgba(255, 255, 255, 0.2)",r.fillRect(Y,V,P-Y,X-V)}},d=(x,O)=>[(x-a.x1)/(a.x2-a.x1)*r.canvas.width,(O-a.y1)/(a.y2-a.y1)*r.canvas.height],h=(x,O)=>[x*(a.x2-a.x1)/r.canvas.width+a.x1,O*(a.y2-a.y1)/r.canvas.height+a.y1],f=x=>{if(x){const O=x.querySelector(".__content");if(O){const S=_(O);if(S)return S}const w=_(x);if(w)return w}return"gray"},_=x=>{const O=getComputedStyle(x).backgroundColor;if(O&&O!=="rgba(0, 0, 0, 0)")return O},m=()=>{const x=i.value.parentElement.offsetWidth,O=i.value.parentElement.offsetHeight,w=x/n.value.scaling-n.value.panning.x,S=O/n.value.scaling-n.value.panning.y;return{x1:-n.value.panning.x,y1:-n.value.panning.y,x2:w,y2:S}},E=x=>{x.button===0&&(o=!0,b(x))},b=x=>{if(o){const[O,w]=h(x.offsetX,x.offsetY),S=m(),R=(S.x2-S.x1)/2,U=(S.y2-S.y1)/2;n.value.panning.x=-(O-R),n.value.panning.y=-(w-U)}},g=()=>{o=!1},y=()=>{s.value=!0},v=()=>{s.value=!1,g()};qn([s,n.value.panning,()=>n.value.scaling,()=>n.value.connections.length],()=>{u()});const T=st(()=>n.value.nodes.map(x=>x.position)),C=st(()=>n.value.nodes.map(x=>x.width));return qn([T,C],()=>{u()},{deep:!0}),Ws(()=>{r=i.value.getContext("2d"),r.imageSmoothingQuality="high",u(),l=setInterval(u,500)}),za(()=>{clearInterval(l)}),(x,O)=>(A(),M("canvas",{ref_key:"canvas",ref:i,class:"baklava-minimap",onMouseenter:y,onMouseleave:v,onMousedown:Te(E,["self"]),onMousemove:Te(b,["self"]),onMouseup:g},null,544))}}),rLt=_n({components:{ContextMenu:hy,VerticalDots:XI},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(t){const{viewModel:e}=Oi(),{switchGraph:n}=Ki(),i=mt(!1),s=st(()=>t.type.startsWith(cc));return{showContextMenu:i,hasContextMenu:s,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{i.value=!0},onContextMenuClick:l=>{const u=t.type.substring(cc.length),d=e.value.editor.graphTemplates.find(h=>h.id===u);if(d)switch(l){case"editSubgraph":n(d);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(d);break}}}}}),oLt=["data-node-type"],aLt={class:"__title"},lLt={class:"__title-label"},cLt={key:0,class:"__menu"};function dLt(t,e,n,i,s,r){const o=ft("vertical-dots"),a=ft("context-menu");return A(),M("div",{class:"baklava-node --palette","data-node-type":t.type},[c("div",aLt,[c("div",lLt,ge(t.title),1),t.hasContextMenu?(A(),M("div",cLt,[Re(o,{class:"--clickable",onPointerdown:e[0]||(e[0]=Te(()=>{},["stop","prevent"])),onClick:Te(t.openContextMenu,["stop","prevent"])},null,8,["onClick"]),Re(a,{modelValue:t.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=l=>t.showContextMenu=l),x:-100,y:0,items:t.contextMenuItems,onClick:t.onContextMenuClick,onPointerdown:e[2]||(e[2]=Te(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):$("",!0)])],8,oLt)}const Gw=hn(rLt,[["render",dLt]]),uLt={class:"baklava-node-palette"},pLt={key:0},_Lt=_n({__name:"NodePalette",setup(t){const{viewModel:e}=Oi(),{x:n,y:i}=ykt(),{transform:s}=$I(),r=YI(e),o=Vi("editorEl"),a=mt(null),l=st(()=>{if(!a.value||!(o!=null&&o.value))return{};const{left:d,top:h}=o.value.getBoundingClientRect();return{top:`${i.value-h}px`,left:`${n.value-d}px`}}),u=(d,h)=>{a.value={type:d,nodeInformation:h};const f=()=>{const _=ei(new h.type);e.value.displayedGraph.addNode(_);const m=o.value.getBoundingClientRect(),[E,b]=s(n.value-m.left,i.value-m.top);_.position.x=E,_.position.y=b,a.value=null,document.removeEventListener("pointerup",f)};document.addEventListener("pointerup",f)};return(d,h)=>(A(),M(We,null,[c("div",uLt,[(A(!0),M(We,null,ct(yt(r),f=>(A(),M("section",{key:f.name},[f.name!=="default"?(A(),M("h1",pLt,ge(f.name),1)):$("",!0),(A(!0),M(We,null,ct(f.nodeTypes,(_,m)=>(A(),xt(Gw,{key:m,type:m,title:_.title,onPointerdown:E=>u(m,_)},null,8,["type","title","onPointerdown"]))),128))]))),128))]),Re(cs,{name:"fade"},{default:$e(()=>[a.value?(A(),M("div",{key:0,class:"baklava-dragged-node",style:en(l.value)},[Re(Gw,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):$("",!0)]),_:1})],64))}});let Rd;const hLt=new Uint8Array(16);function fLt(){if(!Rd&&(Rd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rd(hLt)}const wn=[];for(let t=0;t<256;++t)wn.push((t+256).toString(16).slice(1));function mLt(t,e=0){return wn[t[e+0]]+wn[t[e+1]]+wn[t[e+2]]+wn[t[e+3]]+"-"+wn[t[e+4]]+wn[t[e+5]]+"-"+wn[t[e+6]]+wn[t[e+7]]+"-"+wn[t[e+8]]+wn[t[e+9]]+"-"+wn[t[e+10]]+wn[t[e+11]]+wn[t[e+12]]+wn[t[e+13]]+wn[t[e+14]]+wn[t[e+15]]}const gLt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Vw={randomUUID:gLt};function Tu(t,e,n){if(Vw.randomUUID&&!e&&!t)return Vw.randomUUID();t=t||{};const i=t.random||(t.rng||fLt)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){n=n||0;for(let s=0;s<16;++s)e[n+s]=i[s];return e}return mLt(i)}const dc="SAVE_SUBGRAPH";function bLt(t,e){const n=()=>{const i=t.value;if(!i.template)throw new Error("Graph template property not set");i.template.update(i.save()),i.template.panning=i.panning,i.template.scaling=i.scaling};e.registerCommand(dc,{canExecute:()=>{var i;return t.value!==((i=t.value.editor)==null?void 0:i.graph)},execute:n})}const ELt={},yLt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},vLt=c("polyline",{points:"6 9 12 15 18 9"},null,-1),SLt=[vLt];function TLt(t,e){return A(),M("svg",yLt,SLt)}const xLt=hn(ELt,[["render",TLt]]),CLt=_n({components:{"i-arrow":xLt},props:{intf:{type:Object,required:!0}},setup(t){const e=mt(null),n=mt(!1),i=st(()=>t.intf.items.find(o=>typeof o=="string"?o===t.intf.value:o.value===t.intf.value)),s=st(()=>i.value?typeof i.value=="string"?i.value:i.value.text:""),r=o=>{t.intf.value=typeof o=="string"?o:o.value};return jI(e,()=>{n.value=!1}),{el:e,open:n,selectedItem:i,selectedText:s,setSelected:r}}}),wLt=["title"],RLt={class:"__selected"},ALt={class:"__text"},NLt={class:"__icon"},OLt={class:"__dropdown"},ILt={class:"item --header"},MLt=["onClick"];function DLt(t,e,n,i,s,r){const o=ft("i-arrow");return A(),M("div",{ref:"el",class:qe(["baklava-select",{"--open":t.open}]),title:t.intf.name,onClick:e[0]||(e[0]=a=>t.open=!t.open)},[c("div",RLt,[c("div",ALt,ge(t.selectedText),1),c("div",NLt,[Re(o)])]),Re(cs,{name:"slide-fade"},{default:$e(()=>[z(c("div",OLt,[c("div",ILt,ge(t.intf.name),1),(A(!0),M(We,null,ct(t.intf.items,(a,l)=>(A(),M("div",{key:l,class:qe(["item",{"--active":a===t.selectedItem}]),onClick:u=>t.setSelected(a)},ge(typeof a=="string"?a:a.text),11,MLt))),128))],512),[[Mt,t.open]])]),_:1})],10,wLt)}const kLt=hn(CLt,[["render",DLt]]);class LLt extends nn{constructor(e,n,i){super(e,n),this.component=uc(kLt),this.items=i}}const PLt=_n({props:{intf:{type:Object,required:!0}}});function ULt(t,e,n,i,s,r){return A(),M("div",null,ge(t.intf.value),1)}const FLt=hn(PLt,[["render",ULt]]);class BLt extends nn{constructor(e,n){super(e,n),this.component=uc(FLt),this.setPort(!1)}}const GLt=_n({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){return{v:st({get:()=>t.modelValue,set:i=>{e("update:modelValue",i)}})}}}),VLt=["placeholder","title"];function zLt(t,e,n,i,s,r){return A(),M("div",null,[z(c("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>t.v=o),type:"text",class:"baklava-input",placeholder:t.intf.name,title:t.intf.name},null,8,VLt),[[Oe,t.v]])])}const HLt=hn(GLt,[["render",zLt]]);class Cc extends nn{constructor(){super(...arguments),this.component=uc(HLt)}}class JI extends BI{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new Cc("Name","Input").setPort(!1)},this.outputs={placeholder:new nn("Connection",void 0)}}}class eM extends GI{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new Cc("Name","Output").setPort(!1),placeholder:new nn("Connection",void 0)},this.outputs={output:new nn("Output",void 0).setHidden(!0)}}}const tM="CREATE_SUBGRAPH",zw=[ka,La];function qLt(t,e,n){const i=()=>t.value.selectedNodes.filter(r=>!zw.includes(r.type)).length>0,s=()=>{const{viewModel:r}=Oi(),o=t.value,a=t.value.editor;if(o.selectedNodes.length===0)return;const l=o.selectedNodes.filter(S=>!zw.includes(S.type)),u=l.flatMap(S=>Object.values(S.inputs)),d=l.flatMap(S=>Object.values(S.outputs)),h=o.connections.filter(S=>!d.includes(S.from)&&u.includes(S.to)),f=o.connections.filter(S=>d.includes(S.from)&&!u.includes(S.to)),_=o.connections.filter(S=>d.includes(S.from)&&u.includes(S.to)),m=l.map(S=>S.save()),E=_.map(S=>({id:S.id,from:S.from.id,to:S.to.id})),b=new Map,{xLeft:g,xRight:y,yTop:v}=YLt(l);console.log(g,y,v);for(const[S,R]of h.entries()){const U=new JI;U.inputs.name.value=R.to.name,m.push({...U.save(),position:{x:y-r.value.settings.nodes.defaultWidth-100,y:v+S*200}}),E.push({id:Tu(),from:U.outputs.placeholder.id,to:R.to.id}),b.set(R.to.id,U.graphInterfaceId)}for(const[S,R]of f.entries()){const U=new eM;U.inputs.name.value=R.from.name,m.push({...U.save(),position:{x:g+100,y:v+S*200}}),E.push({id:Tu(),from:R.from.id,to:U.inputs.placeholder.id}),b.set(R.from.id,U.graphInterfaceId)}const T=ei(new fp({connections:E,nodes:m,inputs:[],outputs:[]},a));a.addGraphTemplate(T);const C=a.nodeTypes.get(Pa(T));if(!C)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");const x=ei(new C.type);o.addNode(x);const O=Math.round(l.map(S=>S.position.x).reduce((S,R)=>S+R,0)/l.length),w=Math.round(l.map(S=>S.position.y).reduce((S,R)=>S+R,0)/l.length);x.position.x=O,x.position.y=w,h.forEach(S=>{o.removeConnection(S),o.addConnection(S.from,x.inputs[b.get(S.to.id)])}),f.forEach(S=>{o.removeConnection(S),o.addConnection(x.outputs[b.get(S.from.id)],S.to)}),l.forEach(S=>o.removeNode(S)),e.canExecuteCommand(dc)&&e.executeCommand(dc),n(T),t.value.panning={...o.panning},t.value.scaling=o.scaling};e.registerCommand(tM,{canExecute:i,execute:s})}function YLt(t){const e=t.reduce((s,r)=>{const o=r.position.x;return o{const o=r.position.y;return o{const o=r.position.x+r.width;return o>s?o:s},-1/0),xRight:e,yTop:n}}const Hw="DELETE_NODES";function $Lt(t,e){e.registerCommand(Hw,{canExecute:()=>t.value.selectedNodes.length>0,execute(){t.value.selectedNodes.forEach(n=>t.value.removeNode(n))}}),e.registerHotkey(["Delete"],Hw)}const nM="SWITCH_TO_MAIN_GRAPH";function WLt(t,e,n){e.registerCommand(nM,{canExecute:()=>t.value!==t.value.editor.graph,execute:()=>{e.executeCommand(dc),n(t.value.editor.graph)}})}function KLt(t,e,n){$Lt(t,e),qLt(t,e,n),bLt(t,e),WLt(t,e,n)}class qw{constructor(e,n){this.type=e,e==="addNode"?this.nodeId=n:this.nodeState=n}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const n=e.editor.nodeTypes.get(this.nodeState.type);if(!n)return;const i=new n.type;e.addNode(i),i.load(this.nodeState),this.nodeId=i.id}removeNode(e){const n=e.nodes.find(i=>i.id===this.nodeId);n&&(this.nodeState=n.save(),e.removeNode(n))}}class Yw{constructor(e,n){if(this.type=e,e==="addConnection")this.connectionId=n;else{const i=n;this.connectionState={id:i.id,from:i.from.id,to:i.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const n=e.findNodeInterface(this.connectionState.from),i=e.findNodeInterface(this.connectionState.to);!n||!i||e.addConnection(n,i)}removeConnection(e){const n=e.connections.find(i=>i.id===this.connectionId);n&&(this.connectionState={id:n.id,from:n.from.id,to:n.to.id},e.removeConnection(n))}}class jLt{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let n=this.steps.length-1;n>=0;n--)this.steps[n].undo(e)}redo(e){for(let n=0;n{if(!r.value)if(a.value)l.value.push(b);else for(o.value!==s.value.length-1&&(s.value=s.value.slice(0,o.value+1)),s.value.push(b),o.value++;s.value.length>i.value;)s.value.shift()},d=()=>{a.value=!0},h=()=>{a.value=!1,l.value.length>0&&(u(new jLt(l.value)),l.value=[])},f=()=>s.value.length!==0&&o.value!==-1,_=()=>{f()&&(r.value=!0,s.value[o.value--].undo(t.value),r.value=!1)},m=()=>s.value.length!==0&&o.value{m()&&(r.value=!0,s.value[++o.value].redo(t.value),r.value=!1)};return qn(t,(b,g)=>{g&&(g.events.addNode.unsubscribe(n),g.events.removeNode.unsubscribe(n),g.events.addConnection.unsubscribe(n),g.events.removeConnection.unsubscribe(n)),b&&(b.events.addNode.subscribe(n,y=>{u(new qw("addNode",y.id))}),b.events.removeNode.subscribe(n,y=>{u(new qw("removeNode",y.save()))}),b.events.addConnection.subscribe(n,y=>{u(new Yw("addConnection",y.id))}),b.events.removeConnection.subscribe(n,y=>{u(new Yw("removeConnection",y))}))},{immediate:!0}),e.registerCommand(vb,{canExecute:f,execute:_}),e.registerCommand(Sb,{canExecute:m,execute:E}),e.registerCommand(iM,{canExecute:()=>!a.value,execute:d}),e.registerCommand(sM,{canExecute:()=>a.value,execute:h}),e.registerHotkey(["Control","z"],vb),e.registerHotkey(["Control","y"],Sb),ei({maxSteps:i})}const Tb="COPY",xb="PASTE",XLt="CLEAR_CLIPBOARD";function ZLt(t,e,n){const i=Symbol("ClipboardToken"),s=mt(""),r=mt(""),o=st(()=>!s.value),a=()=>{s.value="",r.value=""},l=()=>{const h=t.value.selectedNodes.flatMap(_=>[...Object.values(_.inputs),...Object.values(_.outputs)]),f=t.value.connections.filter(_=>h.includes(_.from)||h.includes(_.to)).map(_=>({from:_.from.id,to:_.to.id}));r.value=JSON.stringify(f),s.value=JSON.stringify(t.value.selectedNodes.map(_=>_.save()))},u=(h,f,_)=>{for(const m of h){let E;if((!_||_==="input")&&(E=Object.values(m.inputs).find(b=>b.id===f)),!E&&(!_||_==="output")&&(E=Object.values(m.outputs).find(b=>b.id===f)),E)return E}},d=()=>{if(o.value)return;const h=new Map,f=JSON.parse(s.value),_=JSON.parse(r.value),m=[],E=[],b=t.value;n.executeCommand(iM);for(const g of f){const y=e.value.nodeTypes.get(g.type);if(!y){console.warn(`Node type ${g.type} not registered`);return}const v=new y.type,T=v.id;m.push(v),v.hooks.beforeLoad.subscribe(i,C=>{const x=C;return x.position&&(x.position.x+=100,x.position.y+=100),v.hooks.beforeLoad.unsubscribe(i),x}),b.addNode(v),v.load({...g,id:T}),v.id=T,h.set(g.id,T);for(const C of Object.values(v.inputs)){const x=Tu();h.set(C.id,x),C.id=x}for(const C of Object.values(v.outputs)){const x=Tu();h.set(C.id,x),C.id=x}}for(const g of _){const y=u(m,h.get(g.from),"output"),v=u(m,h.get(g.to),"input");if(!y||!v)continue;const T=b.addConnection(y,v);T&&E.push(T)}return t.value.selectedNodes=m,n.executeCommand(sM),{newNodes:m,newConnections:E}};return n.registerCommand(Tb,{canExecute:()=>t.value.selectedNodes.length>0,execute:l}),n.registerHotkey(["Control","c"],Tb),n.registerCommand(xb,{canExecute:()=>!o.value,execute:d}),n.registerHotkey(["Control","v"],xb),n.registerCommand(XLt,{canExecute:()=>!0,execute:a}),ei({isEmpty:o})}const JLt="OPEN_SIDEBAR";function ePt(t,e){e.registerCommand(JLt,{execute:n=>{t.value.sidebar.nodeId=n,t.value.sidebar.visible=!0},canExecute:()=>!0})}function tPt(t,e){ePt(t,e)}const nPt={},iPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},sPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),rPt=c("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),oPt=[sPt,rPt];function aPt(t,e){return A(),M("svg",iPt,oPt)}const lPt=hn(nPt,[["render",aPt]]),cPt={},dPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},uPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),pPt=c("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),_Pt=[uPt,pPt];function hPt(t,e){return A(),M("svg",dPt,_Pt)}const fPt=hn(cPt,[["render",hPt]]),mPt={},gPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},bPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),EPt=c("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),yPt=c("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),vPt=c("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),SPt=[bPt,EPt,yPt,vPt];function TPt(t,e){return A(),M("svg",gPt,SPt)}const xPt=hn(mPt,[["render",TPt]]),CPt={},wPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},RPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),APt=c("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),NPt=c("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),OPt=[RPt,APt,NPt];function IPt(t,e){return A(),M("svg",wPt,OPt)}const MPt=hn(CPt,[["render",IPt]]),DPt={},kPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},LPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),PPt=c("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),UPt=c("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),FPt=[LPt,PPt,UPt];function BPt(t,e){return A(),M("svg",kPt,FPt)}const GPt=hn(DPt,[["render",BPt]]),VPt={},zPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},HPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),qPt=c("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),YPt=c("circle",{cx:"12",cy:"14",r:"2"},null,-1),$Pt=c("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),WPt=[HPt,qPt,YPt,$Pt];function KPt(t,e){return A(),M("svg",zPt,WPt)}const jPt=hn(VPt,[["render",KPt]]),QPt={},XPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ZPt=zb('',6),JPt=[ZPt];function eUt(t,e){return A(),M("svg",XPt,JPt)}const tUt=hn(QPt,[["render",eUt]]),nUt=_n({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:t}=Oi();return{viewModel:t}}}),iUt=["disabled","title"];function sUt(t,e,n,i,s,r){return A(),M("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!t.viewModel.commandHandler.canExecuteCommand(t.command),title:t.title,onClick:e[0]||(e[0]=o=>t.viewModel.commandHandler.executeCommand(t.command))},[t.icon?(A(),xt(Uu(t.icon),{key:0})):(A(),M(We,{key:1},[Je(ge(t.title),1)],64))],8,iUt)}const rUt=hn(nUt,[["render",sUt]]),oUt=_n({components:{ToolbarButton:rUt},setup(){const{viewModel:t}=Oi();return{isSubgraph:st(()=>t.value.displayedGraph!==t.value.editor.graph),commands:[{command:Tb,title:"Copy",icon:GPt},{command:xb,title:"Paste",icon:MPt},{command:vb,title:"Undo",icon:lPt},{command:Sb,title:"Redo",icon:fPt},{command:tM,title:"Create Subgraph",icon:tUt}],subgraphCommands:[{command:dc,title:"Save Subgraph",icon:jPt},{command:nM,title:"Back to Main Graph",icon:xPt}]}}}),aUt={class:"baklava-toolbar"};function lUt(t,e,n,i,s,r){const o=ft("toolbar-button");return A(),M("div",aUt,[(A(!0),M(We,null,ct(t.commands,a=>(A(),xt(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),t.isSubgraph?(A(!0),M(We,{key:0},ct(t.subgraphCommands,a=>(A(),xt(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):$("",!0)])}const cUt=hn(oUt,[["render",lUt]]),dUt={class:"connections-container"},uUt=_n({__name:"Editor",props:{viewModel:{}},setup(t){const e=t,n=Symbol("EditorToken"),i=Kd(e,"viewModel");rkt(i);const s=mt(null);ra("editorEl",s);const r=st(()=>e.viewModel.displayedGraph.nodes),o=st(()=>e.viewModel.displayedGraph.nodes.map(O=>HI(Kd(O,"position")))),a=st(()=>e.viewModel.displayedGraph.connections),l=st(()=>e.viewModel.displayedGraph.selectedNodes),u=okt(),d=akt(),h=lkt(i),f=st(()=>({...u.styles.value})),_=mt(0);e.viewModel.editor.hooks.load.subscribe(n,O=>(_.value++,O));const m=O=>{u.onPointerMove(O),d.onMouseMove(O)},E=O=>{O.button===0&&(O.target===s.value&&(T(),u.onPointerDown(O)),d.onMouseDown())},b=O=>{u.onPointerUp(O),d.onMouseUp()},g=O=>{O.key==="Tab"&&O.preventDefault(),e.viewModel.commandHandler.handleKeyDown(O)},y=O=>{e.viewModel.commandHandler.handleKeyUp(O)},v=O=>{["Control","Shift"].some(w=>e.viewModel.commandHandler.pressedKeys.includes(w))||T(),e.viewModel.displayedGraph.selectedNodes.push(O)},T=()=>{e.viewModel.displayedGraph.selectedNodes=[]},C=O=>{for(const w of e.viewModel.displayedGraph.selectedNodes){const S=r.value.indexOf(w),R=o.value[S];R.onPointerDown(O),document.addEventListener("pointermove",R.onPointerMove)}document.addEventListener("pointerup",x)},x=()=>{for(const O of e.viewModel.displayedGraph.selectedNodes){const w=r.value.indexOf(O),S=o.value[w];S.onPointerUp(),document.removeEventListener("pointermove",S.onPointerMove)}document.removeEventListener("pointerup",x)};return(O,w)=>(A(),M("div",{ref_key:"el",ref:s,tabindex:"-1",class:qe(["baklava-editor",{"baklava-ignore-mouse":!!yt(d).temporaryConnection.value||yt(u).dragging.value,"--temporary-connection":!!yt(d).temporaryConnection.value}]),onPointermove:Te(m,["self"]),onPointerdown:E,onPointerup:b,onWheel:w[1]||(w[1]=Te((...S)=>yt(u).onMouseWheel&&yt(u).onMouseWheel(...S),["self"])),onKeydown:g,onKeyup:y,onContextmenu:w[2]||(w[2]=Te((...S)=>yt(h).open&&yt(h).open(...S),["self","prevent"]))},[kn(O.$slots,"background",{},()=>[Re(ukt)]),kn(O.$slots,"toolbar",{},()=>[Re(cUt)]),kn(O.$slots,"palette",{},()=>[Re(_Lt)]),(A(),M("svg",dUt,[(A(!0),M(We,null,ct(a.value,S=>(A(),M("g",{key:S.id+_.value.toString()},[kn(O.$slots,"connection",{connection:S},()=>[Re(jkt,{connection:S},null,8,["connection"])])]))),128)),kn(O.$slots,"temporaryConnection",{temporaryConnection:yt(d).temporaryConnection.value},()=>[yt(d).temporaryConnection.value?(A(),xt(Zkt,{key:0,connection:yt(d).temporaryConnection.value},null,8,["connection"])):$("",!0)])])),c("div",{class:"node-container",style:en(f.value)},[Re(os,{name:"fade"},{default:$e(()=>[(A(!0),M(We,null,ct(r.value,(S,R)=>kn(O.$slots,"node",{key:S.id+_.value.toString(),node:S,selected:l.value.includes(S),dragging:o.value[R].dragging.value,onSelect:U=>v(S),onStartDrag:C},()=>[Re(zkt,{node:S,selected:l.value.includes(S),dragging:o.value[R].dragging.value,onSelect:U=>v(S),onStartDrag:C},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),kn(O.$slots,"sidebar",{},()=>[Re(iLt)]),kn(O.$slots,"minimap",{},()=>[O.viewModel.settings.enableMinimap?(A(),xt(sLt,{key:0})):$("",!0)]),kn(O.$slots,"contextMenu",{contextMenu:yt(h)},()=>[O.viewModel.settings.contextMenu.enabled?(A(),xt(hy,{key:0,modelValue:yt(h).show.value,"onUpdate:modelValue":w[0]||(w[0]=S=>yt(h).show.value=S),items:yt(h).items.value,x:yt(h).x.value,y:yt(h).y.value,onClick:yt(h).onClick},null,8,["modelValue","items","x","y","onClick"])):$("",!0)])],34))}}),pUt=["INPUT","TEXTAREA","SELECT"];function _Ut(t){const e=mt([]),n=mt([]);return{pressedKeys:e,handleKeyDown:o=>{var a;e.value.includes(o.key)||e.value.push(o.key),!pUt.includes(((a=document.activeElement)==null?void 0:a.tagName)??"")&&n.value.forEach(l=>{l.keys.every(u=>e.value.includes(u))&&t(l.commandName)})},handleKeyUp:o=>{const a=e.value.indexOf(o.key);a>=0&&e.value.splice(a,1)},registerHotkey:(o,a)=>{n.value.push({keys:o,commandName:a})}}}const hUt=()=>{const t=mt(new Map),e=(r,o)=>{if(t.value.has(r))throw new Error(`Command "${r}" already exists`);t.value.set(r,o)},n=(r,o=!1,...a)=>{if(!t.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return}return t.value.get(r).execute(...a)},i=(r,o=!1,...a)=>{if(!t.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return!1}return t.value.get(r).canExecute(a)},s=_Ut(n);return ei({registerCommand:e,executeCommand:n,canExecuteCommand:i,...s})},fUt=t=>!(t instanceof xc);function mUt(t,e){return{switchGraph:i=>{let s;if(fUt(i))s=new xc(t.value),i.createGraph(s);else{if(i!==t.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");s=i}e.value&&e.value!==t.value.graph&&e.value.destroy(),s.panning=s.panning??i.panning??{x:0,y:0},s.scaling=s.scaling??i.scaling??1,s.selectedNodes=s.selectedNodes??[],s.sidebar=s.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=s}}}function gUt(t,e){t.position=t.position??{x:0,y:0},t.disablePointerEvents=!1,t.twoColumn=t.twoColumn??!1,t.width=t.width??e.defaultWidth}const bUt=()=>({useStraightConnections:!1,enableMinimap:!1,background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1},contextMenu:{enabled:!0,additionalItems:[]}});function EUt(t){const e=mt(t??new JDt),n=Symbol("ViewModelToken"),i=mt(null),s=a2(i),{switchGraph:r}=mUt(e,i),o=st(()=>s.value&&s.value!==e.value.graph),a=ei(bUt()),l=hUt(),u=QLt(s,l),d=ZLt(s,e,l),h={renderNode:new li(null),renderInterface:new li(null)};return KLt(s,l,r),tPt(s,l),qn(e,(f,_)=>{_&&(_.events.registerGraph.unsubscribe(n),_.graphEvents.beforeAddNode.unsubscribe(n),f.nodeHooks.beforeLoad.unsubscribe(n),f.nodeHooks.afterSave.unsubscribe(n),f.graphTemplateHooks.beforeLoad.unsubscribe(n),f.graphTemplateHooks.afterSave.unsubscribe(n),f.graph.hooks.load.unsubscribe(n),f.graph.hooks.save.unsubscribe(n)),f&&(f.nodeHooks.beforeLoad.subscribe(n,(m,E)=>(E.position=m.position??{x:0,y:0},E.width=m.width??a.nodes.defaultWidth,E.twoColumn=m.twoColumn??!1,m)),f.nodeHooks.afterSave.subscribe(n,(m,E)=>(m.position=E.position,m.width=E.width,m.twoColumn=E.twoColumn,m)),f.graphTemplateHooks.beforeLoad.subscribe(n,(m,E)=>(E.panning=m.panning,E.scaling=m.scaling,m)),f.graphTemplateHooks.afterSave.subscribe(n,(m,E)=>(m.panning=E.panning,m.scaling=E.scaling,m)),f.graph.hooks.load.subscribe(n,(m,E)=>(E.panning=m.panning,E.scaling=m.scaling,m)),f.graph.hooks.save.subscribe(n,(m,E)=>(m.panning=E.panning,m.scaling=E.scaling,m)),f.graphEvents.beforeAddNode.subscribe(n,m=>gUt(m,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(JI,{category:"Subgraphs"}),e.value.registerNodeType(eM,{category:"Subgraphs"}),r(f.graph))},{immediate:!0}),ei({editor:e,displayedGraph:s,isSubgraph:o,settings:a,commandHandler:l,history:u,clipboard:d,hooks:h,switchGraph:r})}const yUt=el({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new nn("Request",""),agent_name:()=>new LLt("Personality","",xu.state.config.personalities).setPort(!1)},outputs:{response:()=>new nn("Response","")},async calculate({request:t}){console.log(xu.state.config.personalities);let e="";try{e=(await Ce.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),vUt=el({type:"RAGNode",title:"RAG",inputs:{request:()=>new nn("Prompt",""),document_path:()=>new Cc("Document path","").setPort(!1)},outputs:{prompt:()=>new nn("Prompt with Data","")},async calculate({request:t,document_path:e}){let n="";try{n=(await Ce.get("/rag",{params:{text:t,doc_path:e}})).data}catch(i){console.error(i)}return{response:n}}}),$w=el({type:"Task",title:"Task",inputs:{description:()=>new Cc("Task description","").setPort(!1)},outputs:{prompt:()=>new nn("Prompt")},calculate({description:t}){return{prompt:t}}}),Ww=el({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new nn("Input","")},outputs:{response:()=>new BLt("Text","")},async calculate({request:t}){}}),Kw=el({type:"LLMNode",title:"LLM",inputs:{request:()=>new nn("Request","")},outputs:{response:()=>new nn("Response","")},async calculate({request:t}){console.log(xu.state.config.personalities);let e="";try{e=(await Ce.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),SUt=el({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new nn("Question",""),outputs:()=>new Cc("choices, one per line","","").setPort(!1)},outputs:{response:()=>new nn("Response","")}}),TUt=_n({components:{"baklava-editor":uUt},setup(){const t=EUt(),e=new skt(t.editor);t.editor.registerNodeType(yUt),t.editor.registerNodeType($w),t.editor.registerNodeType(vUt),t.editor.registerNodeType(Ww),t.editor.registerNodeType(Kw),t.editor.registerNodeType(SUt);const n=Symbol();e.events.afterRun.subscribe(n,a=>{e.pause(),ekt(a,t.editor),e.resume()}),e.start();function i(a,l,u){const d=new a;return t.displayedGraph.addNode(d),d.position.x=l,d.position.y=u,d}const s=i($w,300,140),r=i(Kw,550,140),o=i(Ww,850,140);return t.displayedGraph.addConnection(s.outputs.prompt,r.inputs.request),t.displayedGraph.addConnection(r.outputs.response,o.inputs.text2display),{baklava:t,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),xUt={style:{width:"100vw",height:"100vh"}};function CUt(t,e,n,i,s,r){const o=ft("baklava-editor");return A(),M("div",xUt,[Re(o,{"view-model":t.baklava},null,8,["view-model"]),c("button",{onClick:e[0]||(e[0]=(...a)=>t.saveGraph&&t.saveGraph(...a))},"Save Graph"),c("button",{onClick:e[1]||(e[1]=(...a)=>t.loadGraph&&t.loadGraph(...a))},"Load Graph")])}const wUt=bt(TUt,[["render",CUt]]),RUt={},AUt={style:{width:"100vw",height:"100vh"}},NUt=["src"];function OUt(t,e,n,i,s,r){return A(),M("div",AUt,[c("iframe",{src:t.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,NUt)])}const IUt=bt(RUt,[["render",OUt]]),MUt={},DUt={style:{width:"100vw",height:"100vh"}},kUt=["src"];function LUt(t,e,n,i,s,r){return A(),M("div",DUt,[c("iframe",{src:t.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,kUt)])}const PUt=bt(MUt,[["render",LUt]]),UUt=$P({history:dP("/"),routes:[{path:"/auto_sd_view/",name:"AutoSD",component:PUt},{path:"/autosd_view/",name:"ComfyUI",component:IUt},{path:"/playground/",name:"playground",component:Ntt},{path:"/extensions/",name:"extensions",component:Gtt},{path:"/help/",name:"help",component:ont},{path:"/settings/",name:"settings",component:rEt},{path:"/training/",name:"training",component:wEt},{path:"/quantizing/",name:"quantizing",component:LEt},{path:"/",name:"discussions",component:Iwt},{path:"/",name:"interactive",component:$Dt},{path:"/",name:"nodes",component:wUt}]});const mp=ZD(NZe);console.log("Loaded main.js");function FUt(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const xu=xk({state(){return{is_rt_on:!1,language:"english",languages:[],currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},posts_headers:{accept:"application/json","Content-Type":"application/json"},client_id:"",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,api_post_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,databases:[]}},mutations:{setisRTOn(t,e){t.is_rt_on=e},setLanguages(t,e){t.languages=e},setLanguage(t,e){t.language=e},setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=e},setIsModelOk(t,e){t.isModelOk=e},setIsGenerating(t,e){t.isGenerating=e},setConfig(t,e){t.config=e},setPersonalities(t,e){t.personalities=e},setMountedPers(t,e){t.mountedPers=e},setMountedPersArr(t,e){t.mountedPersArr=e},setbindingsZoo(t,e){t.bindingsZoo=e},setModelsArr(t,e){t.modelsArr=e},setselectedModel(t,e){t.selectedModel=e},setDiskUsage(t,e){t.diskUsage=e},setRamUsage(t,e){t.ramUsage=e},setVramUsage(t,e){t.vramUsage=e},setModelsZoo(t,e){t.modelsZoo=e},setCurrentBinding(t,e){t.currentBinding=e},setCurrentModel(t,e){t.currentModel=e},setDatabases(t,e){t.databases=e},setTheme(t){this.currentTheme=t}},getters:{getisRTOn(t){return t.is_rt_on},getLanguages(t){return t.languages},getLanguage(t){return t.language},getIsConnected(t){return t.isConnected},getIsModelOk(t){return t.isModelOk},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getMountedPers(t){return t.mountedPers},getbindingsZoo(t){return t.bindingsZoo},getModelsArr(t){return t.modelsArr},getDiskUsage(t){return t.diskUsage},getRamUsage(t){return t.ramUsage},getVramUsage(t){return t.vramUsage},getDatabasesList(t){return t.databases},getModelsZoo(t){return t.modelsZoo},getCyrrentBinding(t){return t.currentBinding},getCurrentModel(t){return t.currentModel}},actions:{async getVersion(){try{let t=await Ce.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data,console.log("version res:",t),console.log("version :",this.state.version))}catch{console.log("Coudln't get version")}},async refreshConfig({commit:t}){console.log("Fetching configuration");try{const e=await ki("get_config");e.active_personality_id<0&&(e.active_personality_id=0);let n=e.personalities[e.active_personality_id].split("/");e.personality_category=n[0],e.personality_folder=n[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),t("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:t}){let e=await ki("list_databases");console.log("databases:",e),t("setDatabases",e)},async fetchisRTOn({commit:t}){console.log("is_rt_on",this.state.client_id);const e=await Ce.get("/is_rt_on");console.log("response",e);const n=e.data.status;console.log("is_rt_on",n),t("setRTOn",n)},async fetchLanguages({commit:t}){console.log("get_personality_languages_list",this.state.client_id);const e=await Ce.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("languages",n),t("setLanguages",n)},async fetchLanguage({commit:t}){console.log("get_personality_language",this.state.client_id);const e=await Ce.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("language",n),t("setLanguage",n)},async changeLanguage({commit:t},e){console.log("Changing language to ",e);let n=await Ce.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await Ce.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("languages",i),t("setLanguages",i),n=await Ce.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const s=n.data;console.log("language",s),t("setLanguage",s),console.log("Language changed successfully:",n.data.message)},async deleteLanguage({commit:t},e){console.log("Deleting ",e);let n=await Ce.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await Ce.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("languages",i),t("setLanguages",i),n=await Ce.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const s=n.data;console.log("language",s),t("setLanguage",s),console.log("Language changed successfully:",n.data.message)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await ki("get_all_personalities"),i=Object.keys(n);console.log("Personalities recovered:"+this.state.config.personalities);for(let s=0;s{let u=!1;for(const h of this.state.config.personalities)if(h.includes(r+"/"+l.folder))if(u=!0,h.includes(":")){const f=h.split(":");l.language=f[1]}else l.language=null;let d={};return d=l,d.category=r,d.full_path=r+"/"+l.folder,d.isMounted=u,d});e.length==0?e=a:e=e.concat(a)}e.sort((s,r)=>s.name.localeCompare(r.name)),t("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:t}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const n=[];for(let i=0;ia.full_path==s||a.full_path==r[0]);if(o>=0){let a=FUt(this.state.personalities[o]);r.length>1&&(a.language=r[1]),a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else n.push(i),console.log("Couldn't load personality : ",s)}for(let i=n.length-1;i>=0;i--)console.log("Removing personality : ",this.state.config.personalities[n[i]]),this.state.config.personalities.splice(n[i],1),this.state.config.active_personality_id>n[i]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e),this.state.mountedPers=this.state.personalities[this.state.personalities.findIndex(i=>i.full_path==this.state.config.personalities[this.state.config.active_personality_id]||i.full_path+":"+i.language==this.state.config.personalities[this.state.config.active_personality_id])]},async refreshBindings({commit:t}){let e=await ki("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(i=>i.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),t("setbindingsZoo",e);const n=e.findIndex(i=>i.name==this.state.config.binding_name);n!=-1&&t("setCurrentBinding",e[n])},async refreshModelsZoo({commit:t}){console.log("Fetching models");const n=(await Ce.get("/get_available_models")).data.filter(i=>i.variants&&i.variants.length>0);console.log(`get_available_models: ${n}`),t("setModelsZoo",n)},async refreshModelStatus({commit:t}){let e=await ki("get_model_status");t("setIsModelOk",e.status)},async refreshModels({commit:t}){console.log("Fetching models");let e=await ki("list_models");console.log(`Found ${e}`);let n=await ki("get_active_model");console.log("Selected model ",n),n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),console.log("setModelsArr",e),console.log("this.state.modelsZoo",this.state.modelsZoo),this.state.modelsZoo.map(s=>{s.isInstalled=e.includes(s.name)}),this.state.installedModels=this.state.modelsZoo.filter(s=>s.isInstalled);const i=this.state.modelsZoo.findIndex(s=>s.name==this.state.config.model_name);i!=-1&&t("setCurrentModel",this.state.modelsZoo[i])},async refreshDiskUsage({commit:t}){this.state.diskUsage=await ki("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await ki("ram_usage")},async refreshVramUsage({commit:t}){const e=await ki("vram_usage"),n=[];if(e.nb_gpus>0){for(let s=0;s!!n.value),onPointerDown:l=>{n.value={x:l.pageX,y:l.pageY},i.value={x:t.value.x,y:t.value.y}},onPointerMove:l=>{if(n.value){const u=l.pageX-n.value.x,d=l.pageY-n.value.y;t.value.x=i.value.x+u/e.value.scaling,t.value.y=i.value.y+d/e.value.scaling}},onPointerUp:()=>{n.value=null,i.value=null}}}function qI(t,e,n){if(!e.template)return!1;if(Pa(e.template)===n)return!0;const i=t.graphTemplates.find(r=>Pa(r)===n);return i?i.nodes.filter(r=>r.type.startsWith(cc)).some(r=>qI(t,e,r.type)):!1}function YI(t){return st(()=>{const e=Array.from(t.value.editor.nodeTypes.entries()),n=new Set(e.map(([,s])=>s.category)),i=[];for(const s of n.values()){let r=e.filter(([,o])=>o.category===s);t.value.displayedGraph.template?r=r.filter(([o])=>!qI(t.value.editor,t.value.displayedGraph,o)):r=r.filter(([o])=>![ka,La].includes(o)),r.length>0&&i.push({name:s,nodeTypes:Object.fromEntries(r)})}return i.sort((s,r)=>s.name==="default"?-1:r.name==="default"||s.name>r.name?1:-1),i})}function $I(){const{graph:t}=Ki();return{transform:(n,i)=>{const s=n/t.value.scaling-t.value.panning.x,r=i/t.value.scaling-t.value.panning.y;return[s,r]}}}function skt(){const{graph:t}=Ki();let e=[],n=-1,i={x:0,y:0};const s=st(()=>t.value.panning),r=HI(s),o=st(()=>({"transform-origin":"0 0",transform:`scale(${t.value.scaling}) translate(${t.value.panning.x}px, ${t.value.panning.y}px)`})),a=(_,m,E)=>{const b=[_/t.value.scaling-t.value.panning.x,m/t.value.scaling-t.value.panning.y],g=[_/E-t.value.panning.x,m/E-t.value.panning.y],y=[g[0]-b[0],g[1]-b[1]];t.value.panning.x+=y[0],t.value.panning.y+=y[1],t.value.scaling=E},l=_=>{_.preventDefault();let m=_.deltaY;_.deltaMode===1&&(m*=32);const E=t.value.scaling*(1-m/3e3);a(_.offsetX,_.offsetY,E)},u=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:o,...r,onPointerDown:_=>{if(e.push(_),r.onPointerDown(_),e.length===2){const{ax:m,ay:E,bx:b,by:g}=u();i={x:m+(b-m)/2,y:E+(g-E)/2}}},onPointerMove:_=>{for(let m=0;m0){const C=t.value.scaling*(1+(T-n)/500);a(i.x,i.y,C)}n=T}else r.onPointerMove(_)},onPointerUp:_=>{e=e.filter(m=>m.pointerId!==_.pointerId),n=-1,r.onPointerUp()},onMouseWheel:l}}var Ei=(t=>(t[t.NONE=0]="NONE",t[t.ALLOWED=1]="ALLOWED",t[t.FORBIDDEN=2]="FORBIDDEN",t))(Ei||{});const WI=Symbol();function rkt(){const{graph:t}=Ki(),e=mt(null),n=mt(null),i=a=>{e.value&&(e.value.mx=a.offsetX/t.value.scaling-t.value.panning.x,e.value.my=a.offsetY/t.value.scaling-t.value.panning.y)},s=()=>{if(n.value){if(e.value)return;const a=t.value.connections.find(l=>l.to===n.value);n.value.isInput&&a?(e.value={status:Ei.NONE,from:a.from},t.value.removeConnection(a)):e.value={status:Ei.NONE,from:n.value},e.value.mx=void 0,e.value.my=void 0}},r=()=>{if(e.value&&n.value){if(e.value.from===n.value)return;t.value.addConnection(e.value.from,e.value.to)}e.value=null},o=a=>{if(n.value=a??null,a&&e.value){e.value.to=a;const l=t.value.checkConnection(e.value.from,e.value.to);if(e.value.status=l.connectionAllowed?Ei.ALLOWED:Ei.FORBIDDEN,l.connectionAllowed){const u=l.connectionsInDanger.map(d=>d.id);t.value.connections.forEach(d=>{u.includes(d.id)&&(d.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=Ei.NONE,t.value.connections.forEach(l=>{l.isInDanger=!1}))};return ra(WI,{temporaryConnection:e,hoveredOver:o}),{temporaryConnection:e,onMouseMove:i,onMouseDown:s,onMouseUp:r,hoveredOver:o}}function okt(t){const e=mt(!1),n=mt(0),i=mt(0),s=YI(t),{transform:r}=$I(),o=st(()=>{let d=[];const h={};for(const _ of s.value){const m=Object.entries(_.nodeTypes).map(([E,b])=>({label:b.title,value:"addNode:"+E}));_.name==="default"?d=m:h[_.name]=m}const f=[...Object.entries(h).map(([_,m])=>({label:_,submenu:m}))];return f.length>0&&d.length>0&&f.push({isDivider:!0}),f.push(...d),f}),a=st(()=>t.value.settings.contextMenu.additionalItems.length===0?o.value:[{label:"Add node",submenu:o.value},...t.value.settings.contextMenu.additionalItems.map(d=>"isDivider"in d||"submenu"in d?d:{label:d.label,value:"command:"+d.command,disabled:!t.value.commandHandler.canExecuteCommand(d.command)})]);function l(d){e.value=!0,n.value=d.offsetX,i.value=d.offsetY}function u(d){if(d.startsWith("addNode:")){const h=d.substring(8),f=t.value.editor.nodeTypes.get(h);if(!f)return;const _=ei(new f.type);t.value.displayedGraph.addNode(_);const[m,E]=r(n.value,i.value);_.position.x=m,_.position.y=E}else if(d.startsWith("command:")){const h=d.substring(8);t.value.commandHandler.canExecuteCommand(h)&&t.value.commandHandler.executeCommand(h)}}return{show:e,x:n,y:i,items:a,open:l,onClick:u}}const akt=_n({setup(){const{viewModel:t}=Oi(),{graph:e}=Ki();return{styles:st(()=>{const i=t.value.settings.background,s=e.value.panning.x*e.value.scaling,r=e.value.panning.y*e.value.scaling,o=e.value.scaling*i.gridSize,a=o/i.gridDivision,l=`${o}px ${o}px, ${o}px ${o}px`,u=e.value.scaling>i.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${s}px top ${r}px`,backgroundSize:`${l} ${u}`}})}}}),hn=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n};function lkt(t,e,n,i,s,r){return A(),M("div",{class:"background",style:en(t.styles)},null,4)}const ckt=hn(akt,[["render",lkt]]);function dkt(t){return nR()?(MM(t),!0):!1}function py(t){return typeof t=="function"?t():yt(t)}const KI=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ukt=Object.prototype.toString,pkt=t=>ukt.call(t)==="[object Object]",Hd=()=>{},_kt=hkt();function hkt(){var t,e;return KI&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function fkt(t,e,n=!1){return e.reduce((i,s)=>(s in t&&(!n||t[s]!==void 0)&&(i[s]=t[s]),i),{})}function mkt(t,e={}){if(!fn(t))return _2(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const i in t.value)n[i]=p2(()=>({get(){return t.value[i]},set(s){var r;if((r=py(e.replaceRef))!=null?r:!0)if(Array.isArray(t.value)){const a=[...t.value];a[i]=s,t.value=a}else{const a={...t.value,[i]:s};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[i]=s}}));return n}function Nl(t){var e;const n=py(t);return(e=n==null?void 0:n.$el)!=null?e:n}const _y=KI?window:void 0;function zl(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=_y):[e,n,i,s]=t,!e)return Hd;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(d=>d()),r.length=0},a=(d,h,f,_)=>(d.addEventListener(h,f,_),()=>d.removeEventListener(h,f,_)),l=qn(()=>[Nl(e),py(s)],([d,h])=>{if(o(),!d)return;const f=pkt(h)?{...h}:h;r.push(...n.flatMap(_=>i.map(m=>a(d,_,m,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),o()};return dkt(u),u}let Fw=!1;function jI(t,e,n={}){const{window:i=_y,ignore:s=[],capture:r=!0,detectIframe:o=!1}=n;if(!i)return Hd;_kt&&!Fw&&(Fw=!0,Array.from(i.document.body.children).forEach(f=>f.addEventListener("click",Hd)),i.document.documentElement.addEventListener("click",Hd));let a=!0;const l=f=>s.some(_=>{if(typeof _=="string")return Array.from(i.document.querySelectorAll(_)).some(m=>m===f.target||f.composedPath().includes(m));{const m=Nl(_);return m&&(f.target===m||f.composedPath().includes(m))}}),d=[zl(i,"click",f=>{const _=Nl(t);if(!(!_||_===f.target||f.composedPath().includes(_))){if(f.detail===0&&(a=!l(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:r}),zl(i,"pointerdown",f=>{const _=Nl(t);a=!l(f)&&!!(_&&!f.composedPath().includes(_))},{passive:!0}),o&&zl(i,"blur",f=>{setTimeout(()=>{var _;const m=Nl(t);((_=i.document.activeElement)==null?void 0:_.tagName)==="IFRAME"&&!(m!=null&&m.contains(i.document.activeElement))&&e(f)},0)})].filter(Boolean);return()=>d.forEach(f=>f())}const QI={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},gkt=Object.keys(QI);function bkt(t={}){const{target:e=_y}=t,n=mt(!1),i=mt(t.initialValue||{});Object.assign(i.value,QI,i.value);const s=r=>{n.value=!0,!(t.pointerTypes&&!t.pointerTypes.includes(r.pointerType))&&(i.value=fkt(r,gkt,!1))};if(e){const r={passive:!0};zl(e,["pointerdown","pointermove","pointerup"],s,r),zl(e,"pointerleave",()=>n.value=!1,r)}return{...mkt(i),isInside:n}}const Ekt=["onMouseenter","onMouseleave","onClick"],ykt={class:"flex-fill"},vkt={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},Skt=c("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[c("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),Tkt=[Skt],hy=_n({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(t,{emit:e}){const n=t,i=e;let s=null;const r=mt(null),o=mt(-1),a=mt(0),l=mt({x:!1,y:!1}),u=st(()=>n.flippable&&(l.value.x||n.isFlipped.x)),d=st(()=>n.flippable&&(l.value.y||n.isFlipped.y)),h=st(()=>{const y={};return n.isNested||(y.top=(d.value?n.y-a.value:n.y)+"px",y.left=n.x+"px"),y}),f=st(()=>({"--flipped-x":u.value,"--flipped-y":d.value,"--nested":n.isNested})),_=st(()=>n.items.map(y=>({...y,hover:!1})));qn([()=>n.y,()=>n.items],()=>{var y,v,T,C;a.value=n.items.length*30;const x=((v=(y=r.value)==null?void 0:y.parentElement)==null?void 0:v.offsetWidth)??0,O=((C=(T=r.value)==null?void 0:T.parentElement)==null?void 0:C.offsetHeight)??0;l.value.x=!n.isNested&&n.x>x*.75,l.value.y=!n.isNested&&n.y+a.value>O-20}),jI(r,()=>{n.modelValue&&i("update:modelValue",!1)});const m=y=>{!y.submenu&&y.value&&(i("click",y.value),i("update:modelValue",!1))},E=y=>{i("click",y),o.value=-1,n.isNested||i("update:modelValue",!1)},b=(y,v)=>{n.items[v].submenu&&(o.value=v,s!==null&&(clearTimeout(s),s=null))},g=(y,v)=>{n.items[v].submenu&&(s=window.setTimeout(()=>{o.value=-1,s=null},200))};return(y,v)=>{const T=ft("ContextMenu",!0);return A(),xt(cs,{name:"slide-fade"},{default:$e(()=>[z(c("div",{ref_key:"el",ref:r,class:qe(["baklava-context-menu",f.value]),style:en(h.value)},[(A(!0),M(We,null,ct(_.value,(C,x)=>(A(),M(We,null,[C.isDivider?(A(),M("div",{key:`d-${x}`,class:"divider"})):(A(),M("div",{key:`i-${x}`,class:qe(["item",{submenu:!!C.submenu,"--disabled":!!C.disabled}]),onMouseenter:O=>b(O,x),onMouseleave:O=>g(O,x),onClick:Te(O=>m(C),["stop","prevent"])},[c("div",ykt,ge(C.label),1),C.submenu?(A(),M("div",vkt,Tkt)):$("",!0),C.submenu?(A(),xt(T,{key:1,"model-value":o.value===x,items:C.submenu,"is-nested":!0,"is-flipped":{x:u.value,y:d.value},flippable:y.flippable,onClick:E},null,8,["model-value","items","is-flipped","flippable"])):$("",!0)],42,Ekt))],64))),256))],6),[[Mt,y.modelValue]])]),_:1})}}}),xkt={},Ckt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},wkt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Rkt=c("circle",{cx:"12",cy:"12",r:"1"},null,-1),Akt=c("circle",{cx:"12",cy:"19",r:"1"},null,-1),Nkt=c("circle",{cx:"12",cy:"5",r:"1"},null,-1),Okt=[wkt,Rkt,Akt,Nkt];function Ikt(t,e){return A(),M("svg",Ckt,Okt)}const XI=hn(xkt,[["render",Ikt]]),Mkt=["id"],Dkt={key:0,class:"__tooltip"},kkt={key:2,class:"align-middle"},Bw=_n({__name:"NodeInterface",props:{node:{},intf:{}},setup(t){const e=(b,g=100)=>{const y=b!=null&&b.toString?b.toString():"";return y.length>g?y.slice(0,g)+"...":y},n=t,{viewModel:i}=Oi(),{hoveredOver:s,temporaryConnection:r}=Vi(WI),o=mt(null),a=st(()=>n.intf.connectionCount>0),l=mt(!1),u=st(()=>i.value.settings.displayValueOnHover&&l.value),d=st(()=>({"--input":n.intf.isInput,"--output":!n.intf.isInput,"--connected":a.value})),h=st(()=>n.intf.component&&(!n.intf.isInput||!n.intf.port||n.intf.connectionCount===0)),f=()=>{l.value=!0,s(n.intf)},_=()=>{l.value=!1,s(void 0)},m=()=>{o.value&&i.value.hooks.renderInterface.execute({intf:n.intf,el:o.value})},E=()=>{const b=i.value.displayedGraph.sidebar;b.nodeId=n.node.id,b.optionName=n.intf.name,b.visible=!0};return Ws(m),pc(m),(b,g)=>{var y;return A(),M("div",{id:b.intf.id,ref_key:"el",ref:o,class:qe(["baklava-node-interface",d.value])},[b.intf.port?(A(),M("div",{key:0,class:qe(["__port",{"--selected":((y=yt(r))==null?void 0:y.from)===b.intf}]),onPointerover:f,onPointerout:_},[kn(b.$slots,"portTooltip",{showTooltip:u.value},()=>[u.value===!0?(A(),M("span",Dkt,ge(e(b.intf.value)),1)):$("",!0)])],34)):$("",!0),h.value?(A(),xt(Uu(b.intf.component),{key:1,modelValue:b.intf.value,"onUpdate:modelValue":g[0]||(g[0]=v=>b.intf.value=v),node:b.node,intf:b.intf,onOpenSidebar:E},null,40,["modelValue","node","intf"])):(A(),M("span",kkt,ge(b.intf.name),1))],10,Mkt)}}}),Lkt=["id","data-node-type"],Pkt={class:"__title-label"},Ukt={class:"__menu"},Fkt={class:"__outputs"},Bkt={class:"__inputs"},Gkt=_n({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(t,{emit:e}){const n=t,i=e,{viewModel:s}=Oi(),{graph:r,switchGraph:o}=Ki(),a=mt(null),l=mt(!1),u=mt(""),d=mt(null),h=mt(!1),f=mt(!1),_=st(()=>{const U=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return n.node.type.startsWith(cc)&&U.push({value:"editSubgraph",label:"Edit Subgraph"}),U}),m=st(()=>({"--selected":n.selected,"--dragging":n.dragging,"--two-column":!!n.node.twoColumn})),E=st(()=>{var U,F;return{top:`${((U=n.node.position)==null?void 0:U.y)??0}px`,left:`${((F=n.node.position)==null?void 0:F.x)??0}px`,"--width":`${n.node.width??s.value.settings.nodes.defaultWidth}px`}}),b=st(()=>Object.values(n.node.inputs).filter(U=>!U.hidden)),g=st(()=>Object.values(n.node.outputs).filter(U=>!U.hidden)),y=()=>{i("select")},v=U=>{n.selected||y(),i("start-drag",U)},T=()=>{f.value=!0},C=async U=>{var F;switch(U){case"delete":r.value.removeNode(n.node);break;case"rename":u.value=n.node.title,l.value=!0,await Ge(),(F=d.value)==null||F.focus();break;case"editSubgraph":o(n.node.template);break}},x=()=>{n.node.title=u.value,l.value=!1},O=()=>{a.value&&s.value.hooks.renderNode.execute({node:n.node,el:a.value})},w=U=>{h.value=!0,U.preventDefault()},S=U=>{if(!h.value)return;const F=n.node.width+U.movementX/r.value.scaling,Q=s.value.settings.nodes.minWidth,L=s.value.settings.nodes.maxWidth;n.node.width=Math.max(Q,Math.min(L,F))},R=()=>{h.value=!1};return Ws(()=>{O(),window.addEventListener("mousemove",S),window.addEventListener("mouseup",R)}),pc(O),za(()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",R)}),(U,F)=>(A(),M("div",{id:U.node.id,ref_key:"el",ref:a,class:qe(["baklava-node",m.value]),style:en(E.value),"data-node-type":U.node.type,onPointerdown:y},[yt(s).settings.nodes.resizable?(A(),M("div",{key:0,class:"__resize-handle",onMousedown:w},null,32)):$("",!0),kn(U.$slots,"title",{},()=>[c("div",{class:"__title",onPointerdown:Te(v,["self","stop"])},[l.value?z((A(),M("input",{key:1,ref_key:"renameInputEl",ref:d,"onUpdate:modelValue":F[1]||(F[1]=Q=>u.value=Q),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:x,onKeydown:Hs(x,["enter"])},null,544)),[[Oe,u.value]]):(A(),M(We,{key:0},[c("div",Pkt,ge(U.node.title),1),c("div",Ukt,[Re(XI,{class:"--clickable",onClick:T}),Re(hy,{modelValue:f.value,"onUpdate:modelValue":F[0]||(F[0]=Q=>f.value=Q),x:0,y:0,items:_.value,onClick:C},null,8,["modelValue","items"])])],64))],32)]),kn(U.$slots,"content",{},()=>[c("div",{class:"__content",onKeydown:F[2]||(F[2]=Hs(Te(()=>{},["stop"]),["delete"]))},[c("div",Fkt,[(A(!0),M(We,null,ct(g.value,Q=>kn(U.$slots,"nodeInterface",{key:Q.id,type:"output",node:U.node,intf:Q},()=>[Re(Bw,{node:U.node,intf:Q},null,8,["node","intf"])])),128))]),c("div",Bkt,[(A(!0),M(We,null,ct(b.value,Q=>kn(U.$slots,"nodeInterface",{key:Q.id,type:"input",node:U.node,intf:Q},()=>[Re(Bw,{node:U.node,intf:Q},null,8,["node","intf"])])),128))])],32)])],46,Lkt))}}),Vkt=_n({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:Ei.NONE},isTemporary:{type:Boolean,default:!1}},setup(t){const{viewModel:e}=Oi(),{graph:n}=Ki(),i=(o,a)=>{const l=(o+n.value.panning.x)*n.value.scaling,u=(a+n.value.panning.y)*n.value.scaling;return[l,u]},s=st(()=>{const[o,a]=i(t.x1,t.y1),[l,u]=i(t.x2,t.y2);if(e.value.settings.useStraightConnections)return`M ${o} ${a} L ${l} ${u}`;{const d=.3*Math.abs(o-l);return`M ${o} ${a} C ${o+d} ${a}, ${l-d} ${u}, ${l} ${u}`}}),r=st(()=>({"--temporary":t.isTemporary,"--allowed":t.state===Ei.ALLOWED,"--forbidden":t.state===Ei.FORBIDDEN}));return{d:s,classes:r}}}),zkt=["d"];function Hkt(t,e,n,i,s,r){return A(),M("path",{class:qe(["baklava-connection",t.classes]),d:t.d},null,10,zkt)}const ZI=hn(Vkt,[["render",Hkt]]);function qkt(t){return document.getElementById(t.id)}function Ua(t){const e=document.getElementById(t.id),n=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:n&&n.length>0?n[0]:null}}const Ykt=_n({components:{"connection-view":ZI},props:{connection:{type:Object,required:!0}},setup(t){const{graph:e}=Ki();let n;const i=mt({x1:0,y1:0,x2:0,y2:0}),s=st(()=>t.connection.isInDanger?Ei.FORBIDDEN:Ei.NONE),r=st(()=>{var u;return(u=e.value.findNodeById(t.connection.from.nodeId))==null?void 0:u.position}),o=st(()=>{var u;return(u=e.value.findNodeById(t.connection.to.nodeId))==null?void 0:u.position}),a=u=>u.node&&u.interface&&u.port?[u.node.offsetLeft+u.interface.offsetLeft+u.port.offsetLeft+u.port.clientWidth/2,u.node.offsetTop+u.interface.offsetTop+u.port.offsetTop+u.port.clientHeight/2]:[0,0],l=()=>{const u=Ua(t.connection.from),d=Ua(t.connection.to);u.node&&d.node&&(n||(n=new ResizeObserver(()=>{l()}),n.observe(u.node),n.observe(d.node)));const[h,f]=a(u),[_,m]=a(d);i.value={x1:h,y1:f,x2:_,y2:m}};return Ws(async()=>{await Ge(),l()}),za(()=>{n&&n.disconnect()}),qn([r,o],()=>l(),{deep:!0}),{d:i,state:s}}});function $kt(t,e,n,i,s,r){const o=ft("connection-view");return A(),xt(o,{x1:t.d.x1,y1:t.d.y1,x2:t.d.x2,y2:t.d.y2,state:t.state},null,8,["x1","y1","x2","y2","state"])}const Wkt=hn(Ykt,[["render",$kt]]);function Su(t){return t.node&&t.interface&&t.port?[t.node.offsetLeft+t.interface.offsetLeft+t.port.offsetLeft+t.port.clientWidth/2,t.node.offsetTop+t.interface.offsetTop+t.port.offsetTop+t.port.clientHeight/2]:[0,0]}const Kkt=_n({components:{"connection-view":ZI},props:{connection:{type:Object,required:!0}},setup(t){const e=st(()=>t.connection?t.connection.status:Ei.NONE);return{d:st(()=>{if(!t.connection)return{input:[0,0],output:[0,0]};const i=Su(Ua(t.connection.from)),s=t.connection.to?Su(Ua(t.connection.to)):[t.connection.mx||i[0],t.connection.my||i[1]];return t.connection.from.isInput?{input:s,output:i}:{input:i,output:s}}),status:e}}});function jkt(t,e,n,i,s,r){const o=ft("connection-view");return A(),xt(o,{x1:t.d.input[0],y1:t.d.input[1],x2:t.d.output[0],y2:t.d.output[1],state:t.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const Qkt=hn(Kkt,[["render",jkt]]),Xkt=_n({setup(){const{viewModel:t}=Oi(),{graph:e}=Ki(),n=mt(null),i=Kd(t.value.settings.sidebar,"width"),s=st(()=>t.value.settings.sidebar.resizable),r=st(()=>{const h=e.value.sidebar.nodeId;return e.value.nodes.find(f=>f.id===h)}),o=st(()=>({width:`${i.value}px`})),a=st(()=>r.value?[...Object.values(r.value.inputs),...Object.values(r.value.outputs)].filter(f=>f.displayInSidebar&&f.component):[]),l=()=>{e.value.sidebar.visible=!1},u=()=>{window.addEventListener("mousemove",d),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",d)},{once:!0})},d=h=>{var f,_;const m=((_=(f=n.value)==null?void 0:f.parentElement)==null?void 0:_.getBoundingClientRect().width)??500;let E=i.value-h.movementX;E<300?E=300:E>.9*m&&(E=.9*m),i.value=E};return{el:n,graph:e,resizable:s,node:r,styles:o,displayedInterfaces:a,startResize:u,close:l}}}),Zkt={class:"__header"},Jkt={class:"__node-name"};function eLt(t,e,n,i,s,r){return A(),M("div",{ref:"el",class:qe(["baklava-sidebar",{"--open":t.graph.sidebar.visible}]),style:en(t.styles)},[t.resizable?(A(),M("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...o)=>t.startResize&&t.startResize(...o))},null,32)):$("",!0),c("div",Zkt,[c("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...o)=>t.close&&t.close(...o))},"×"),c("div",Jkt,[c("b",null,ge(t.node?t.node.title:""),1)])]),(A(!0),M(We,null,ct(t.displayedInterfaces,o=>(A(),M("div",{key:o.id,class:"__interface"},[(A(),xt(Uu(o.component),{modelValue:o.value,"onUpdate:modelValue":a=>o.value=a,node:t.node,intf:o},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const tLt=hn(Xkt,[["render",eLt]]),nLt=_n({__name:"Minimap",setup(t){const{viewModel:e}=Oi(),{graph:n}=Ki(),i=mt(null),s=mt(!1);let r,o=!1,a={x1:0,y1:0,x2:0,y2:0},l;const u=()=>{var x,O;if(!r)return;r.canvas.width=i.value.offsetWidth,r.canvas.height=i.value.offsetHeight;const w=new Map,S=new Map;for(const L of n.value.nodes){const Y=qkt(L),V=(Y==null?void 0:Y.offsetWidth)??0,P=(Y==null?void 0:Y.offsetHeight)??0,X=((x=L.position)==null?void 0:x.x)??0,W=((O=L.position)==null?void 0:O.y)??0;w.set(L,{x1:X,y1:W,x2:X+V,y2:W+P}),S.set(L,Y)}const R={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const L of w.values())L.x1R.x2&&(R.x2=L.x2),L.y2>R.y2&&(R.y2=L.y2);const U=50;R.x1-=U,R.y1-=U,R.x2+=U,R.y2+=U,a=R;const F=r.canvas.width/r.canvas.height,Q=(a.x2-a.x1)/(a.y2-a.y1);if(F>Q){const L=(F-Q)*(a.y2-a.y1)*.5;a.x1-=L,a.x2+=L}else{const L=a.x2-a.x1,Y=a.y2-a.y1,V=(L-F*Y)/F*.5;a.y1-=V,a.y2+=V}r.clearRect(0,0,r.canvas.width,r.canvas.height),r.strokeStyle="white";for(const L of n.value.connections){const[Y,V]=Su(Ua(L.from)),[P,X]=Su(Ua(L.to)),[W,Z]=d(Y,V),[ae,ie]=d(P,X);if(r.beginPath(),r.moveTo(W,Z),e.value.settings.useStraightConnections)r.lineTo(ae,ie);else{const ee=.3*Math.abs(W-ae);r.bezierCurveTo(W+ee,Z,ae-ee,ie,ae,ie)}r.stroke()}r.strokeStyle="lightgray";for(const[L,Y]of w.entries()){const[V,P]=d(Y.x1,Y.y1),[X,W]=d(Y.x2,Y.y2);r.fillStyle=f(S.get(L)),r.beginPath(),r.rect(V,P,X-V,W-P),r.fill(),r.stroke()}if(s.value){const L=m(),[Y,V]=d(L.x1,L.y1),[P,X]=d(L.x2,L.y2);r.fillStyle="rgba(255, 255, 255, 0.2)",r.fillRect(Y,V,P-Y,X-V)}},d=(x,O)=>[(x-a.x1)/(a.x2-a.x1)*r.canvas.width,(O-a.y1)/(a.y2-a.y1)*r.canvas.height],h=(x,O)=>[x*(a.x2-a.x1)/r.canvas.width+a.x1,O*(a.y2-a.y1)/r.canvas.height+a.y1],f=x=>{if(x){const O=x.querySelector(".__content");if(O){const S=_(O);if(S)return S}const w=_(x);if(w)return w}return"gray"},_=x=>{const O=getComputedStyle(x).backgroundColor;if(O&&O!=="rgba(0, 0, 0, 0)")return O},m=()=>{const x=i.value.parentElement.offsetWidth,O=i.value.parentElement.offsetHeight,w=x/n.value.scaling-n.value.panning.x,S=O/n.value.scaling-n.value.panning.y;return{x1:-n.value.panning.x,y1:-n.value.panning.y,x2:w,y2:S}},E=x=>{x.button===0&&(o=!0,b(x))},b=x=>{if(o){const[O,w]=h(x.offsetX,x.offsetY),S=m(),R=(S.x2-S.x1)/2,U=(S.y2-S.y1)/2;n.value.panning.x=-(O-R),n.value.panning.y=-(w-U)}},g=()=>{o=!1},y=()=>{s.value=!0},v=()=>{s.value=!1,g()};qn([s,n.value.panning,()=>n.value.scaling,()=>n.value.connections.length],()=>{u()});const T=st(()=>n.value.nodes.map(x=>x.position)),C=st(()=>n.value.nodes.map(x=>x.width));return qn([T,C],()=>{u()},{deep:!0}),Ws(()=>{r=i.value.getContext("2d"),r.imageSmoothingQuality="high",u(),l=setInterval(u,500)}),za(()=>{clearInterval(l)}),(x,O)=>(A(),M("canvas",{ref_key:"canvas",ref:i,class:"baklava-minimap",onMouseenter:y,onMouseleave:v,onMousedown:Te(E,["self"]),onMousemove:Te(b,["self"]),onMouseup:g},null,544))}}),iLt=_n({components:{ContextMenu:hy,VerticalDots:XI},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(t){const{viewModel:e}=Oi(),{switchGraph:n}=Ki(),i=mt(!1),s=st(()=>t.type.startsWith(cc));return{showContextMenu:i,hasContextMenu:s,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{i.value=!0},onContextMenuClick:l=>{const u=t.type.substring(cc.length),d=e.value.editor.graphTemplates.find(h=>h.id===u);if(d)switch(l){case"editSubgraph":n(d);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(d);break}}}}}),sLt=["data-node-type"],rLt={class:"__title"},oLt={class:"__title-label"},aLt={key:0,class:"__menu"};function lLt(t,e,n,i,s,r){const o=ft("vertical-dots"),a=ft("context-menu");return A(),M("div",{class:"baklava-node --palette","data-node-type":t.type},[c("div",rLt,[c("div",oLt,ge(t.title),1),t.hasContextMenu?(A(),M("div",aLt,[Re(o,{class:"--clickable",onPointerdown:e[0]||(e[0]=Te(()=>{},["stop","prevent"])),onClick:Te(t.openContextMenu,["stop","prevent"])},null,8,["onClick"]),Re(a,{modelValue:t.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=l=>t.showContextMenu=l),x:-100,y:0,items:t.contextMenuItems,onClick:t.onContextMenuClick,onPointerdown:e[2]||(e[2]=Te(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):$("",!0)])],8,sLt)}const Gw=hn(iLt,[["render",lLt]]),cLt={class:"baklava-node-palette"},dLt={key:0},uLt=_n({__name:"NodePalette",setup(t){const{viewModel:e}=Oi(),{x:n,y:i}=bkt(),{transform:s}=$I(),r=YI(e),o=Vi("editorEl"),a=mt(null),l=st(()=>{if(!a.value||!(o!=null&&o.value))return{};const{left:d,top:h}=o.value.getBoundingClientRect();return{top:`${i.value-h}px`,left:`${n.value-d}px`}}),u=(d,h)=>{a.value={type:d,nodeInformation:h};const f=()=>{const _=ei(new h.type);e.value.displayedGraph.addNode(_);const m=o.value.getBoundingClientRect(),[E,b]=s(n.value-m.left,i.value-m.top);_.position.x=E,_.position.y=b,a.value=null,document.removeEventListener("pointerup",f)};document.addEventListener("pointerup",f)};return(d,h)=>(A(),M(We,null,[c("div",cLt,[(A(!0),M(We,null,ct(yt(r),f=>(A(),M("section",{key:f.name},[f.name!=="default"?(A(),M("h1",dLt,ge(f.name),1)):$("",!0),(A(!0),M(We,null,ct(f.nodeTypes,(_,m)=>(A(),xt(Gw,{key:m,type:m,title:_.title,onPointerdown:E=>u(m,_)},null,8,["type","title","onPointerdown"]))),128))]))),128))]),Re(cs,{name:"fade"},{default:$e(()=>[a.value?(A(),M("div",{key:0,class:"baklava-dragged-node",style:en(l.value)},[Re(Gw,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):$("",!0)]),_:1})],64))}});let Rd;const pLt=new Uint8Array(16);function _Lt(){if(!Rd&&(Rd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rd(pLt)}const wn=[];for(let t=0;t<256;++t)wn.push((t+256).toString(16).slice(1));function hLt(t,e=0){return wn[t[e+0]]+wn[t[e+1]]+wn[t[e+2]]+wn[t[e+3]]+"-"+wn[t[e+4]]+wn[t[e+5]]+"-"+wn[t[e+6]]+wn[t[e+7]]+"-"+wn[t[e+8]]+wn[t[e+9]]+"-"+wn[t[e+10]]+wn[t[e+11]]+wn[t[e+12]]+wn[t[e+13]]+wn[t[e+14]]+wn[t[e+15]]}const fLt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Vw={randomUUID:fLt};function Tu(t,e,n){if(Vw.randomUUID&&!e&&!t)return Vw.randomUUID();t=t||{};const i=t.random||(t.rng||_Lt)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){n=n||0;for(let s=0;s<16;++s)e[n+s]=i[s];return e}return hLt(i)}const dc="SAVE_SUBGRAPH";function mLt(t,e){const n=()=>{const i=t.value;if(!i.template)throw new Error("Graph template property not set");i.template.update(i.save()),i.template.panning=i.panning,i.template.scaling=i.scaling};e.registerCommand(dc,{canExecute:()=>{var i;return t.value!==((i=t.value.editor)==null?void 0:i.graph)},execute:n})}const gLt={},bLt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ELt=c("polyline",{points:"6 9 12 15 18 9"},null,-1),yLt=[ELt];function vLt(t,e){return A(),M("svg",bLt,yLt)}const SLt=hn(gLt,[["render",vLt]]),TLt=_n({components:{"i-arrow":SLt},props:{intf:{type:Object,required:!0}},setup(t){const e=mt(null),n=mt(!1),i=st(()=>t.intf.items.find(o=>typeof o=="string"?o===t.intf.value:o.value===t.intf.value)),s=st(()=>i.value?typeof i.value=="string"?i.value:i.value.text:""),r=o=>{t.intf.value=typeof o=="string"?o:o.value};return jI(e,()=>{n.value=!1}),{el:e,open:n,selectedItem:i,selectedText:s,setSelected:r}}}),xLt=["title"],CLt={class:"__selected"},wLt={class:"__text"},RLt={class:"__icon"},ALt={class:"__dropdown"},NLt={class:"item --header"},OLt=["onClick"];function ILt(t,e,n,i,s,r){const o=ft("i-arrow");return A(),M("div",{ref:"el",class:qe(["baklava-select",{"--open":t.open}]),title:t.intf.name,onClick:e[0]||(e[0]=a=>t.open=!t.open)},[c("div",CLt,[c("div",wLt,ge(t.selectedText),1),c("div",RLt,[Re(o)])]),Re(cs,{name:"slide-fade"},{default:$e(()=>[z(c("div",ALt,[c("div",NLt,ge(t.intf.name),1),(A(!0),M(We,null,ct(t.intf.items,(a,l)=>(A(),M("div",{key:l,class:qe(["item",{"--active":a===t.selectedItem}]),onClick:u=>t.setSelected(a)},ge(typeof a=="string"?a:a.text),11,OLt))),128))],512),[[Mt,t.open]])]),_:1})],10,xLt)}const MLt=hn(TLt,[["render",ILt]]);class DLt extends nn{constructor(e,n,i){super(e,n),this.component=uc(MLt),this.items=i}}const kLt=_n({props:{intf:{type:Object,required:!0}}});function LLt(t,e,n,i,s,r){return A(),M("div",null,ge(t.intf.value),1)}const PLt=hn(kLt,[["render",LLt]]);class ULt extends nn{constructor(e,n){super(e,n),this.component=uc(PLt),this.setPort(!1)}}const FLt=_n({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){return{v:st({get:()=>t.modelValue,set:i=>{e("update:modelValue",i)}})}}}),BLt=["placeholder","title"];function GLt(t,e,n,i,s,r){return A(),M("div",null,[z(c("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>t.v=o),type:"text",class:"baklava-input",placeholder:t.intf.name,title:t.intf.name},null,8,BLt),[[Oe,t.v]])])}const VLt=hn(FLt,[["render",GLt]]);class Cc extends nn{constructor(){super(...arguments),this.component=uc(VLt)}}class JI extends BI{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new Cc("Name","Input").setPort(!1)},this.outputs={placeholder:new nn("Connection",void 0)}}}class eM extends GI{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new Cc("Name","Output").setPort(!1),placeholder:new nn("Connection",void 0)},this.outputs={output:new nn("Output",void 0).setHidden(!0)}}}const tM="CREATE_SUBGRAPH",zw=[ka,La];function zLt(t,e,n){const i=()=>t.value.selectedNodes.filter(r=>!zw.includes(r.type)).length>0,s=()=>{const{viewModel:r}=Oi(),o=t.value,a=t.value.editor;if(o.selectedNodes.length===0)return;const l=o.selectedNodes.filter(S=>!zw.includes(S.type)),u=l.flatMap(S=>Object.values(S.inputs)),d=l.flatMap(S=>Object.values(S.outputs)),h=o.connections.filter(S=>!d.includes(S.from)&&u.includes(S.to)),f=o.connections.filter(S=>d.includes(S.from)&&!u.includes(S.to)),_=o.connections.filter(S=>d.includes(S.from)&&u.includes(S.to)),m=l.map(S=>S.save()),E=_.map(S=>({id:S.id,from:S.from.id,to:S.to.id})),b=new Map,{xLeft:g,xRight:y,yTop:v}=HLt(l);console.log(g,y,v);for(const[S,R]of h.entries()){const U=new JI;U.inputs.name.value=R.to.name,m.push({...U.save(),position:{x:y-r.value.settings.nodes.defaultWidth-100,y:v+S*200}}),E.push({id:Tu(),from:U.outputs.placeholder.id,to:R.to.id}),b.set(R.to.id,U.graphInterfaceId)}for(const[S,R]of f.entries()){const U=new eM;U.inputs.name.value=R.from.name,m.push({...U.save(),position:{x:g+100,y:v+S*200}}),E.push({id:Tu(),from:R.from.id,to:U.inputs.placeholder.id}),b.set(R.from.id,U.graphInterfaceId)}const T=ei(new fp({connections:E,nodes:m,inputs:[],outputs:[]},a));a.addGraphTemplate(T);const C=a.nodeTypes.get(Pa(T));if(!C)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");const x=ei(new C.type);o.addNode(x);const O=Math.round(l.map(S=>S.position.x).reduce((S,R)=>S+R,0)/l.length),w=Math.round(l.map(S=>S.position.y).reduce((S,R)=>S+R,0)/l.length);x.position.x=O,x.position.y=w,h.forEach(S=>{o.removeConnection(S),o.addConnection(S.from,x.inputs[b.get(S.to.id)])}),f.forEach(S=>{o.removeConnection(S),o.addConnection(x.outputs[b.get(S.from.id)],S.to)}),l.forEach(S=>o.removeNode(S)),e.canExecuteCommand(dc)&&e.executeCommand(dc),n(T),t.value.panning={...o.panning},t.value.scaling=o.scaling};e.registerCommand(tM,{canExecute:i,execute:s})}function HLt(t){const e=t.reduce((s,r)=>{const o=r.position.x;return o{const o=r.position.y;return o{const o=r.position.x+r.width;return o>s?o:s},-1/0),xRight:e,yTop:n}}const Hw="DELETE_NODES";function qLt(t,e){e.registerCommand(Hw,{canExecute:()=>t.value.selectedNodes.length>0,execute(){t.value.selectedNodes.forEach(n=>t.value.removeNode(n))}}),e.registerHotkey(["Delete"],Hw)}const nM="SWITCH_TO_MAIN_GRAPH";function YLt(t,e,n){e.registerCommand(nM,{canExecute:()=>t.value!==t.value.editor.graph,execute:()=>{e.executeCommand(dc),n(t.value.editor.graph)}})}function $Lt(t,e,n){qLt(t,e),zLt(t,e,n),mLt(t,e),YLt(t,e,n)}class qw{constructor(e,n){this.type=e,e==="addNode"?this.nodeId=n:this.nodeState=n}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const n=e.editor.nodeTypes.get(this.nodeState.type);if(!n)return;const i=new n.type;e.addNode(i),i.load(this.nodeState),this.nodeId=i.id}removeNode(e){const n=e.nodes.find(i=>i.id===this.nodeId);n&&(this.nodeState=n.save(),e.removeNode(n))}}class Yw{constructor(e,n){if(this.type=e,e==="addConnection")this.connectionId=n;else{const i=n;this.connectionState={id:i.id,from:i.from.id,to:i.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const n=e.findNodeInterface(this.connectionState.from),i=e.findNodeInterface(this.connectionState.to);!n||!i||e.addConnection(n,i)}removeConnection(e){const n=e.connections.find(i=>i.id===this.connectionId);n&&(this.connectionState={id:n.id,from:n.from.id,to:n.to.id},e.removeConnection(n))}}class WLt{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let n=this.steps.length-1;n>=0;n--)this.steps[n].undo(e)}redo(e){for(let n=0;n{if(!r.value)if(a.value)l.value.push(b);else for(o.value!==s.value.length-1&&(s.value=s.value.slice(0,o.value+1)),s.value.push(b),o.value++;s.value.length>i.value;)s.value.shift()},d=()=>{a.value=!0},h=()=>{a.value=!1,l.value.length>0&&(u(new WLt(l.value)),l.value=[])},f=()=>s.value.length!==0&&o.value!==-1,_=()=>{f()&&(r.value=!0,s.value[o.value--].undo(t.value),r.value=!1)},m=()=>s.value.length!==0&&o.value{m()&&(r.value=!0,s.value[++o.value].redo(t.value),r.value=!1)};return qn(t,(b,g)=>{g&&(g.events.addNode.unsubscribe(n),g.events.removeNode.unsubscribe(n),g.events.addConnection.unsubscribe(n),g.events.removeConnection.unsubscribe(n)),b&&(b.events.addNode.subscribe(n,y=>{u(new qw("addNode",y.id))}),b.events.removeNode.subscribe(n,y=>{u(new qw("removeNode",y.save()))}),b.events.addConnection.subscribe(n,y=>{u(new Yw("addConnection",y.id))}),b.events.removeConnection.subscribe(n,y=>{u(new Yw("removeConnection",y))}))},{immediate:!0}),e.registerCommand(vb,{canExecute:f,execute:_}),e.registerCommand(Sb,{canExecute:m,execute:E}),e.registerCommand(iM,{canExecute:()=>!a.value,execute:d}),e.registerCommand(sM,{canExecute:()=>a.value,execute:h}),e.registerHotkey(["Control","z"],vb),e.registerHotkey(["Control","y"],Sb),ei({maxSteps:i})}const Tb="COPY",xb="PASTE",jLt="CLEAR_CLIPBOARD";function QLt(t,e,n){const i=Symbol("ClipboardToken"),s=mt(""),r=mt(""),o=st(()=>!s.value),a=()=>{s.value="",r.value=""},l=()=>{const h=t.value.selectedNodes.flatMap(_=>[...Object.values(_.inputs),...Object.values(_.outputs)]),f=t.value.connections.filter(_=>h.includes(_.from)||h.includes(_.to)).map(_=>({from:_.from.id,to:_.to.id}));r.value=JSON.stringify(f),s.value=JSON.stringify(t.value.selectedNodes.map(_=>_.save()))},u=(h,f,_)=>{for(const m of h){let E;if((!_||_==="input")&&(E=Object.values(m.inputs).find(b=>b.id===f)),!E&&(!_||_==="output")&&(E=Object.values(m.outputs).find(b=>b.id===f)),E)return E}},d=()=>{if(o.value)return;const h=new Map,f=JSON.parse(s.value),_=JSON.parse(r.value),m=[],E=[],b=t.value;n.executeCommand(iM);for(const g of f){const y=e.value.nodeTypes.get(g.type);if(!y){console.warn(`Node type ${g.type} not registered`);return}const v=new y.type,T=v.id;m.push(v),v.hooks.beforeLoad.subscribe(i,C=>{const x=C;return x.position&&(x.position.x+=100,x.position.y+=100),v.hooks.beforeLoad.unsubscribe(i),x}),b.addNode(v),v.load({...g,id:T}),v.id=T,h.set(g.id,T);for(const C of Object.values(v.inputs)){const x=Tu();h.set(C.id,x),C.id=x}for(const C of Object.values(v.outputs)){const x=Tu();h.set(C.id,x),C.id=x}}for(const g of _){const y=u(m,h.get(g.from),"output"),v=u(m,h.get(g.to),"input");if(!y||!v)continue;const T=b.addConnection(y,v);T&&E.push(T)}return t.value.selectedNodes=m,n.executeCommand(sM),{newNodes:m,newConnections:E}};return n.registerCommand(Tb,{canExecute:()=>t.value.selectedNodes.length>0,execute:l}),n.registerHotkey(["Control","c"],Tb),n.registerCommand(xb,{canExecute:()=>!o.value,execute:d}),n.registerHotkey(["Control","v"],xb),n.registerCommand(jLt,{canExecute:()=>!0,execute:a}),ei({isEmpty:o})}const XLt="OPEN_SIDEBAR";function ZLt(t,e){e.registerCommand(XLt,{execute:n=>{t.value.sidebar.nodeId=n,t.value.sidebar.visible=!0},canExecute:()=>!0})}function JLt(t,e){ZLt(t,e)}const ePt={},tPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},nPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),iPt=c("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),sPt=[nPt,iPt];function rPt(t,e){return A(),M("svg",tPt,sPt)}const oPt=hn(ePt,[["render",rPt]]),aPt={},lPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},cPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),dPt=c("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),uPt=[cPt,dPt];function pPt(t,e){return A(),M("svg",lPt,uPt)}const _Pt=hn(aPt,[["render",pPt]]),hPt={},fPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},mPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),gPt=c("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),bPt=c("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),EPt=c("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),yPt=[mPt,gPt,bPt,EPt];function vPt(t,e){return A(),M("svg",fPt,yPt)}const SPt=hn(hPt,[["render",vPt]]),TPt={},xPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},CPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),wPt=c("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),RPt=c("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),APt=[CPt,wPt,RPt];function NPt(t,e){return A(),M("svg",xPt,APt)}const OPt=hn(TPt,[["render",NPt]]),IPt={},MPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},DPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),kPt=c("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),LPt=c("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),PPt=[DPt,kPt,LPt];function UPt(t,e){return A(),M("svg",MPt,PPt)}const FPt=hn(IPt,[["render",UPt]]),BPt={},GPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},VPt=c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),zPt=c("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),HPt=c("circle",{cx:"12",cy:"14",r:"2"},null,-1),qPt=c("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),YPt=[VPt,zPt,HPt,qPt];function $Pt(t,e){return A(),M("svg",GPt,YPt)}const WPt=hn(BPt,[["render",$Pt]]),KPt={},jPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},QPt=zb('',6),XPt=[QPt];function ZPt(t,e){return A(),M("svg",jPt,XPt)}const JPt=hn(KPt,[["render",ZPt]]),eUt=_n({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:t}=Oi();return{viewModel:t}}}),tUt=["disabled","title"];function nUt(t,e,n,i,s,r){return A(),M("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!t.viewModel.commandHandler.canExecuteCommand(t.command),title:t.title,onClick:e[0]||(e[0]=o=>t.viewModel.commandHandler.executeCommand(t.command))},[t.icon?(A(),xt(Uu(t.icon),{key:0})):(A(),M(We,{key:1},[Je(ge(t.title),1)],64))],8,tUt)}const iUt=hn(eUt,[["render",nUt]]),sUt=_n({components:{ToolbarButton:iUt},setup(){const{viewModel:t}=Oi();return{isSubgraph:st(()=>t.value.displayedGraph!==t.value.editor.graph),commands:[{command:Tb,title:"Copy",icon:FPt},{command:xb,title:"Paste",icon:OPt},{command:vb,title:"Undo",icon:oPt},{command:Sb,title:"Redo",icon:_Pt},{command:tM,title:"Create Subgraph",icon:JPt}],subgraphCommands:[{command:dc,title:"Save Subgraph",icon:WPt},{command:nM,title:"Back to Main Graph",icon:SPt}]}}}),rUt={class:"baklava-toolbar"};function oUt(t,e,n,i,s,r){const o=ft("toolbar-button");return A(),M("div",rUt,[(A(!0),M(We,null,ct(t.commands,a=>(A(),xt(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),t.isSubgraph?(A(!0),M(We,{key:0},ct(t.subgraphCommands,a=>(A(),xt(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):$("",!0)])}const aUt=hn(sUt,[["render",oUt]]),lUt={class:"connections-container"},cUt=_n({__name:"Editor",props:{viewModel:{}},setup(t){const e=t,n=Symbol("EditorToken"),i=Kd(e,"viewModel");ikt(i);const s=mt(null);ra("editorEl",s);const r=st(()=>e.viewModel.displayedGraph.nodes),o=st(()=>e.viewModel.displayedGraph.nodes.map(O=>HI(Kd(O,"position")))),a=st(()=>e.viewModel.displayedGraph.connections),l=st(()=>e.viewModel.displayedGraph.selectedNodes),u=skt(),d=rkt(),h=okt(i),f=st(()=>({...u.styles.value})),_=mt(0);e.viewModel.editor.hooks.load.subscribe(n,O=>(_.value++,O));const m=O=>{u.onPointerMove(O),d.onMouseMove(O)},E=O=>{O.button===0&&(O.target===s.value&&(T(),u.onPointerDown(O)),d.onMouseDown())},b=O=>{u.onPointerUp(O),d.onMouseUp()},g=O=>{O.key==="Tab"&&O.preventDefault(),e.viewModel.commandHandler.handleKeyDown(O)},y=O=>{e.viewModel.commandHandler.handleKeyUp(O)},v=O=>{["Control","Shift"].some(w=>e.viewModel.commandHandler.pressedKeys.includes(w))||T(),e.viewModel.displayedGraph.selectedNodes.push(O)},T=()=>{e.viewModel.displayedGraph.selectedNodes=[]},C=O=>{for(const w of e.viewModel.displayedGraph.selectedNodes){const S=r.value.indexOf(w),R=o.value[S];R.onPointerDown(O),document.addEventListener("pointermove",R.onPointerMove)}document.addEventListener("pointerup",x)},x=()=>{for(const O of e.viewModel.displayedGraph.selectedNodes){const w=r.value.indexOf(O),S=o.value[w];S.onPointerUp(),document.removeEventListener("pointermove",S.onPointerMove)}document.removeEventListener("pointerup",x)};return(O,w)=>(A(),M("div",{ref_key:"el",ref:s,tabindex:"-1",class:qe(["baklava-editor",{"baklava-ignore-mouse":!!yt(d).temporaryConnection.value||yt(u).dragging.value,"--temporary-connection":!!yt(d).temporaryConnection.value}]),onPointermove:Te(m,["self"]),onPointerdown:E,onPointerup:b,onWheel:w[1]||(w[1]=Te((...S)=>yt(u).onMouseWheel&&yt(u).onMouseWheel(...S),["self"])),onKeydown:g,onKeyup:y,onContextmenu:w[2]||(w[2]=Te((...S)=>yt(h).open&&yt(h).open(...S),["self","prevent"]))},[kn(O.$slots,"background",{},()=>[Re(ckt)]),kn(O.$slots,"toolbar",{},()=>[Re(aUt)]),kn(O.$slots,"palette",{},()=>[Re(uLt)]),(A(),M("svg",lUt,[(A(!0),M(We,null,ct(a.value,S=>(A(),M("g",{key:S.id+_.value.toString()},[kn(O.$slots,"connection",{connection:S},()=>[Re(Wkt,{connection:S},null,8,["connection"])])]))),128)),kn(O.$slots,"temporaryConnection",{temporaryConnection:yt(d).temporaryConnection.value},()=>[yt(d).temporaryConnection.value?(A(),xt(Qkt,{key:0,connection:yt(d).temporaryConnection.value},null,8,["connection"])):$("",!0)])])),c("div",{class:"node-container",style:en(f.value)},[Re(os,{name:"fade"},{default:$e(()=>[(A(!0),M(We,null,ct(r.value,(S,R)=>kn(O.$slots,"node",{key:S.id+_.value.toString(),node:S,selected:l.value.includes(S),dragging:o.value[R].dragging.value,onSelect:U=>v(S),onStartDrag:C},()=>[Re(Gkt,{node:S,selected:l.value.includes(S),dragging:o.value[R].dragging.value,onSelect:U=>v(S),onStartDrag:C},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),kn(O.$slots,"sidebar",{},()=>[Re(tLt)]),kn(O.$slots,"minimap",{},()=>[O.viewModel.settings.enableMinimap?(A(),xt(nLt,{key:0})):$("",!0)]),kn(O.$slots,"contextMenu",{contextMenu:yt(h)},()=>[O.viewModel.settings.contextMenu.enabled?(A(),xt(hy,{key:0,modelValue:yt(h).show.value,"onUpdate:modelValue":w[0]||(w[0]=S=>yt(h).show.value=S),items:yt(h).items.value,x:yt(h).x.value,y:yt(h).y.value,onClick:yt(h).onClick},null,8,["modelValue","items","x","y","onClick"])):$("",!0)])],34))}}),dUt=["INPUT","TEXTAREA","SELECT"];function uUt(t){const e=mt([]),n=mt([]);return{pressedKeys:e,handleKeyDown:o=>{var a;e.value.includes(o.key)||e.value.push(o.key),!dUt.includes(((a=document.activeElement)==null?void 0:a.tagName)??"")&&n.value.forEach(l=>{l.keys.every(u=>e.value.includes(u))&&t(l.commandName)})},handleKeyUp:o=>{const a=e.value.indexOf(o.key);a>=0&&e.value.splice(a,1)},registerHotkey:(o,a)=>{n.value.push({keys:o,commandName:a})}}}const pUt=()=>{const t=mt(new Map),e=(r,o)=>{if(t.value.has(r))throw new Error(`Command "${r}" already exists`);t.value.set(r,o)},n=(r,o=!1,...a)=>{if(!t.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return}return t.value.get(r).execute(...a)},i=(r,o=!1,...a)=>{if(!t.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return!1}return t.value.get(r).canExecute(a)},s=uUt(n);return ei({registerCommand:e,executeCommand:n,canExecuteCommand:i,...s})},_Ut=t=>!(t instanceof xc);function hUt(t,e){return{switchGraph:i=>{let s;if(_Ut(i))s=new xc(t.value),i.createGraph(s);else{if(i!==t.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");s=i}e.value&&e.value!==t.value.graph&&e.value.destroy(),s.panning=s.panning??i.panning??{x:0,y:0},s.scaling=s.scaling??i.scaling??1,s.selectedNodes=s.selectedNodes??[],s.sidebar=s.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=s}}}function fUt(t,e){t.position=t.position??{x:0,y:0},t.disablePointerEvents=!1,t.twoColumn=t.twoColumn??!1,t.width=t.width??e.defaultWidth}const mUt=()=>({useStraightConnections:!1,enableMinimap:!1,background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1},contextMenu:{enabled:!0,additionalItems:[]}});function gUt(t){const e=mt(t??new XDt),n=Symbol("ViewModelToken"),i=mt(null),s=a2(i),{switchGraph:r}=hUt(e,i),o=st(()=>s.value&&s.value!==e.value.graph),a=ei(mUt()),l=pUt(),u=KLt(s,l),d=QLt(s,e,l),h={renderNode:new li(null),renderInterface:new li(null)};return $Lt(s,l,r),JLt(s,l),qn(e,(f,_)=>{_&&(_.events.registerGraph.unsubscribe(n),_.graphEvents.beforeAddNode.unsubscribe(n),f.nodeHooks.beforeLoad.unsubscribe(n),f.nodeHooks.afterSave.unsubscribe(n),f.graphTemplateHooks.beforeLoad.unsubscribe(n),f.graphTemplateHooks.afterSave.unsubscribe(n),f.graph.hooks.load.unsubscribe(n),f.graph.hooks.save.unsubscribe(n)),f&&(f.nodeHooks.beforeLoad.subscribe(n,(m,E)=>(E.position=m.position??{x:0,y:0},E.width=m.width??a.nodes.defaultWidth,E.twoColumn=m.twoColumn??!1,m)),f.nodeHooks.afterSave.subscribe(n,(m,E)=>(m.position=E.position,m.width=E.width,m.twoColumn=E.twoColumn,m)),f.graphTemplateHooks.beforeLoad.subscribe(n,(m,E)=>(E.panning=m.panning,E.scaling=m.scaling,m)),f.graphTemplateHooks.afterSave.subscribe(n,(m,E)=>(m.panning=E.panning,m.scaling=E.scaling,m)),f.graph.hooks.load.subscribe(n,(m,E)=>(E.panning=m.panning,E.scaling=m.scaling,m)),f.graph.hooks.save.subscribe(n,(m,E)=>(m.panning=E.panning,m.scaling=E.scaling,m)),f.graphEvents.beforeAddNode.subscribe(n,m=>fUt(m,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(JI,{category:"Subgraphs"}),e.value.registerNodeType(eM,{category:"Subgraphs"}),r(f.graph))},{immediate:!0}),ei({editor:e,displayedGraph:s,isSubgraph:o,settings:a,commandHandler:l,history:u,clipboard:d,hooks:h,switchGraph:r})}const bUt=el({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new nn("Request",""),agent_name:()=>new DLt("Personality","",xu.state.config.personalities).setPort(!1)},outputs:{response:()=>new nn("Response","")},async calculate({request:t}){console.log(xu.state.config.personalities);let e="";try{e=(await Ce.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),EUt=el({type:"RAGNode",title:"RAG",inputs:{request:()=>new nn("Prompt",""),document_path:()=>new Cc("Document path","").setPort(!1)},outputs:{prompt:()=>new nn("Prompt with Data","")},async calculate({request:t,document_path:e}){let n="";try{n=(await Ce.get("/rag",{params:{text:t,doc_path:e}})).data}catch(i){console.error(i)}return{response:n}}}),$w=el({type:"Task",title:"Task",inputs:{description:()=>new Cc("Task description","").setPort(!1)},outputs:{prompt:()=>new nn("Prompt")},calculate({description:t}){return{prompt:t}}}),Ww=el({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new nn("Input","")},outputs:{response:()=>new ULt("Text","")},async calculate({request:t}){}}),Kw=el({type:"LLMNode",title:"LLM",inputs:{request:()=>new nn("Request","")},outputs:{response:()=>new nn("Response","")},async calculate({request:t}){console.log(xu.state.config.personalities);let e="";try{e=(await Ce.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),yUt=el({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new nn("Question",""),outputs:()=>new Cc("choices, one per line","","").setPort(!1)},outputs:{response:()=>new nn("Response","")}}),vUt=_n({components:{"baklava-editor":cUt},setup(){const t=gUt(),e=new nkt(t.editor);t.editor.registerNodeType(bUt),t.editor.registerNodeType($w),t.editor.registerNodeType(EUt),t.editor.registerNodeType(Ww),t.editor.registerNodeType(Kw),t.editor.registerNodeType(yUt);const n=Symbol();e.events.afterRun.subscribe(n,a=>{e.pause(),ZDt(a,t.editor),e.resume()}),e.start();function i(a,l,u){const d=new a;return t.displayedGraph.addNode(d),d.position.x=l,d.position.y=u,d}const s=i($w,300,140),r=i(Kw,550,140),o=i(Ww,850,140);return t.displayedGraph.addConnection(s.outputs.prompt,r.inputs.request),t.displayedGraph.addConnection(r.outputs.response,o.inputs.text2display),{baklava:t,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),SUt={style:{width:"100vw",height:"100vh"}};function TUt(t,e,n,i,s,r){const o=ft("baklava-editor");return A(),M("div",SUt,[Re(o,{"view-model":t.baklava},null,8,["view-model"]),c("button",{onClick:e[0]||(e[0]=(...a)=>t.saveGraph&&t.saveGraph(...a))},"Save Graph"),c("button",{onClick:e[1]||(e[1]=(...a)=>t.loadGraph&&t.loadGraph(...a))},"Load Graph")])}const xUt=bt(vUt,[["render",TUt]]),CUt={},wUt={style:{width:"100vw",height:"100vh"}},RUt=["src"];function AUt(t,e,n,i,s,r){return A(),M("div",wUt,[c("iframe",{src:t.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,RUt)])}const NUt=bt(CUt,[["render",AUt]]),OUt={},IUt={style:{width:"100vw",height:"100vh"}},MUt=["src"];function DUt(t,e,n,i,s,r){return A(),M("div",IUt,[c("iframe",{src:t.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,MUt)])}const kUt=bt(OUt,[["render",DUt]]),LUt=$P({history:dP("/"),routes:[{path:"/auto_sd_view/",name:"AutoSD",component:kUt},{path:"/autosd_view/",name:"ComfyUI",component:NUt},{path:"/playground/",name:"playground",component:Ntt},{path:"/extensions/",name:"extensions",component:Gtt},{path:"/help/",name:"help",component:ont},{path:"/settings/",name:"settings",component:iEt},{path:"/training/",name:"training",component:xEt},{path:"/quantizing/",name:"quantizing",component:DEt},{path:"/",name:"discussions",component:Nwt},{path:"/",name:"interactive",component:qDt},{path:"/",name:"nodes",component:xUt}]});const mp=ZD(NZe);console.log("Loaded main.js");function PUt(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const xu=xk({state(){return{is_rt_on:!1,language:"english",languages:[],currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},posts_headers:{accept:"application/json","Content-Type":"application/json"},client_id:"",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,api_post_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,databases:[]}},mutations:{setisRTOn(t,e){t.is_rt_on=e},setLanguages(t,e){t.languages=e},setLanguage(t,e){t.language=e},setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=e},setIsModelOk(t,e){t.isModelOk=e},setIsGenerating(t,e){t.isGenerating=e},setConfig(t,e){t.config=e},setPersonalities(t,e){t.personalities=e},setMountedPers(t,e){t.mountedPers=e},setMountedPersArr(t,e){t.mountedPersArr=e},setbindingsZoo(t,e){t.bindingsZoo=e},setModelsArr(t,e){t.modelsArr=e},setselectedModel(t,e){t.selectedModel=e},setDiskUsage(t,e){t.diskUsage=e},setRamUsage(t,e){t.ramUsage=e},setVramUsage(t,e){t.vramUsage=e},setModelsZoo(t,e){t.modelsZoo=e},setCurrentBinding(t,e){t.currentBinding=e},setCurrentModel(t,e){t.currentModel=e},setDatabases(t,e){t.databases=e},setTheme(t){this.currentTheme=t}},getters:{getisRTOn(t){return t.is_rt_on},getLanguages(t){return t.languages},getLanguage(t){return t.language},getIsConnected(t){return t.isConnected},getIsModelOk(t){return t.isModelOk},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getMountedPers(t){return t.mountedPers},getbindingsZoo(t){return t.bindingsZoo},getModelsArr(t){return t.modelsArr},getDiskUsage(t){return t.diskUsage},getRamUsage(t){return t.ramUsage},getVramUsage(t){return t.vramUsage},getDatabasesList(t){return t.databases},getModelsZoo(t){return t.modelsZoo},getCyrrentBinding(t){return t.currentBinding},getCurrentModel(t){return t.currentModel}},actions:{async getVersion(){try{let t=await Ce.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data,console.log("version res:",t),console.log("version :",this.state.version))}catch{console.log("Coudln't get version")}},async refreshConfig({commit:t}){console.log("Fetching configuration");try{const e=await ki("get_config");e.active_personality_id<0&&(e.active_personality_id=0);let n=e.personalities[e.active_personality_id].split("/");e.personality_category=n[0],e.personality_folder=n[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),t("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:t}){let e=await ki("list_databases");console.log("databases:",e),t("setDatabases",e)},async fetchisRTOn({commit:t}){console.log("is_rt_on",this.state.client_id);const e=await Ce.get("/is_rt_on");console.log("response",e);const n=e.data.status;console.log("is_rt_on",n),t("setRTOn",n)},async fetchLanguages({commit:t}){console.log("get_personality_languages_list",this.state.client_id);const e=await Ce.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("languages",n),t("setLanguages",n)},async fetchLanguage({commit:t}){console.log("get_personality_language",this.state.client_id);const e=await Ce.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("language",n),t("setLanguage",n)},async changeLanguage({commit:t},e){console.log("Changing language to ",e);let n=await Ce.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await Ce.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("languages",i),t("setLanguages",i),n=await Ce.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const s=n.data;console.log("language",s),t("setLanguage",s),console.log("Language changed successfully:",n.data.message)},async deleteLanguage({commit:t},e){console.log("Deleting ",e);let n=await Ce.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await Ce.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("languages",i),t("setLanguages",i),n=await Ce.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const s=n.data;console.log("language",s),t("setLanguage",s),console.log("Language changed successfully:",n.data.message)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await ki("get_all_personalities"),i=Object.keys(n);console.log("Personalities recovered:"+this.state.config.personalities);for(let s=0;s{let u=!1;for(const h of this.state.config.personalities)if(h.includes(r+"/"+l.folder))if(u=!0,h.includes(":")){const f=h.split(":");l.language=f[1]}else l.language=null;let d={};return d=l,d.category=r,d.full_path=r+"/"+l.folder,d.isMounted=u,d});e.length==0?e=a:e=e.concat(a)}e.sort((s,r)=>s.name.localeCompare(r.name)),t("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:t}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const n=[];for(let i=0;ia.full_path==s||a.full_path==r[0]);if(o>=0){let a=PUt(this.state.personalities[o]);r.length>1&&(a.language=r[1]),a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else n.push(i),console.log("Couldn't load personality : ",s)}for(let i=n.length-1;i>=0;i--)console.log("Removing personality : ",this.state.config.personalities[n[i]]),this.state.config.personalities.splice(n[i],1),this.state.config.active_personality_id>n[i]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e),this.state.mountedPers=this.state.personalities[this.state.personalities.findIndex(i=>i.full_path==this.state.config.personalities[this.state.config.active_personality_id]||i.full_path+":"+i.language==this.state.config.personalities[this.state.config.active_personality_id])]},async refreshBindings({commit:t}){let e=await ki("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(i=>i.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),t("setbindingsZoo",e);const n=e.findIndex(i=>i.name==this.state.config.binding_name);n!=-1&&t("setCurrentBinding",e[n])},async refreshModelsZoo({commit:t}){console.log("Fetching models");const n=(await Ce.get("/get_available_models")).data.filter(i=>i.variants&&i.variants.length>0);console.log(`get_available_models: ${n}`),t("setModelsZoo",n)},async refreshModelStatus({commit:t}){let e=await ki("get_model_status");t("setIsModelOk",e.status)},async refreshModels({commit:t}){console.log("Fetching models");let e=await ki("list_models");console.log(`Found ${e}`);let n=await ki("get_active_model");console.log("Selected model ",n),n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),console.log("setModelsArr",e),console.log("this.state.modelsZoo",this.state.modelsZoo),this.state.modelsZoo.map(s=>{s.isInstalled=e.includes(s.name)}),this.state.installedModels=this.state.modelsZoo.filter(s=>s.isInstalled);const i=this.state.modelsZoo.findIndex(s=>s.name==this.state.config.model_name);i!=-1&&t("setCurrentModel",this.state.modelsZoo[i])},async refreshDiskUsage({commit:t}){this.state.diskUsage=await ki("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await ki("ram_usage")},async refreshVramUsage({commit:t}){const e=await ki("vram_usage"),n=[];if(e.nb_gpus>0){for(let s=0;s License: see project LICENSE Touched: 2022 -*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0;outline:none}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.container{margin:0;padding:0}.link-item{height:25px;margin-top:5px;padding:0 20px;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.link-item-dark{padding:0 20px;color:#f0f8ff;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.nav-ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;height:100%}.nav-li{cursor:pointer;display:flex;align-items:center;padding:5px}.fade-in{animation:fadeInAnimation .5s}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}.bounce-in{animation:bounceInAnimation .5s}.bounce-out{animation:bounceOutAnimation .5s}@keyframes bounceInAnimation{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.shadow-no-bottom{box-shadow:0 -4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}.hovered{transition:transform .3s cubic-bezier(.175,.885,.32,1.275);transform:scale(1.1)}.active{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;pointer-events:all}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:250px;background-color:#fff;z-index:1000;display:none}.settings-button{cursor:pointer;padding:10px;border:1px solid #ddd;border-radius:5px;color:#333;font-size:14px}.settings-button:hover{background-color:#eee}.settings-button:active{background-color:#ddd}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.scrollbar[data-v-b19a05a8]{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);white-space:pre-wrap;overflow-wrap:break-word}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar{width:8px}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:4px}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color)}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.selected-choice{background-color:#bde4ff}.heartbeat-text[data-v-e25208c0]{font-size:24px;animation:pulsate-e25208c0 1.5s infinite}@keyframes pulsate-e25208c0{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-e25208c0],.list-enter-active[data-v-e25208c0],.list-leave-active[data-v-e25208c0]{transition:all .5s ease}.list-enter-from[data-v-e25208c0]{transform:translatey(-30px)}.list-leave-to[data-v-e25208c0]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-e25208c0]{position:absolute}.bounce-enter-active[data-v-e25208c0]{animation:bounce-in-e25208c0 .5s}.bounce-leave-active[data-v-e25208c0]{animation:bounce-in-e25208c0 .5s reverse}@keyframes bounce-in-e25208c0{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-e25208c0]{background-color:#0ff}.hover[data-v-e25208c0]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-e25208c0]{font-weight:700}.collapsible-section{cursor:pointer;margin-bottom:10px;font-weight:700}.collapsible-section:hover{color:#1a202c}.collapsible-section .toggle-icon{margin-right:.25rem}.collapsible-section .toggle-icon i{color:#4a5568}.collapsible-section .toggle-icon i:hover{color:#1a202c}.json-viewer{max-height:300px;max-width:700px;flex:auto;overflow-y:auto;padding:10px;background-color:#f1f1f1;border:1px solid #ccc;border-radius:4px}.json-viewer .toggle-icon{cursor:pointer;margin-right:.25rem}.json-viewer .toggle-icon i{color:#4a5568}.json-viewer .toggle-icon i:hover{color:#1a202c}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}.bounce-enter-active[data-v-d7f8ef94]{animation:bounce-in-d7f8ef94 .5s}.bounce-leave-active[data-v-d7f8ef94]{animation:bounce-in-d7f8ef94 .5s reverse}@keyframes bounce-in-d7f8ef94{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-1a32c141]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-1a32c141]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-1a32c141]{top:calc(-100% - 2rem)}.list-move[data-v-011f8851],.list-enter-active[data-v-011f8851],.list-leave-active[data-v-011f8851]{transition:all .5s ease}.list-enter-from[data-v-011f8851]{transform:translatey(-30px)}.list-leave-to[data-v-011f8851]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-011f8851]{position:absolute}.slide-right-enter-active[data-v-b8e854ae],.slide-right-leave-active[data-v-b8e854ae]{transition:transform .3s ease}.slide-right-enter[data-v-b8e854ae],.slide-right-leave-to[data-v-b8e854ae]{transform:translate(-100%)}.fade-and-fly-enter-active[data-v-b8e854ae]{animation:fade-and-fly-enter-b8e854ae .5s ease}.fade-and-fly-leave-active[data-v-b8e854ae]{animation:fade-and-fly-leave-b8e854ae .5s ease}@keyframes fade-and-fly-enter-b8e854ae{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-b8e854ae{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-b8e854ae],.list-enter-active[data-v-b8e854ae],.list-leave-active[data-v-b8e854ae]{transition:all .5s ease}.list-enter-from[data-v-b8e854ae]{transform:translatey(-30px)}.list-leave-to[data-v-b8e854ae]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-b8e854ae]{position:absolute}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:white;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:PTSans,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1F2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4B5563}.dark input[type=file]::file-selector-button:hover{background:#6B7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6B7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-moz-range-thumb{background:#6B7280}input[type=range]::-moz-range-progress{background:#3F83F8}input[type=range]::-ms-fill-lower{background:#3F83F8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:white;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1C64F2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}html{scroll-behavior:smooth}@font-face{font-family:Roboto;src:url(/assets/Roboto-Regular-7277cfb8.ttf) format("truetype")}@font-face{font-family:PTSans;src:url(/assets/PTSans-Regular-23b91352.ttf) format("truetype")}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1{left:-.25rem}.-left-1\.5{left:-.375rem}.-left-6{left:-1.5rem}.-right-0{right:-0px}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-right-6{right:-1.5rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.-top-2{top:-.5rem}.-top-20{top:-5rem}.-top-6{top:-1.5rem}.-top-9{top:-2.25rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-5{bottom:1.25rem}.bottom-\[60px\]{bottom:60px}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-20{left:5rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1{margin-top:-.25rem;margin-bottom:-.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-6{max-height:1.5rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-\[500px\]{min-height:500px}.min-h-\[900px\]{min-height:900px}.min-h-full{min-height:100%}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[1000px\]{width:1000px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-\[23rem\]{min-width:23rem}.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[23rem\]{max-width:23rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-\[900px\]{max-width:900px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y: -0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\[40px\,1fr\]{grid-template-columns:40px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-discussion{background-color:var(--color-bg-light-discussion)}.bg-bg-light-panel{background-color:var(--color-bg-light-panel)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bg-light-tone{--tw-gradient-from: var(--color-bg-light-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.fill-blue-600{fill:#1c64f2}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-24{padding-top:6rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-sans{font-family:PTSans,Roboto,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[\.82rem\]{font-size:.82rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-dark-text-panel{color:var(--color-dark-text-panel)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.scrollbar{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar{scrollbar-width:auto}.scrollbar::-webkit-scrollbar{display:block;width:var(--scrollbar-width, 16px);height:var(--scrollbar-height, 16px)}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{font-size:36px;font-weight:700}h2{font-size:24px;font-weight:700}h3{font-size:18px;font-weight:700}h4{font-size:18px;font-style:italic}p{font-size:16px;word-wrap:break-word;overflow-wrap:break-word;white-space:normal}ul{list-style-type:disc;margin-left:0}li{list-style-type:disc;margin-left:20px}ol{list-style-type:decimal;margin-left:20px}:root{--color-primary: #0e8ef0;--color-primary-light: #3dabff;--color-secondary: #0fd974;--color-accent: #f0700e;--color-light-text-panel: #ffffff;--color-dark-text-panel: #ffffff;--color-bg-light-panel: #7cb5ec;--color-bg-light: #e2edff;--color-bg-light-tone: #b9d2f7;--color-bg-light-code-block: #cad7ed;--color-bg-light-tone-panel: #8fb5ef;--color-bg-light-discussion: #c5d8f8;--color-bg-light-discussion-odd: #d6e7ff;--color-bg-dark: #132e59;--color-bg-dark-tone: #25477d;--color-bg-dark-tone-panel: #4367a3;--color-bg-dark-code-block: #2254a7;--color-bg-dark-discussion: #435E8A;--color-bg-dark-discussion-odd: #284471}.last\:mb-0:last-child{margin-bottom:0}.last\:\!border-transparent:last-child{border-color:transparent!important}.last\:pb-0:last-child{padding-bottom:0}.odd\:bg-bg-light-tone:nth-child(odd){background-color:var(--color-bg-light-tone)}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.even\:bg-bg-light-tone-panel:nth-child(2n){background-color:var(--color-bg-light-tone-panel)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:-translate-x-12{--tw-translate-x: -3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-y-12{--tw-translate-y: -3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-y-8{--tw-translate-y: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-\[0px\]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-y-\[-50px\]{--tw-translate-y: -50px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:z-50:hover{z-index:50}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-8:hover{--tw-translate-y: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:translate-y-\[-5px\]:hover{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-150:hover{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-95:hover{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{background-color:var(--color-secondary)}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:fill-primary:hover{fill:var(--color-primary)}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}:is(.dark .dark\:divide-gray-700)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}:is(.dark .dark\:border-bg-light){border-color:var(--color-bg-light)}:is(.dark .dark\:border-blue-500){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-500){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-600){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-800){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-900){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}:is(.dark .dark\:border-green-500){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-400){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-500){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-400){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-500){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}:is(.dark .dark\:border-red-500){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}:is(.dark .dark\:border-transparent){border-color:transparent}:is(.dark .dark\:border-yellow-300){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}:is(.dark .dark\:bg-bg-dark){background-color:var(--color-bg-dark)}:is(.dark .dark\:bg-bg-dark-discussion){background-color:var(--color-bg-dark-discussion)}:is(.dark .dark\:bg-bg-dark-tone){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:bg-bg-dark-tone-panel){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:bg-black){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-200){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-500){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-600){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-700){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-800){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-900){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-200){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-300){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-600){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800\/30){background-color:#1f29374d}:is(.dark .dark\:bg-gray-800\/50){background-color:#1f293780}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-200){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-500){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-600){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-800){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-200){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-500){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-700){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-800){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-200){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-600){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-200){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-500){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-600){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-200){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-500){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-600){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-200){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-opacity-70){--tw-bg-opacity: .7}:is(.dark .dark\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\:from-bg-dark){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-bg-dark-tone){--tw-gradient-from: var(--color-bg-dark-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:via-bg-dark){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}:is(.dark .dark\:fill-gray-300){fill:#d1d5db}:is(.dark .dark\:fill-white){fill:#fff}:is(.dark .dark\:text-blue-200){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-800){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}:is(.dark .dark\:text-dark-text-panel){color:var(--color-dark-text-panel)}:is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-100){--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-200){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-500){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-800){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-900){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-500){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-900){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}:is(.dark .dark\:text-light-text-panel){color:var(--color-light-text-panel)}:is(.dark .dark\:text-orange-200){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-400){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-500){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-900){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}:is(.dark .dark\:text-primary){color:var(--color-primary)}:is(.dark .dark\:text-purple-400){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-500){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-900){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-200){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-800){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-900){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-50){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-300){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-500){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-800){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-900){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-gray-400)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:shadow-lg){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-blue-800\/80){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-cyan-800\/80){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-green-800\/80){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-lime-800\/80){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-pink-800\/80){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-purple-800\/80){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-red-800\/80){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-teal-800\/80){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:ring-gray-500){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:ring-offset-gray-700){--tw-ring-offset-color: #374151}:is(.dark .dark\:ring-offset-gray-800){--tw-ring-offset-color: #1F2937}:is(.dark .dark\:scrollbar-track-bg-dark){--scrollbar-track: var(--color-bg-dark) !important}:is(.dark .dark\:scrollbar-track-bg-dark-tone){--scrollbar-track: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone){--scrollbar-thumb: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone-panel){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}:is(.dark .odd\:dark\:bg-bg-dark-tone):nth-child(odd){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n)){background-color:var(--color-bg-dark-discussion-odd)}:is(.dark .dark\:even\:bg-bg-dark-tone-panel:nth-child(2n)){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60){background-color:#1f293799}:is(.dark .group:hover .dark\:group-hover\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70){--tw-ring-color: rgb(31 41 55 / .7)}:is(.dark .dark\:hover\:border-gray-600:hover){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-primary:hover){border-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-bg-dark-tone:hover){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:hover\:bg-blue-300:hover){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-600:hover){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-700:hover){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-600:hover){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-300:hover){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-600:hover){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-700:hover){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-500:hover){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-700:hover){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-primary:hover){background-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-purple-500:hover){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-700:hover){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-300:hover){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-600:hover){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-700:hover){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-secondary:hover){background-color:var(--color-secondary)}:is(.dark .dark\:hover\:bg-yellow-300:hover){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-400:hover){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}:is(.dark .hover\:dark\:bg-bg-dark-tone):hover{background-color:var(--color-bg-dark-tone)}:is(.dark .hover\:dark\:bg-bg-dark-tone-panel):hover{background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:hover\:fill-primary:hover){fill:var(--color-primary)}:is(.dark .dark\:hover\:text-blue-500:hover){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-900:hover){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:scrollbar-thumb-primary){--scrollbar-thumb-hover: var(--color-primary) !important}:is(.dark .dark\:focus\:border-blue-500:focus){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-secondary:focus){border-color:var(--color-secondary)}:is(.dark .dark\:focus\:text-white:focus){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:focus\:ring-blue-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-cyan-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-lime-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-400:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-secondary:focus){--tw-ring-color: var(--color-secondary)}:is(.dark .dark\:focus\:ring-teal-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-offset-gray-700:focus){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}:is(.dark .md\:dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .md\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .md\:dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} +*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0;outline:none}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.container{margin:0;padding:0}.link-item{height:25px;margin-top:5px;padding:0 20px;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.link-item-dark{padding:0 20px;color:#f0f8ff;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.nav-ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;height:100%}.nav-li{cursor:pointer;display:flex;align-items:center;padding:5px}.fade-in{animation:fadeInAnimation .5s}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}.bounce-in{animation:bounceInAnimation .5s}.bounce-out{animation:bounceOutAnimation .5s}@keyframes bounceInAnimation{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.shadow-no-bottom{box-shadow:0 -4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}.hovered{transition:transform .3s cubic-bezier(.175,.885,.32,1.275);transform:scale(1.1)}.active{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;pointer-events:all}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:250px;background-color:#fff;z-index:1000;display:none}.settings-button{cursor:pointer;padding:10px;border:1px solid #ddd;border-radius:5px;color:#333;font-size:14px}.settings-button:hover{background-color:#eee}.settings-button:active{background-color:#ddd}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.scrollbar[data-v-b19a05a8]{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);white-space:pre-wrap;overflow-wrap:break-word}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar{width:8px}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:4px}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color)}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.selected-choice{background-color:#bde4ff}.heartbeat-text[data-v-cb71036e]{font-size:24px;animation:pulsate-cb71036e 1.5s infinite}@keyframes pulsate-cb71036e{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-cb71036e],.list-enter-active[data-v-cb71036e],.list-leave-active[data-v-cb71036e]{transition:all .5s ease}.list-enter-from[data-v-cb71036e]{transform:translatey(-30px)}.list-leave-to[data-v-cb71036e]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-cb71036e]{position:absolute}.bounce-enter-active[data-v-cb71036e]{animation:bounce-in-cb71036e .5s}.bounce-leave-active[data-v-cb71036e]{animation:bounce-in-cb71036e .5s reverse}@keyframes bounce-in-cb71036e{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-cb71036e]{background-color:#0ff}.hover[data-v-cb71036e]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-cb71036e]{font-weight:700}.collapsible-section{cursor:pointer;margin-bottom:10px;font-weight:700}.collapsible-section:hover{color:#1a202c}.collapsible-section .toggle-icon{margin-right:.25rem}.collapsible-section .toggle-icon i{color:#4a5568}.collapsible-section .toggle-icon i:hover{color:#1a202c}.json-viewer{max-height:300px;max-width:700px;flex:auto;overflow-y:auto;padding:10px;background-color:#f1f1f1;border:1px solid #ccc;border-radius:4px}.json-viewer .toggle-icon{cursor:pointer;margin-right:.25rem}.json-viewer .toggle-icon i{color:#4a5568}.json-viewer .toggle-icon i:hover{color:#1a202c}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}.bounce-enter-active[data-v-d7f8ef94]{animation:bounce-in-d7f8ef94 .5s}.bounce-leave-active[data-v-d7f8ef94]{animation:bounce-in-d7f8ef94 .5s reverse}@keyframes bounce-in-d7f8ef94{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-1a32c141]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-1a32c141]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-1a32c141]{top:calc(-100% - 2rem)}.list-move[data-v-011f8851],.list-enter-active[data-v-011f8851],.list-leave-active[data-v-011f8851]{transition:all .5s ease}.list-enter-from[data-v-011f8851]{transform:translatey(-30px)}.list-leave-to[data-v-011f8851]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-011f8851]{position:absolute}.slide-right-enter-active[data-v-b8e854ae],.slide-right-leave-active[data-v-b8e854ae]{transition:transform .3s ease}.slide-right-enter[data-v-b8e854ae],.slide-right-leave-to[data-v-b8e854ae]{transform:translate(-100%)}.fade-and-fly-enter-active[data-v-b8e854ae]{animation:fade-and-fly-enter-b8e854ae .5s ease}.fade-and-fly-leave-active[data-v-b8e854ae]{animation:fade-and-fly-leave-b8e854ae .5s ease}@keyframes fade-and-fly-enter-b8e854ae{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-b8e854ae{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-b8e854ae],.list-enter-active[data-v-b8e854ae],.list-leave-active[data-v-b8e854ae]{transition:all .5s ease}.list-enter-from[data-v-b8e854ae]{transform:translatey(-30px)}.list-leave-to[data-v-b8e854ae]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-b8e854ae]{position:absolute}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:white;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:PTSans,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1F2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4B5563}.dark input[type=file]::file-selector-button:hover{background:#6B7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6B7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-moz-range-thumb{background:#6B7280}input[type=range]::-moz-range-progress{background:#3F83F8}input[type=range]::-ms-fill-lower{background:#3F83F8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:white;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1C64F2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}html{scroll-behavior:smooth}@font-face{font-family:Roboto;src:url(/assets/Roboto-Regular-7277cfb8.ttf) format("truetype")}@font-face{font-family:PTSans;src:url(/assets/PTSans-Regular-23b91352.ttf) format("truetype")}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1{left:-.25rem}.-left-1\.5{left:-.375rem}.-left-6{left:-1.5rem}.-right-0{right:-0px}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-right-6{right:-1.5rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.-top-2{top:-.5rem}.-top-20{top:-5rem}.-top-6{top:-1.5rem}.-top-9{top:-2.25rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-5{bottom:1.25rem}.bottom-\[60px\]{bottom:60px}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-20{left:5rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1{margin-top:-.25rem;margin-bottom:-.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-6{max-height:1.5rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-\[500px\]{min-height:500px}.min-h-\[900px\]{min-height:900px}.min-h-full{min-height:100%}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[1000px\]{width:1000px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-\[23rem\]{min-width:23rem}.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[23rem\]{max-width:23rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-\[900px\]{max-width:900px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y: -0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\[40px\,1fr\]{grid-template-columns:40px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-discussion{background-color:var(--color-bg-light-discussion)}.bg-bg-light-panel{background-color:var(--color-bg-light-panel)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bg-light-tone{--tw-gradient-from: var(--color-bg-light-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.fill-blue-600{fill:#1c64f2}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-24{padding-top:6rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-sans{font-family:PTSans,Roboto,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[\.82rem\]{font-size:.82rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-dark-text-panel{color:var(--color-dark-text-panel)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.scrollbar{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar{scrollbar-width:auto}.scrollbar::-webkit-scrollbar{display:block;width:var(--scrollbar-width, 16px);height:var(--scrollbar-height, 16px)}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{font-size:36px;font-weight:700}h2{font-size:24px;font-weight:700}h3{font-size:18px;font-weight:700}h4{font-size:18px;font-style:italic}p{font-size:16px;word-wrap:break-word;overflow-wrap:break-word;white-space:normal}ul{list-style-type:disc;margin-left:0}li{list-style-type:disc;margin-left:20px}ol{list-style-type:decimal;margin-left:20px}:root{--color-primary: #0e8ef0;--color-primary-light: #3dabff;--color-secondary: #0fd974;--color-accent: #f0700e;--color-light-text-panel: #ffffff;--color-dark-text-panel: #ffffff;--color-bg-light-panel: #7cb5ec;--color-bg-light: #e2edff;--color-bg-light-tone: #b9d2f7;--color-bg-light-code-block: #cad7ed;--color-bg-light-tone-panel: #8fb5ef;--color-bg-light-discussion: #c5d8f8;--color-bg-light-discussion-odd: #d6e7ff;--color-bg-dark: #132e59;--color-bg-dark-tone: #25477d;--color-bg-dark-tone-panel: #4367a3;--color-bg-dark-code-block: #2254a7;--color-bg-dark-discussion: #435E8A;--color-bg-dark-discussion-odd: #284471}.last\:mb-0:last-child{margin-bottom:0}.last\:\!border-transparent:last-child{border-color:transparent!important}.last\:pb-0:last-child{padding-bottom:0}.odd\:bg-bg-light-tone:nth-child(odd){background-color:var(--color-bg-light-tone)}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.even\:bg-bg-light-tone-panel:nth-child(2n){background-color:var(--color-bg-light-tone-panel)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:-translate-x-12{--tw-translate-x: -3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-y-12{--tw-translate-y: -3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-y-8{--tw-translate-y: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-\[0px\]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-y-\[-50px\]{--tw-translate-y: -50px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:z-50:hover{z-index:50}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-8:hover{--tw-translate-y: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:translate-y-\[-5px\]:hover{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-150:hover{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-95:hover{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{background-color:var(--color-secondary)}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:fill-primary:hover{fill:var(--color-primary)}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}:is(.dark .dark\:divide-gray-700)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}:is(.dark .dark\:border-bg-light){border-color:var(--color-bg-light)}:is(.dark .dark\:border-blue-500){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-500){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-600){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-800){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-900){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}:is(.dark .dark\:border-green-500){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-400){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-500){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-400){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-500){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}:is(.dark .dark\:border-red-500){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}:is(.dark .dark\:border-transparent){border-color:transparent}:is(.dark .dark\:border-yellow-300){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}:is(.dark .dark\:bg-bg-dark){background-color:var(--color-bg-dark)}:is(.dark .dark\:bg-bg-dark-discussion){background-color:var(--color-bg-dark-discussion)}:is(.dark .dark\:bg-bg-dark-tone){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:bg-bg-dark-tone-panel){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:bg-black){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-200){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-500){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-600){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-700){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-800){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-900){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-200){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-300){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-600){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800\/30){background-color:#1f29374d}:is(.dark .dark\:bg-gray-800\/50){background-color:#1f293780}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-200){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-500){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-600){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-800){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-200){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-500){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-700){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-800){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-200){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-600){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-200){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-500){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-600){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-200){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-500){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-600){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-200){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-opacity-70){--tw-bg-opacity: .7}:is(.dark .dark\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\:from-bg-dark){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-bg-dark-tone){--tw-gradient-from: var(--color-bg-dark-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:via-bg-dark){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}:is(.dark .dark\:fill-gray-300){fill:#d1d5db}:is(.dark .dark\:fill-white){fill:#fff}:is(.dark .dark\:text-blue-200){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-800){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}:is(.dark .dark\:text-dark-text-panel){color:var(--color-dark-text-panel)}:is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-100){--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-200){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-500){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-800){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-900){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-500){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-900){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}:is(.dark .dark\:text-light-text-panel){color:var(--color-light-text-panel)}:is(.dark .dark\:text-orange-200){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-400){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-500){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-900){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}:is(.dark .dark\:text-primary){color:var(--color-primary)}:is(.dark .dark\:text-purple-400){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-500){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-900){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-200){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-800){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-900){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-50){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-300){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-500){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-800){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-900){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-gray-400)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:shadow-lg){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-blue-800\/80){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-cyan-800\/80){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-green-800\/80){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-lime-800\/80){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-pink-800\/80){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-purple-800\/80){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-red-800\/80){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-teal-800\/80){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:ring-gray-500){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:ring-offset-gray-700){--tw-ring-offset-color: #374151}:is(.dark .dark\:ring-offset-gray-800){--tw-ring-offset-color: #1F2937}:is(.dark .dark\:scrollbar-track-bg-dark){--scrollbar-track: var(--color-bg-dark) !important}:is(.dark .dark\:scrollbar-track-bg-dark-tone){--scrollbar-track: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone){--scrollbar-thumb: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone-panel){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}:is(.dark .odd\:dark\:bg-bg-dark-tone):nth-child(odd){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n)){background-color:var(--color-bg-dark-discussion-odd)}:is(.dark .dark\:even\:bg-bg-dark-tone-panel:nth-child(2n)){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60){background-color:#1f293799}:is(.dark .group:hover .dark\:group-hover\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70){--tw-ring-color: rgb(31 41 55 / .7)}:is(.dark .dark\:hover\:border-gray-600:hover){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-primary:hover){border-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-bg-dark-tone:hover){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:hover\:bg-blue-300:hover){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-600:hover){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-700:hover){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-600:hover){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-300:hover){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-600:hover){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-700:hover){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-500:hover){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-700:hover){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-primary:hover){background-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-purple-500:hover){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-700:hover){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-300:hover){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-600:hover){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-700:hover){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-secondary:hover){background-color:var(--color-secondary)}:is(.dark .dark\:hover\:bg-yellow-300:hover){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-400:hover){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}:is(.dark .hover\:dark\:bg-bg-dark-tone):hover{background-color:var(--color-bg-dark-tone)}:is(.dark .hover\:dark\:bg-bg-dark-tone-panel):hover{background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:hover\:fill-primary:hover){fill:var(--color-primary)}:is(.dark .dark\:hover\:text-blue-500:hover){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-900:hover){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:scrollbar-thumb-primary){--scrollbar-thumb-hover: var(--color-primary) !important}:is(.dark .dark\:focus\:border-blue-500:focus){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-secondary:focus){border-color:var(--color-secondary)}:is(.dark .dark\:focus\:text-white:focus){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:focus\:ring-blue-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-cyan-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-lime-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-400:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-secondary:focus){--tw-ring-color: var(--color-secondary)}:is(.dark .dark\:focus\:ring-teal-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-offset-gray-700:focus){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}:is(.dark .md\:dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .md\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .md\:dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} diff --git a/web/dist/index.html b/web/dist/index.html index db10bad7..d1fca726 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -6,8 +6,8 @@ LoLLMS WebUI - Welcome - - + +
diff --git a/web/src/views/SettingsView.vue b/web/src/views/SettingsView.vue index cdc55201..c44cf328 100644 --- a/web/src/views/SettingsView.vue +++ b/web/src/views/SettingsView.vue @@ -1003,9 +1003,7 @@ @change="settingsChanged=true" class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600" > - - - +