1import f from"./DqIKrIDH.js";import z from"./BZGR7yIn.js";import S from"./CcggGS2i.js";import{i as d}from"./NUoIgR6R.js";import{p as g}from"./DrwGJLjZ.js";import{s as b}from"./BAqXvIa3.js";import{_ as p,c as r,j as u,n as h,F as y,t as m,e as l,b as v,a as n,l as c,o as a}from"./C_dDoqqV.js";const C={"2xs":"w-lg h-lg",xs:"w-xl h-xl",sm:"w-[40px] h-[40px]",md:"w-[40px] h-[40px] md:w-2xl md:h-2xl",lg:"w-[56px] h-[56px]",xl:"w-3xl h-3xl","2xl":"w-[72px] h-[72px]","3xl":"w-4xl h-4xl","4xl":"w-[88px] h-[88px]","5xl":"w-[96px] h-[96px]"},I=new Set(["initials","photo","placeholder","brand","hexagon"]),F=new Set(["2xs","xs","sm","md","lg","xl","2xl","3xl","4xl","5xl"]),L={name:"Avatar",components:{IconIntersect:z,VImage:f},props:{variant:{type:String,validator:o=>I.has(o),default:"initials"},size:{type:String,validator:o=>F.has(o),default:"2xs"},data:{type:Object,default:()=>({})},verified:{type:Boolean,default:!1},notification:{type:Boolean,default:!1},brandFaviconUrl:{type:String,default:""},brandColor:{type:String,default:""},level:{type:String,default:"Gold",validator:o=>["Gold","Silver","Bronze"].includes(o)}},data(){return{iconSizeMap:d,uniqueId:`avatar-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}},computed:{shieldSmallUrl:()=>b,authorPhoto(){return["photo","brand","hexagon"].includes(this.variant)&&this.data?.authorPhoto},isInitials(){return this.variant==="initials"},initials(){return this.data.name.split(" ").map((o,s,e)=>s===0||s+1===e.length?o[0]:null).join("")},isBrand(){return this.variant==="brand"},avatarWidth(){return g(d.imageAvatarWidth[this.size])},avatarHeight(){return g(d.imageAvatarHeight[this.size])},imageSizeClass(){return C[this.size]},borderSizeClass(){return d.borderAvatarSizes[this.size]},iconClass(){return this.isBrand?"w-full h-full":""},iconFixed(){return"bottom-0 right-0"},iconHexagonFixed(){switch(this.size){case"2xs":return"bottom-0 right-px";case"xs":return"bottom-px right-px";case"sm":return"bottom-px right-px";case"md":return"bottom-px right-px";case"lg":return"bottom-3xs right-3xs";case"xl":return"bottom-3xs right-3xs";case"2xl":return"bottom-3xs right-3xs";case"3xl":return"bottom-3xs right-3xs";case"4xl":return"bottom-3xs right-3xs";default:return"bottom-0 right-3xs"}},brandFaviconClass(){return"absolute rounded-pill overflow-hidden w-[21px] h-[21px] md:w-[29px] md:h-[29px] -right-[6px] -bottom-2xs"},hexagonBrandFaviconClass(){return`absolute rounded-pill overflow-hidden ${this.iconHexagonFixed}`},isHexagon(){return this.variant==="hexagon"},hexagonSizeClass(){return`${d.hexagonAvatarWidth[this.size]} ${d.hexagonAvatarHeight[this.size]}`},hexagonPatternId(){return`hexagon-pattern-${this.uniqueId}`},hexagonClipPathId(){return`hexagon-clip-path-${this.uniqueId}`},hexagonGradientId(){return`hexagon-gradient-${this.level.toLowerCase()}-${this.uniqueId}`}}},M={key:0,class:"absolute font-bold text-foreground-regular top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 p-xs"},k=["width","height"],A=["src","width","height"],B=["src"],P=["width","height"],U=["fill"],G=["stroke"],H=["id"],O=["id"],V=["id"],j=["id"],E=["id"],W=["href","aria-label"],q={key:0},D=["width","height"],N=["src","width","height"];function Z(o,s,e,Q,i,t){const x=f,_=z,w=S;return t.isHexagon?(a(),r("div",{key:1,class:h(["relative",t.hexagonSizeClass])},[t.authorPhoto?(a(),r("img",{key:0,src:t.authorPhoto,alt:"",class:"hidden",loading:"eager",fetchpriority:"high"},null,8,B)):l("",!0),(a(),r("svg",{width:t.hexagonSizeClass.match(/w-\[(\d+)px\]/)[1],height:t.hexagonSizeClass.match(/h-\[(\d+)px\]/)[1],viewBox:"0 0 83 88",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n("g",null,[n("path",{d:"M8.17898 24.929L6.51149 57.7397C6.33899 61.0036 8.12148 64.0384 10.9965 65.47L37.7338 79.0981C40.0913 80.3006 42.9087 80.3006 45.2662 79.0981L72.0035 65.47C74.8785 63.9812 76.661 60.9463 76.4885 57.7397L74.821 24.929C74.6485 22.0087 72.981 19.4319 70.3935 18.0576L45.3237 4.94481C42.9087 3.68506 40.0338 3.68506 37.6188 4.94481L12.6064 18.0576C10.019 19.3746 8.35148 22.0087 8.17898 24.929Z",fill:t.authorPhoto?`url(#${t.hexagonPatternId})`:`url(#${t.hexagonGradientId})`,"shape-rendering":"geometricPrecision"},null,8,U),n("path",{d:"M37.1562 4.05859C39.861 2.64767 43.0813 2.64767 45.7861 4.05859H45.7871L70.8574 17.1719L70.8623 17.1748C73.6646 18.6631 7
15.5077 21.4191 75.7959 24.5645L75.8193 24.8701V24.8779L77.4873 57.6855L77.499 58.0234C77.5552 61.5075 75.5758 64.7464 72.4629 66.3584L72.458 66.3613L45.7207 79.9893C43.0778 81.3373 39.9222 81.3373 37.2793 79.9893L10.542 66.3613V66.3604C7.31445 64.7488 5.31941 61.3437 5.5127 57.6865L7.18066 24.8779V24.8701C7.37325 21.6098 9.23676 18.6505 12.1533 17.166L37.1543 4.05957L37.1562 4.05859Z",stroke:`url(#${t.hexagonGradientId})`,"stroke-width":"2","shape-rendering":"geometricPrecision"},null,8,G)]),n("defs",null,[n("clipPath",{id:t.hexagonClipPathId,transform:"translate(9.5 12)"},[...s[0]||(s[0]=[n("path",{d:"M8.17898 24.929L6.51149 57.7397C6.33899 61.0036 8.12148 64.0384 10.9965 65.47L37.7338 79.0981C40.0913 80.3006 42.9087 80.3006 45.2662 79.0981L72.0035 65.47C74.8785 63.9812 76.661 60.9463 76.4885 57.7397L74.821 24.929C74.6485 22.0087 72.981 19.4319 70.3935 18.0576L45.3237 4.94481C42.9087 3.68506 40.0338 3.68506 37.6188 4.94481L12.6064 18.0576C10.019 19.3746 8.35148 22.0087 8.17898 24.929Z"},null,-1)])],8,H),e.level==="Gold"?(a(),r("linearGradient",{key:0,id:t.hexagonGradientId,x1:"11.198",y1:"18.25",x2:"72.9438",y2:"21.1931",gradientUnits:"userSpaceOnUse"},[...s[1]||(s[1]=[n("stop",{offset:"0.04","stop-color":"#FDE68A"},null,-1),n("stop",{offset:"0.4848","stop-color":"#FBBF24"},null,-1),n("stop",{offset:"1","stop-color":"#F59E0B"},null,-1)])],8,O)):l("",!0),e.level==="Silver"?(a(),r("linearGradient",{key:1,id:t.hexagonGradientId,x1:"11.198",y1:"18.25",x2:"72.9438",y2:"21.1931",gradientUnits:"userSpaceOnUse"},[...s[2]||(s[2]=[n("stop",{offset:"0.04","stop-color":"#E0F2FE"},null,-1),n("stop",{offset:"1","stop-color":"#4B6392"},null,-1)])],8,V)):l("",!0),e.level==="Bronze"?(a(),r("linearGradient",{key:2,id:t.hexagonGradientId,x1:"11.198",y1:"18.25",x2:"72.9438",y2:"21.1931",gradientUnits:"userSpaceOnUse"},[...s[3]||(s[3]=[n("stop",{offset:"0.0879611","stop-color":"#D97706"},null,-1),n("stop",{offset:"1","stop-color":"#652C0B"},null,-1)])],8,j)):l("",!0),t.authorPhoto?(a(),r("pattern",{key:3,id:t.hexagonPatternId,patternUnits:"userSpaceOnUse",width:"83",height:"88",x:"0",y:"0"},[n("image",{id:"hexagon-image",width:"83",height:"88",x:"0",y:"0",preserveAspectRatio:"xMidYMid slice","image-rendering":"optimizeQuality","shape-rendering":"geometricPrecision",href:t.authorPhoto,"aria-label":e.data?.name||null},[e.data?.name?(a(),r("title",q,m(e.data.name),1)):l("",!0)],8,W)],8,E)):l("",!0)])],8,P)),e.verified?(a(),r("div",{key:1,class:h(["absolute",t.iconFixed]),style:c({width:`${i.iconSizeMap.verifiedAvatarIcon[e.size]}px`,height:`${i.iconSizeMap.verifiedAvatarIcon[e.size]}px`}),width:i.iconSizeMap.verifiedAvatarIcon[e.size],height:i.iconSizeMap.verifiedAvatarIcon[e.size]},[v(w,{name:"shield-small",width:i.iconSizeMap.verifiedAvatarIcon[e.size],height:i.iconSizeMap.verifiedAvatarIcon[e.size],"aria-hidden":"true",role:"img"},null,8,["width","height"])],14,D)):l("",!0),e.brandFaviconUrl?(a(),r("img",{key:2,src:e.brandFaviconUrl,style:c({width:`${i.iconSizeMap.brandFaviconSize[e.size]}px`,height:`${i.iconSizeMap.brandFaviconSize[e.size]}px`}),alt:"Brand favicon",class:h(t.hexagonBrandFaviconClass),width:i.iconSizeMap.brandFaviconSize[e.size],height:i.iconSizeMap.brandFaviconSize[e.size],loading:"lazy"},null,14,N)):l("",!0)],2)):(a(),r("div",{key:0,class:h(["flex relative",`${t.imageSizeClass}`])},[t.authorPhoto?(a(),u(x,{key:0,src:e.data.authorPhoto,alt:e.data.name,classes:"w-full h-full",class:h([t.borderSizeClass,"object-cover rounded-pill color-stroke-accent overflow-hidden"]),width:t.avatarWidth,height:t.avatarHeight},null,8,["src","alt","class","width","height"])):(a(),r(y,{key:1},[t.isInitials?(a(),r("span",M,m(t.initials),1)):l("",!0),v(_,{width:i.iconSizeMap.verifiedAvatarIcon[e.size],height:i.iconSizeMap.verifiedAvatarIcon[e.size],color:"currentColor",class:h(t.iconClass)},null,8,["width","height","class"])],64)),e.verified?(a(),r("div",{key:2,class:h(["absolute",t.iconFixed]),width:i.iconSizeMap.verifiedAvatarIcon[e.size],height:i.iconSizeMap.verifiedAvatarIcon[e.size]},[n("img",{src:t.shieldSmallUrl,width:i.iconSizeMap.verifiedAvatarIcon[e.size],height:i.iconSizeMap.verifiedAvatarIcon[e.size],alt:"","aria-hidden":"true",role:"img",loading:"lazy",decoding:"async"},null,8,A)],10,k)):l("",!0),t.isBrand&&e.brandFaviconUrl?(a(),u(x,{key:3,src:e.brandFaviconUrl,
1style:c({"box-shadow":`0 1px 23px 1px ${e.brandColor}`}),class:h(t.brandFaviconClass),width:t.avatarWidth/2,height:t.avatarHeight/2},null,8,["src","style","class","width","height"])):l("",!0)],2))}const ee=Object.assign(p(L,[["render",Z],["__scopeId","data-v-904e744a"]]),{__name:"Avatar"});export{ee 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.