1const ot={corner:8,iconSquare:56,iconSquareCorner:6,iconSize:28,pad:6,padEnd:32,gap:16,fontPx:14.5,fontWeight:500,fontFamily:"Inter, sans-serif",textColor:"#1D2452",fill:"rgba(255, 255, 255, 0.2)",iconFill:"#ffffff",blur:24,liquid:30,saturate:.8,brightness:1.02,specular:.6},ct={ampX:6,ampY:9,periodSec:7.2,phaseSpread:.62,parallax:.4},st={delaySec:1,durationSec:1,riseY:32},it={color:"#b2bfea",layers:[{type:"radial",anchor:"top",h:560,cx:53,cy:0,rx:56,ry:100,stops:[[0,"rgba(255, 255, 255, 0.8)"],[.78,"rgba(255, 255, 255, 0)"]]},{type:"radial",anchor:"top",h:470,cx:90,cy:0,rx:64,ry:100,stops:[[0,"rgba(228, 234, 251, 0.45)"],[.72,"rgba(228, 234, 251, 0)"]]},{type:"radial",anchor:"bottom",h:1088,cx:57,cy:50,rx:52,ry:50,stops:[[0,"rgba(255, 255, 255, 0.45)"],[.55,"rgba(255, 255, 255, 0.12)"],[1,"rgba(255, 255, 255, 0)"]]},{type:"radial",anchor:"bottom",h:900,cx:102,cy:100,rx:72,ry:100,stops:[[0,"rgba(154, 172, 229, 0.55)"],[.72,"rgba(154, 172, 229, 0)"]]},{type:"linear",anchor:"bottom",h:1700,stops:[[0,"rgba(255, 255, 255, 0)"],[.2,"rgba(158, 175, 230, 0.3)"],[.56,"rgba(255, 255, 255, 0.18)"],[1,"rgba(255, 255, 255, 0.06)"]]}]},lt={desktop:{media:"(min-width: 768px)",frame:{w:1440,h:544},rings:[{name:"outer",r:535.5,cy:559.5,paintOpacity:.6,top:"rgba(183, 196, 237, 1)",mid:"rgba(255, 255, 255, 0.2)",spin:30},{name:"middle",r:401,cy:539,paintOpacity:1,top:"rgba(183, 196, 237, 1)",mid:"rgba(255, 255, 255, 0.2)",spin:-10},{name:"inner",r:272,cy:543,paintOpacity:1,top:"rgba(255, 255, 255, 1)",mid:"rgba(183, 196, 237, 0.6)",spin:30}],containers:[{key:"ap_automation",leftPct:.0975694,top:215,ring:0},{key:"purchasing",leftPct:.5763889,top:420,ring:2},{key:"supplier_management",leftPct:.6701389,top:215,ring:0},{key:"intake",leftPct:.2868056,top:352,ring:2},{key:"spend_intelligence",leftPct:.3909722,top:88,ring:1}]},mobile:{media:"(max-width: 767px)",frame:{w:375,h:590},rings:[{name:"outer",r:535.5,cy:535.5,paintOpacity:.6,top:"rgba(183, 196, 237, 1)",mid:"rgba(255, 255, 255, 0.2)",spin:30},{name:"middle",r:401,cy:515,paintOpacity:1,top:"rgba(183, 196, 237, 1)",mid:"rgba(255, 255, 255, 0.2)",spin:-10},{name:"inner",r:272,cy:519,paintOpacity:1,top:"rgba(255, 255, 255, 1)",mid:"rgba(183, 196, 237, 0.6)",spin:30}],containers:[{key:"ap_automation",leftPct:.0426667,top:130.55,ring:0},{key:"purchasing",leftPct:.1706667,top:485.31,ring:2},{key:"supplier_management",leftPct:.184,top:244.08,ring:0},{key:"intake",leftPct:.4986667,top:364.69,ring:2},{key:"spend_intelligence",leftPct:.368,top:17.03,ring:1}]}},F={dprCap:2,containerStyle:ot,float:ct,intro:st,backdrop:it,variants:lt},pt=768,X=Math.PI*2,L=(e,n,o,S,a,E)=>{const t=Math.min(E,S/2,a/2);e.beginPath(),e.moveTo(n+t,o),e.arcTo(n+S,o,n+S,o+a,t),e.arcTo(n+S,o+a,n,o+a,t),e.arcTo(n,o+a,n,o,t),e.arcTo(n,o,n+S,o,t),e.closePath()},dt=(e,n,o,S)=>{const{color:a,layers:E}=F.backdrop;e.fillStyle=a,e.fillRect(0,0,n,o),E.forEach(t=>{const g=t.h*S,h=t.anchor==="top"?0:o-g;if(e.save(),e.beginPath(),e.rect(0,h,n,g),e.clip(),t.type==="linear"){const x=e.createLinearGradient(0,h,0,h+g);t.stops.forEach(([C,m])=>x.addColorStop(C,m)),e.fillStyle=x,e.fillRect(0,h,n,g)}else{const x=t.cx/100*n,C=h+t.cy/100*g,m=t.rx/100*n,v=t.ry/100*g;e.translate(x,C),e.scale(m,v);const O=e.createRadialGradient(0,0,0,0,0,1);t.stops.forEach(([T,s])=>O.addColorStop(T,s)),e.fillStyle=O,e.fillRect(-x/m,(h-C)/v,n/m,g/v)}e.restore()})},ht=(e,n,o,S,a,E)=>{n.forEach(t=>{const g=t.r*S,h=t.cy*S;e.save(),e.globalAlpha=t.paintOpacity*E,e.translate(o/2,h),e.rotate(a/t.spin*X);const x=e.createLinearGradient(0,-g,0,0);x.addColorStop(0,t.top),x.addColorStop(1,t.mid),e.fillStyle=x,e.beginPath(),e.arc(0,0,g,0,X),e.fill(),e.restore()})},mt=e=>1-Math.pow(1-e,3),tt=112,et=e=>new Promise(n=>{const o=new Image;o.onload=()=>n(o),o.onerror=()=>n(null),o.src=e}),z=(e,n)=>{const o=e.match(new RegExp(`\\s${n}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));return o?o[2]??o[3]??o[4]:null},ft=e=>e.replace(/<svg\b[^>]*>/i,n=>{const o=z(n,"viewBox")||!parseFloat(z(n,"width"))||!parseFloat(z(n,"height"))?"":` viewBox="0 0 ${parseFloat(z(n,"width"))} ${parseFloat(z(n,"height"))}"`;
1return n.replace(/\s(width|height)\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/\/?>$/,`${o} width="${tt}" height="${tt}"$&`)}),ut=e=>Promise.all(e.map(n=>n.icon?fetch(n.icon).then(o=>o.ok?o.text():Promise.reject(new Error(o.status))).then(o=>et(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(ft(o))}`)).catch(()=>et(n.icon)):null)),gt=e=>{const n=e.querySelector("[data-ai-crews-canvas]"),o=e.querySelector("[data-ai-crews-scene]"),S=e.querySelector("[data-ai-crews-data]");if(!n||!o||!S||!n.getContext)return;const a=n.getContext("2d"),E=JSON.parse(S.textContent),t=F.containerStyle,g=F.float,h=F.intro,x="filter"in a,C=document.createElement("canvas"),m=document.createElement("canvas"),v=document.createElement("canvas");let O=[],T=null,s=null,R=0,N=!0,Y=0;const G=window.matchMedia("(prefers-reduced-motion: reduce)"),at=()=>window.innerWidth<pt?F.variants.mobile:F.variants.desktop,nt=()=>{T=at();const c=e.clientWidth,i=e.clientHeight,_=o.offsetHeight,P=_/T.frame.h,p=Math.min(window.devicePixelRatio||1,F.dprCap);if(!c||!_)return!1;const d=Math.ceil(t.blur*3*P);s={cssW:c,cssH:i,scale:P,sceneH:_,sceneTop:i-_,dpr:p,bleed:d},[[n,c,i],[C,c,i],[m,c+d*2,_+d*2]].forEach(([b,y,f])=>{b.width=Math.round(y*p),b.height=Math.round(f*p)}),n.style.width=`${c}px`,n.style.height=`${i}px`;const l=C.getContext("2d");return l.setTransform(p,0,0,p,0,0),dt(l,c,i,P),a.setTransform(p,0,0,p,0,0),a.font=`${t.fontWeight} ${t.fontPx*P}px ${t.fontFamily}`,T.containers.forEach((b,y)=>{const f=E[y];if(b.__crew=!!f,!f)return;const u=f.text.toUpperCase(),r=a.measureText(u).width;b.__label=u,b.__w=(t.pad+t.iconSquare+t.gap+t.padEnd)*P+r,b.__h=(t.iconSquare+t.pad*2)*P,b.__amp=1-g.parallax*(b.ring/2),b.__phase=T.containers.length>1?y/(T.containers.length-1)*g.phaseSpread:0}),!0},rt=(c,i,_,P,p)=>{const{scale:d,sceneTop:l}=s,b=(_/g.periodSec+c.__phase)*X,y=c.__w,f=c.__h,u=c.leftPct*s.cssW+g.ampX*d*c.__amp*Math.sin(b),r=l+c.top*d+g.ampY*d*c.__amp*Math.cos(b)+p,w=t.corner*d,$=t.blur*d,I=s.bleed,M=y+I*2,q=f+I*2,W=v.getContext("2d");(v.width!==Math.ceil(M*s.dpr)||v.height!==Math.ceil(q*s.dpr))&&(v.width=Math.ceil(M*s.dpr),v.height=Math.ceil(q*s.dpr)),W.setTransform(s.dpr,0,0,s.dpr,0,0),W.clearRect(0,0,M,q),x&&(W.filter=`blur(${$}px) saturate(${t.saturate}) brightness(${t.brightness})`),W.drawImage(m,(u-I+s.bleed)*s.dpr,(r-l-I+s.bleed)*s.dpr,M*s.dpr,q*s.dpr,0,0,M,q),x&&(W.filter="none"),a.save(),a.globalAlpha=P,L(a,u,r,y,f,w),a.save(),a.clip();const V=()=>a.drawImage(v,0,0,M*s.dpr,q*s.dpr,u-I,r-I,M,q);V();
1{const k=t.liquid/5*d,Z=1+t.liquid/1e3;a.save(),a.beginPath(),L(a,u,r,y,f,w),L(a,u+k,r+k,y-k*2,f-k*2,Math.max(1,w-k/2)),a.clip("evenodd"),a.translate(u+y/2,r+f/2),a.scale(Z,Z),a.translate(-(u+y/2),-(r+f/2)),V(),a.restore()}a.fillStyle=t.fill,a.fillRect(u,r,y,f),a.restore(),a.lineWidth=1,a.strokeStyle=`rgba(255, 255, 255, ${t.specular})`,L(a,u+.5,r+.5,y-1,f-1,w),a.stroke();const A=t.pad*d,B=t.iconSquare*d;a.fillStyle=t.iconFill,L(a,u+A,r+A,B,B,t.iconSquareCorner*d),a.fill();const Q=O[i];if(Q){const k=t.iconSize*d;a.drawImage(Q,u+A+(B-k)/2,r+A+(B-k)/2,k,k)}a.fillStyle=t.textColor,a.textBaseline="middle",a.font=`${t.fontWeight} ${t.fontPx*d}px ${t.fontFamily}`,a.fillText(c.__label,u+A+B+t.gap*d,r+f/2),a.restore()},H=c=>{const{cssW:i,cssH:_,scale:P,sceneH:p,sceneTop:d,dpr:l}=s,b=Math.min(1,Math.max(0,(c-h.delaySec)/h.durationSec)),y=mt(b),f=y,u=(1-y)*h.riseY*P,{bleed:r}=s,w=m.getContext("2d");w.setTransform(l,0,0,l,r*l,r*l),w.clearRect(-r,-r,i+r*2,p+r*2),w.drawImage(C,0,d*l,i*l,p*l,0,0,i,p),ht(w,T.rings,i,P,c,f);const $=l;w.drawImage(m,r*$,0,$,m.height,-r,-r,r,p+r*2),w.drawImage(m,(r+i-1)*$,0,$,m.height,i,-r,r,p+r*2),w.drawImage(m,0,r*$,m.width,$,-r,-r,i+r*2,r),w.drawImage(m,0,(r+p-1)*$,m.width,$,-r,p,i+r*2,r),a.setTransform(l,0,0,l,0,0),a.clearRect(0,0,i,_),a.drawImage(C,0,0,i*l,_*l,0,0,i,_),a.drawImage(m,r*l,r*l,i*l,p*l,0,d,i,p),T.containers.forEach((I,M)=>{I.__crew&&rt(I,M,c,f,u)})},j=c=>{Y||(Y=c),H((c-Y)/1e3),R=requestAnimationFrame(j)},D=()=>{R&&(cancelAnimationFrame(R),R=0)},J=()=>{if(!(R||!N||!s)){if(G.matches){H(h.delaySec+h.durationSec);return}R=requestAnimationFrame(j)}},U=()=>{D(),nt()&&(G.matches?H(h.delaySec+h.durationSec):J())};new IntersectionObserver(c=>{N=c.some(i=>i.isIntersecting),N?J():D()},{rootMargin:"100px"}).observe(e);let K=0;window.addEventListener("resize",()=>{clearTimeout(K),K=setTimeout(U,150)}),G.addEventListener("change",U),Promise.resolve(document.fonts?document.fonts.load(`${t.fontWeight} ${t.fontPx}px ${t.fontFamily}`).then(()=>document.fonts.ready,()=>null):null).then(U),ut(E).then(c=>{O=c,!R&&s&&H(h.delaySec+h.durationSec)})};export{gt as init}; 2//# sourceMappingURL=heroes.ai-agents-hero.CzTR_qmP.js.map
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.