1import{c as et,d as S,l as ot,m as it}from"./chunk-YHEZE2MJ.js";import"./chunk-3SJUOXSC.js";import"./chunk-4NXVO5GJ.js";import"./chunk-KYFL7ZEE.js";import"./chunk-UXHF74A2.js";import"./chunk-I4GBBJVR.js";import"./chunk-BYZUOS6H.js";import"./chunk-7AGUIZVY.js";import{a as K,b as Z}from"./chunk-5LP3BRDN.js";import"./chunk-BGRC6EDS.js";import"./chunk-4XPRE4AD.js";import"./chunk-3TIUSOGG.js";import"./chunk-EIWJUG7K.js";import"./chunk-DMNGJY3S.js";import"./chunk-RGNDWIHZ.js";import"./chunk-DJXMNGRO.js";import"./chunk-G32F6VCX.js";import"./chunk-JVB3MHWV.js";import"./chunk-662IJJ3R.js";import"./chunk-VP4NXIPM.js";import{a as J,b as W}from"./chunk-YWGZZQIP.js";import"./chunk-27UAU47I.js";import"./chunk-P2XZD6CT.js";import{e as U}from"./chunk-TQQCBYLH.js";import"./chunk-DGQK52CG.js";import"./chunk-HXIMHFV3.js";import{b as $}from"./chunk-T2WYISUV.js";import"./chunk-SWGX6VYE.js";import{a as nt}from"./chunk-4M7R2HNE.js";import{a as tt}from"./chunk-SEOD66DG.js";import"./chunk-VHUH6MZC.js";import"./chunk-PFDY72CE.js";import{a as G}from"./chunk-CVPCRE5I.js";import{$c as L,Ac as Q,Bb as l,Bc as k,Cb as T,Eb as D,La as u,Nc as R,Ob as A,Pb as N,Ra as g,T as x,Tb as I,Ub as B,Wc as w,Ya as h,Z as b,Zc as Y,_ as v,bb as a,ca as V,cb as r,cd as H,da as _,db as p,dd as X,ea as f,hb as y,ka as j,kb as P,mb as d,vb as q,wb as F,xb as z,ya as c,za as m}from"./chunk-7OI6FXJV.js";import{g as O}from"./chunk-JNGVGNCT.js";function lt(n,t){n&1&&p(0,"af-spinner")}function mt(n,t){n&1&&(a(0,"span",5),l(1," You currently qualify for this offer "),r())}function gt(n,t){if(n&1&&(a(0,"p",6),l(1," Add "),a(2,"b"),l(3),I(4,"currency"),r(),l(5," more to qualify "),r()),n&2){let o=d(2);c(3),T(B(4,1,o.promotion.increaseToAmount-o.basket.stats.subTotal))}}function dt(n,t){if(n&1&&(a(0,"div",8),p(1,"af-product-carousel",14),r()),n&2){let o=d(2);c(),g("products",o.products)("breakpoints",o.breakpoints)("noShadow",!0)("negativeMarginBottom",!0)}}function Ct(n,t){n&1&&(a(0,"div",9),p(1,"af-spinner",15),r())}function _t(n,t){if(n&1&&(a(0,"p",10),l(1),r()),n&2){let o=d(2);c(),T(o.promotion.discountTerms)}}function ft(n,t){if(n&1){let o=y();a(0,"div",4)(1,"h1"),l(2),I(3,"currency"),r(),u(4,mt,2,0,"span",5)(5,gt,6,3,"p",6),r(),p(6,"span",7),u(7,dt,2,4,"div",8)(8,Ct,2,0,"div",9),a(9,"p",10),l(10,"You will receive a discount code via email after your order is shipped"),r(),u(11,_t,2,1,"p",10),a(12,"button",11),P("click",function(){_(o);let i=d();return f(i.dismissPrompt())}),l(13,"Stop showing me this"),r(),a(14,"div",12)(15,"af-basket-stage-buttons",13),P("progressStage",function(i){_(o);let s=d();return f(s.progressStage.emit(i))}),r()()}if(n&2){let o=d();c(2),D("Spend over ",B(3,7,o.promotion==null?null:o.promotion.increaseToAmount)," for ",o.promotion==null?null:o.promotion.discountDescriptionShort,""),c(2),h(o.promotion&&o.basket&&o.basket.stats.subTotal>=o.promotion.increaseToAmount?4:o.promotion&&o.basket?5:-1),c(3),h(o.products&&o.products.length>0?7:8),c(4),h(o.promotion&&o.promotion.discountTerms?11:-1),c(4),g("stage","basket")("basket",o.basket)}}var rt=(()=>{let t=class t{constructor(e,i){this.productService=e,this.router=i,this.progressStage=new j,this.waitingForBasket=!0,this.products=[],this.breakpoints={2100:{slidesPerView:4},1590:{slidesPerView:3},1461:{slidesPerView:2},1281:{slidesPerView:3},1160:{slidesPerView:4},1010:{slidesPerView:3},0:{slidesPerView:2}}}ngOnInit(){return O(this,null,function*(){let e=yield this.productService.getProducts(10,0,{bespoke:!0,fillToLimit:10},{orderBy:"relevancy",sort:"desc"});e.data&&e.data.length>0&&(this.products=e.data)})}ngOnChanges(e){e.basket&&this.basket?.stats.subTotal&&this.basket.stats.subTotal>0&&(this.waitingForBasket=!1)}dismissPrompt(){let e=new Date;e.setMonth(e.getMonth()+1),localStorage.removeItem("promotion"),localStorage.setItem("promotionDismissedUntil",e.toISOString()),this.router.navigate(["basket/shipping"])}};t.\u0275fac=function(i){return new(i||t)(m($),m(w))},t.\u0275cmp=b({type:t,selectors:[["af-promotion-prompt"]],inputs:{promotion:"promotion",basket:"basket"},outputs:{progressStage:"progressStage"},features:[V],decls:6,vars:1,consts:[[1,"split-container"],[1,"left-container"],[1,"right-container"],["src","assets/images/graphics/dan-promo.webp","alt","Promotion"],[1,"promotion-detail
1s"],[1,"qualified-badge"],[1,"amount-required"],[1,"divider"],[1,"carousel-container"],[1,"spinner-container"],[1,"notice-text"],[1,"dismiss-button",3,"click"],[1,"basket-state-buttons-container"],[3,"progressStage","stage","basket"],[3,"products","breakpoints","noShadow","negativeMarginBottom"],[1,"minimal-margin"]],template:function(i,s){i&1&&(a(0,"div",0)(1,"div",1),u(2,lt,1,0,"af-spinner")(3,ft,16,9),r(),a(4,"div",2),p(5,"img",3),r()()),i&2&&(c(2),h(s.waitingForBasket?2:3))},dependencies:[J,K,et,Q],styles:['[_nghost-%COMP%]{position:relative;display:flex;width:100%;max-height:628px;background-color:var(--primary-color);border-radius:var(--border-radius-large);box-shadow:0 6px 15px #00000040;margin-right:24px;overflow:hidden}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;width:100%;height:100%}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:start;align-items:center;width:calc(100% - 320px);height:100%;padding:32px 30px 28px;background-color:#fff;border-radius:var(--border-radius-large)}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:90%;height:1px;min-height:1px;background-color:var(--default-color);opacity:.25;margin:6px 0 14px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 5%;margin-bottom:6px;gap:10px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-details[_ngcontent-%COMP%] .qualified-badge[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;color:#fff;border-radius:var(--border-radius-small);background-color:var(--primary-color);height:38px;padding:0 16px;transform-origin:center center;transform:scale(.9);gap:8px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-details[_ngcontent-%COMP%] .qualified-badge[_ngcontent-%COMP%]:before{content:"\\f00c";position:relative;width:16px;height:16px;font-size:16px;font-family:var(--icons)}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-details[_ngcontent-%COMP%] .amount-required[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:38px;font-size:16px;color:var(--secondary-color);text-align:center;line-height:1.1;gap:5px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-details[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:26px;color:var(--primary-color);font-weight:600;text-align:center}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .spinner-container[_ngcontent-%COMP%]{position:relative;margin:auto 0}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .carousel-container[_ngcontent-%COMP%]{width:108%;margin-top:6px;transform:scale(.9);transform-origin:top center}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .carousel-container.hidden[_ngcontent-%COMP%]{visibility:hidden}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .notice-text[_ngcontent-%COMP%], [_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .dismiss-button[_ngcontent-%COMP%]{font-size:14px;color:var(--default-color);text-align:center;margin-top:-2px;margin-bottom:12px;line-height:1.1;opacity:.8}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .notice-text.dismiss-button[_ngcontent-%COMP%], [_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .dismiss-button.dismiss-button[_ngcontent-%COMP%]{background:transparent;border:none;margin:0;opacity:.6}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .basket-state-buttons-container[_ngcontent-%COMP%]{display:none;margin-top:24px;width:100%}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:320px;height:100%}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;object-fit:contain;transform:scale(1.25);transform-origin:bottom right;top:26%;right:-12%}@media only screen and (max-width: 1495px){[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%]{width:calc(100% - 300px)}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:300px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:25%}}@media only screen and (max-width: 1475px){[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%]{width:calc(100% - 280px)}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:280px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{top:21%}}@media only screen and (max-width: 1460px){[_nghost-%COMP%]{background-color:transparent}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{display:none}}@media only screen and (max-width: 979px){[_nghost-%COMP%]{max-height:unset;width:calc(100% - 24px);margin:0 12px 20px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .spinner-container[_ngcontent-%COMP%]{margin:100px 0}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .basket-state-buttons-container[_ngcontent-%COMP%]{display:block}}@media only screen and (max-width: 580px){[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-detail
1s[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-details[_ngcontent-%COMP%] .qualified-badge[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-details[_ngcontent-%COMP%] .amount-required[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-details[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:32px}}@media only screen and (max-width: 480px){[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%]{padding:32px 20px 28px}[_nghost-%COMP%] .split-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%] .promotion-details[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:28px}}']});let n=t;return n})();var ht=()=>({name:"My Basket",url:"/basket/."}),Pt=n=>[n],at=(()=>{let t=class t{constructor(e,i,s,C){this.basketService=e,this.title=i,this.apiService=s,this.router=C,this.subscriptions=[],this.loading=!0,this.subscriptions.push(this.basketService.basket$.subscribe(M=>{this.basket=M})),this.subscriptions.push(this.basketService.basketLoading$.subscribe(M=>{this.loading=M})),this.title.setTitle("Promotion | Store | "+G.basetitle)}ngOnInit(){return O(this,null,function*(){try{let e=yield this.apiService.get("v1/basket/promotion");this.promotion=e.data[0]}catch(e){console.error(e),this.router.navigate(["/basket/shipping"])}})}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}progressStage(e){this.basketInfoComponent?.progressStage(e)}};t.\u0275fac=function(i){return new(i||t)(m(U),m(R),m(L),m(w))},t.\u0275cmp=b({type:t,selectors:[["af-promotion"]],viewQuery:function(i,s){if(i&1&&q(S,5),i&2){let C;F(C=z())&&(s.basketInfoComponent=C.first)}},decls:5,vars:8,consts:[["basketInfo",""],["name","Before You Checkout...",1,"checkout",3,"links"],[1,"row","checkout"],[3,"progressStage","promotion","basket"],[3,"basket","loading"]],template:function(i,s){if(i&1){let C=y();p(0,"af-title-bar",1),a(1,"af-body",2)(2,"af-promotion-prompt",3),P("progressStage",function(ct){return _(C),f(s.progressStage(ct))}),r(),p(3,"af-basket-info",4,0),r()}i&2&&(g("links",N(6,Pt,A(5,ht))),c(2),g("promotion",s.promotion)("basket",s.basket),c(),g("basket",s.basket)("loading",s.loading))},dependencies:[tt,S,H,rt],styles:["@media only screen and (max-width: 979px){[_nghost-%COMP%] af-body[_ngcontent-%COMP%] af-basket-info{display:none!important}}"]});let n=t;return n})();var st=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=v({type:t}),t.\u0275inj=x({imports:[k,W,Z,ot]});let n=t;return n})();var tn=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=v({type:t}),t.\u0275inj=x({imports:[k,Y.forChild([{path:"",redirectTo:".",pathMatch:"full"},{path:".",component:at}]),nt,it,X,st]});let n=t;return n})();export{tn as PromotionModule};
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.