PageSourceSearch

https://approvedfood.co.uk/chunk-MHNJ2PVN.js

js approvedfood.co.uk collected 2026-09-24 22:21:00 UTC 12,212 bytes, 1 lines download raw bytes

1import{a as U,b as Y,c as G}from"./chunk-JVB3MHWV.js";import{b as J}from"./chunk-E4DUHRSR.js";import{a as q}from"./chunk-662IJJ3R.js";import{g as W}from"./chunk-TQQCBYLH.js";import{$a as y,Ab as _,Bb as h,Bc as P,Cb as T,Eb as z,Fc as R,La as l,Pb as g,Qa as F,Ra as c,T as O,Tb as E,Ub as L,Wa as H,Xb as j,Xc as V,Ya as m,Z as I,Za as w,Zc as A,_ as M,ab as b,bb as a,cb as s,db as C,gb as d,mb as i,p as k,rc as $,ta as B,vc as D,ya as r,yc as N,za as v}from"./chunk-7OI6FXJV.js";import{g as S}from"./chunk-JNGVGNCT.js";var x=t=>({"ignore-hover":t}),f=t=>({$implicit:t});function X(t,n){if(t&1&&(a(0,"span",5),C(1,"img",6)(2,"img",7),s(),a(3,"p",8),h(4,"Our customers say "),a(5,"b"),h(6,"Excellent"),s(),C(7,"br"),h(8),E(9,"number"),s()),t&2){let e=i(2);r(8),z("",e.rating," out of 5 based on ",L(9,2,e.reviews)," reviews")}}function Z(t,n){if(t&1&&(a(0,"h1"),h(1),s(),a(2,"p"),h(3),s()),t&2){let e=i().$implicit;r(),T(e.title),r(2),T(e.text)}}function tt(t,n){if(t&1&&(C(0,"img",3),a(1,"div",4),l(2,X,10,4)(3,Z,4,2),s()),t&2){let e=n.$implicit;c("src",e.image,B),F("alt",e.alt),r(2),m(e.reviews?2:3)}}function nt(t,n){if(t&1&&(a(0,"a",9),d(1,11),s()),t&2){let e=i(2).$implicit;i();let o=_(1);c("routerLink",e.link)("ngClass",g(4,x,e.ignoreHover)),r(),c("ngTemplateOutlet",o)("ngTemplateOutletContext",g(6,f,e))}}function et(t,n){if(t&1&&(a(0,"div",10),d(1,11),s()),t&2){let e=i(2).$implicit;i();let o=_(1);c("ngClass",g(3,x,e.ignoreHover)),r(),c("ngTemplateOutlet",o)("ngTemplateOutletContext",g(5,f,e))}}function ot(t,n){if(t&1&&l(0,nt,2,8,"a",9)(1,et,2,7,"div",10),t&2){let e=i().$implicit;m(e.link?0:1)}}function it(t,n){if(t&1&&l(0,ot,2,1),t&2){let e=n.$implicit,o=i();m((!e.requiresLoggedIn||o.loggedIn)&&!(e.hideWhenLoggedIn&&o.loggedIn)?0:-1)}}function rt(t,n){if(t&1&&(a(0,"a",12)(1,"div",14),d(2,11),s()()),t&2){let e=i(2).$implicit;i();let o=_(1);c("routerLink",e.link),r(),c("ngClass",g(4,x,e.ignoreHover)),r(),c("ngTemplateOutlet",o)("ngTemplateOutletContext",g(6,f,e))}}function st(t,n){if(t&1&&(a(0,"div",13)(1,"div",14),d(2,11),s()()),t&2){let e=i(2).$implicit;i();let o=_(1);r(),c("ngClass",g(3,x,e.ignoreHover)),r(),c("ngTemplateOutlet",o)("ngTemplateOutletContext",g(5,f,e))}}function at(t,n){if(t&1&&l(0,rt,3,8,"a",12)(1,st,3,7,"div",13),t&2){let e=i().$implicit;m(e.link?0:1)}}function ct(t,n){if(t&1&&l(0,at,2,1),t&2){let e=n.$implicit,o=i();m((!e.requiresLoggedIn||o.loggedIn)&&!(e.hideWhenLoggedIn&&o.loggedIn)?0:-1)}}var Ot=(()=>{let n=class n{constructor(o,p){this.authService=o,this.http=p,this.topSections=[{image:"assets/images/graphics/home-banner-top-graphics/food.webp",title:"Popular Products",text:"Check Out What Others Are Loving",link:"/popular",hideWhenLoggedIn:!0,alt:"Popular Products"},{image:"assets/images/graphics/home-banner-top-graphics/food.webp",title:"My Bargains",text:"Check Out Your Personalised Deals!",link:"/bargains",requiresLoggedIn:!0,alt:"My Bargains"},{image:"assets/images/graphics/home-banner-top-graphics/boxes.webp",title:"New Stock Daily",text:"Browse New Deals Every Day!",link:"/latest",alt:"Latest"},{image:"assets/images/graphics/home-banner-top-graphics/medal.webp",reviews:!0,ignoreHover:!0,alt:"Medal"}],this.loggedIn=!1,this.rating="",this.reviews=0,this.uuid=q(),this.subscriptions=[],this.subscriptions.push(this.authService.onLoggedIn.subscribe(()=>{this.loggedIn=!0})),this.subscriptions.push(this.authService.onLoggedOut.subscribe(()=>{this.loggedIn=!1,this.swiper?.destroy(),setTimeout(()=>{this.createSwiper()},1)}))}ngOnInit(){return S(this,null,function*(){this.loggedIn=yield this.authService.authCheck();let o=yield k(this.http.get("https://api.reviews.io/merchant/reviews?store=approved-food-ltd"));o.stats&&(this.reviews=o.stats.total_reviews,this.rating=o.stats.average_rating),this.createSwiper()})}ngOnDestroy(){this.subscriptions.forEach(o=>o.unsubscribe()),this.swiper&&this.swiper.destroy()}createSwiper(){this.swiper=new U(`.swiper-${this.uuid}`,{modules:[Y,G],slidesPerView:2,spaceBetween:10,speed:1e3,autoplay:{delay:4e3},pagination:{el:".swiper-pagination",clickable:!0},breakpoints:{740:{slidesPerView:2},0:{slidesPerView:1}}})}};n.\u0275fac=function(p){return new(p||n)(v(W),v(R))}
1,n.\u0275cmp=I({type:n,selectors:[["af-home-banner-top"]],decls:9,vars:3,consts:[["topSectionContent",""],[1,"swiper-wrapper"],[1,"swiper-pagination"],[3,"src"],[1,"text-container"],[1,"stars-container"],["src","assets/images/graphics/home-banner-top-graphics/stars.webp","alt","stars"],["src","assets/images/graphics/home-banner-top-graphics/reviewsio.png","alt","reviews"],[1,"smaller-text"],[1,"desktop","top-section",3,"routerLink","ngClass"],[1,"desktop","top-section",3,"ngClass"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"swiper-slide",3,"routerLink"],[1,"swiper-slide"],[1,"top-section",3,"ngClass"]],template:function(p,u){p&1&&(l(0,tt,4,3,"ng-template",null,0,j),y(2,it,1,1,null,null,w),a(4,"div")(5,"div",1),y(6,ct,1,1,null,null,w),s(),C(8,"div",2),s()),p&2&&(r(2),b(u.topSections),r(2),H("mobile-swiper swiper swiper-",u.uuid,""),r(2),b(u.topSections))},dependencies:[$,D,V,N],styles:["[_nghost-%COMP%]{position:relative;display:flex;flex-direction:row;justify-content:space-evenly;width:100%;padding-top:40px;margin-bottom:20px;gap:14px}.body-styling[_nghost-%COMP%]{padding-top:24px;margin-bottom:40px}[_nghost-%COMP%]   .mobile-swiper[_ngcontent-%COMP%]{display:none;width:100%;height:146px;padding-top:12px}[_nghost-%COMP%]   .mobile-swiper[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]{position:relative;display:flex;flex:1 1 0;height:100px;padding:0 40px;background-color:var(--lightest-grey);border:1px solid var(--default-bg-color-lighten-25);border-radius:var(--border-radius-medium);transition:background-color .15s ease-in-out,border-color .15s ease-in-out;text-decoration:none;gap:12px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]:hover:not(.ignore-hover){background-color:var(--primary-color-lighten-40);border-color:var(--primary-color-lighten-20);cursor:pointer}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]:hover:not(.ignore-hover)   .text-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--primary-color-darken-10)}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]:hover:not(.ignore-hover)   .text-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--primary-color-darken-10)}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{position:relative;z-index:1;width:auto;height:120%;object-fit:contain;bottom:20%}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:8px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:26px;font-weight:600;color:var(--secondary-color);text-align:center;opacity:.8;transition:color .15s ease-in-out}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:var(--secondary-color);line-height:1.2;text-align:center;opacity:.8;transition:color .15s ease-in-out}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   p.smaller-text[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .stars-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:10px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .stars-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:20px;width:auto;object-fit:contain}@media only screen and (max-width: 1560px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]{padding:0 24px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]{gap:6px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:24px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .stars-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:18px}}@media only screen and (max-width: 1335px){[_nghost-%COMP%]   .to
1p-section[_ngcontent-%COMP%]{padding:0 16px}}@media only screen and (max-width: 1280px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]{padding:0 28px}}@media only screen and (max-width: 1090px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]{padding:0 16px}}@media only screen and (max-width: 1020px){[_nghost-%COMP%]{padding-top:16px;margin-bottom:10px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:110%;bottom:10%}}@media only screen and (max-width: 979px){[_nghost-%COMP%]   .mobile-swiper[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%]   .desktop[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]{width:100%;justify-content:center;gap:28px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]{flex:unset}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:22px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .stars-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:18px}}@media only screen and (max-width: 940px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:20px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .stars-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:16px}}@media only screen and (max-width: 790px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]{gap:16px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:18px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .stars-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:14px}}@media only screen and (max-width: 740px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]{gap:30px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]{gap:4px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:24px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .stars-container[_ngcontent-%COMP%]{margin-bottom:2px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .stars-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:18px}}@media only screen and (max-width: 490px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]{gap:20px}}@media only screen and (max-width: 440px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .stars-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:16px}}@media only screen and (max-width: 430px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:20px}}@media only screen and (max-width: 405px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   p.smaller-text[_ngcontent-%COMP%]{font-size:13px}}@media only screen and (max-width: 400px){[_nghost-%COMP%]   .mobile-swiper[_ngcontent-%COMP%]{height:136px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]{height:90px}}@media only screen and (max-width: 385px){[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:18px}[_nghost-%COMP%]   .top-section[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:15px}}"]});let t=n;return t})();var Q=(()=>{let n=class n{};n.\u0275fac=function(p){return new(p||n)},n.\u0275mod=M({type:n}),n.\u0275inj=O({imports:[P]});let t=n;return t})();var Bt=(()=>{let n=class n{};n.\u0275fac=function(p){return new(p||n)},n.\u0275mod=M({type:n}),n.\u0275inj=O({imports:[P,A,Q,J]});let t=n;return t})();export{Ot as a,Bt as b};

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.