1var module_127128501418=function(){async function startViewCatalog(rowsData){try{if(!Array.isArray(rowsData))throw new Error("No rows data was provided.");const items=rowsData.filter(Boolean).map((course,index)=>function(course,index){const actualPrice=course?.actual_price||"NA",discountPrice=course?.price||"NA",productId=course?.product_id;return{item_id:productId?.includes(",")?productId.split(",").map(item=>item.trim()):productId,item_name:course?.name,item_type:course?.course_topics?.[0]?.label,variant_id:course?.variant?.id||"NA",price:parseFloat(discountPrice.replace(/[$,]/g,"")||"NA"),actual_price:parseFloat(actualPrice.replace(/[$,]/g,"")||"NA"),sku:course.sku||"NA",index:index}}(course,index));if(!items.length)return;const viewItemsList={event:"view_item_list",ecommerce:{item_list_name:"view_catalog_name",item_list_id:"view_catalog_id",items:items}};await triggerECommEvent(viewItemsList)}catch(error){console.error(error)}}document.addEventListener("DOMContentLoaded",()=>{document.addEventListener("shopifyDataLoaded",()=>{document.querySelectorAll(".course-catalog[data-rows]").forEach(catalog=>{const dataRows=JSON.parse(catalog.getAttribute("data-rows"));(function(element){const{display:display,visibility:visibility}=window.getComputedStyle(element);return"none"!==display&&"hidden"!==visibility})(catalog)&&Array.isArray(dataRows)&&startViewCatalog(dataRows)})})})}(); 2//# sourceURL=https://23273748.fs1.hubspotusercontent-na1.net/hubfs/23273748/hub_generated/module_assets/1/127128501418/1768582637875/module_Course_Catalog.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.