PageSourceSearch

https://www.kudoboard.com/build/assets/index-BRPYYRbd.js

js kudoboard.com collected 2026-10-02 02:55:17 UTC 2,322 bytes, 1 lines download raw bytes

1import{c as m}from"./tailwind-Bc-EYKSC.js";import{P as w,c as g,o as u,n as p,u as c,l as o,t as N,m as x,p as h,d as f,E as d}from"./runtime-dom.esm-bundler-B8eLWgJQ.js";const $=["src","alt"],k={__name:"avatar-image",props:{src:{type:String,required:!0},firstName:{type:String,default:null},alt:{type:String,default:null}},emits:["error"],setup(t){const e=w();return(a,r)=>(u(),g("img",{src:t.src,alt:t.alt||(t.firstName?`${t.firstName}'s photo`:"User photo"),class:p(c(m)("tw-w-[28px] tw-h-[28px] tw-rounded-full tw-object-cover tw-shrink-0 tw-border tw-border-solid tw-border-gray-40",c(e).class)),onError:r[0]||(r[0]=l=>a.$emit("error"))},null,42,$))}},A=["aria-label"],O="A",q="tw-bg-slate-400 tw-text-slate-200",C={__name:"avatar-fallback",props:{firstName:{type:String,default:null},userSqid:{type:String,default:null},colorSeed:{type:String,default:null}},setup(t){const e=t,a=w(),r=["tw-bg-blue-400 tw-text-blue-200","tw-bg-pink-400 tw-text-pink-200","tw-bg-purple-400 tw-text-purple-200","tw-bg-green-400 tw-text-green-200","tw-bg-orange-400 tw-text-orange-200"];function l(s){return Array.from(s).reduce((i,y)=>i*31+y.charCodeAt(0),0)}const n=o(()=>{var s;return!!((s=e.firstName)!=null&&s.trim())}),S=o(()=>n.value?e.firstName.trim().charAt(0).toUpperCase():O),b=o(()=>{if(!n.value)return q;const s=String(e.colorSeed??e.userSqid??e.firstName),i=l(s)%r.length;return r[i]}),v=o(()=>n.value?`${e.firstName}'s avatar`:"User avatar");return(s,i)=>(u(),g("div",{role:"img","aria-label":v.value,class:p(c(m)("tw-w-[28px] tw-h-[28px] tw-rounded-full tw-flex tw-items-center tw-justify-center tw-font-semibold tw-text-sm tw-select-none",b.value,c(a).class))},N(S.value),11,A))}},I=Object.assign({inheritAttrs:!1},{__name:"index",props:{firstName:{type:String,default:null},userSqid:{type:String,default:null},colorSeed:{type:String,default:null},src:{type:String,default:null},alt:{type:String,default:null}},setup(t){const e=t,a=x(!1);return h(()=>e.src,()=>{a.value=!1}),(r,l)=>t.src&&!a.value?(u(),f(k,d({key:0},r.$attrs,{src:t.src,"first-name":t.firstName,alt:t.alt,onError:l[0]||(l[0]=n=>a.value=!0)}),null,16,["src","first-name","alt"])):(u(),f(C,d({key:1},r.$attrs,{"first-name":t.firstName,"user-sqid":t.userSqid,"color-seed":t.colorSeed}),null,16,["first-name","user-sqid","color-seed"]))}});export{I as _};

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.