PageSourceSearch

https://elysiajs.com/assets/chunks/diagram-5BDNPKRD.KZeBm1GI.js

js elysiajs.com collected 2026-09-25 19:09:18 UTC 2,907 bytes, 10 lines download raw bytes

1import{q as x,b as f,s as C,t as B,g as T,a as y,_ as s,H as u,l as k,L as V,e as _,F as N,I as S,A}from"./mermaid.core.DfzPUtSG.js";import{p as D}from"./chunk-4BX2VUAB.B98XCNCk.js";import{I}from"./chunk-QZHKN3VN.Dj_CQgV5.js";import{p as $}from"./wardley-RL74JXVD.AFsVu8eu.js";import"./framework.B8hc4P1C.js";import"./theme.LtDDF5mG.js";import"./dayjs.min.HVubNV5D.js";import"./commonjsHelpers.CE1G-McA.js";import"./min.D_GYsnI4.js";import"./baseUniq.DzhncyyX.js";var d=new I(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),H=s(()=>{d.reset(),A()},"clear"),L=s(()=>d.records.stack[0],"getRoot"),X=s(()=>d.records.cnt,"getCount"),z=S.treeView,R=s(()=>u(z,N().treeView),"getConfig"),W=s((e,t)=>{for(;e<=d.records.stack[d.records.stack.length-1].level;)d.records.stack.pop();const r={id:d.records.cnt++,level:e,name:t,children:[]};d.records.stack[d.records.stack.length-1].children.push(r),d.records.stack.push(r)},"addNode"),E={clear:H,addNode:W,getRoot:L,getCount:X,getConfig:R,getAccTitle:y,getAccDescription:T,getDiagramTitle:B,setAccDescription:C,setAccTitle:f,setDiagramTitle:x},w=E,F=s(e=>{D(e,w),e.nodes.map(t=>w.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),M={parse:s(async e=>{const t=await $("treeView",e);k.debug(t),F(t)},"parse")},Y=s((e,t,r,i,n)=>{const c=i.append("text").text(r.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:p,width:a}=c.node().getBBox(),l=p+n.paddingY*2,o=a+n.paddingX*2;c.attr("x",e+n.paddingX),c.attr("y",t+l/2),r.BBox={x:e,y:t,width:o,height:l}},"positionLabel"),b=s((e,t,r,i,n,c)=>e.append("line").attr("x1",t).attr("y1",r).attr("x2",i).attr("y2",n).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),q=s((e,t,r)=>{let i=0,n=0;const c=s((a,l,o,h)=>{const m=h*(o.rowIndent+o.paddingX);Y(m,i,l,a,o);const{height:g,width:v}=l.BBox;b(a,m-o.rowIndent,i+g/2,m,i+g/2,o.lineThickness),n=Math.max(n,m+v),i+=g},"drawNode"),p=s((a,l=0)=>{c(e,a,r,l),a.children.forEach(g=>{p(g,l+1)});const{x:o,y:h,height:m}=a.BBox;if(a.children.length){const{y:g,height:v}=a.children[a.children.length-1].BBox;b(e,o+r.paddingX,h+m,o+r.paddingX,g+v/2+r.lineThickness/2,r.lineThickness)}},"processNode");return p(t),{totalHeight:i,totalWidth:n}},"drawTree"),j=s((e,t,r,i)=>{k.debug(`Rendering treeView diagram
2`+e);const n=i.db,c=n.getRoot(),p=n.getConfig(),a=V(t),l=a.append("g");l.attr("class","tree-view");const{totalHeight:o,totalWidth:h}=q(l,c,p);a.attr("viewBox",`-${p.lineThickness/2} 0 ${h} ${o}`),_(a,o,h,p.useMaxWidth)},"draw"),G={draw:j},J=G,K={labelFontSize:"16px",labelColor:"black",lineColor:"black"},O=s(({treeView:e})=>{const{labelFontSize:t,labelColor:r,lineColor:i}=u(K,e);return`
3    .treeView-node-label {
4        font-size: ${t};
5        fill: ${r};
6    }
7    .treeView-node-line {
8        stroke: ${i};
9    }
10    `},"styles"),P=O,ne={db:w,renderer:J,parser:M,styles:P};export{ne 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.