1import{d as g,v as p,g as y,i as d,j as _,o as a,m as b,E as h,D as m,a8 as k,F as v,A as B,b as C}from"#entry";import{a as I}from"./BbIF33YR.js";import{_ as x}from"./BBu8Wlkq.js";const W={key:0,class:"flex items-center border-b p-3 font-mono text-sm"},$={class:"bg-muted/30 w-auto p-2"},A=g({__name:"FileTree",props:{title:{},icon:{},autoSlash:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!0},tree:{}},setup(n){const l=new Map(Object.entries(p().value.main.codeIcon));function c(t,s){if(t!=="...")return t.endsWith("/")?"lucide:folder":l.get(t.split(".")[t.split(".").length-1])||l.get(t.toLowerCase())||(s==="file"?"lucide:file":"lucide:folder")}function f(t,s,o){let e=t,i=!1;e.startsWith("^")&&e.endsWith("^")&&(e=e.substring(1,e.length-1),i=!0);let r="none";return e.startsWith("+")?r="addition":e.startsWith("-")&&(r="deletion"),s==="file"?{title:e,icon:c(e,"file"),highlighted:i,diff:r}:{title:`${e}${n.autoSlash?"/":""}`,icon:c(e,"folder"),children:o&&u(o),highlighted:i,diff:r}}function u(t){const s=[];for(const o of t)if(typeof o=="string")s.push(f(o,"file"));else if(typeof o=="object")for(const e of Object.keys(o))s.push(f(e,"folder",o[e]));return s}const w=y(()=>u(n.tree));return(t,s)=>{const o=k,e=I,i=x;return a(),d(i,{class:"relative overflow-hidden [&:not(:first-child)]:mt-5 [&:not(:last-child)]:mb-5"},{default:_(()=>[n.title?(a(),b("div",W,[n.icon?(a(),d(o,{key:0,name:n.icon,class:"mr-1.5"},null,8,["name"])):h("",!0),m("span",null,v(n.title),1)])):h("",!0),m("div",$,[B(e,{tree:C(w),"show-arrow":n.showArrow,"show-icon":n.showIcon,level:0},null,8,["tree","show-arrow","show-icon"])])]),_:1})}}});
1export{A as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.