import{d as t}from"./index.js";const o=(t,...o)=>new Promise(((e,r)=>{t(...o,(t=>{e(t)}))})),e=function(t){let o=t.toLowerCase(),e="";if(/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(o)){if(4===o.length){let t="#";for(var r=1;r<4;r+=1)t+=o.slice(r,r+1).concat(o.slice(r,r+1));o=t}const t=[];for(r=1;r<7;r+=2)t.push(parseInt("0x"+o.slice(r,r+2)));return e="rgb("+t.join(",")+")",{rgb:e,rgbStr:t.join(","),r:t[0],g:t[1],b:t[2]}}return e="无效",{rgb:e}},r=t({id:"global",state:()=>({chatQWeb:null,activityColor:"",loadTranslations:{},AssistantType:{UOS_AI:1,UOS_SYSTEM_ASSISTANT:2,DEEPIN_SYSTEM_ASSISTANT:3,PERSONAL_KNOWLEDGE_ASSISTANT:4,PLUGIN_ASSISTANT:256},ChatAction:{ChatTextPlain:0,ChatFunctionCall:1,ChatText2Image:2},ExtentionType:{None:0,Conversation:1,DocSummary:2,WordSelectionLable:3,PerView:4,PromptTag:5,PictureId:6,LikeOrNot:7},DeepSeek_Uos_Free:81,IsDeepThink:!0,IsSearchOnline:!1,DocParsingStatusType:{Success:0,MoreOneError:1,SuffixError:2,NoDocError:3,ExceedSize:4},QuestionAiAction:1,LikeOrNot:{NONE:-1,LIKE:1,DISLIKE:2,EMPTY:3}}),getters:{},actions:{updateActivityColor(t){console.log(t),this.activityColor=t;const o=e(t).rgbStr;document.body.style.setProperty("--activityColor",t),document.body.style.setProperty("--boxShadow",`rgba(${o},0.3)`),document.body.style.setProperty("--borderColor",`rgba(${o},0.2)`),document.body.style.setProperty("--backgroundColor",`rgba(${o},0.1)`),document.body.style.setProperty("--activityColorHover",`rgba(${o},0.9)`),document.body.style.setProperty("--activityColorPromptTag",`rgba(${o},0.15)`),document.body.style.setProperty("--activityAddNewConversationBtnBgNormal",`rgba(${o},0.1)`),document.body.style.setProperty("--activityAddNewConversationBtnBgHover",`rgba(${o},0.15)`),document.body.style.setProperty("--activityAddNewConversationBtnBgActive",`rgba(${o},0.2)`)},updateTheme(t){const o=2===t?"dark":"light";document.querySelector("html").setAttribute("class",o);const r=e(this.activityColor).rgbStr;2==t?document.body.style.setProperty("--activityColorPromptTag",`rgba(${r},0.12)`):document.body.style.setProperty("--activityColorPromptTag",`rgba(${r},0.15)`)},updateFont(t,o){console.log("pixelSize : ",o),document.documentElement.style.fontSize=o+"px",document.documentElement.style.fontFamily=t,document.body.style.setProperty("--font-family",t)},updateMainContentBackgroundColor(t){console.log("updateMainContentBackgroundColor : ",t),document.body.style.setProperty("--main-content-background-color",t)}}});export{o as Q,r as u};
