PageSourceSearch

https://frigidfluid.com/cdn/shop/t/51/assets/highlight-text-with-image.js?v=72332227661899001651791128405

js frigidfluid.com collected 2026-10-10 01:10:34 UTC 5,131 bytes, 2 lines download raw bytes

1window.Eurus.loadedScript.has("highlight-text-with-image.js")||(window.Eurus.loadedScript.add("highlight-text-with-image.js"),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.data("xHighlightAnimation",()=>({initElements:null,animationFrameId:null,window_height:window.innerHeight,load(el,rtl_check,equalLines,fullScreen=!1,range){this.initElements=this.separateWords(el),this.partitionIntoLines(el,rtl_check,equalLines,fullScreen,range);let lastWidth=window.innerWidth;window.addEventListener("resize",this.debounce(()=>{window.innerWidth!==lastWidth&&(lastWidth=window.innerWidth,this.partitionIntoLines(el,rtl_check,equalLines,fullScreen,range))}))},debounce(func,timeout=300){let timer;return(...args)=>{clearTimeout(timer),timer=setTimeout(()=>{func.apply(this,args)},timeout)}},calRelativePos(el,rtl_check=!1){const elRect=el.getBoundingClientRect(),parentRect=el.parentElement.getBoundingClientRect(),pos=Math.round((elRect.left-parentRect.left)/parentRect.width*100);return rtl_check?Math.max(0,Math.min(100,100-pos)):pos},separateWords(container){let elements=[];return container.childNodes.forEach(node=>{node.nodeType===Node.TEXT_NODE&&node.textContent.trim()!==""?node.textContent.match(/(\s+|[^\s-]+|[-])/g).forEach(word=>{if(word){let span=document.createElement("span");span.textContent=word,elements.push(span)}}):node.nodeType===Node.ELEMENT_NODE&&elements.push(node)}),elements},partitionIntoLines(container,rtl_check,equalLines,fullScreen=!1,range){container.innerHTML="",this.initElements.forEach(el=>container.appendChild(el));let maxHeight=0;requestAnimationFrame(()=>{let lines=[],currentLine=[],prevMid=null;this.initElements.forEach(el=>{let rect=el.getBoundingClientRect();if(rect.width===0)return;maxHeight<rect.height&&(maxHeight=rect.height);let midpoint=rect.bottom+(rect.top-rect.bottom)/2;prevMid!==null&&Math.abs(midpoint-prevMid)>10&&(lines.push(currentLine),currentLine=[]),currentLine.push(el),prevMid=midpoint}),currentLine.length&&lines.push(currentLine);let newInnerHTML=lines.map(lineElements=>{let div=document.createElement("div");return equalLines?(div.className="text-highlight content-center relative inline-block text-[rgba(var(--colors-heading),0.3)]",div.style.height=`${maxHeight+8}px`):div.className="text-highlight content-center relative inline-block text-[rgba(var(--colors-heading),0.3)] mb-0.5",lineElements.forEach(el=>div.appendChild(el.cloneNode(!0))),div.outerHTML}).join("");container.innerHTML=newInnerHTML,container.setAttribute("x-intersect.once.margin.300px","startAnim($el, "+rtl_check+", "+fullScreen+", "+range+")")})},startAnim(el,rtl_check,fullScreen=!1,range){let starts=[],ends=[];if(fullScreen){let offsetStart=el.offsetParent.parentElement.getBoundingClientRect().top+window.scrollY,offset={3e3:-200,2e3:200}[range]??600;el.childNodes.forEach((element,index)=>{index!=0?(starts.push(ends[index-1]),ends.push(starts[index]+range)):(starts.push(offsetStart),ends.push(offsetStart+range))}),el.offsetParent.parentElement.style.height=`calc(${ends[ends.length-1]-starts[0]+range/2+offset}px)`}else starts=[.7],ends=[.5],el.childNodes.forEach((element,index)=>{if(index!=el.childNodes.length-1){const element_rect=element.getBoundingClientRect(),element_height=Math.abs(element_rect.bottom-element_rect.top)/this.window_height;let start=ends[index]+element_height;starts.push(start),ends.push(Math.max(start-.2,.2))}});this.createObserver(el,rtl_check,starts,ends,fullScreen)},createObserver(el,rtl_check,starts,ends,fullScreen=!1){const option={root:null,rootMargin:"300px",threshold:0};new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting?this.updateHighlight(el,rtl_check,starts,ends,fullScreen):this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)})},option).observe(el)},updateHighlight(el,rtl_check=!1,starts,ends,fullScreen=!1){const update=()=>{el.childNodes.forEach((element,index)=>{let value;const element_rect=element.getBoundingClientRect();let position=fullScreen?window.scrollY:Math.max(Math.min(element_rect.top/this.window_height,1),0);fullScreen?position<starts[index]?value=0:position>ends[index]?value=120:value=120*(position-starts[index])/(ends[index]-starts[index]):position>starts[index]?value=0:position<ends[index]?value=120:value=120*(position-starts[index])/(ends[index]-starts[index]),element.style.backgroundSize=`${value}%`,Array.from(element.getElementsByClassName("highlight")).forEac
1h(el2=>{Math.round(value)>this.calRelativePos(el2,rtl_check)?(el2.classList.add("highlight-anm-start"),el2.classList.remove("highlight-anm-end")):(el2.classList.remove("highlight-anm-start"),el2.classList.add("highlight-anm-end"))}),element.style.setProperty("--highlight-fill-stop",`${element.offsetWidth*value/100-element.offsetWidth*.2}px`),element.style.setProperty("--highlight-unfill-stop",`${element.offsetWidth*value/100}px`)}),this.animationFrameId=window.requestAnimationFrame(update)};this.animationFrameId||update()}}))})}));
2//# sourceMappingURL=/cdn/shop/t/51/assets/highlight-text-with-image.js.map?v=72332227661899001651791128405

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.