PageSourceSearch

https://animicausa.com/cdn/shop/t/39/assets/gc-hand-guide.js?v=52503637301748693311787839041

js animicausa.com collected 2026-10-03 22:01:57 UTC 4,878 bytes, 18 lines download raw bytes

1let handGuideElement=null,currentHandTarget=null,scrollListener=null,bubbleElement=null,bubbleTimer=null;const HEARTBEAT_CLASS="gc-dot-heartbeat";let handOffsetX=-64,handOffsetY=-24,handEdgeRelative=!1;function createHandElement(){const container=document.createElement("div");container.id="gc-hand-guide-container",container.style.position="absolute",container.style.pointerEvents="none",container.style.zIndex="900",container.style.width="48px",container.style.height="48px";const img=document.createElement("img");return img.src=window.GC_ASSETS?.pointingHand||new URL("./pointing-hand.png",import.meta.url).href,img.style.width="100%",img.style.height="100%",img.style.objectFit="contain",img.onerror=()=>console.warn("Failed to load gc-pointing-hand.png",img.src),container.appendChild(img),container}function updateHandPosition(){if(!handGuideElement||!currentHandTarget)return;const center=currentHandTarget.offsetLeft,top=currentHandTarget.offsetTop,left=handEdgeRelative?center-currentHandTarget.offsetWidth/2:center;handGuideElement.style.left=left+handOffsetX+"px",handGuideElement.style.top=top+handOffsetY+"px",updateBubblePosition()}function createBubbleElement(){const bubble=document.createElement("div");return bubble.className="gc-click-here-bubble",bubble.textContent="Click Here",bubble.style.position="absolute",bubble.style.pointerEvents="none",bubble.style.zIndex="900",bubble}function updateBubblePosition(){if(!bubbleElement||!currentHandTarget)return;const center=currentHandTarget.offsetLeft,top=currentHandTarget.offsetTop;bubbleElement.style.left=center+"px",bubbleElement.style.top=top-currentHandTarget.offsetHeight/2-12+"px"}function clearBubble(){bubbleTimer&&(clearTimeout(bubbleTimer),bubbleTimer=null),bubbleElement&&(bubbleElement.remove(),bubbleElement=null)}function showClickHereBubble(target){clearBubble(),bubbleElement=createBubbleElement(),(target.offsetParent||target.parentElement||document.body).appendChild(bubbleElement),updateBubblePosition(),bubbleTimer=setTimeout(()=>{bubbleElement&&(bubbleElement.classList.add("is-hiding"),setTimeout(()=>clearBubble(),500))},5200)}function getNextUnlockedDot(currentSlot){const dots=document.querySelectorAll("[data-slot]");if(dots.length===0)return console.warn("Hand guide: No dots found with [data-slot] attribute"),null;for(let dot of dots){const slot=parseInt(dot.getAttribute("data-slot"));if(slot>currentSlot&&!dot.classList.contains("is-locked"))return console.log(`Hand guide: Found unlocked dot at slot ${slot}`),dot}return console.warn(`Hand guide: No unlocked dots found after slot ${currentSlot}`),null}export function showHandGuide(currentSlot,options={}){typeof options.offsetX=="number"&&(handOffsetX=options.offsetX),typeof options.offsetY=="number"&&(handOffsetY=options.offsetY),handEdgeRelative=!!options.edgeRelative;const nextDot=getNextUnlockedDot(currentSlot);if(!nextDot){console.warn(`Hand guide: No unlocked dot found after slot ${currentSlot}`),handGuideElement&&(handGuideElement.remove(),handGuideElement=null),currentHandTarget?.classList.remove(HEARTBEAT_CLASS),currentHandTarget=null,clearBubble();return}handGuideElement||(handGuideElement=createHandElement()),currentHandTarget&&currentHandTarget!==nextDot&&currentHandTarget.classList.remove(HEARTBEAT_CLASS),currentHandTarget=nextDot,currentHandTarget.classList.add(HEARTBEAT_CLASS),showClickHereBubble(currentHandTarget);const host=nextDot.offsetParent||nextDot.parentElement||document.body;if(handGuideElement.parentElement!==host&&host.appendChild(handGuideElement),nextDot.offsetWidth===0||nextDot.offsetHeight===0){console.warn("Hand guide: Dot has invalid size");return}updateHandPosition(),handGuideElement.style.opacity="0",handGuideElement.style.animation="gc-hand-slide 2s ease-in-out infinite",setTimeout(()=>{handGuideElement&&(handGuideElement.style.transition="opacity 0.5s ease-in",handGuideElement.style.opacity="1")},100)}export function hideHandGuide(){handGuideElement&&(handGuideElement.remove(),handGuideElement=null),document.getElementById("gc-hand-guide-container")?.remove(),currentHandTarget?.classList.remove(HEARTBEAT_CLASS),currentHandTarget=null,clearBubble(),scrollListener&&(window.removeEventListener("scroll",scrollListener),scrollListener=null)}export function injectHandGuideStyles(){if(document.getElementById("gc-hand-guide-styles"))return;const style=document.createElement("style");style.id="gc-hand-guide-styles",style.textContent=`
2    @keyframes gc-hand-slide {
3      0% {
4        transform: translateX(0);
5      }
6      50% {
7        transform: translateX(40px);
8      }
9      100% {
10        transform: translateX(0);
11      }
12    }
13
14    #gc-hand-guide-container {
15      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
16    }
17  `,document.head.appendChild(style)}
18//# sourceMappingURL=/cdn/shop/t/39/assets/gc-hand-guide.js.map?v=52503637301748693311787839041

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.