| 1 |
- import{U as a,W as l}from"./index-cdGt9RBW.js";import{j as r,a as i}from"./utils-B_8oV70w.js";function u(s){const t=i(s);l.setItem(t)}function c(){const s=l.getItem(),t=r(s);return t===null?[]:t}const h=a("all_agents",{state:()=>({agents:[]}),actions:{getList(){if(this.agents.length===0){const t=c();return this.agents=t,this.agents}return this.agents},getInfo(s){if(!s)return null;const t=this.getList(),o=t.length;for(let e=0;e<o;e++){const n=t[e];if(n.id===s)return n}return null},setList(s){const t=r(i(s));this.agents=t,u(t)}}});export{h as u};
|