PageSourceSearch

https://lusun.com/assets/7203.bdd6a4bb.js

js lusun.com collected 2026-10-05 22:50:22 UTC 5,273 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunklusun_web=self.webpackChunklusun_web||[]).push([[7203],{29397:(e,t,a)=>{function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{A:()=>i}),(0,a(93287).e)(i,"populateCommonDb")},43171:(e,t,a)=>{a.r(t),a.d(t,{diagram:()=>k});var i=a(29397),n=a(95142),l=a(97169),r=a(2212),s=a(53002),o=a(93287),c=a(62839),d=a(28168),p=r.vZ.pie,h={sections:new Map,showData:!1,config:p},u=h.sections,g=h.showData,f=structuredClone(p),m=(0,o.e)((()=>structuredClone(f)),"getConfig"),w=(0,o.e)((()=>{u=new Map,g=h.showData,(0,r.ZH)()}),"clear"),b=(0,o.e)((({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);u.has(e)||(u.set(e,t),s.c.debug(`added new section: ${e}, with value: ${t}`))}),"addSection"),x=(0,o.e)((()=>u),"getSections"),$=(0,o.e)((e=>{g=e}),"setShowData"),S=(0,o.e)((()=>g),"getShowData"),v={getConfig:m,clear:w,setDiagramTitle:r.g2,getDiagramTitle:r.Kr,setAccTitle:r.GN,getAccTitle:r.eu,setAccDescription:r.U$,getAccDescription:r.Mx,addSection:b,getSections:x,setShowData:$,getShowData:S},y=(0,o.e)(((e,t)=>{(0,i.A)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)}),"populateDb"),C={parse:(0,o.e)((async e=>{const t=await(0,c.Qc)("pie",e);s.c.debug(t),y(t,v)}),"parse")},D=(0,o.e)((e=>`\n  .pieCircle{\n    stroke: ${e.pieStrokeColor};\n    stroke-width : ${e.pieStrokeWidth};\n    opacity : ${e.pieOpacity};\n  }\n  .pieCircle.highlighted{\n    scale: 1.05;\n    opacity: 1;\n  }\n  .pieCircle.highlightedOnHover:hover{\n    transition-duration: 250ms;\n    scale: 1.05;\n    opacity: 1;\n  }\n  .pieOuterCircle{\n    stroke: ${e.pieOuterStrokeColor};\n    stroke-width: ${e.pieOuterStrokeWidth};\n    fill: none;\n  }\n  .pieTitleText {\n    text-anchor: middle;\n    font-size: ${e.pieTitleTextSize};\n    fill: ${e.pieTitleTextColor};\n    font-family: ${e.fontFamily};\n  }\n  .slice {\n    font-family: ${e.fontFamily};\n    fill: ${e.pieSectionTextColor};\n    font-size:${e.pieSectionTextSize};\n    // fill: white;\n  }\n  .legend text {\n    fill: ${e.pieLegendTextColor};\n    font-family: ${e.fontFamily};\n    font-size: ${e.pieLegendTextSize};\n  }\n`),"getStyles"),T=(0,o.e)((e=>{const t=[...e.values()].reduce(((e,t)=>e+t),0),a=[...e.entries()].map((([e,t])=>({label:e,value:t}))).filter((e=>e.value/t*100>=1));return(0,d.ve8)().value((e=>e.value)).sort(null)(a)}),"createPieArcs"),k={parser:C,db:v,renderer:{draw:(0,o.e)(((e,t,a,i)=>{s.c.debug("rendering pie chart\n"+e);const o=i.db,c=(0,r.nV)(),p=(0,l.Rb)(o.getConfig(),c.pie),h=18,u=450,g=u,f=(0,n.P)(t),m=f.append("g");m.attr("transform","translate(225,225)");const{themeVariables:w}=c;let[b]=(0,l.VG)(w.pieOuterStrokeWidth);b??=2;const x=p.legendPosition,$=p.textPosition,S=p.donutHole>0&&p.donutHole<=.9?p.donutHole:0,v=Math.min(g,u)/2-40,y=(0,d.Nb1)().innerRadius(S*v).outerRadius(v),C=(0,d.Nb1)().innerRadius(v*$).outerRadius(v*$),D=m.append("g");D.append("circle").attr("cx",0).attr("cy",0).attr("r",v+b/2).attr("class","pieOuterCircle");const k=o.getSections(),A=T(k),M=[w.pie1,w.pie2,w.pie3,w.pie4,w.pie5,w.pie6,w.pie7,w.pie8,w.pie9,w.pie10,w.pie11,w.pie12];let O=0;k.forEach((e=>{O+=e}));const R=A.filter((e=>"0"!==(e.data.value/O*100).toFixed(0))),z=(0,d.PKp)(M).domain([...k.keys()]);D.selectAll("mySlices").data(R).enter().append("path").attr("d",y).attr("fill",(e=>z(e.data.label))).attr("class",(e=>{let t="pieCircle";return"hover"===p.highlightSlice?t+=" highlightedOnHover":p.highlightSlice===e.data.label&&(t+=" highlighted"),t})),D.selectAll("mySlices").data(R).enter().append("text").text((e=>(e.data.value/O*100).toFixed(0)+"%")).attr("transform",(e=>"translate("+C.centroid(e)+")")).style("text-anchor","middle").attr("class","slice");const H=m.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),F=[...k.entries()].map((([e,t])=>({label:e,value:t}))),P=m.selectAll(".legend").data(F).enter().append("g").attr("class","legend");P.append("rect").attr("width",h).attr("height",h).style("fill",(e=>z(e.label))).style("stroke",(e=>z(e.label))),P.append("text").attr("x",22).attr("y",14).text((e=>o.getShowData()?`${e.label} [${e.value}]`:e.label));const N=Math.max(...P.selectAll("text").nodes().map((e=>e?.getBoundingClientRect().width??0)));let W=u,B=490;const V=22,E=F.length*V;switch(x){case"center":P.attr("transform",((e,t)=>
1{const a=V*F.length/2;return"translate("+(-N/2-22)+","+(t*V-a)+")"}));break;case"top":W+=E,P.attr("transform",((e,t)=>`translate(${-N/2-22}, ${t*V-v})`)),D.attr("transform",(()=>`translate(0, ${E+V})`));break;case"bottom":W+=E,P.attr("transform",((e,t)=>"translate("+(-N/2-22)+","+(t*V-(-v-V))+")"));break;case"left":B+=22+N,P.attr("transform",((e,t)=>{const a=V*F.length/2;return"translate("+(-v-22)+","+(t*V-a)+")"})),D.attr("transform",(()=>`translate(${N+h+4}, 0)`));break;default:B+=22+N,P.attr("transform",((e,t)=>{const a=V*F.length/2;return"translate(216,"+(t*V-a)+")"}))}const G=H.node()?.getBoundingClientRect().width??0,K=225-G/2,L=225+G/2,Z=Math.min(0,K),_=Math.max(B,L)-Z;f.attr("viewBox",`${Z} 0 ${_} ${W}`),(0,r.v2)(f,W,_,p.useMaxWidth)}),"draw")},styles:D}}}]);

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.