1import"./DsnmJJEf.js";import{u as S,h as c,l as I,U as M,p as P,b as _,d as b,a as g,e as x,c as H,m as J,r as K,f as O}from"./DaVHO1IQ.js";import{c as z}from"./BIDP4hjR.js";import{p as n,r as A,s as R}from"./DITARmhu.js";import{c as T}from"./BFBDibVz.js";import{s as w}from"./Bvwue9Bc.js";import{i as D}from"./ES-JY3d4.js";import{c as L}from"./C6VWFyT8.js";import{a as j,d as N,c as q,b as y,m as B}from"./D5tAXFu9.js";import{r as Q}from"./C69uO5cC.js";import{C as V,w as X}from"./B8F3L-xP.js";import{D as Y}from"./DWks5jUz.js";const U=N({component:"avatar",parts:["root","image","fallback"]}),W=new V("Avatar.Root");class E{static create(t){return W.set(new E(t))}opts;domContext;attachment;constructor(t){this.opts=t,this.domContext=new Y(this.opts.ref),this.loadImage=this.loadImage.bind(this),this.attachment=j(this.opts.ref)}loadImage(t,a,s){if(this.opts.loadingStatus.current==="loaded")return;let r;const o=new Image;return o.src=t,a!==void 0&&(o.crossOrigin=a),s&&(o.referrerPolicy=s),this.opts.loadingStatus.current="loading",o.onload=()=>{r=this.domContext.setTimeout(()=>{this.opts.loadingStatus.current="loaded"},this.opts.delayMs.current)},o.onerror=()=>{this.opts.loadingStatus.current="error"},()=>{r&&this.domContext.clearTimeout(r)}}#t=S(()=>({id:this.opts.id.current,[U.root]:"","data-status":this.opts.loadingStatus.current,...this.attachment}));get props(){return c(this.#t)}set props(t){I(this.#t,t)}}class F{static create(t){return new F(t,W.get())}opts;root;attachment;constructor(t,a){this.opts=t,this.root=a,this.attachment=j(this.opts.ref),X.pre([()=>this.opts.src.current,()=>this.opts.crossOrigin.current],([s,r])=>
1{if(!s){this.root.opts.loadingStatus.current="error";return}this.root.loadImage(s,r,this.opts.referrerPolicy.current)})}#t=S(()=>({id:this.opts.id.current,style:{display:this.root.opts.loadingStatus.current==="loaded"?"block":"none"},"data-status":this.root.opts.loadingStatus.current,[U.image]:"",src:this.opts.src.current,crossorigin:this.opts.crossOrigin.current,referrerpolicy:this.opts.referrerPolicy.current,...this.attachment}));get props(){return c(this.#t)}set props(t){I(this.#t,t)}}class G{static create(t){return new G(t,W.get())}opts;root;attachment;constructor(t,a){this.opts=t,this.root=a,this.attachment=j(this.opts.ref)}#t=S(()=>this.root.opts.loadingStatus.current==="loaded"?{display:"none"}:void 0);get style(){return c(this.#t)}set style(t){I(this.#t,t)}#e=S(()=>({style:this.style,"data-status":this.root.opts.loadingStatus.current,[U.fallback]:"",...this.attachment}));get props(){return c(this.#e)}set props(t){I(this.#e,t)}}var Z=O("<div><!></div>");function $(m,t){const a=M();P(t,!0);let s=n(t,"delayMs",3,0),r=n(t,"loadingStatus",15,"loading"),o=n(t,"id",19,()=>q(a)),d=n(t,"ref",15,null),u=A(t,["$$slots","$$events","$$legacy","delayMs","loadingStatus","onLoadingStatusChange","child","children","id","ref"]);const f=E.create({delayMs:y(()=>s()),loadingStatus:y(()=>r(),e=>{r()!==e&&(r(e),t.onLoadingStatusChange?.(e))}),id:y(()=>o()),ref:y(()=>d(),e=>d(e))}),l=S(()=>B(u,f.props));var v=_(),C=b(v);{var h=e=>{var i=_(),k=b(i);w(k,()=>t.child,()=>({props:c(l)})),g(e,i)},p=e=>{var i=Z();L(i,()=>({...c(l)}));var k=H(i);w(k,()=>t.children??J),K(i),g(e,i)};D(C,e=>{t.child?e(h):e(p,!1)})}g(m,v),x()}var tt=O("<img/>");function et(m,t){const a=M();P(t,!0);let s=n(t,"id",19,()=>q(a)),r=n(t,"ref",15,null),o=n(t,"crossorigin",3,void 0),d=n(t,"referrerpolicy",3,void 0),u=A(t,["$$slots","$$events","$$legacy","src","child","id","ref","crossorigin","referrerpolicy"]);const f=F.create({src:y(()=>t.src),id:y(()=>s()),ref:y(()=>r(),e=>r(e)),crossOrigin:y(()=>o()),referrerPolicy:y(()=>d())}),l=S(()=>B(u,f.props));var v=_(),C=b(v);{var h=e=>{var i=_(),k=b(i);w(k,()=>t.child,()=>({props:c(l)})),g(e,i)},p=e=>{var i=tt();L(i,()=>({...c(l),src:t.src})),Q(i),g(e,i)};D(C,e=>{t.child?e(h):e(p,!1)})}g(m,v),x()}var rt=O("<span><!></span>");function at(m,t){const a=M();P(t,!0);let s=n(t,"id",19,()=>q(a)),r=n(t,"ref",15,null),o=A(t,["$$slots","$$events","$$legacy","children","child","id","ref"]);const d=G.create({id:y(()=>s()),ref:y(()=>r(),h=>r(h))}),u=S(()=>B(o,d.props));var f=_(),l=b(f);{var v=h=>{var p=_(),e=b(p);w(e,()=>t.child,()=>({props:c(u)})),g(h,p)},C=h=>{var p=rt();L(p,()=>({...c(u)}));var e=H(p);w(e,()=>t.children??J),K(p),g(h,p)};D(l,h=>{t.child?h(v):h(C,!1)})}g(m,f),x()}function vt(m,t){P(t,!0);let a=n(t,"ref",15,null),s=n(t,"loadingStatus",15,"loading"),r=A(t,["$$slots","$$events","$$legacy","ref","loadingStatus","class"]);var o=_(),d=b(o);{let u=S(()=>T("relative flex size-8 shrink-0 overflow-hidden rounded-full",t.class));z(d,()=>$,(f,l)=>{l(f,R({"data-slot":"avatar",get class(){return c(u)}},()=>r,{get ref(){return a()},set ref(v){a(v)},get loadingStatus(){return s()},set loadingStatus(v){s(v)}}))})}g(m,o),x()}function pt(m,t){P(t,!0);let a=n(t,"ref",15,null),s=A(t,["$$slots","$$events","$$legacy","ref","class"]);var r=_(),o=b(r);{let d=S(()=>T("aspect-square size-full",t.class));z(o,()=>et,(u,f)=>{f(u,R({"data-slot":"avatar-image",get class(){return c(d)}},()=>s,{get ref(){return a()},set ref(l){a(l)}}))})}g(m,r),x()}function yt(m,t){P(t,!0);let a=n(t,"ref",15,null),s=A(t,["$$slots","$$events","$$legacy","ref","class"]);var r=_(),o=b(r);{let d=S(()=>T("bg-muted flex size-full items-center justify-center rounded-full",t.class));z(o,()=>at,(u,f)=>{f(u,R({"data-slot":"avatar-fallback",get class(){return c(d)}},()=>s,{get ref(){return a()},set ref(l){a(l)}}))})}g(m,r),x()}export{vt as A,pt as a,yt as b};
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.