PageSourceSearch

https://shop.bodybuilding.com/cdn/shop/t/268/assets/sale-tiles.js?v=38040689479261688311787342945

js bodybuilding.com collected 2026-10-01 08:44:58 UTC 5,973 bytes, 1 lines download raw bytes

1(function(){"use strict";var j="https://cdn.jsdelivr.net/npm/[email protected]/build/three.min.js",q="(hover: hover) and (pointer: fine)",R=4,B=28,H=.86,F=.14,W=.12,V=.22,U=.32,Y=.14,Q=.028,J=9,K=12,O=10,C=new WeakMap,P=new WeakMap;function Z(){return window.matchMedia(q).matches}function $(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ee(){return Z()&&!$()}function te(e){var t=null;if(window.THREE){e(window.THREE);return}if(t=document.querySelector("script[data-bb-three], script[data-cta-three]"),t){t.addEventListener("load",function(){window.THREE&&e(window.THREE)});return}t=document.createElement("script"),t.src=j,t.async=!0,t.dataset.bbThree="true",t.addEventListener("load",function(){window.THREE&&e(window.THREE)}),document.head.appendChild(t)}function re(e,t,o,r){var n=t*K*r,a=-o*J*r,d=t*O*r,s=o*O*r;e.style.transform="perspective(900px) translate3d("+d.toFixed(2)+"px, "+s.toFixed(2)+"px, 0) rotateX("+a.toFixed(2)+"deg) rotateY("+n.toFixed(2)+"deg)"}function ne(e,t,o){var r=e.currentSrc||e.src,n=new Image,a=document.createElement("canvas"),d=null,s=0,i=0;if(!r){o();return}n.crossOrigin="anonymous",n.decoding="async",n.onload=function(){if(s=n.naturalWidth,i=n.naturalHeight,d=a.getContext("2d"),!d||!s||!i){o();return}a.width=s,a.height=i;try{d.drawImage(n,0,0,s,i),t(a,s/i)}catch{o()}},n.onerror=o,n.src=r}function ae(e,t,o,r){var n=t/o,a=R,d=2*Math.tan(e.fov*Math.PI/360)*a,s=d*n,i=s*H,l=d*H,g=i,E=i/r;return E>l&&(E=l,g=l*r),{width:g,height:E}}function ie(e,t,o,r){var n=e.clientWidth||1,a=e.clientHeight||1,d=new r.Scene,s=new r.PerspectiveCamera(B,n/a,.1,20),i=new r.WebGLRenderer({alpha:!0,antialias:!0,powerPreference:"high-performance",premultipliedAlpha:!1}),l=new r.CanvasTexture(t),g=new r.MeshBasicMaterial({map:l,transparent:!0,depthWrite:!1}),E=new r.PlaneGeometry(1,1),u=new r.Mesh(E,g),M=new r.Clock,h=0,f=0,S=0,x=0,L=0,I=0,y=0,_=!1,T={width:1,height:1};l.colorSpace=r.SRGBColorSpace,l.needsUpdate=!0,l.minFilter=r.LinearFilter,l.magFilter=r.LinearFilter,l.generateMipmaps=!1,s.position.z=R,i.setPixelRatio(Math.min(window.devicePixelRatio||1,1.5)),i.setClearColor(0,0),i.domElement.setAttribute("aria-hidden","true"),e.appendChild(i.domElement),d.add(u);function b(){var c=e.clientWidth||1,p=e.clientHeight||1;s.aspect=c/p,s.updateProjectionMatrix(),i.setSize(c,p,!1),T=ae(s,c,p,o),u.scale.set(T.width,T.height,1)}function A(){var c=M.elapsedTime,p=0,D=!1;if(f+=(h-f)*W,f<.001&&(f=0),f>.999&&h===1&&(f=1),L+=(S-L)*F,I+=(x-I)*F,p=f,u.rotation.y=L*U*p,u.rotation.x=I*V*p,u.position.x=L*Y*p,u.position.y=-I*Y*p+Math.sin(c*1.15)*Q*p,u.position.z=Math.abs(L)*.04*p,i.render(d,s),!_&&f>.08&&(_=!0,e.classList.add("is-float-ready")),D=Math.abs(h-f)>.002||Math.abs(S-L)>.002||Math.abs(x-I)>.002,h===1||D){y=window.requestAnimationFrame(A);return}y=0,e.classList.remove("is-float-ready")}function v(){y||(M.getDelta(),y=window.requestAnimationFrame(A))}function m(){y&&(window.cancelAnimationFrame(y),y=0)}var w=new ResizeObserver(b);return w.observe(e),b(),{setHover:function(c){h=c?1:0,c||(S=0,x=0),v()},setPointer:function(c,p){S=c,x=p,v()},destroy:function(){m(),w.disconnect(),i.domElement.parentNode&&i.domElement.parentNode.removeChild(i.domElement),E.dispose(),g.dispose(),l.dispose(),i.dispose(),e.classList.remove("is-float-ready")}}}function oe(e,t){var o=e.querySelector("[data-sale-tile-float]"),r=o?o.querySelector("img.sale-tiles__image"):null,n=e.querySelector(".sale-tiles__link"),a=null,d=!1,s=!1,i=0,l=0,g=0,E=0,u=0,M=0,h=0,f=!1;if(!o||!r)return null;function S(){h&&(window.cancelAnimationFrame(h),h=0)}function x(){if(u+=(M-u)*W,g+=(i-g)*F,E+=(l-E)*F,u<.001&&(u=0),u>.999&&M===1&&(u=1),re(r,g,E,u),M===1||Math.abs(M-u)>.002||Math.abs(i-g)>.002){h=window.requestAnimationFrame(x);return}h=0,r.style.transform=""}function L(){h||(h=window.requestAnimationFrame(x))}function I(v,m){i=v,l=m,a?a.setPointer(v,m):d&&y(),L()}function y(){var v=t();!v||a||f||s||(f=!0,ne(r,function(m,w){f=!1,!(s||a||!e.isConnected)&&(a=ie(o,m,w,v),a.setPointer(i,l),a.setHover(d))},function(){f=!1}))}function _(v){if(d=v,M=v?1:0,v||(i=0,l=0),L(),a){a.setHover(v);return}v&&y()}function T(v){var m=o.getBoundingClientRect(),w=0,c=0;!m.width||!m.height||(w=(v.clientX-m.left)/m.width*2-1,c=(v.clientY-m.top)/m.height*2-1,w>1&&(w=1),w<-1&&(w=-1),c>1&&(c=1),c<-1&&(c=-1),I(w,c))}function b(){_(!0)}function A(){n&&document.activeElement===n||_(!1)}return e.addEventListener("pointerenter",b),e.addEventListener("pointerleave",A),e.addEventListener("pointermove",T),n&&(n.addEventListener("focus",b),n.addEventListener("blur",A)),{destroy:function(){s=!0,S(),e.removeEventListener("pointerenter",b),e.removeEventListener("pointerleave",A),e.removeEventListener("pointermove",T),n&&(n.removeEventListener("focus",b),n.removeEventListener("blur",A)),a&&(a.destroy(),a=null),r.style.transform="",o.classList.remove("is-float-ready")}}}function X(e){var t=C.get(e),o=e.querySelectorAll(".sale-tiles__card"),r=[],n=0,a=null,d=(P.get(e)||0)+1;
1if(P.set(e,d),t&&(t.destroy(),C.delete(e)),!!ee()){var s=window.THREE||null;for(n=0;n<o.length;n+=1)a=oe(o[n],function(){return s}),a&&r.push(a);C.set(e,{destroy:function(){for(n=0;n<r.length;n+=1)r[n].destroy();r=[]}}),te(function(i){P.get(e)===d&&(s=i)})}}function k(){var e=document.querySelectorAll("[data-sale-tiles]"),t=0;for(t=0;t<e.length;t+=1)X(e[t])}function z(e){var t=e.target;return!t||!t.querySelector?null:t.matches&&t.matches("[data-sale-tiles]")?t:t.querySelector("[data-sale-tiles]")}document.addEventListener("shopify:section:load",function(e){var t=z(e);t&&X(t)}),document.addEventListener("shopify:section:unload",function(e){var t=z(e),o=t?C.get(t):null;o&&(o.destroy(),C.delete(t))});var G=window.matchMedia(q),se=window.matchMedia("(prefers-reduced-motion: reduce)");function N(){k()}G.addEventListener&&(G.addEventListener("change",N),se.addEventListener("change",N)),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",k):k()})();

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.