1import{T as e,a as t,c as n,D as r,N as a,o,b as s,a7 as l,i,az as u,n as c}from"./CowmiXBc.js";const d=["innerHTML"],v=e({__name:"MazIcon",props:{src:{type:String,default:void 0},path:{type:String,default:void 0},name:{type:String,default:void 0},size:{type:String,default:void 0},title:{type:String,default:void 0},transformSource:{type:Function,default:e=>e}},emits:["loaded","unloaded","error"],setup(e,{emit:v}){const f=e,m=v,p={},g=t(),y=t();const S=n((()=>f.path??function(){try{return u("mazIconPath")}catch{return}}())),h=n((()=>f.src?f.src:S.value?`${S.value}/${f.name}.svg`:`/${f.name}.svg`));function w(e){return Object.keys(e).reduce(((t,n)=>(!1!==e[n]&&null!==e[n]&&void 0!==e[n]&&(t[n]=e[n]),t)),{})}function E(e){const t={},n=e.attributes;if(!n)return t;for(let r=n.length-1;r>=0;r--)t[n[r].name]=n[r].value;return t}function L(e){let t=e.cloneNode(!0);return t=f.transformSource(e),f.title&&function(e,t){const n=e.querySelectorAll("title");if(n.length>0)n[0].textContent=t;else{const n=document.createElementNS("http://www.w3.org/2000/svg","title");n.textContent=t,e.append(n)}}(t,f.title),e.innerHTML}async function x(e){p[e]||(p[e]=function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.addEventListener("load",(()=>{if(r.status>=200&&r.status<400)try{let e=(new DOMParser).parseFromString(r.responseText,"text/xml").querySelectorAll("svg")[0];e?(e=f.transformSource(e),t(e)):n(new Error('Loaded file is not valid SVG"'))}catch(e){n(e)}else n(new Error("Error loading SVG"))})),r.addEventListener("error",(e=>n(e))),r.send()}))}(e));try{g.value=await p[e],await c(),m("loaded",y.value)}catch(t){g.value&&(g.value=void 0,m("unloaded")),delete p[e],m("error",t)}}return r((()=>{!f.name&&f.src})),a((()=>x(h.value))),(t,n)=>g.value?(o(),s("svg",l({key:0,ref_key:"svgElem",ref:y,width:"1em",height:"1em"},{...E(g.value),...w(t.$attrs)},{style:`font-size: ${e.size}`,innerHTML:L(g.value)}),null,16,d)):i("v-if",!0)}});export{v as default};
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.