PageSourceSearch

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

js aiayu.com collected 2026-09-25 18:42:15 UTC 5,277 bytes, 2 lines download raw bytes

1(function(){"use strict";function fmt(amount){var cents=Math.round(Number(amount)*100),format=window.themeVariables&&window.themeVariables.settings.moneyFormat;return window.slateCurrency&&format?slateCurrency.formatMoney(cents,format):window.Shopify&&typeof Shopify.formatMoney=="function"&&format?Shopify.formatMoney(cents,format):String(Math.round(Number(amount)))}function escapeHtml(str){return str==null?"":String(str).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function cloneTemplate(id){var tpl=document.getElementById(id);return tpl?tpl.content.cloneNode(!0):(console.warn("[HR Helpers] Template not found: #"+id),null)}function fillSlots(fragment,fillers,data){Object.keys(fillers).forEach(function(slotName){fragment.querySelectorAll('[data-hr-slot="'+slotName+'"]').forEach(function(el){fillers[slotName](el,data)})})}function buildPriceHtml(p){return p.isOnSale&&p.oldPrice!=null&&p.price!=null?'<dl class="price-list"><dt class="sr-only">Regular price</dt><dd><s class="price-list__price price-list__price--regular">'+fmt(p.oldPrice)+'</s></dd><dt class="sr-only">Sale price</dt><dd><span class="price-list__price price-list__price--sale">'+fmt(p.price)+"</span></dd></dl>":p.price!=null?'<dl class="price-list"><dt class="sr-only">Price</dt><dd><span class="price-list__price">'+fmt(p.price)+"</span></dd></dl>":""}function buildBadgeHtml(p,soldOutText,onSaleText,showSoldOut){var parts=[],customBadges=p.extraDataList&&p.extraDataList.badges;return customBadges&&customBadges.length&&customBadges.forEach(function(badge){parts.push('<span class="badge badge--custom">'+escapeHtml(badge)+"</span>")}),!p.inStock&&showSoldOut!==!1&&parts.push('<sold-out-badge class="badge badge--sold-out">'+escapeHtml(soldOutText||"Sold out")+"</sold-out-badge>"),p.isOnSale&&p.oldPrice!=null&&p.price!=null&&parts.push('<on-sale-badge class="badge badge--on-sale">'+escapeHtml(onSaleText||"Sale")+"</on-sale-badge>"),parts.length?'<badge-list class="badge-list badge-list--vertical">'+parts.join("")+"</badge-list>":""}function buildMediaHtml(p,imgClass){var images=[];if(p.extraDataList&&p.extraDataList.images&&p.extraDataList.images.length&&(images=p.extraDataList.images.map(function(imgStr){try{return JSON.parse(imgStr)}catch(e){return null}}).filter(Boolean)),!images.length&&p.imgUrl&&(images=[{src:p.imgUrl,alt:p.title}]),!images.length)return"";if(images.length===1)return'<a href="'+escapeHtml(p.url)+'" class="product-card__media" data-instant><img src="'+escapeHtml(images[0].src)+'" alt="'+escapeHtml(images[0].alt||p.title)+'" class="'+imgClass+'" loading="lazy"></a>';var pId=String(p.productNumber||p.id||"").replace(/[^a-zA-Z0-9]/g,"")||String(Date.now()),slideBase="hrslide-"+pId,lastNum=images.length,slides=images.map(function(img,i){var num=i+1;return'<li id="'+slideBase+"-"+num+'" tabindex="0" class="carousel__slide"><a href="'+escapeHtml(p.url)+'" tabindex="0"><img src="'+escapeHtml(img.src)+'" alt="'+escapeHtml(img.alt||p.title)+'" class="'+imgClass+'" loading="lazy"></a><div class="carousel__snapper"></div><button class="carousel__control carousel__controls_prev" data-slide-id="'+slideBase+"-"+(num-1)+'"'+(num===2?' data-image-index="first"':"")+'></button><button class="carousel__control carousel__controls_next" data-slide-id="'+slideBase+"-"+(num+1)+'"'+(num===lastNum-1?' data-image-index="last"':"")+"></button></li>"}).join("");return'<div class="product-card__media" data-instant><div class="carousel hidden-prev" aria-label="Gallery"><ol class="carousel__viewport">'+slides+"</ol></div></div>"}function buildSwatchHtml(p){var swatches=p.extraDataList&&p.extraDataList.vrColorSwatches;if(!swatches||swatches.length<=1)return"";var shown=0,dotsHtml=swatches.reduce(function(acc,str){if(shown>=2)return acc;try{var s=JSON.parse(str);return s.color?(shown++,acc+'<span style="background-color:'+escapeHtml(s.color)+';"></span>'):acc}catch(e){return acc}},"");if(!dotsHtml)return"";var extra=swatches.length>2?"+"+(swatches.length-2):"";return'<div class="VariantRobot--Collection">'+dotsHtml+extra+"</div>"}var CARD_SLOT_FILLERS={productMedia:function(el,p){var tpl=document.getElementById("hr-product-card-tpl"),imgClass=tpl&&tpl.dataset.imgClass||"product-card__image product-card__image--primary object-cover";el.innerHTML=buildMediaHtml(p,imgClass)},productTitle:function(el,p){el.href=p.url,el.textContent=(p.title||"").split(" | ")[0]},productPrice:function(el,p){el.innerHTML=buildPriceHtml(p)},productBadges:function(el,p){var tpl=document.getElementById("hr-product-card-tpl"),soldOutText=tpl&&tpl.dataset.soldOut||"
1Sold out",onSaleText=tpl&&tpl.dataset.onSale||"Sale",showSoldOut=!tpl||tpl.dataset.showSoldOut!=="false";el.innerHTML=buildBadgeHtml(p,soldOutText,onSaleText,showSoldOut)},productSwatches:function(el,p){el.innerHTML=buildSwatchHtml(p)}};window.HelloRetailHelpers={fmt:fmt,escapeHtml:escapeHtml,cloneTemplate:cloneTemplate,fillSlots:fillSlots,buildMediaHtml:buildMediaHtml,buildPriceHtml:buildPriceHtml,buildBadgeHtml:buildBadgeHtml,buildSwatchHtml:buildSwatchHtml,CARD_SLOT_FILLERS:CARD_SLOT_FILLERS},document.dispatchEvent(new CustomEvent("hr:helpers:ready"))})();
2//# sourceMappingURL=/cdn/shop/t/10/assets/hello-retail-helpers.js.map?v=27652902612200391711783509198

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.