import{r as f,y as w}from"./index.82404a61.js";function b(d,D){const i=f([]),m=f(!1),u=w(()=>{a(JSON.parse(JSON.stringify(i.value)))}),a=t=>{let e=[];for(const n of t){const o=n.children;delete n.children,e.push(n),o&&(e=e.concat(a(o)))}return e},g=t=>{let e=0,n=0;for(const o of t){const r=o.children||[],h=l(r);e+=h;for(const p of r){const s=p.children||[];n+=s.length;for(const c of s)c.length1=e,c.sum1=h,c.length2=n,c.sum2=s.length}}},l=t=>{let e=0;for(const n of t){const o=n.children||[];for(const r of o)e++,r.children&&l(r.children)}return e};return{treeData:i,loading:m,tableData:u,setMergeData:g,getSum:l,handlePreview:t=>{d.$modal.confirm(`\u4E0B\u8F7D\u6B64\u6587\u4EF6: ${t.name}\uFF1F`).then(()=>{window.open(t.url)})}}}export{b as u};