import{e as d,q as f,a as g}from"./Dd9LBWfc.js";import{a as i}from"./ChPOfM_V.js";const{post:p}=g(),y=d("configTools",()=>{const a=i(),c=i();async function l(){try{const o=window.location.search,t=f.parse(o.slice(1)),n=String(t.route||"app.collov.ai"),e=m(n),s=await p("/customerTool/getCusTools",{code:e,configId:"",username:"",deviceId:""},{isFormdata:!0});a.value=s.config,c.value=s.tools,localStorage.setItem("collov_ai_allInOne",s.token)}catch{}}function m(o){const t=u(10),e=`${new Date().getTime()}|${encodeURIComponent(o)}|${t}`;return btoa(e)}function u(o){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let e=0;e<o;e++){const r=Math.floor(Math.random()*t.length);n+=t.charAt(r)}return n}return{config:a,tools:c,getConfig:l}});export{y as u};
