1import{r as _}from"./react-vendor-uGzgjzEW.js";import{s}from"./trackingEnvironment-x_W2Kb7A.js";const y=()=>(_.useEffect(()=>{if(s())return window.heapReadyCb=window.heapReadyCb||[],window.heap=window.heap||[],window.heap.load=function(e,t){window.heap.envId=e,window.heap.clientConfig=t=t||{},window.heap.clientConfig.shouldFetchServerConfig=!1;const r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.us.heap-api.com/config/"+e+"/heap_config.js";const n=document.getElementsByTagName("script")[0];n.parentNode?.insertBefore(r,n);const d=["init","startTracking","stopTracking","track","resetIdentity","identify","getSessionId","getUserId","getIdentity","addUserProperties","addEventProperties","removeEventProperty","clearEventProperties","addAccountProperties","addAdapter","addTransformer","addTransformerFn","onReady","addPageviewProperties","removePageviewProperty","clearPageviewProperties"],p=function(a){return function(...l){window.heapReadyCb.push({name:a,fn:function(){window.heap[a]&&window.heap[a].apply(window.heap,l)}})}};for(let a=0;a<d.length;a++)window.heap[d[a]]=p(d[a])},window.heap.load("391195760"),()=>{}},[]),null),i=(e,t)=>{if(s())try{window.heap&&window.heap.track&&window.heap.track(e,{...t,timestamp:new Date().toISOString(),page_url:window.location.href,page_path:window.location.pathname})}catch{}},c="heap_user_identity",m=()=>{try{const e=localStorage.getItem(c);if(e)return JSON.parse(e)}catch{}return null},h=(e,t)=>{try{localStorage.setItem(c,JSON.stringify({email:e,properties:t,identifiedAt:new Date().toISOString()}))}catch{}},f=(e,t)=>{if(e)try{h(e,t),window.heap&&(window.heap.identify(e),window.heap.addUserProperties({email:e,first_identified:new Date().toISOString(),is_returning_user:!1,...t}))}catch{}},v=()=>{const e=m();if(!e?.email)return!1;try{if(window.heap)return window.heap.identify(e.email),window.heap.addUserProperties({email:e.email,is_returning_user:!0,last_session_start:new Date().toISOString(),...e.properties}),!0}catch{}return!1},o=e=>{try{window.heap&&window.heap.addUserProperties&&window.heap.addUserProperties(e)}catch{}},g=()=>{try{window.heap&&window.heap.resetIdentity&&window.heap.resetIdentity()}catch{}},S=e=>{try{window.heap&&window.heap.addEventProperties&&window.heap.addEventProperties(e)}catch{}},C={pageView:(e,t)=>{i("Page View",{page_name:e,page_type:t})},navigationClick:(e,t)=>{i("Navigation Click",{menu_item:e,destination:t})},viewVehicle:e=>{i("View Vehicle",{car_id:e.id,make:e.make,model:e.model,year:e.year,price:e.price,body_type:e.bodyType,vehicle_name:`${e.year} ${e.make} ${e.model}`})},viewVehicleGallery:(e,t,r)=>{i("View Vehicle Gallery",{car_id:e,image_index:t,total_images:r})},addToFavorites:(e,t,r)=>{i("Add to Favorites",{car_id:e,car_name:t,price:r})},removeFromFavorites:(e,t)=>{i("Remove from Favorites",{car_id:e,car_name:t})},shareVehicle:(e,t)=>{i("Share Vehicle",{car_id:e,share_method:t})},search:(e,t)=>{i("Search",{search_query:e,results_count:t})},applyFilter:(e,t)=>{i("Apply Filter",{filter_type:e,filter_value:String(t)})},clearFilters:()=>{i("Clear Filters",{})},sortInventory:(e,t)=>{i("Sort Inventory",{sort_by:e,sort_order:t})},clickWhatsApp:(e,t)=>{i("Click WhatsApp",{car_id:e,car_name:t,contact_method:"whatsapp"})},clickCall:(e,t)=>{i("Click Call",{car_id:e,car_name:t,contact_method:"phone"})},clickEmail:(e,t)=>{i("Click Email",{car_id:e,car_name:t,contact_method:"email"})},formStart:(e,t)=>{i("Form Start",{form_name:e,form_step:t})},formStepComplete:(e,t,r)=>{i("Form Step Complete",{form_name:e,step_number:t,step_name:r})},formSubmit:(e,t)=>{i("Form Submit",{form_name:e,has_vehicle:!!t?.vehicle_id,vehicle_id:t?.vehicle_id})},formError:(e,t,r)=>{i("Form Error",{form_name:e,error_field:t,error_message:r})},formAbandon:(e,t)=>{i("Form Abandon",{form_name:e,last_step:t})},financeCalculatorUse:(e,t,r)=>{i("Finance Calculator Use",{loan_amount:e,term_months:t,down_payment:r})},viewLeaseSpecial:(e,t,r,n)=>{i("View Lease Special",{lease_id:e,make:t,model:r,monthly_payment:n})},scrollDepth:(e,t)=>{i("Scroll Depth",{scroll_depth_percent:e,page_path:t})},timeOnPage:(e,t)=>
1{i("Time on Page",{time_seconds:e,page_path:t})},videoPlay:(e,t)=>{i("Video Play",{video_id:e,video_title:t})},videoComplete:(e,t,r)=>{i("Video Complete",{video_id:e,video_title:t,watch_time_seconds:r})},popupView:(e,t)=>{i("Popup View",{popup_id:e,popup_title:t})},popupClick:(e,t,r)=>{i("Popup Click",{popup_id:e,popup_title:t,button_text:r})},popupClose:(e,t)=>{i("Popup Close",{popup_id:e,popup_title:t})},newsletterSubscribe:e=>{i("Newsletter Subscribe",{source:e})},errorOccurred:(e,t,r)=>{i("Error Occurred",{error_type:e,error_message:t,page_path:r})},sessionStart:(e,t,r)=>{i("Session Start",{traffic_source:e,landing_page:t,utm_source:r?.utm_source,utm_medium:r?.utm_medium,utm_campaign:r?.utm_campaign})},sessionEnd:(e,t,r)=>{i("Session End",{duration_seconds:e,pages_viewed:t,cars_viewed:r})},addToCompare:(e,t)=>{i("Add to Compare",{car_id:e,car_name:t})},tradeInStart:()=>{i("Trade-In Start",{})},tradeInSubmit:(e,t,r)=>{i("Trade-In Submit",{vehicle_make:e,vehicle_model:t,vehicle_year:r})},printVehicleDetails:(e,t)=>{i("Print Vehicle Details",{car_id:e,car_name:t})},socialShare:(e,t,r)=>{i("Social Share",{platform:e,content_type:t,content_id:r})},viewReviews:e=>{i("View Reviews",{car_id:e})},getDirections:()=>{i("Get Directions",{})},viewLocation:()=>{i("View Location",{})}},I={lead:(e,t,r)=>{i("Lead Generated",{lead_type:e,lead_value:t,car_id:r}),o({has_converted:!0,last_conversion_type:e})},financeApplication:(e,t)=>{i("Finance Application Submitted",{application_id:e,vehicle_price:t}),o({has_finance_application:!0})},tradeSubmission:(e,t,r)=>{i("Trade Submission",{submission_id:e,vehicle_year:t,vehicle_make:r}),o({has_trade_submission:!0})},contactInquiry:(e,t)=>{i("Contact Inquiry",{inquiry_type:e,car_id:t}),o({has_contacted:!0})},testDriveRequest:(e,t)=>{i("Test Drive Request",{car_id:e,car_name:t}),o({has_requested_test_drive:!0})}};export{S as addHeapEventProperties,o as addHeapUserProperties,y as default,m as getStoredHeapIdentity,I as heapConversions,C as heapEvents,f as identifyHeapUser,v as reidentifyHeapUser,g as resetHeapIdentity,i as trackHeapEvent};
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.