PageSourceSearch

https://docs.iconsax.io/_nuxt/BvYKWV7l.js

js iconsax.io collected 2026-10-03 20:14:28 UTC 2,080 bytes, 1 lines download raw bytes

1import{d,ap as h,aq as C,I as v,b as u,o as p,w as f,r as m,h as s,ar as g,af as S,s as _,av as x,S as z,l as w,v as y,n as A,D as $,P as B,as as I}from"./DZduPnqv.js";const[R,b]=C("AvatarRoot"),L=d({__name:"AvatarRoot",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return h(),b({imageLoadingStatus:v("loading")}),(a,e)=>(p(),u(s(g),{"as-child":a.asChild,as:a.as},{default:f(()=>[m(a.$slots,"default")]),_:3},8,["as-child","as"]))}});function j(t,a){const e=v("idle"),o=v(!1),l=r=>()=>{o.value&&(e.value=r)};return S(()=>{o.value=!0,_([()=>t.value,()=>a==null?void 0:a.value],([r,c])=>{if(!r)e.value="error";else{const n=new window.Image;e.value="loading",n.onload=l("loaded"),n.onerror=l("error"),n.src=r,c&&(n.referrerPolicy=c)}},{immediate:!0})}),x(()=>{o.value=!1}),e}const k=d({__name:"AvatarImage",props:{src:{},referrerPolicy:{},asChild:{type:Boolean},as:{default:"img"}},emits:["loadingStatusChange"],setup(t,{emit:a}){const e=t,o=a,{src:l,referrerPolicy:r}=z(e);h();const c=R(),n=j(l,r);return _(n,i=>{o("loadingStatusChange",i),i!=="idle"&&(c.imageLoadingStatus.value=i)},{immediate:!0}),(i,q)=>w((p(),u(s(g),{role:"img","as-child":i.asChild,as:i.as,src:s(l),"referrer-policy":s(r)},{default:f(()=>[m(i.$slots,"default")]),_:3},8,["as-child","as","src","referrer-policy"])),[[y,s(n)==="loaded"]])}}),M=d({__name:"Avatar",props:{class:{},size:{default:"sm"},shape:{default:"circle"}},setup(t){const a=t;return(e,o)=>(p(),u(s(L),{class:A(s($)(s(P)({size:e.size,shape:e.shape}),a.class))},{default:f(()=>[m(e.$slots,"default")]),_:3},8,["class"]))}}),E=d({__name:"AvatarImage",props:{src:{},referrerPolicy:{},asChild:{type:Boolean},as:{}},setup(t){const a=t;return(e,o)=>(p(),u(s(k),B(a,{class:"size-full object-cover"}),{default:f(()=>[m(e.$slots,"default")]),_:3},16))}}),P=I("bg-secondary text-foreground inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-normal",{variants:{size:{sm:"size-10 text-xs",base:"size-16 text-2xl",lg:"size-32 text-5xl"},shape:{circle:"rounded-full",square:"rounded-md"}}});export{M as _,E as a};

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.