PageSourceSearch

https://aiayu.com/cdn/shop/t/10/assets/hello-retail-recoms.js?v=14180825994090790361783931360

js aiayu.com collected 2026-09-25 18:42:27 UTC 4,576 bytes, 2 lines download raw bytes

1(function(){"use strict";if(window.__hrRecomsLoaded)return;window.__hrRecomsLoaded=!0;function init(){var sections=document.querySelectorAll("[data-hr-recom-section]");if(sections.length){var registrations=[],pageUrl=window.location.origin+window.location.pathname;sections.forEach(function(sectionEl){var cfg=readConfig(sectionEl);if(!cfg.recomKey){console.warn("[HR Recom] no recom_key set in section settings \u2014 aborting",sectionEl);return}var listGrid=document.getElementById("hr-recom-list-"+cfg.sectionId),listCarousel=document.getElementById("carousel-"+cfg.sectionId);if(!listGrid||!listCarousel){console.warn("[HR Recom] missing DOM elements for section",cfg.sectionId);return}registrations.push({request:{key:cfg.recomKey,format:"json",context:{urls:[pageUrl]}},handle:function(recom){var products=recom&&recom.products;!products||!products.length||render(cfg,sectionEl,listGrid,listCarousel,products)}})}),registrations.length&&(window.hrq=window.hrq||[],window.hrq.push(["loadRecom",registrations.map(function(r){return r.request}),function(result){var responses=normalizeRecomResult(result);responses&&registrations.forEach(function(reg,i){reg.handle(responses[i])})}]))}}function normalizeRecomResult(result){return Array.isArray(result)?result:result&&Array.isArray(result.responses)?result.success===!1?(console.error("[HR Recom] loadRecom failed:",result.message),null):result.responses:(console.warn("[HR Recom] unexpected loadRecom result shape",result),null)}function readConfig(el){var ds=el.dataset;return{sectionId:ds.sectionId||"",recomKey:ds.recomKey||"",stackMobile:ds.stackMobile==="true",stackDesktop:ds.stackDesktop==="true",productsLimitMobile:parseInt(ds.productsLimitMobile,10)||0,hideInfo:ds.hideInfo==="true",reveal:ds.reveal==="true"}}function render(cfg,sectionEl,listGrid,listCarousel,products){var isMobile=window.matchMedia("(max-width: 699px)").matches,visible=isMobile&&cfg.productsLimitMobile?products.slice(0,cfg.productsLimitMobile):products;listGrid.innerHTML="",listCarousel.innerHTML="";var gridFrag=document.createDocumentFragment(),carouselFrag=document.createDocumentFragment();visible.forEach(function(p){gridFrag.appendChild(buildCard(p,cfg,"-g")),carouselFrag.appendChild(buildCard(p,cfg,"-c"))}),listGrid.appendChild(gridFrag),listCarousel.appendChild(carouselFrag),sectionEl.style.display="",attachCarouselEdgeEvents(listCarousel)}function buildCard(p,cfg,listSuffix){var H=window.HelloRetailHelpers,frag=H.cloneTemplate("hr-product-card-tpl");if(!frag)return document.createDocumentFragment();H.fillSlots(frag,H.CARD_SLOT_FILLERS,p);var innerEl=frag.querySelector(".product-card");if(!innerEl)return frag;uniquifySlideIds(frag,"-"+cfg.sectionId+listSuffix);var wrapper=document.createElement("product-card");for(wrapper.className=innerEl.className,cfg.reveal&&wrapper.setAttribute("reveal-on-scroll","true");innerEl.firstChild;)wrapper.appendChild(innerEl.firstChild);if(innerEl.replaceWith(wrapper),cfg.hideInfo){var info=wrapper.querySelector(".product-card__info");info&&info.remove()}return frag}function uniquifySlideIds(fragment,suffix){fragment.querySelectorAll(".carousel__slide").forEach(function(slide){slide.id&&(slide.id=slide.id+suffix)}),fragment.querySelectorAll(".carousel__control").forEach(function(btn){var sid=btn.getAttribute("data-slide-id");sid&&btn.setAttribute("data-slide-id",sid+suffix)})}function attachCarouselEdgeEvents(el){var s={nearingStart:!0,nearingEnd:!0,leavingStart:!0,leav
1ingEnd:!0};el.addEventListener("scroll",function(){var threshold=100,scrollLeft=Math.round(Math.abs(el.scrollLeft));scrollLeft<threshold&&s.nearingStart&&(el.dispatchEvent(new CustomEvent("scroll:edge-nearing",{detail:{position:"start"}})),s.nearingStart=!1,s.leavingStart=!0),scrollLeft>=threshold&&s.leavingStart&&(el.dispatchEvent(new CustomEvent("scroll:edge-leaving",{detail:{position:"start"}})),s.leavingStart=!1,s.nearingStart=!0),el.scrollWidth-el.clientWidth<scrollLeft+threshold&&s.nearingEnd&&(el.dispatchEvent(new CustomEvent("scroll:edge-nearing",{detail:{position:"end"}})),s.nearingEnd=!1,s.leavingEnd=!0),el.scrollWidth-el.clientWidth>=scrollLeft+threshold&&s.leavingEnd&&(el.dispatchEvent(new CustomEvent("scroll:edge-leaving",{detail:{position:"end"}})),s.leavingEnd=!1,s.nearingEnd=!0)})}function boot(){window.HelloRetailHelpers?init():document.addEventListener("hr:helpers:ready",init)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",boot):boot()})();
2//# sourceMappingURL=/cdn/shop/t/10/assets/hello-retail-recoms.js.map?v=14180825994090790361783931360

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.