1import{t as b,b as p}from"./BJV9v1XP.js";import{p as Q,t as k,a as S,j as J,A as rt,s as y,c as l,g as h,k as K,i as st,r as i,d as N}from"./BPAoz2ir.js";import{p as w,a as j}from"./CsFDU-iK.js";import{i as z}from"./zPfMiggm.js";import{e as it,i as ot}from"./CHBa18Jj.js";import{d as B,s as H,c as L}from"./DHoWmUKI.js";import{p as R}from"./Bg8KmTGx.js";import{P as lt}from"./tatzVcaN.js";import{I as nt}from"./Bg9EJDvC.js";const dt=async(a,t)=>{if(!a)return"light";a.crossOrigin="anonymous",(!a.complete||a.naturalWidth===0)&&await new Promise((r,s)=>{a.onload=r,a.onerror=s});try{const r=document.createElement("canvas"),s=r.getContext("2d");if(!s)return"light";r.width=a.naturalWidth,r.height=a.naturalHeight,s.drawImage(a,0,0);const[c,v]=(t==null?void 0:t.map(f=>Math.max(0,Math.min(1,f))))??[0,1],d=Math.floor(r.height*c),x=Math.floor(r.height*v)-d,n=s.getImageData(0,d,r.width,x).data;let _=0;for(let f=0;f<n.length;f+=4)_+=.299*n[f]+.587*n[f+1]+.114*n[f+2];return _/=n.length/4,_>127.5?"light":"dark"}catch(r){return console.error("Error analyzing image:",r),"light"}},ct=a=>{const{r:t,g:r,b:s}=U(a);return Math.sqrt(.299*t*t+.587*r*r+.114*s*s)>127.5?"light":"dark"},U=a=>{a=a.replace("#","");const t=parseInt(a.substring(0,2),16),r=parseInt(a.substring(2,4),16),s=parseInt(a.substring(4,6),16);return{r:t,g:r,b:s}};var vt=b('<div class="progressive-blur-container svelte-1qsifq1"><div class="blur-filter svelte-1qsifq1"></div> <div class="gradient svelte-1qsifq1"></div></div>');function ft(a,t){Q(t,!0);const r=w(t,"bgColor",3,"#FFFFFF"),s=U(r());var c=vt();k(()=>B(c,"style",`--bg-color-hex: ${r()}; --bg-color-rgb: ${s.r}, ${s.g}, ${s.b}`)),p(a,c),S()}var gt=b('<div class="flex-1 overflow-hidden"><!></div>'),ut=b('<div class="absolute top-[-30px] left-0 z-0 h-[calc(100%+30px)] w-full"><!></div>'),ht=b('<span class="rounded-lg bg-offset-primary px-3 py-1 body-4 text-offset-primary"> </span>'),pt=b('<div class="relative flex flex-1 flex-wrap gap-2 overflow-hidden whitespace-nowrap"></div>'),bt=b('<div class="card-cta absolute bottom-0 left-full z-10 flex h-fit w-fit -translate-x-full pl-[30px] text-primary opacity-0 transition-opacity duration-300 svelte-17qjsi3"><div class="card-cta-text flex items-center gap-1 border-b-2 border-accent-green py-1 body-4 transition-transform duration-300 svelte-17qjsi3"><span class="whitespace-nowrap"> </span> <!></div></div>'),mt=b('<div class="relative w-full"><!> <!></div>'),xt=b('<a><!> <div><!> <div class="z-10 flex translate-z-0 flex-col gap-y-2"><div><p class="label-3 font-semibold text-tertiary"> </p> <p> </p></div> <!></div></div></a>');function kt(a,t){Q(t,!0);const r=(e,o=st)=>{const g=N(()=>({filename:t.img||"",alt:t.alt||""})),Y=N(()=>c()==="sm"?500:1e3);lt(e,{get image(){return h(g)},get width(){return h(Y)},get class(){return`card-picture h-full w-full object-cover transition-all duration-300 ${o()??""}`},get element(){return h(x)},set element(A){K(x,R(A))}})};let s=w(t,"class",3,""),c=w(t,"size",3,"md"),v=w(t,"fullBleedImg",3,!1),d=w(t,"bgColor",7),D=w(t,"cta",3,"View project"),x=J(void 0),I=J(R(d()&&v()?ct(d()):"light"));rt(()=>{h(x)&&!d()&&v()&&dt(h(x),[.8,1]).then(e=>{K(I,R(e)),h(I)==="light"?d("#FFFFFF"):d("#000000")})});var n=xt(),_=l(n);{var f=e=>{r(e,()=>"absolute inset-0 z-0")},X=e=>{var o=gt(),g=l(o);r(g),i(o),p(e,o)};z(_,e=>{v()?e(f):e(X,!1)})}var M=y(_,2),W=l(M);{var Z=e=>{var o=ut(),g=l(o);ft(g,{get bgColor(){return d()}}),i(o),p(e,o)};z(W,e=>{v()&&d()&&e(Z)})}var V=y(W,2),E=l(V),O=l(E),T=l(O,!0);i(O);var P=y(O,2),$=l(P,!0);i(P),i(E);var tt=y(E,2);{var et=e=>{var o=mt(),g=l(o);{var Y=m=>{var u=pt();it(u,21,()=>t.tags,ot,(C,F)=>{var q=ht(),G=l(q,!0);i(q),k(()=>j(G,h(F))),p(C,q)}),i(u),p(m,u)};z(g,m=>{t.tags&&m(Y)})}var A=y(g,2);{var at=m=>{var u=bt(),C=l(u),F=l(C),q=l(F,!0);i(F);var G=y(F,2);nt(G,{icon:"arrow-up-right"}),i(C),i(u),k(()=>{B(u,"style",`background: linear-gradient(to right, transparent, ${d()??""} 15px)`),j(q,D())}),p(m,u)};z(A,m=>{D()&&v()&&m(at)})}i(o),p(e,o)};z(tt,e=>{c()!=="sm"&&e(et)})}i(V),i(M),i(n),k(e=>{B(n,"href",t.href),B(n,"target",e),H(n,1,L(["card-wrapper relative flex flex-col overflow-hidden no-underline",s(),h(I),{"justify-end":v()}]),"svelte-17qjsi3"),H(M,1,L(["relative z-10 flex flex-col justify-end gap-3 p-4",{"bg-secondary":!v()}])),j(T,t.eyebrow),H(P,1,L(["headline-5 font-bold text-secondary",{"body-2":c()==="sm"}])),j($,t.title)},[()=>{var e;return(e=t.href)!=null&&e.includes("http")?"_blank":""}]),p(a,n),S()}export{kt as C};
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.