PageSourceSearch

https://floydhome.com/cdn/shop/t/354/assets/helper-functions.js?v=124326101606921789781700080795

js floydhome.com collected 2026-09-25 20:14:19 UTC 4,023 bytes, 2 lines download raw bytes

1const getFocusableElements=container=>Array.from(container.querySelectorAll("summary, a[href], button:not(:disabled), button:enabled, [tabindex]:not([tabindex^='-']), [aria-hidden]:not([aria-hidden='true']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe")),trapFocusHandlers={},removeTrapFocus=(elementToFocus=null)=>{document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),elementToFocus&&elementToFocus.focus()},trapFocus=(container,_elementToFocus)=>{var elements=getFocusableElements(container).filter(el=>!(el.ariaHidden==="true"||el.tabIndex===-1)),first=elements[0],last=elements[elements.length-1];const elementToFocus=_elementToFocus??first??container;return removeTrapFocus(),trapFocusHandlers.focusin=event=>{event.target!==container&&event.target!==last&&event.target!==first||document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=()=>{document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=event=>{event.code.toUpperCase()==="TAB"&&(event.target===last&&!event.shiftKey&&(event.preventDefault(),first.focus()),(event.target===container||event.target===first)&&event.shiftKey&&(event.preventDefault(),last.focus()))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),elementToFocus.focus(),{elementToFocus,elements,first,last}},pauseAllMedia=()=>{document.querySelectorAll(".js-youtube").forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll(".js-vimeo").forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video").forEach(video=>video.pause()),document.querySelectorAll("product-model").forEach(model=>model.modelViewerUI?.pause())},debounce=(fn,wait)=>{let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}},throttle=(callback,limit)=>{var waiting=!1;return function(){waiting||(callback.apply(this,arguments),waiting=!0,setTimeout(function(){waiting=!1},limit))}},serializeForm=form=>{const obj={},formData=new FormData(form);for(const key of formData.keys())obj[key]=formData.get(key);return JSON.stringify(obj)},fetchConfig=(type="json")=>({method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${type}`}}),isTouch=()=>"ontouchstart"in window||navigator.maxTouchPoints,deepClone=obj=>JSON.parse(JSON.stringify(obj)),formatPrice=(num,fraction=2)=>"$"+(Number(num)/100).toLocaleString("en-EN",{minimumFractionDigits:fraction}),handleize=str=>str.replace(/[ /_]/g,"-").toLowerCase(),decode=str=>decodeURIComponent(str).replace(/\+/g," "),getImageWithSize=(src="",size=1e3)=>(""+src).replace(/([.](?:jpe?g|png))/,`_${size}x$1`),getProductImage=(name="",value="",images,featured=!1,fallback=!1)=>{const key=`${name}-${(value||"").replace(/[/ ]/g,"-")}`.toLowerCase(),image=(images||[]).find(({src})=>~src.indexOf(key)&&~src.indexOf(featured?"pos-1":"pos-2"));return image?getImageWithSize(image,featured?1200:600):getImageWithSize(fallback,600)},decodeIDproduct=id=>decodeURIComponent(escape(window.atob(id))).split("gid://shopify/Product/")[1],encodeIDproduct=id=>window.btoa("gid://shopify/Product/"+id),decodeIDproductVariant=id=>decodeURIComponent(escape(window.atob(id))).split("gid://shopify/ProductVariant/")[1];function customFormValidator(form,eventName="submit"){if(!form)return;form.querySelectorAll("input").forEach(formInput=>{formInput.classList.remove("has-error"),eventName==="submit"&&(formInput.value.trim()===""?formInput.classList.add("has-error"):formInput.pattern&&(new RegExp(formInput.pattern,"gmi").exec()||formInput.classList.add("has-error")))})}
2//# sourceMappingURL=/cdn/shop/t/354/assets/helper-functions.js.map?v=124326101606921789781700080795

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.