PageSourceSearch

https://ast-science.com/wp-content/themes/spacemobile-2025/assets/js/map.min.js?ver=1772734065

js ast-science.com collected 2026-10-02 04:20:59 UTC 8,313 bytes, 1 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){gsap.registerPlugin(ScrollTrigger);const RING_WIDTHS_PX=[2,4,6],mapEl=document.querySelector("#map"),svg=mapEl.querySelector("svg");let allDots=[],marketDots=[];const vb=svg.viewBox?.baseVal||{x:0,y:0,width:svg.getBoundingClientRect().width,height:svg.getBoundingClientRect().height},cxMap=vb.x+.5*vb.width,cyMap=vb.y+.5*vb.height,maxR=Math.hypot(.5*vb.width,.5*vb.height),delayFn=el=>{const b=el.getBBox(),x=b.x+.5*b.width,y=b.y+.5*b.height,r=((x,y)=>Math.min(1,Math.hypot(x-cxMap,y-cyMap)/maxR))(x,y),band=.066*(.5*Math.sin(10*r)+.5),rnd=(((x,y)=>{const n=43758.5453*Math.sin(157.31*x+311.7*y);return n-Math.floor(n)})(x,y)-.5)*(.035*1.1);return.8*r+band+rnd};let canonicalLayer=null;function isMarketNode(n){return(n.getAttribute("fill")||"").trim().toLowerCase()==="#F5A145".toLowerCase()||!!n.closest(".market-dot, #market-dot, [data-market]")}let glowLayer,globalSurgeLayer,pageGlowEl,strokeRings1=[],strokeRings2=[],strokeRings3=[],globalSurgeClones=[];function updatePageGlowCenter(){if(!pageGlowEl)return;const rect=mapEl.getBoundingClientRect(),cx=rect.left+.5*rect.width,cy=rect.top+.5*rect.height;pageGlowEl.style.setProperty("--cx",`${cx}px`),pageGlowEl.style.setProperty("--cy",`${cy}px`)}function updatePageGlowRadius(){if(!pageGlowEl)return;const vw=Math.max(document.documentElement.clientWidth,window.innerWidth||0),vh=Math.max(document.documentElement.clientHeight,window.innerHeight||0),radius=1.05*Math.hypot(vw,vh),o_r=245,o_g=161,o_b=69,col1=`rgba(${o_r}, ${o_g}, ${o_b}, 0.42)`,col2=`rgba(${o_r}, ${o_g}, ${o_b}, 0.147)`,col3=`rgba(${o_r}, ${o_g}, ${o_b}, 0)`;pageGlowEl.style.setProperty("--r",`${radius}px`),pageGlowEl.style.background=`radial-gradient(circle at var(--cx) var(--cy),\n      ${col1} 0%, ${col2} 35%, ${col3} 75%)`}const hoverTweens=new WeakMap,hoverHalos=new WeakMap;function bumpNode(node){const existing=hoverTweens.get(node);if(existing&&existing.isActive())return;const bb=node.getBBox(),baseAmt=.55/Math.max(.001,.5*(bb.width+bb.height));let amt=baseAmt+gsap.utils.random(-.25,.25)*baseAmt;amt=Math.max(.002,Math.min(.006,amt));const dur=gsap.utils.random(.5,.9),t=gsap.fromTo(node,{scale:1},{scale:1+amt,duration:.5*dur,ease:"sine.out",yoyo:!0,repeat:1,onComplete:()=>hoverTweens.delete(node)});hoverTweens.set(node,t);const halo=function(node){let halo=hoverHalos.get(node);if(halo)return halo;const h=node.cloneNode(!0);return h.setAttribute("fill","none"),h.setAttribute("stroke","#F5A145"),h.setAttribute("vector-effect","non-scaling-stroke"),h.setAttribute("stroke-width",3),h.style.opacity=0,glowLayer.appendChild(h),hoverHalos.set(node,h),h}(node);gsap.killTweensOf(halo),gsap.fromTo(halo,{opacity:0},{opacity:.22,duration:.175,ease:"sine.out",yoyo:!0,repeat:1})}function addHoverHandlers(n){n.__hoverBound||(n.__hoverEnter=()=>bumpNode(n),n.__hoverTouch=()=>bumpNode(n),n.addEventListener("pointerenter",n.__hoverEnter),n.addEventListener("touchstart",n.__hoverTouch,{passive:!0}),n.style.cursor="pointer",n.__hoverBound=!0)}function removeHoverHandlers(n){n.__hoverBound&&(n.__hoverEnter&&n.removeEventListener("pointerenter",n.__hoverEnter),n.__hoverTouch&&n.removeEventListener("touchstart",n.__hoverTouch),n.__hoverEnter=n.__hoverTouch=null,n.style.cursor="",n.__hoverBound=!1)}function resetState(){mapEl.style.visibility="hidden",svg.querySelectorAll("[opacity],[fill-opacity],[stroke-opacity]").forEach(n=>{n.removeAttribute("opacity"),n.removeAttribute("fill-opacity"),n.removeAttribute("stroke-opacity")}),function(){svg.querySelector(".canonical-dots")?.remove();const allSrc=function(root){const nodes=[...root.querySelectorAll("circle, path, ellipse, rect, polygon")].filter(n=>!function(n){return n.closest(".canonical-dots, .glow-layer, .global-surge-layer, defs")}(n)),out=[];for(const n of nodes)try{const b=n.getBBox();b.width>0&&b.height>0&&out.push(n)}catch{}return out}(svg),keyOf=b=>`${.5*Math.round((b.x+.5*b.width)/.5)}|${.5*Math.round((b.y+.5*b.height)/.5)}`,centerMap=new Map,marketKeys=new Set;for(const n of allSrc){const b=n.getBBox(),k=keyOf(b);centerMap.has(k)||centerMap.set(k,b),isMarketNode(n)&&marketKeys.add(k)}
1allSrc.forEach(n=>{n.style.opacity="0"}),canonicalLayer=document.createElementNS("http://www.w3.org/2000/svg","g"),canonicalLayer.setAttribute("class","canonical-dots"),svg.appendChild(canonicalLayer),allDots=[],marketDots=[],centerMap.forEach((b,k)=>{const cx=b.x+.5*b.width,cy=b.y+.5*b.height,r=.5*Math.min(b.width,b.height),c=document.createElementNS("http://www.w3.org/2000/svg","circle");c.setAttribute("cx",cx),c.setAttribute("cy",cy),c.setAttribute("r",r),c.setAttribute("fill","#494949"),marketKeys.has(k)&&(c.dataset.market="1"),canonicalLayer.appendChild(c),allDots.push(c),marketKeys.has(k)&&marketDots.push(c)})}(),allDots.forEach(n=>n.setAttribute("fill","#494949")),gsap.set(allDots,{transformBox:"fill-box",transformOrigin:"50% 50%",scale:1}),svg.querySelector(".glow-layer")?.remove(),glowLayer=document.createElementNS("http://www.w3.org/2000/svg","g"),glowLayer.setAttribute("class","glow-layer"),glowLayer.style.pointerEvents="none",svg.appendChild(glowLayer),strokeRings1=[],strokeRings2=[],strokeRings3=[],marketDots.forEach(shape=>{const mk=(cls,widthPx)=>{const c=shape.cloneNode(!0);return c.setAttribute("class",cls),c.setAttribute("fill","none"),c.setAttribute("stroke","#F5A145"),c.setAttribute("vector-effect","non-scaling-stroke"),c.setAttribute("stroke-width",widthPx),c.style.opacity=0,c.style.strokeLinecap="round",c.style.strokeLinejoin="round",glowLayer.appendChild(c),c};strokeRings1.push(mk("dot-glow--stroke",RING_WIDTHS_PX[0])),strokeRings2.push(mk("dot-glow--stroke2",RING_WIDTHS_PX[1])),strokeRings3.push(mk("dot-glow--stroke3",RING_WIDTHS_PX[2]))}),svg.querySelector(".global-surge-layer")?.remove(),globalSurgeLayer=document.createElementNS("http://www.w3.org/2000/svg","g"),globalSurgeLayer.setAttribute("class","global-surge-layer"),globalSurgeLayer.style.pointerEvents="none",svg.appendChild(globalSurgeLayer),globalSurgeClones=marketDots.map(s=>{const c=s.cloneNode(!0);return c.setAttribute("fill","#F5A145"),c.style.opacity=0,globalSurgeLayer.appendChild(c),c}),gsap.set(globalSurgeLayer,{transformBox:"fill-box",transformOrigin:"50% 50%",scale:1}),document.querySelector(".fx-ambient")?.remove(),pageGlowEl=document.createElement("div"),pageGlowEl.className="fx-ambient",document.body.appendChild(pageGlowEl),updatePageGlowCenter(),updatePageGlowRadius(),allDots.forEach(removeHoverHandlers),marketDots.forEach(addHoverHandlers),mapEl.style.visibility="visible"}function init(){ScrollTrigger.getAll().forEach(st=>st.kill()),gsap.globalTimeline.clear(),resetState();const reduced=window.matchMedia("(prefers-reduced-motion: reduce)").matches,tl=gsap.timeline({scrollTrigger:{trigger:"#map",start:"top 70%",once:!0,markers:false}});if(reduced||(tl.set(globalSurgeLayer,{scale:1.04},0),tl.to(globalSurgeClones,{opacity:.45,duration:.56,ease:"power2.out"},.04).to(globalSurgeClones,{opacity:0,duration:.84,ease:"power2.in"},.376).to(globalSurgeLayer,{scale:1,duration:.84,ease:"sine.out"},.04)),tl.to(marketDots,{fill:"#F5A145",duration:1.2,ease:"power1.out",stagger:(i,t)=>delayFn(t)},.1),!reduced){const rise=.28,fade=.46;tl.to(strokeRings1,{opacity:.32,duration:2*rise,ease:"sine.out",stagger:(i,t)=>delayFn(t)},.16).to(strokeRings1,{opacity:0,duration:2*fade,ease:"power1.in",stagger:(i,t)=>delayFn(t)},.36),tl.to(strokeRings2,{opacity:.2,duration:2*rise,ease:"sine.out",stagger:(i,t)=>delayFn(t)},.24).to(strokeRings2,{opacity:0,duration:2*fade,ease:"power1.in",stagger:(i,t)=>delayFn(t)},.44),tl.to(strokeRings3,{opacity:.12,duration:2*rise,ease:"sine.out",stagger:(i,t)=>delayFn(t)},.32).to(strokeRings3,{opacity:0,duration:2*fade,ease:"power1.in",stagger:(i,t)=>delayFn(t)},.52)}!reduced&&pageGlowEl&&tl.to(pageGlowEl,{opacity:.42,duration:1,ease:"sine.out"},0).to(pageGlowEl,{opacity:0,duration:1.4,ease:"power1.inOut"},.84)}init(),document.getElementById("replay")?.addEventListener("click",()=>{const mapTop=mapEl.offsetTop;window.scrollTo({top:Math.max(0,mapTop-innerHeight),behavior:"auto"}),init()});window.addEventListener("resize",()=>{updatePageGlowCenter(),updatePageGlowRadius()},{passive:!0}),window.addEventListener("scroll",()=>requestAnimationFrame(updatePageGlowCenter),{passive:!0})});

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.