1import{I as X}from"./chunk-2Q5K7J3B-TddR7fAv.js";import{p as z}from"./chunk-JWPE2WC7-BhXc-_xC.js";import{p as O,b as G,s as Y,q as P,g as F,a as q,_ as m,D as N,l as A,G as Z,d as U,A as E,r as j,i as J,ak as K,E as Q,al as tt}from"./mermaid.core-DMz-tEN9.js";import{p as et}from"./cynefin-OW5HDTMX-DOiSPtr6.js";import"./index-BbN0-VeI.js";import"./constants-DAWul56a.js";import"./chunk-62JRHF6Z-bfD53SOp.js";import"./mermaid-NA5CF7SZ-BW-qNGGt.js";import"./chunk-ZA36QIGN-Dq1Fkfik.js";import"./jsx-runtime-u17CrQMm.js";import"./Button-DmMEzNVw.js";import"./useHover-CzmIqD15.js";import"./usePress-3lCCvr6b.js";import"./index-DBzAvLVe.js";import"./icon-CwkHE3DH.js";import"./index-CDpyLZpS.js";import"./popover-Bhy_zgj0.js";import"./Dialog-BG5YzsK1.js";import"./FocusScope-oqnhLXFu.js";import"./VisuallyHidden-q1NBfwCb.js";import"./index-1i1syFfE.js";import"./button-DRcrZ6dN.js";import"./radio-group-C6OtSvt6.js";import"./useFormValidation-BjyAfLpO.js";import"./Label-BtVzf35a.js";import"./useSlot-CnzSNurq.js";import"./field-BJaIK68s.js";import"./freebc-logo-dark-6JRgUcu9.js";import"./paragraph-DF-eS1Gr.js";import"./StepProgress-CEdcqf3x.js";import"./header-C0smGzNw.js";import"./methodSlugs-BVCwE0DF.js";import"./schemas-BdPyM-YW.js";import"./CookieBanner-BekpxL5y.js";import"./resetVisitorIdentity-BQ95LcRG.js";import"./visitorBootstrap-Y4scAR2D.js";import"./useTranslation-3Qrhfb_e.js";import"./context-CoWWtjvn.js";import"./Trans-DRFLHH82.js";import"./i18next-Cm10fOe7.js";import"./featureFlags-B_-_Lj8a.js";import"./logger-dBxPFjkU.js";import"./LocalStorageProvider-BwGvbneT.js";import"./methods-mbBMuTYW.js";import"./input-DVAAwZbe.js";import"./Input-CgmZSlN-.js";import"./index-BkzU2qH-.js";import"./parse-BAgr0IfG.js";import"./helpers-CV61HEKM.js";import"./index-CzZrtqVF.js";import"./emailMe-igzsz98x.js";import"./MethodLabels-D7myVQIE.js";import"./Select-LclSQMWS.js";import"./DragAndDrop-5s64eDsR.js";import"./Modal-ozEIpyXh.js";import"./card-DzTowZFt.js";import"./a11y-yERX5OOZ.js";import"./Banner-Dr18bpFK.js";import"./index-BG7ZdmCr.js";import"./formatLlmOutputToSsml-BC6vs2WN.js";import"./utils-DfrdhlvH.js";import"./Checkbox-C9NCF2Xb.js";import"./useToggleState-D13tW15H.js";var D=/[ââââââââ£]/,L=/[ââââ£]/,rt=/[ââ]/,k=/^[\sââ]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,V=/^\s*%%/,it=" ";function _(r){return r.some(e=>D.test(e))}m(_,"isBoxDrawingFormat");function M(r){for(const e of r){const t=L.exec(e);if(t?.index&&t.index>0)return t.index}return 4}m(M,"inferSegmentWidth");function S(r,e){return r.replace(/\bline\s+(\d+)\b/gi,(t,i)=>{const s=parseInt(i,10),o=e.get(s);return o?`line ${o}`:t})}m(S,"remapErrorLines");function R(r){const e=r.split(` 2`),t=new Map;let i=-1;for(const[h,c]of e.entries())if(c.trim()==="treeView-beta"){i=h;break}if(i===-1)return{text:r,lineMap:t};const s=[];for(let h=i+1;h<e.length;h++){const c=e[h];c.trim()===""||V.test(c)||T.test(c)||k.test(c)||s.push(c.replace(/\t/g," "))}if(!_(s))return{text:r,lineMap:t};const o=M(s),n=[];let a=0;for(let h=0;h<=i;h++)n.push(e[h]),a++,t.set(a,h+1);for(let h=i+1;h<e.length;h++){const c=e[h],d=c.trim(),p=h+1;if(d===""){n.push(c),a++,t.set(a,p);continue}if(V.test(c)){n.push(c),a++,t.set(a,p);continue}if(T.test(c)){n.push(c),a++,t.set(a,p);continue}if(k.test(c))continue;const l=c.replace(/\t/g," "),u=L.exec(l);if(u?.index!==void 0){const g=u.index,w=Math.round(g/o)+1;let f=g+1;for(;f<l.length&&rt.test(l[f]);)f++;for(;f<l.length&&l[f]===" ";)f++;const v=l.slice(f).trimEnd();if(!v)throw new Error(`Line ${p}: Empty node â expected a filename or directory name after the box-drawing prefix`);const W=it.repeat(w);n.push(W+v),a++,t.set(a,p)}else{if(/^[\sââââââââ£]+$/.test(l))continue;if(D.test(l))n.push(c),a++,t.set(a,p);else{if(/^\s+/.test(l))throw new Error(`Line ${p}: Unexpected indentation without box-drawing characters. In box-drawing format, use âââ or âââ prefixes for indented nodes.`);n.push(c),a++,t.set(a,p)}}}return{text:n.join(` 3`),lineMap:t}}m(R,"preprocessBoxDrawing");var x=new X(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ot=m(()=>{x.reset(),j()},"clear"),nt=m(()=>x.records.stack[0],"getRoot"),st=m(()=>x.records.cnt,"getCount"),at=Q.treeView,ct=m(()=>N(at,E().treeView),"getConfig"),lt=m((r,e,t,i,s,o)=>{for(;r<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const n={id:x.records.cnt++,level:r,name:e,nodeType:t,icon:s,cssClass:i,description:o,children:[]};x.records.stack[x.records.stack.length-1].children.push(n),x.records.stack.push(n)},"addNode"),dt={clear:ot,addNode:lt,getRoot:nt,getCount:st,getConfig:ct,getAccTitle:q,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:O},I=dt,pt=m(r=>{z(r,I);for(const e of r.nodes){const t=typeof e.indent=="number"?e.indent:0;let i=e.name;const s=i.endsWith("/");
3s&&(i=i.slice(0,-1));const o=s?"directory":"file",n=e.classAnnotation||void 0,a=e.iconAnnotation,h=a!==void 0?a||"none":void 0,c=e.descAnnotation||void 0,d=c?J(c,E()):void 0;I.addNode(t,i,o,n,h,d)}},"populate"),ht={parse:m(async r=>{const{text:e,lineMap:t}=R(r);try{const i=await et("treeView",e);A.debug(i),pt(i)}catch(i){throw t.size>0&&i instanceof Error&&(i.message=S(i.message,t)),i}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function H(r,e){const t=e?.filenameIcons?.[r];if(t)return t;const i=r.lastIndexOf(".");if(i>0){const s=r.substring(i).toLowerCase(),o=e?.extensionIcons;return o?.[s]??o?.[s.slice(1)]}}m(H,"detectIcon");function C(r,e){return r.includes(":")?r:r in b.icons||!e?`${b.prefix}:${r}`:`${e}:${r}`}m(C,"qualifyIcon");function B(r,e){if(r.icon!=="none"){if(r.icon)return C(r.icon,e.defaultIconPack);if(e.showIcons){if(r.nodeType==="file"){const t=H(r.name,e);if(t==="none")return;if(t)return C(t,e.defaultIconPack)}return`${b.prefix}:${r.nodeType==="directory"?"folder":"file"}`}}}m(B,"getNodeIcon");tt([{name:b.prefix,icons:b}]);var y=14,mt=4,gt=16,ft=m(async(r,e)=>{const t=[],i=m(o=>{const n=B(o,e);n&&t.push({icon:n,node:o}),o.children.forEach(i)},"collect");i(r);const s=await Promise.all(t.map(async({icon:o,node:n})=>({id:n.id,svg:await K(o,{height:y,width:y})})));return new Map(s.map(({id:o,svg:n})=>[o,n]))},"resolveNodeIcons"),ut=m((r,e,t,i,s,o)=>{const n=i.append("g");let a="treeView-node-label";t.nodeType==="directory"&&(a+=" treeView-node-dir"),t.cssClass&&(a+=` ${t.cssClass}`);const h=y+mt,c=B(t,s),d=c!==void 0;c&&n.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${r+s.paddingX}, ${e+s.paddingY})`).html(o.get(t.id)??"");const p=n.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:u}=p.node().getBBox(),g=l+s.paddingY*2,w=r+s.paddingX+(d?h:0);p.attr("x",w),p.attr("y",e+g/2);const f=w+u,v=u+s.paddingX*2+(d?h:0);return t.BBox={x:r,y:e,width:v,height:g},t.cssClass?.split(/\s+/).includes("highlight")&&n.insert("rect",":first-child").attr("x",r).attr("y",e+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:n,labelRightEdge:f,centerY:e+g/2}},"positionLabel"),$=m((r,e,t,i,s,o)=>r.append("line").attr("x1",e).attr("y1",t).attr("x2",i).attr("y2",s).attr("stroke-width",o).attr("class","treeView-node-line"),"positionLine"),wt=m((r,e,t,i)=>{let s=0,o=0;const n=[],a=m((d,p,l,u)=>
3{const g=u*(l.rowIndent+l.paddingX),w=ut(g,s,p,d,l,i);n.push(w);const{height:f,width:v}=p.BBox;$(d,g-l.rowIndent,s+f/2,g,s+f/2,l.lineThickness),o=Math.max(o,g+v),s+=f},"drawNode"),h=m((d,p=0)=>{a(r,d,t,p),d.children.forEach(w=>{h(w,p+1)});const{x:l,y:u,height:g}=d.BBox;if(d.children.length){const{y:w,height:f}=d.children[d.children.length-1].BBox;$(r,l+t.paddingX,u+g,l+t.paddingX,w+f/2+t.lineThickness/2,t.lineThickness)}},"processNode");h(e);const c=n.filter(d=>d.node.description);if(c.length>0){const p=Math.max(...n.map(l=>l.labelRightEdge))+gt;for(const l of c){const g=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",l.centerY).node().getBBox();o=Math.max(o,p+g.width+t.paddingX)}}for(const d of n)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const p=d.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const l=o-d.node.BBox.x+8;p.attr("width",l),o=Math.max(o,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:o}},"drawTree"),xt=m(async(r,e,t,i)=>{A.debug(`Rendering treeView diagram 4`+r);const s=i.db,o=s.getRoot(),n=s.getConfig(),a=Z(e),h=a.append("g");h.attr("class","tree-view");const c=await ft(o,n),{totalHeight:d,totalWidth:p}=wt(h,o,n,c);a.attr("viewBox",`-${n.lineThickness/2} 0 ${p} ${d}`),U(a,d,p,n.useMaxWidth)},"draw"),vt={draw:xt},bt=vt,It={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ct=m(({treeView:r})=>{const{labelFontSize:e,labelColor:t,lineColor:i,iconColor:s,descriptionColor:o,highlightBg:n,highlightStroke:a}=N(It,r);return` 5 .treeView-node-label { 6 font-size: ${e}; 7 fill: ${t}; 8 white-space: pre; 9 } 10 .treeView-node-dir { 11 font-weight: bold; 12 } 13 .treeView-node-line { 14 stroke: ${i}; 15 } 16 .treeView-node-icon { 17 color: ${s}; 18 } 19 .treeView-node-description { 20 font-size: ${e}; 21 fill: ${o}; 22 font-style: italic; 23 white-space: pre; 24 } 25 .treeView-highlight-bg { 26 fill: ${n}; 27 stroke: ${a}; 28 stroke-width: 1; 29 } 30 `},"styles"),yt=Ct,Le={db:I,renderer:bt,parser:ht,styles:yt};export{Le as diagram};
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.