1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[925],{69474:function(e,t,i){i.d(t,{A:function(){return n}});var r=i(63557),n=class{constructor(e){this.init=e,this.records=this.init()}static{(0,r.e)(this,"ImperativeState")}reset(){this.records=this.init()}}},89667:function(e,t,i){function r(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}i.d(t,{A:function(){return r}}),(0,i(63557).e)(r,"populateCommonDb")},40925:function(e,t,i){i.d(t,{diagram:function(){return _}});var r=i(69474),n=i(89667),o=i(29988),s=i(63686),a=i(41055),l=i(16088),c=i(40594),d=i(63557),h=i(45144),f=/[ââââââââ£]/,p=/[ââââ£]/,g=/[ââ]/,u=/^[\sââ]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,x=/^\s*%%/;function m(e){return e.some(e=>f.test(e))}function b(e){for(let t of e){let e=p.exec(t);if(e?.index&&e.index>0)return e.index}return 4}function y(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,i)=>{let r=parseInt(i,10),n=t.get(r);return n?`line ${n}`:e})}function k(e){let t=e.split("\n"),i=new Map,r=-1;for(let[e,i]of t.entries())if("treeView-beta"===i.trim()){r=e;break}if(-1===r)return{text:e,lineMap:i};let n=[];for(let e=r+1;e<t.length;e++){let i=t[e];""===i.trim()||x.test(i)||w.test(i)||u.test(i)||n.push(i.replace(/\t/g," "))}if(!m(n))return{text:e,lineMap:i};let o=b(n),s=[],a=0;for(let e=0;e<=r;e++)s.push(t[e]),a++,i.set(a,e+1);for(let e=r+1;e<t.length;e++){let r=t[e],n=r.trim(),l=e+1;if(""===n||x.test(r)||w.test(r)){s.push(r),a++,i.set(a,l);continue}if(u.test(r))continue;let c=r.replace(/\t/g," "),d=p.exec(c);if(d?.index!==void 0){let e=d.index,t=Math.round(e/o)+1,r=e+1;for(;r<c.length&&g.test(c[r]);)r++;for(;r<c.length&&" "===c[r];)r++;let n=c.slice(r).trimEnd();if(!n)throw Error(`Line ${l}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);let h=" ".repeat(t);s.push(h+n),a++,i.set(a,l)}else if(/^[\sââââââââ£]+$/.test(c))continue;else if(f.test(c))s.push(r),a++,i.set(a,l);else if(/^\s+/.test(c))throw Error(`Line ${l}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251C\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);else s.push(r),a++,i.set(a,l)}return{text:s.join("\n"),lineMap:i}}(0,d.e)(m,"isBoxDrawingFormat"),(0,d.e)(b,"inferSegmentWidth"),(0,d.e)(y,"remapErrorLines"),(0,d.e)(k,"preprocessBoxDrawing");var $=new r.A(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),v=(0,d.e)(()=>{$.reset(),(0,l.ZH)()},"clear"),V=(0,d.e)(()=>$.records.stack[0],"getRoot"),B=(0,d.e)(()=>$.records.cnt,"getCount"),C=l.vZ.treeView,T=(0,d.e)(()=>(0,a.Rb)(C,(0,l.iE)().treeView),"getConfig"),I={clear:v,addNode:(0,d.e)((e,t,i,r,n,o)=>{for(;e<=$.records.stack[$.records.stack.length-1].level;)$.records.stack.pop();let s={id:$.records.cnt++,level:e,name:t,nodeType:i,icon:n,cssClass:r,description:o,children:[]};$.records.stack[$.records.stack.length-1].children.push(s),$.records.stack.push(s)},"addNode"),getRoot:V,getCount:B,getConfig:T,getAccTitle:l.eu,getAccDescription:l.Mx,getDiagramTitle:l.Kr,setAccDescription:l.U$,setAccTitle:l.GN,setDiagramTitle:l.g2},A=(0,d.e)(e=>{for(let t of((0,n.A)(e,I),e.nodes)){let e="number"==typeof t.indent?t.indent:0,i=t.name,r=i.endsWith("/");r&&(i=i.slice(0,-1));let n=r?"directory":"file",o=t.classAnnotation||void 0,s=t.iconAnnotation,a=void 0!==s?s||"none":void 0,c=t.descAnnotation||void 0,d=c?(0,l.oO)(c,(0,l.iE)()):void 0;I.addNode(e,i,n,o,a,d)}},"populate"),D={parse:(0,d.e)(async e=>{let{text:t,lineMap:i}=k(e);try{let e=await (0,h.Qc)("treeView",t);c.c.debug(e),A(e)}catch(e){throw i.size>0&&e instanceof Error&&(e.message=y(e.message,i)),e}},"parse")},E={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 M(e,t){let i=t?.filenameIcons?.[e];if(i)return i;let r=e.lastIndexOf(".");if(r>0){let i=e.substring(r).toLowerCase(),n=t?.extensionIcons;return n?.[i]??n?.[i.slice(1)]}}function N(e,t){return e.includes(":")?e:e in E.icons||!t?`${E.prefix}:${e}`:`${t}:${e}`}function X(e,t){if("none"!==e.icon){if(e.icon)return N(e.icon,t.defaultIconPack);if(t.showIcons){if("file"===e.nodeType){let i=M(e.name,t);if("none"===i)return;if(i)return N(i,t.defaultIconPack)}return`${E.prefix}:${"directory"===e.nodeType?"folder":"file"}`}}}(0,d.e)(M,"detectIcon"),(0,d.e)(N,"qualifyIcon"),(0,d.e)(X,"getNodeIcon"),(0,s.ef)([{name:E.prefix,icons:E}]);var z=(0,d.e)((e,t)=>`tv-icon-${e}-${t.replace(/[^\w-]/g,"-")}
1`,"iconSymbolId"),L=(0,d.e)(async(e,t,i,r)=>{let n=new Set,o=(0,d.e)(e=>{let t=X(e,i);t&&n.add(t),e.children.forEach(o)},"collect");if(o(t),0===n.size)return;let a=await Promise.all([...n].map(async e=>({icon:e,svg:await (0,s.s4)(e,{height:14,width:14})}))),l=e.append("defs");for(let{icon:e,svg:t}of a)l.append("g").attr("id",z(r,e)).html(t)},"injectIconDefs"),R=(0,d.e)((e,t,i,r,n,o)=>{let s=r.append("g"),a="treeView-node-label";"directory"===i.nodeType&&(a+=" treeView-node-dir"),i.cssClass&&(a+=` ${i.cssClass}`);let l=X(i,n),c=void 0!==l;l&&s.append("use").attr("xlink:href",`#${z(o,l)}`).attr("x",e+n.paddingX).attr("y",t+n.paddingY).attr("class","treeView-node-icon");let d=s.append("text").text(i.name).attr("dominant-baseline","middle").attr("class",a),{height:h,width:f}=d.node().getBBox(),p=h+2*n.paddingY,g=e+n.paddingX+(c?18:0);d.attr("x",g),d.attr("y",t+p/2);let u=g+f,w=f+2*n.paddingX+(c?18:0);return i.BBox={x:e,y:t,width:w,height:p},i.cssClass?.split(/\s+/).includes("highlight")&&s.insert("rect",":first-child").attr("x",e).attr("y",t+1).attr("width",0).attr("height",p-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:i,nodeGroup:s,labelRightEdge:u,centerY:t+p/2}},"positionLabel"),S=(0,d.e)((e,t,i,r,n,o)=>e.append("line").attr("x1",t).attr("y1",i).attr("x2",r).attr("y2",n).attr("stroke-width",o).attr("class","treeView-node-line"),"positionLine"),P=(0,d.e)((e,t,i,r)=>{let n=0,o=0,s=[],a=(0,d.e)((e,t,i,a)=>{let l=a*(i.rowIndent+i.paddingX),c=R(l,n,t,e,i,r);s.push(c);let{height:d,width:h}=t.BBox;S(e,l-i.rowIndent,n+d/2,l,n+d/2,i.lineThickness),o=Math.max(o,l+h),n+=d},"drawNode"),l=(0,d.e)((t,r=0)=>{a(e,t,i,r),t.children.forEach(e=>{l(e,r+1)});let{x:n,y:o,height:s}=t.BBox;if(t.children.length){let{y:r,height:a}=t.children[t.children.length-1].BBox;S(e,n+i.paddingX,o+s,n+i.paddingX,r+a/2+i.lineThickness/2,i.lineThickness)}},"processNode");l(t);let c=s.filter(e=>e.node.description);if(c.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+16;for(let t of c){let r=t.nodeGroup.append("text").text(t.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",e).attr("y",t.centerY).node().getBBox();o=Math.max(o,e+r.width+i.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes("highlight")){let t=e.nodeGroup.select(".treeView-highlight-bg");if(!t.empty()){let i=o-e.node.BBox.x+8;t.attr("width",i),o=Math.max(o,e.node.BBox.x+i+2)}}return{totalHeight:n,totalWidth:o}},"drawTree"),Y=(0,d.e)(async(e,t,i,r)=>{c.c.debug("Rendering treeView diagram\n"+e);let n=r.db,s=n.getRoot(),a=n.getConfig(),d=(0,o.P)(t);await L(d,s,a,t);let h=d.append("g");h.attr("class","tree-view");let{totalHeight:f,totalWidth:p}=P(h,s,a,t);d.attr("viewBox",`-${a.lineThickness/2} 0 ${p} ${f}`),(0,l.v2)(d,f,p,a.useMaxWidth)},"draw"),Z={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},_={db:I,renderer:{draw:Y},parser:D,styles:(0,d.e)(({treeView:e})=>{let{labelFontSize:t,labelColor:i,lineColor:r,iconColor:n,descriptionColor:o,highlightBg:s,highlightStroke:l}=(0,a.Rb)(Z,e);return` 2 .treeView-node-label { 3 font-size: ${t}; 4 fill: ${i}; 5 white-space: pre; 6 } 7 .treeView-node-dir { 8 font-weight: bold; 9 } 10 .treeView-node-line { 11 stroke: ${r}; 12 } 13 .treeView-node-icon { 14 color: ${n}; 15 } 16 .treeView-node-description { 17 font-size: ${t}; 18 fill: ${o}; 19 font-style: italic; 20 white-space: pre; 21 } 22 .treeView-highlight-bg { 23 fill: ${s}; 24 stroke: ${l}; 25 stroke-width: 1; 26 } 27 `},"styles")}}}]);
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.