PageSourceSearch

https://www.gaif.ai/_next/static/chunks/7868-bb23a3c8d54f632a.js

js gaif.ai collected 2026-10-05 12:02:56 UTC 8,986 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7868],{14432:(e,t,a)=>{a.d(t,{W:()=>l,b:()=>n});let n=[{id:"nigeria",name:"Nigeria",flag:"https://cdn.gaif.ai/app/flags/nigeria.png",area:{left:33.5,top:30},cities:[{name:"Lagos",left:30.4,top:41.8},{name:"Abuja",left:36.4,top:39.1}]},{id:"ghana",name:"Ghana",flag:"https://cdn.gaif.ai/app/flags/ghana.png",area:{left:24.5,top:32},cities:[{name:"Accra",left:25.4,top:42.6},{name:"Kumasi",left:23.6,top:41.4}]},{id:"kenya",name:"Kenya",flag:"https://cdn.gaif.ai/app/flags/kenya.png",area:{left:80,top:45},cities:[{name:"Nairobi",left:78.9,top:53.4},{name:"Mombasa",left:81.4,top:56.2}]},{id:"liberia",name:"Liberia",flag:"https://cdn.gaif.ai/app/flags/liberia.png",area:{left:11,top:32},cities:[{name:"Monrovia",left:10.6,top:42.2},{name:"Gbarnga",left:12.4,top:41.2,labelPos:"top-7 left-3.5"}]},{id:"sa",name:"South Africa",flag:"https://cdn.gaif.ai/app/flags/sa.png",area:{left:59.5,top:82},cities:[{name:"Johannesburg",left:66.2,top:87.6},{name:"Cape Town",left:52.6,top:96}]}],l=["liberia","ghana","nigeria","kenya","sa"]},67868:(e,t,a)=>{a.d(t,{A:()=>g});var n=a(51900),l=a(45232),i=a(2340),r=a(42670),o=a(14432);let s=[];o.b.forEach(e=>e.cities.forEach((t,a)=>s.push({fx:t.left/100,fy:t.top/100,cohortId:e.id,isHub:0===a})));let c={};s.forEach((e,t)=>{e.isHub&&(c[e.cohortId]=t)});let f=[];for(let e=0;e<s.length;e+=2)f.push([e,e+1,!1]);for(let e=0;e<o.W.length-1;e++)f.push([c[o.W[e]],c[o.W[e+1]],!0]);let h=o.b.map(e=>({id:e.id,name:e.name,flag:e.flag,ci:c[e.id]}));function p(e){let t=e.trim().replace("#",""),a=parseInt(3===t.length?t.split("").map(e=>e+e).join(""):t,16);return{r:a>>16&255,g:a>>8&255,b:255&a}}function m(e,t){return p(getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t)}let d={layers:3,dot:1,op:.68,bri:.7,spin:.5,link:1};function g(e){let{className:t,selected:a,onSelect:o,showFlags:c=!0}=e,g=(0,l.useRef)(null),u=(0,l.useRef)(null),b=(0,l.useRef)(null),y=(0,l.useRef)(null!=a?a:null),x=(0,l.useRef)(o);(0,l.useEffect)(()=>{y.current=null!=a?a:null},[a]),(0,l.useEffect)(()=>{x.current=o},[o]),(0,l.useEffect)(()=>{let e=g.current,t=u.current,a=b.current;if(!e||!t)return;let n=t.getContext("2d");if(!n)return;let l="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,i=m("--map-ramp-red","#ff4b3e"),o=m("--map-ramp-yellow","#ffc633"),c=m("--map-ramp-green","#2fcb6e"),M=getComputedStyle(document.documentElement).getPropertyValue("--map-city").trim()||"#8b5cf6",w=p(M);function v(e){var t,a,n;let l,r,s;return e<.5?(l=i,r=o,s=e/.5):(l=o,r=c,s=(e-.5)/.5),{r:0|(t=l.r,t+(r.r-t)*s),g:0|(a=l.g,a+(r.g-a)*s),b:0|(n=l.b,n+(r.b-n)*s)}}let A=1,k=1,E=!1,j=window.innerWidth<640,N=0,S=0,T=1,P=1,C=[],R=[],W=0,_=[],I=new Image,L=1;function H(){let a=e.getBoundingClientRect();N=Math.max(1,a.width),S=Math.max(1,a.height),j=window.innerWidth<640,L=Math.min(2,window.devicePixelRatio||1),t.width=Math.round(N*L),t.height=Math.round(S*L),n.setTransform(L,0,0,L,0,0);let l=.9*N,i=k/A*l;i>.94*S&&(l=A/k*(i=.94*S)),P=1.5*(T=l)}let V={A:0,cosA:1,sinA:0,cosT:1,sinT:0,cx:0,cy:0,mapH:1,breath:1};function z(e,t,a){let n=e*V.cosA+a*V.sinA,l=-e*V.sinA+a*V.cosA,i=t*V.cosT-l*V.sinT,r=t*V.sinT+l*V.cosT,o=P/(P+r);return{sx:V.cx+n*o,sy:V.cy+i*o,persp:o,z2:r}}function B(e){let t=l?.195:.78*Math.sin(.32*e);V.A=t,V.cosA=Math.cos(t),V.sinA=Math.sin(t),V.cosT=.9758974493306055,V.sinT=.21822962308086932,V.cx=N/2,V.cy=S/2,V.mapH=k/A*T,V.breath=l?1:1+.012*Math.sin(.6*e),n.clearRect(0,0,N,S);let i=y.current,r=V.breath,o=l?0:d.spin,c=1.6*d.dot;for(let t of R){let a=t.x*T+(l?0:Math.sin(.5*e+t.ph2)*T*.01),i=z(a,t.y*T,t.z*T),r=v(t.t);n.globalAlpha=(.08+.12*Math.max(0,Math.min(1,(i.persp-.6)/.9)))*d.op,n.fillStyle="rgb(".concat(r.r,",").concat(r.g,",").concat(r.b,")"),n.beginPath(),n.arc(i.sx,i.sy,1.1,0,6.2832),n.fill()}for(let t of C){let a=(t.fx-.5)*T,l=(t.fy-.5)*V.mapH,i=t.zc*T;o&&(a+=Math.sin(.8*e+t.ph)*o*t.am,l+=Math.cos(.7*e+t.ph)*o*t.am);let s=z(a*=r,l*=r,i*=r),f=Math.max(0,Math.min(1,(s.persp-.62)/.9)),h=v(t.t);n.globalAlpha=Math.min(1,(.3+.66*f)*d.bri*d.op),n.fillStyle="rgb(".concat(h.r,",").concat(h.g,",").concat(h.b,")"),n.beginPath(),n.arc(s.sx,s.sy,c*s.persp,0,6.2832),n.fill()}if(n.globalAlpha=1,_=s.map(e=>z((e.fx-.5)*T,(e.fy-.5)*V.mapH,0)),d.link>0){let t="".concat(w.r,",").concat(w.g,",").concat(w.b);n.setLineDash([]);let a=l?0:13*e;for(let e of f){let l=_[e[0]],i=_[e[1]],r=e[2],o=Math.max(0,Math.min(1,((l.persp+i.persp)/2-.62)/.9)),s=i.sx-l.sx,c=i.sy-l.sy,f=Math.hypot(s,c);if(f<2)continue;let h=s/f,p=c/f,m=(r?.5:.62)*d.link*(.4+.6*o);n.lineWidth=1,n.strokeStyle="rgba(".concat(t,",").concat(.22*m,")"),n.beginPath(),n.moveTo(l.sx,l.sy),n.lineTo(i.sx,i.sy),n.stroke(),n.fillStyle="rgb(".concat(t,")");for(let e=0;e<2;e++){let t=((0===e?1:-1)*a%17+17)%17+8.5*e;for(let e=t;e<f;e+=17){let t=l.sx+h*e,a=l.sy+p*e;n.globalAlpha=m*Math.min(1,Math.min(e,f-e)/14),n.beginPath(),n.arc(t,a,1.5*(.75+.4*o),0,6.2832),n.fill()}}}n.globalAlpha=1}let p=l?0:.5*Math.sin(2.2*e)+.5;for(let e=0;e<_.length;e++){let t=_[e],a=Math.max(0,Math.min(1,(t.persp-.62)/.9)),l=null!=i&&s[e].cohortId===i,r=null==i||l?1:.42,o=(3.1+.9*p)*t.persp*(l?1.55:1);n.save(),n.globalAlpha=(.55+.45*a)*r,n.shadowColor=M,n.shadowBlur=o*(l?3.4:2.6),n.fillStyle=M,n.beginPath(),n.arc(t.sx,t.sy,o,0,6.2832),n.fill(),l&&(n.globalAlpha=(.3+.3*(1-p))*r,n.lineWidth=1.5,n.strokeStyle=M,n.shadowBlur=0,n.beginPath(),n.arc(t.sx,t.sy,o+4+6*p,0,6.2832),n.stroke()),n.shadowBlur=0,n.globalAlpha=(.7+.3*a)*r,n.fillStyle="rgba(255,255,255,.92)",n.beginPath(),n.arc(t.sx,t.sy,.34*o,0,6.2832),n.fill(),n.restore(
1)}if(n.globalAlpha=1,a)for(let e=0;e<D.length;e++){let t=D[e];if(!t)continue;let a=_[h[e].ci],n=Math.max(0,Math.min(1,(a.persp-.62)/.9)),l=null!=i&&h[e].id===i,r=null==i||l?1:.28;t.style.transform="translate(".concat(a.sx,"px, ").concat(a.sy,"px)"),t.style.opacity=String(Math.max(0,(.42+.45*n)*r*(l?1.35:1)))}}function F(e){E&&(B(.001*e),W=requestAnimationFrame(F))}function G(e,a){let n=t.getBoundingClientRect(),l=e-n.left,i=a-n.top,r=-1,o=484;for(let e=0;e<_.length;e++){let t=_[e].sx-l,a=_[e].sy-i,n=t*t+a*a;n<o&&(o=n,r=e)}return r>=0?s[r].cohortId:null}let X=e=>{let t=x.current;if(!t)return;let a=G(e.clientX,e.clientY);a&&t(y.current===a?null:a)},q=e=>{x.current&&(t.style.cursor=G(e.clientX,e.clientY)?"pointer":"default")},D=a?h.map((e,t)=>a.querySelector('[data-flag="'.concat(t,'"]'))):[],K=new ResizeObserver(()=>{E&&(H(),l&&B(0))});return I.onload=()=>{A=I.width,k=I.height,function(){R=[];let e=j?40:90;for(let t=0;t<e;t++){let e=.72+.6*Math.random(),t=6.283*Math.random(),a=Math.acos(2*Math.random()-1);R.push({x:e*Math.sin(a)*Math.cos(t),y:(Math.random()-.5)*1,z:e*Math.cos(a),t:Math.random(),ph2:6.283*Math.random()})}}(),H(),function(){let e=document.createElement("canvas"),t=Math.round(320*k/A);e.width=320,e.height=t;let a=e.getContext("2d");if(!a)return;a.drawImage(I,0,0,320,t);let n=a.getImageData(0,0,320,t).data;C=[];let l=j?6:4,i=j?Math.min(2,d.layers):d.layers;for(let e=0;e<t;e+=l)for(let a=0;a<320;a+=l)if(n[(320*e+a)*4+3]>70){let n=a/320,r=e/t,o=(n+(1-r))/2;for(let e=0;e<i;e++){let a=(1===i?0:e/(i-1)-.5)*.14;C.push({fx:n+(Math.random()-.5)*l*.6/320,fy:r+(Math.random()-.5)*l*.6/t,t:o,zc:a+(Math.random()-.5)*.03,ph:6.283*Math.random(),am:.5+ +Math.random()})}}}(),E=!0,K.observe(e),l?B(0):W=requestAnimationFrame(F)},I.src="string"==typeof r.cV?r.cV:r.cV.src,t.addEventListener("click",X),t.addEventListener("mousemove",q,{passive:!0}),()=>{E=!1,cancelAnimationFrame(W),K.disconnect(),t.removeEventListener("click",X),t.removeEventListener("mousemove",q)}},[]);let M="function"==typeof o;return(0,n.jsxs)("div",{ref:g,className:"relative ".concat(null!=t?t:""),children:[(0,n.jsx)(i.default,{src:r.cV,alt:"","aria-hidden":!0,className:"h-auto w-full opacity-0"}),(0,n.jsx)("canvas",{ref:u,"aria-hidden":"true",className:"absolute inset-0 h-full w-full ".concat(M?"":"pointer-events-none")}),c&&(0,n.jsxs)("div",{ref:b,"aria-hidden":"true",className:"pointer-events-none absolute inset-0 overflow-visible",children:[(0,n.jsx)("style",{children:"\n            @keyframes gaifGlobeFlagWave{0%,100%{transform:rotate(-2.2deg) skewX(-3deg)}50%{transform:rotate(2.2deg) skewX(3deg)}}\n            @media (prefers-reduced-motion: reduce){.gaif-globe-flag img{animation:none!important}}\n          "}),h.map((e,t)=>(0,n.jsx)("div",{"data-flag":t,className:"absolute left-0 top-0 will-change-transform",style:{opacity:0},children:(0,n.jsxs)("div",{className:"flex -translate-x-1/2 -translate-y-[calc(100%+6px)] flex-col items-center gap-1",children:[(0,n.jsx)("img",{src:e.flag,alt:"",className:"gaif-globe-flag h-5 w-8 rounded-[3px] object-cover shadow-[0_6px_16px_rgba(0,0,0,.5)] ring-1 ring-white/30",style:{animation:"gaifGlobeFlagWave 3.4s ease-in-out infinite"}}),(0,n.jsx)("span",{className:"whitespace-nowrap text-[11px] font-semibold text-white/85 [text-shadow:0_1px_6px_rgba(0,0,0,.9)]",children:e.name})]})},e.id))]})]})}}}]);

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.