1var module_180472083473=void $(document).ready((function(){let map;async function fetchNearest3Stores(lat,lng){const location={lat:lat,lng:lng},results=await async function(){const response=await fetch("/_hcms/api/cce/get-stores",{method:"GET",headers:{"Content-Type":"application/json"}});if(!response.ok)throw new Error(`Failed to fetch stores: ${response.statusText}`);const data=await response.json();return data?.data||[]}(),destinations=results.map((store=>JSON.parse(store.values.store_location))),stores=results.map((store=>({...store,...store?.values,location:JSON.parse(store.values.store_location)})));window.getTravelTimes(location.lat,location.lng,destinations,stores,(async function(sortedResults){!function(stores){const baseURL=`${window.location.origin}`,container=$(".dynamic-cards__container"),currentDay=(new Date).toLocaleString("en-US",{weekday:"long"});stores.forEach((store=>{const openStatus=window.getStoreOpenStatus(store),openingHours=store.opening_hours_week_day_text?JSON.parse(store.opening_hours_week_day_text):"No opening hours available";container.append(`\n <div class="dynamic-cards__items">\n <div class="dynamic-cards__items-image">\n <span><img src="https://46358621.fs1.hubspotusercontent-na1.net/hubfs/46358621/Theme/loc-icon-1.svg" alt="Location Arrow"></span>\n <img src="${store?.store_image?.url}" alt="${store?.name}">\n </div>\n <div class="dynamic-cards__items-content">\n <h3>${store?.name}</h3>\n <p>${store?.address}</p>\n\n <div class="dynamic-cards__items-bottom-text time-dropdown">\n <div class="dynamic-cards__items-bottom-text__open-status time-dropdown__status">${openStatus}</div>\n <div class="dynamic-cards__items-bottom-text__open-hours time-dropdown__hours">\n ${Array.isArray(openingHours)?openingHours?.map((hour=>{const[day,time]=hour.split(": ");return`<div class="${day.trim().toString()===currentDay.trim().toString()?"dynamic-cards__items-current":""}"><span>${day}</span>: <span>${time}</span></div>`})).join(""):openingHours}\n </div>\n <img class="time-dropdown__curret" src="https://46358621.fs1.hubspotusercontent-na1.net/hubfs/46358621/Theme/arrow-down.svg" alt="Arrow down" height="9" width="16" loading="lazy">\n </div>\n <div class="dynamic-cards__items-button cce-button">\n <a href="${baseURL}/store-locations/${store?.path}">Visit Store</a>\n </div>\n </div>\n </div>\n `)})),$(".dynamic-cards__items-content h3").matchHeight({byRow:!0,property:"height",target:null,remove:!1}),$(".dynamic-cards__items-content p").matchHeight({byRow:!0,property:"height",target:null,remove:!1})}(sortedResults.map((store=>store.result)).slice(0,3))}))}const init=async()=>{const{lat:lat,lng:lng}=await window.useCurrentLocation(),defaultLocation={lat:lat,lng:lng};map=new google.maps.Map(document.getElementById("dynamic-cards-map"),{center:defaultLocation,zoom:window.defaultZoomLevel,mapTypeControl:!1,mapId:window.globalMapId}),await fetchNearest3Stores(lat,lng)};if($(document).on("click",".dynamic-cards__items-bottom-text",(function(){$(this).toggleClass("active")})),window.googleMapsInitialized)init();else{const checkGoogleMaps=setInterval((()=>{window.googleMapsInitialized&&(clearInterval(checkGoogleMaps),init())}),100)}})); 2//# sourceURL=https://46358621.fs1.hubspotusercontent-na1.net/hubfs/46358621/hub_generated/module_assets/1/180472083473/1741033188078/module_dynamic-cards.js
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.