PageSourceSearch

https://marketlikeacmo.com/hubfs/hub_generated/module_assets/1/214…/module_revenue-signal-hero-new.min.js

js marketlikeacmo.com collected 2026-10-05 02:46:54 UTC 7,743 bytes, 2 lines download raw bytes

1var module_214856290863=void function(){"use strict";const prefersReducedMotion=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,isMobile=()=>window.matchMedia("(max-width: 700px)").matches;function samplePath(pathEl,count){const total=pathEl.getTotalLength(),points=[];for(let i=0;i<=count;i++){const t=i/count*total,p=pathEl.getPointAtLength(t);points.push({x:p.x,y:p.y,t:i/count})}return points}class SparkleTrail{constructor(root){this.root=root,this.canvas=root.querySelector(".mlac-rsh__particles"),this.svg=root.querySelector(".mlac-rsh__path-svg"),this.path=root.querySelector(".mlac-rsh__path"),this.canvas&&this.path&&(this.ctx=this.canvas.getContext("2d"),this.ambient=[],this.sparks=[],this.cursor={x:-9999,y:-9999,active:!1},this.lastFrame=0,this.running=!1,this.observer=null,this.visible=!1,this.lastSpawn=0,this.ambientCount=260,this.maxSparks=50,this.cursorSpawnEvery=40,this.burstSpawnEvery=380,this.lastBurst=0,this.setup())}setup(){this.resize(),this.pathPoints=samplePath(this.path,200),this.seedAmbient(),this.onMove=this.handleMove.bind(this),this.root.addEventListener("mousemove",this.onMove,{passive:!0}),this.root.addEventListener("mouseleave",()=>{this.cursor.active=!1},{passive:!0}),this.onTouch=e=>{if(e.touches&&e.touches[0]){const r=this.canvas.getBoundingClientRect();this.cursor.x=e.touches[0].clientX-r.left,this.cursor.y=e.touches[0].clientY-r.top,this.cursor.active=!0}},this.root.addEventListener("touchmove",this.onTouch,{passive:!0}),this.onResize=this.debounce(()=>{this.resize(),this.pathPoints=samplePath(this.path,200),this.ambient=[],this.seedAmbient()},150),window.addEventListener("resize",this.onResize),"IntersectionObserver"in window?(this.observer=new IntersectionObserver(entries=>{entries.forEach(e=>{this.visible=e.isIntersecting,this.visible&&!this.running?this.start():this.visible||this.stop()})},{threshold:0}),this.observer.observe(this.root)):(this.visible=!0,this.start())}resize(){const rect=this.canvas.getBoundingClientRect(),dpr=Math.min(window.devicePixelRatio||1,2);this.canvas.width=rect.width*dpr,this.canvas.height=rect.height*dpr,this.ctx.setTransform(dpr,0,0,dpr,0,0),this.canvasRect=rect,this.canvasW=rect.width,this.canvasH=rect.height,this.scaleX=rect.width/600,this.scaleY=rect.height/520}toCanvas(p){return{x:p.x*this.scaleX,y:p.y*this.scaleY}}seedAmbient(){const n=isMobile()?0:this.ambientCount;for(let i=0;i<n;i++){const t=Math.random();this.ambient.push(this.makeAmbientParticle(t))}}makeAmbientParticle(t){const brightnessMul=.55+.45*Math.pow(t,1.4);return{t:t,baseSize:Math.random()<.08?1.6+1*Math.random():.5+.9*Math.random(),brightness:brightnessMul,phase:Math.random()*Math.PI*2,speed:.012+.025*Math.random(),driftSpeed:1e-4+3e-4*Math.random(),tint:Math.random()<.15?"bright":"gold"}}handleMove(e){const r=this.canvas.getBoundingClientRect();this.cursor.x=e.clientX-r.left,this.cursor.y=e.clientY-r.top,this.cursor.active=!0}nearestPathPoint(cx,cy){let best=1/0,bestPt=null,bestT=0;for(let i=0;i<this.pathPoints.length;i++){const p=this.pathPoints[i],px=p.x*this.scaleX,py=p.y*this.scaleY,dx=cx-px,dy=cy-py,d=dx*dx+dy*dy;d<best&&(best=d,bestPt={x:px,y:py},bestT=p.t)}return{dist:Math.sqrt(best),point:bestPt,t:bestT}}spawnCursorSpark(near,t){if(this.sparks.length>=this.maxSparks)return;const jx=18*(Math.random()-.5),jy=18*(Math.random()-.5);this.sparks.push({x:near.x+jx,y:near.y+jy,vx:.4*(Math.random()-.5),vy:.4*(Math.random()-.5)-.15,life:0,maxLife:40+40*Math.random(),size:1.2+1.8*Math.random(),tint:Math.random()<.4?"bright":"gold"})}spawnTerminalBurst(){const endPoint=this.pathPoints[this.pathPoints.length-1];if(!endPoint)return;const cx=endPoint.x*this.scaleX,cy=endPoint.y*this.scaleY;for(let i=0;i<6&&!(this.sparks.length>=this.maxSparks);i++){const angle=i/6*Math.PI*2+.3*Math.random(),speed=.4+.6*Math.random();this.sparks.push({x:cx+8*(Math.random()-.5),y:cy+8*(Math.random()-.5),vx:Math.cos(angle)*speed,vy:Math.sin(angle)*speed,life:0,maxLife:50+30*Math.random(),size:1.4+1.2*Math.random(),tint:"bright"})}}update(now){if(this.cursor.active){const near=this.nearestPathPoint(this.cursor.x,this.cursor.y);near.point&&near.dist<100&&now-this.lastSpawn>this.cursorSpawnEvery&&(this.spawnCursorSpark(near.point,near.t),this.lastSpawn=now)}now-this.lastBurst>this.burstSpawnEvery&&(this.spawnTerminalBurst(),this.lastBurst=now);for(let i=0;i<this.ambient.length;i++){const p=this.ambient[i];p.phase+=p.speed,p.t+=p.driftSpeed,p.t>=1&&(p.t-=1)}for(let i=this.sparks.length-1;i>=0;i--){const p=this.sparks[i];p.x+=p.vx,p.y+=p.vy,p.vy+=.005,p.life++,p.life>=p.maxLife&&this.sparks.splice(i,1)}}draw(){const ctx=this.ctx,w=this.canvasW,h=this.canvasH;ctx.clearRect(0,0,w,h),ctx.save(),ctx.globalCompositeOperation="lighter";const pts=this.pathPoints,ptsLen=pts.length,scaleX=this.scaleX,scaleY=this.scaleY;for(let i=0;i<this.ambient.length;i++){const p=this.ambient[i];let t=p.t;t<0?t=0:t>1&&(t=1);const idxF=t*(ptsLen-1),idx=0|idxF,idxNext=Math.min(ptsLen-1,idx+1),frac=idxF-idx,pa=pts[idx],pb=pts[idxNext],sx=pa.x+(pb.x-pa.x)*frac,sy=pa.y+(pb.y-pa.y)*frac,dx=pb.x-pa.x,dy=pb.y-pa.y,len=Math.sqrt(dx*dx+dy*dy)||1,nxS=-dy/len,nyS=dx/len,spread=3+18*Math.pow(t,2.5),offset=Math.sin(.3*p.phase+.7*i)*spread,avgScale=.5*(scaleX+scaleY),cx=sx*scaleX+nxS*offset*avgScale,cy=sy*scaleY+nyS*offset*avgScale,sinPhase=Math.sin(p.phase),a=(.55+.45*sinPhase)*p.brightness,size=p.baseSize*(.85+.3*sinPhase);ctx.beginPath(),ctx.fillStyle="bright"===p.tint?`rgba(255, 233, 184, ${.25*a})`:`rgba(244, 215, 134, ${.18*a})`,ctx.arc(cx,cy,3.5*size,0,2*Math.PI),ctx.fill(),ctx.beginPath(),ctx.fillStyle="bright"===p.tint?`rgba(255, 245, 220, ${a})`:`rgba(244, 215, 134, ${.9*a})`,ctx.arc(cx,cy,size,0,2*Math.PI),ctx.fill()}for(let i=0;i<this.sparks.length;i++){const p=this.sparks[i],t=p.life/p.maxLife,alpha=.9*(1-t),size=p.size*(1-.4*t);ctx.beginPath(),ctx.fillStyle="bright"===p.tint?`rgba(255, 245, 220, ${.35*alpha})`:`rgba(244, 215, 134, ${.3*alpha})`,ctx.arc(p.x,p.y,4*size,0,2*Math.PI),ctx.fill(),ctx.beginPath(),ctx.fillStyle="bright"===p.tint?`rgba(255, 250, 235, ${alpha})`:`rgba(244, 215, 134, ${alpha})`,ctx.arc(p.x,p.y,size,0,2*Math.PI),ctx.fill()}
1ctx.restore()}loop(ts){this.running&&(this.lastFrame=ts,this.update(ts),this.draw(),this.rafId=requestAnimationFrame(t=>this.loop(t)))}start(){this.running||(this.running=!0,this.lastFrame=performance.now(),this.lastBurst=performance.now(),this.rafId=requestAnimationFrame(t=>this.loop(t)))}stop(){this.running=!1,this.rafId&&cancelAnimationFrame(this.rafId)}destroy(){this.stop(),this.root.removeEventListener("mousemove",this.onMove),this.root.removeEventListener("touchmove",this.onTouch),window.removeEventListener("resize",this.onResize),this.observer&&this.observer.disconnect()}debounce(fn,ms){let t;return function(){const args=arguments;clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),ms)}}}function initInstance(id){const root=document.getElementById(id);if(!root)return;const enabled="true"===root.dataset.animationEnabled,staticEl=root.querySelector(".mlac-rsh__static-trail");!enabled||prefersReducedMotion||isMobile()?staticEl&&(staticEl.style.display="block"):new SparkleTrail(root)}function autoInit(){document.querySelectorAll(".mlac-rsh").forEach(el=>{el.id&&!el.dataset.initialised&&(el.dataset.initialised="true",initInstance(el.id))})}window.MLAC_RSH_INIT=initInstance,Array.isArray(window.MLAC_RSH_QUEUE)&&(window.MLAC_RSH_QUEUE.forEach(initInstance),window.MLAC_RSH_QUEUE=[]),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",autoInit):autoInit()}();
2//# sourceURL=https://44038840.fs1.hubspotusercontent-na1.net/hubfs/44038840/hub_generated/module_assets/1/214856290863/1781580268699/module_revenue-signal-hero-new.js

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.