1import{r as g,x,j as o,q as A,I,y as P}from"./phantom-ui-gBKV8nCw.js";var S={image:"_1k81z8a0"};const m=new RegExp("(\\p{Emoji_Presentation}|\\p{Extended_Pictographic})","giu"),_=new RegExp("\\p{Script=Latin}|\\p{Script=Cyrillic}+","giu"),R=t=>{if(typeof Intl<"u"&&"Segmenter"in Intl){const e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(t),s=>s.segment)}return Array.from(t)},j=t=>g.useMemo(()=>{if(new RegExp(m).test(t)){let s="";for(const r of R(t))if(r.match(m))s+=r;else break;return s}return new RegExp(_).test(t)?x(t).charAt(0):t.charAt(0).toUpperCase()},[t]),v=/=s\d+((?:-[a-z]+)*)$/i,y=t=>{try{const{hostname:e}=new URL(t);return e==="googleusercontent.com"||e.endsWith(".googleusercontent.com")}catch{return!1}},G=(t,e)=>{const s=t.startsWith(I)?t:P(t);if(!e)return s;const r=new URL(s),a=r.searchParams.get("image");return a&&y(a)&&r.searchParams.set("image",a.replace(v,`=s${e}$1`)),r.searchParams.set("fit","cover"),r.searchParams.set("width",String(e)),r.searchParams.set("height",String(e)),r.toString()},L=({imageUrl:t,emoji:e,fallbackText:s,username:r,renderEmoji:a,renderInitial:h,imageClassName:l,imageTestId:p,imageSize:u})=>{const[f,c]=g.useState(void 0),n=t?G(t,u):void 0,E=!!n&&f!==n,d=j(s??r??"");return E?o.jsx("img",{ref:i=>{i!=null&&i.complete&&i.naturalWidth===0&&c(n)},src:n,alt:r?`@${r}`:"",className:A(S.image,l),"data-testid":p,onError:()=>c(n)}):e?o.jsx(o.Fragment,{children:a(e)}):o.jsx(o.Fragment,{children:h(d)})};export{L 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.