1import{I as e,N as t,b as n,et as r,l as i,p as a,ut as o,v as s,vt as c,z as l}from"./CgDnuvNn.js";import{t as u}from"./C8FudJIn.js";import{t as d}from"./B65RteAa.js";import{n as f,t as p}from"./DSqFRPy8.js";import{t as m}from"./CffetNxK.js";import{n as h,t as g}from"./Ceog9k9P.js";var _=Object.assign(n({__name:`favorite-products`,props:{block:{}},setup(n){let{apiUrl:_}=d(),v=i(()=>h(n.block)),y=o(null),b=o([]),x=o(!0),S=null,C=null,w=async()=>{let e=new AbortController;C=e;try{let t=await u(_(`/api/home-products/favorites`),{signal:e.signal});b.value=t.products.items}catch(t){e.signal.aborted||(console.error(`Unable to load favorite products`,t),b.value=[])}finally{e.signal.aborted||(x.value=!1)}};return e(()=>{if(!(`IntersectionObserver`in window)){w();return}S=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(S?.disconnect(),S=null,w())},{rootMargin:`300px`}),y.value&&S.observe(y.value)}),t(()=>{S?.disconnect(),C?.abort()}),(e,t)=>{let n=f,i=p,o=m;return l(),a(`section`,{ref_key:`sectionRef`,ref:y,class:`bg-white py-16 md:py-24`},[s(o,{class:`px-5 md:px-6`},{default:r(()=>[s(n,{class:`mb-10`,text:c(v).text,title:c(g)(c(v).title),"link-label":c(v).link_label,"link-to":c(v).link_url},null,8,[`text`,`title`,`link-label`,`link-to`]),s(i,{loading:c(x),"placeholder-count":8,products:c(b)},null,8,[`loading`,`products`])]),_:1})],512)}}}),{__name:`CmsBlockFavoriteProducts`});export{_ as default};
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.