1"use strict";(globalThis.webpackChunkwebsite=globalThis.webpackChunkwebsite||[]).push([[4638],{15350(e,t,n){n.d(t,{m:()=>o});var i=n(86827),o=class{constructor(e){this.init=e,this.records=this.init()}static{(0,i.K)(this,"ImperativeState")}reset(){this.records=this.init()}}},77454(e,t,n){function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}n.d(t,{S:()=>i}),(0,n(86827).K)(i,"populateCommonDb")},14638(e,t,n){n.d(t,{diagram:()=>W});var i=n(15350),o=n(77454),r=n(14924),s=n(66955),c=n(13813),a=n(97844),d=n(31293),l=n(86827),h=n(78731),p=/[\u2500\u2501\u2502\u2503\u2514\u2517\u251c\u2523]/,g=/[\u2514\u2517\u251c\u2523]/,f=/[\u2500\u2501]/,u=/^[\s\u2502\u2503]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,x=/^\s*%%/;function m(e){return e.some(e=>p.test(e))}function b(e){for(const t of e){const e=g.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,n)=>{const i=parseInt(n,10),o=t.get(i);return o?`line ${o}`:e})}function k(e){const t=e.split("\n"),n=new Map;let i=-1;for(const[a,d]of t.entries())if("treeView-beta"===d.trim()){i=a;break}if(-1===i)return{text:e,lineMap:n};const o=[];for(let a=i+1;a<t.length;a++){const e=t[a];""===e.trim()||x.test(e)||w.test(e)||(u.test(e)||o.push(e.replace(/\t/g," ")))}if(!m(o))return{text:e,lineMap:n};const r=b(o),s=[];let c=0;for(let a=0;a<=i;a++)s.push(t[a]),c++,n.set(c,a+1);for(let a=i+1;a<t.length;a++){const e=t[a],i=a+1;if(""===e.trim()){s.push(e),c++,n.set(c,i);continue}if(x.test(e)){s.push(e),c++,n.set(c,i);continue}if(w.test(e)){s.push(e),c++,n.set(c,i);continue}if(u.test(e))continue;const o=e.replace(/\t/g," "),d=g.exec(o);if(void 0!==d?.index){const e=d.index,t=Math.round(e/r)+1;let a=e+1;for(;a<o.length&&f.test(o[a]);)a++;for(;a<o.length&&" "===o[a];)a++;const l=o.slice(a).trimEnd();if(!l)throw new Error(`Line ${i}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);const h=" ".repeat(t);s.push(h+l),c++,n.set(c,i)}else{if(/^[\s\u2500\u2501\u2502\u2503\u2514\u2517\u251c\u2523]+$/.test(o))continue;if(p.test(o))s.push(e),c++,n.set(c,i);else{if(/^\s+/.test(o))throw new Error(`Line ${i}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251c\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);s.push(e),c++,n.set(c,i)}}}return{text:s.join("\n"),lineMap:n}}(0,l.K)(m,"isBoxDrawingFormat"),(0,l.K)(b,"inferSegmentWidth"),(0,l.K)(y,"remapErrorLines"),(0,l.K)(k,"preprocessBoxDrawing");var $=new i.m(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),v=(0,l.K)(()=>{$.reset(),(0,a.IU)()},"clear"),C=(0,l.K)(()=>$.records.stack[0],"getRoot"),K=(0,l.K)(()=>$.records.cnt,"getCount"),V=a.UI.treeView,B=(0,l.K)(()=>(0,c.$t)(V,(0,a.zj)().treeView),"getConfig"),T={clear:v,addNode:(0,l.K)((e,t,n,i,o,r)=>{for(;e<=$.records.stack[$.records.stack.length-1].level;)$.records.stack.pop();const s={id:$.records.cnt++,level:e,name:t,nodeType:n,icon:o,cssClass:i,description:r,children:[]};$.records.stack[$.records.stack.length-1].children.push(s),$.records.stack.push(s)},"addNode"),getRoot:C,getCount:K,getConfig:B,getAccTitle:a.iN,getAccDescription:a.m7,getDiagramTitle:a.ab,setAccDescription:a.EI,setAccTitle:a.SV,setDiagramTitle:a.ke},I=(0,l.K)(e=>{(0,o.S)(e,T);for(const t of e.nodes){const e="number"==typeof t.indent?t.indent:0;let n=t.name;const i=n.endsWith("/");i&&(n=n.slice(0,-1));const o=i?"directory":"file",r=t.classAnnotation||void 0,s=t.iconAnnotation,c=void 0!==s?s||"none":void 0,d=t.descAnnotation||void 0,l=d?(0,a.jZ)(d,(0,a.zj)()):void 0;T.addNode(e,n,o,r,c,l)}},"populate"),M={parse:(0,l.K)(async e=>{const{text:t,lineMap:n}=k(e);try{const e=await(0,h.qg)("treeView",t);d.R.debug(e),I(e)}catch(i){throw n.size>0&&i instanceof Error&&(i.message=y(i.message,n)),i}},"parse")},D={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"/>'}
1,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 A(e,t){const n=t?.filenameIcons?.[e];if(n)return n;const i=e.lastIndexOf(".");if(i>0){const n=e.substring(i).toLowerCase(),o=t?.extensionIcons;return o?.[n]??o?.[n.slice(1)]}}function E(e,t){return e.includes(":")?e:e in D.icons||!t?`${D.prefix}:${e}`:`${t}:${e}`}function S(e,t){if("none"!==e.icon){if(e.icon)return E(e.icon,t.defaultIconPack);if(t.showIcons){if("file"===e.nodeType){const n=A(e.name,t);if("none"===n)return;if(n)return E(n,t.defaultIconPack)}return`${D.prefix}:${"directory"===e.nodeType?"folder":"file"}`}}}(0,l.K)(A,"detectIcon"),(0,l.K)(E,"qualifyIcon"),(0,l.K)(S,"getNodeIcon"),(0,s.pC)([{name:D.prefix,icons:D}]);var z=(0,l.K)(async(e,t)=>{const n=[],i=(0,l.K)(e=>{const o=S(e,t);o&&n.push({icon:o,node:e}),e.children.forEach(i)},"collect");i(e);const o=await Promise.all(n.map(async({icon:e,node:t})=>({id:t.id,svg:await(0,s.WY)(e,{height:14,width:14})})));return new Map(o.map(({id:e,svg:t})=>[e,t]))},"resolveNodeIcons"),N=(0,l.K)((e,t,n,i,o,r)=>{const s=i.append("g");let c="treeView-node-label";"directory"===n.nodeType&&(c+=" treeView-node-dir"),n.cssClass&&(c+=` ${n.cssClass}`);const a=S(n,o),d=void 0!==a;a&&s.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${e+o.paddingX}, ${t+o.paddingY})`).html(r.get(n.id)??"");const l=s.append("text").text(n.name).attr("dominant-baseline","middle").attr("class",c),{height:h,width:p}=l.node().getBBox(),g=h+2*o.paddingY,f=e+o.paddingX+(d?18:0);l.attr("x",f),l.attr("y",t+g/2);const u=f+p,w=p+2*o.paddingX+(d?18:0);return n.BBox={x:e,y:t,width:w,height:g},n.cssClass?.split(/\s+/).includes("highlight")&&s.insert("rect",":first-child").attr("x",e).attr("y",t+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:n,nodeGroup:s,labelRightEdge:u,centerY:t+g/2}},"positionLabel"),R=(0,l.K)((e,t,n,i,o,r)=>e.append("line").attr("x1",t).attr("y1",n).attr("x2",i).attr("y2",o).attr("stroke-width",r).attr("class","treeView-node-line"),"positionLine"),X=(0,l.K)((e,t,n,i)=>{let o=0,r=0;const s=[],c=(0,l.K)((e,t,n,c)=>{const a=c*(n.rowIndent+n.paddingX),d=N(a,o,t,e,n,i);s.push(d);const{height:l,width:h}=t.BBox;R(e,a-n.rowIndent,o+l/2,a,o+l/2,n.lineThickness),r=Math.max(r,a+h),o+=l},"drawNode"),a=(0,l.K)((t,i=0)=>{c(e,t,n,i),t.children.forEach(e=>{a(e,i+1)});const{x:o,y:r,height:s}=t.BBox;if(t.children.length){const{y:i,height:c}=t.children[t.children.length-1].BBox;R(e,o+n.paddingX,r+s,o+n.paddingX,i+c/2+n.lineThickness/2,n.lineThickness)}},"processNode");a(t);const d=s.filter(e=>e.node.description);if(d.length>0){const e=Math.max(...s.map(e=>e.labelRightEdge))+16;for(const t of d){const i=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();r=Math.max(r,e+i.width+n.paddingX)}}for(const l of s)if(l.node.cssClass?.split(/\s+/).includes("highlight")){const e=l.nodeGroup.select(".treeView-highlight-bg");if(!e.empty()){const t=r-l.node.BBox.x+8;e.attr("width",t),r=Math.max(r,l.node.BBox.x+t+2)}}return{totalHeight:o,totalWidth:r}},"drawTree"),L={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},W={db:T,renderer:{draw:(0,l.K)(async(e,t,n,i)=>{d.R.debug("Rendering treeView diagram\n"+e);const o=i.db,s=o.getRoot(),c=o.getConfig(),l=(0,r.D)(t),h=l.append("g");h.attr("class","tree-view");const p=await z(s,c),{totalHeight:g,totalWidth:f}=X(h,s,c,p);l.attr("viewBox",`-${c.lineThickness/2} 0 ${f} ${g}`),(0,a.a$)(l,g,f,c.useMaxWidth)},"draw")},parser:M,styles:(0,l.K)(({treeView:e})=>{const{labelFontSize:t,labelColor:n,lineColor:i,iconColor:o,descriptionColor:r,highlightBg:s,highlightStroke:a}=(0,c.$t)(L,e);return`\n .treeView-node-label {\n font-size: ${t};\n fill: ${n};\n white-space: pre;\n }\n .treeView-node-dir {\n font-weight: bold;\n }\n .treeView-node-line {\n stroke: ${i};\n }\n .treeView-node-icon {\n color: ${o};\n }\n .treeView-node-description {\n font-size: ${t};\n fill: ${r};\n font-style: italic;\n white-space: pre;\n }\n .treeView-highlight-bg {\n fill: ${s};\n stroke: ${a};\n stroke-width: 1;\n }\n `},"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.