PageSourceSearch

https://www.bloomon.nl/chunk-BHW2IBMS.js

js bloomon.nl collected 2026-09-25 18:39:52 UTC 25,984 bytes, 1 lines download raw bytes

1import{c as c_}from"./chunk-U2L7BYUZ.js";import{a as S_}from"./chunk-LGQGOOCQ.js";import"./chunk-3KBNRBDL.js";import{a as l_}from"./chunk-XZBDF23O.js";import{d as d_}from"./chunk-GDFASPTO.js";import{a as n_}from"./chunk-SPNJYGLW.js";import{a as O_}from"./chunk-IDAT5PGY.js";import{a as r_}from"./chunk-PR4LLFOP.js";import{a as s_}from"./chunk-FFYOHNHT.js";import{a as R_}from"./chunk-6SWM2L6B.js";import{a as o_}from"./chunk-H6ZP3JE5.js";import{F as Oe,Oa as re,Q as ke,ga as Ye,ia as E_,k as xe,z as We}from"./chunk-BHILMZES.js";import{b as de}from"./chunk-K6VC2NHH.js";import"./chunk-UAQR7HN7.js";import"./chunk-L6CLTHJR.js";import"./chunk-4DLTETEX.js";import{b as a_}from"./chunk-YYXE5YHQ.js";import"./chunk-PXDUDVW4.js";import{w as C_,x as T_}from"./chunk-76HLWMME.js";import"./chunk-V7OYPJZB.js";import{J as ee}from"./chunk-FVB5ICPK.js";import"./chunk-FGUYNI5P.js";import"./chunk-LKFOOZVU.js";import"./chunk-MEOHQN5I.js";import{a as Be}from"./chunk-E57HI4BH.js";import"./chunk-IFS6RENJ.js";import{b as Le}from"./chunk-JGXHNXN2.js";import{a as $e}from"./chunk-YQTDYFTE.js";import{c as B}from"./chunk-XIXZNW33.js";import{a as I_,b as Q}from"./chunk-GUR7RV4L.js";import{m as Ge}from"./chunk-2K3S2M3J.js";import{A as te,B as ie,C as oe,Ga as t_,J as ne,Oa as i_,R as He,W as Ze,c as _e,d as Je,e as Fe,ea as Qe,f as Xe,h as z,ha as e_,ia as __,j as ze,o as qe,p as je,v as Ke}from"./chunk-2H77OGSV.js";import"./chunk-ICUNXVWC.js";import{$a as S,Bb as R,Ha as q,Kc as we,La as Ue,Lb as ve,Ma as Ee,Qb as b,Sb as g,W as I,Z as M,Za as j,_ as p,bb as C,db as Ve,dc as F,eb as K,fb as H,gb as d,ha as A,hb as o,ib as r,jb as P,ka as fe,kc as D,lc as X,mc as v,nb as y,ob as w,pb as Re,pc as he,qb as U,rc as ye,ub as E,vb as k,vc as Z,wb as Y,xa as n,xb as J,zb as m}from"./chunk-ARHQY7RN.js";import{g as u_}from"./chunk-ZBHDWYNT.js";var se=u_(I_());var p_=()=>[];function A_(i,s){if(i&1&&(o(0,"p",45),b(1),y(2),E(3,6),w(),r()),i&2){let t=R(3);n(),g(" ",t.welcomePoints()," ");}}function m_(i,s){i&1&&(o(0,"p",45),E(1,7),r());}function P_(i,s){i&1&&(o(0,"p",45),E(1,8),r());}function D_(i,s){if(i&1&&(o(0,"ui-box",32)(1,"ui-stack",42)(2,"ui-box",43),P(3,"ui-icon",44),r(),S(4,A_,4,1,"p",45),S(5,m_,2,0,"p",45),S(6,P_,2,0,"p",45),r()()),i&2){let t=s.$index,e=R(2);n(2),d("ui-theme",e.tierConfigThemeName()),n(2),C(t===0?4:-1),n(),C(t===1?5:-1),n(),C(t===2?6:-1);}}function b_(i,s){if(i&1&&(o(0,"ui-stack")(1,"p"),E(2,9),r(),o(3,"ui-stack",42),P(4,"ui-image",46),o(5,"ui-stack",29)(6,"p",47),E(7,10),r(),o(8,"p",45),E(9,11),r()()(),o(10,"ui-stack",42),P(11,"ui-image",48),o(12,"ui-stack",29)(13,"p",47),E(14,12),r(),o(15,"p",45),E(16,13),r()()(),o(17,"ui-stack",42),P(18,"ui-image",49),o(19,"ui-stack",29)(20,"p",47),E(21,14),r(),o(22,"p",45),E(23,15),r()()(),o(24,"ui-stack",42),P(25,"ui-image",50),o(26,"ui-stack",29)(27,"p",47),E(28,16),r(),o(29,"p",45),E(30,17),r()()(),o(31,"ui-box",51)(32,"p",52),y(33),E(34,18),w(),o(35,"a",53),E(36,19),r(),b(37,". "),r()()()),i&2){let t=R(2);n(4),d("image_src",t.rewardsImages.earnPoints),n(7),d("image_src",t.rewardsImages.birthdayTreat),n(7),d("image_src",t.rewardsImages.sneakPeeks),n(7),d("image_src",t.rewardsImages.secretSales);}}function g_(i,s){if(i&1){let t=U();o(0,"div",25)(1,"bw-modal",26),m("modalClose",function(){M(t);let _=R();return p(_.onCancelSuccess());}),o(2,"ui-stack",27)(3,"div",28),E(4,0),r(),o(5,"ui-stack",29)(6,"p"),y(7),E(8,1),w(),b(9),D(10,"localeRelativeDate"),r(),o(11,"p"),E(12,2),r()()(),o(13,"ui-box",30)(14,"ui-stack",31),K(15,D_,7,4,"ui-box",32,Ve),r()(),o(17,"ui-box",33)(18,"ui-stack",34)(19,"ui-box",35),P(20,"ui-icon",36),r(),o(21,"a",37),m("click",function(){M(t);let _=R();return p(_.toggleRewardsInfo());}),E(22,3),r()()(),S(23,b_,38,4,"ui-stack"),P(24,"ui-image",38),o(25,"bw-modal-footer")(26,"ui-stack",39)(27,"ui-button",40),m("clicked",function(){M(t);let _=R();return p(_.onCancelSuccess());}),E(28,4),r(),o(29,"ui-button",41),m("clicked",function(){M(t);let _=R();return p(_.onCancelSuccess());}),E(30,5),r()()()()();}if(i&2){let t=R();n(9),g(" ",v(10,4,t.dateToUpdate(),t.dateFormat),". "),n(5),d("stack_wrap",!0),n(),H(F(7,p_).constructor(3)),n(8),C(t.rewardsInfoCollapsed()?23:-1),n(),d("image_src",t.rewardsImages.bottomImage);}}
1function f_(i,s){if(i&1&&(o(0,"p"),y(1),E(2,24),w(),b(3),D(4,"localeRelativeDate"),r()),i&2){let t=R(2);n(3),g(" ",v(4,1,t.dateToUpdate(),t.dateFormat),". ");}}function U_(i,s){if(i&1){let t=U();o(0,"div",25)(1,"bw-modal",54),m("modalClose",function(){M(t);let _=R();return p(_.onCancelSuccess());}),o(2,"ui-stack",55),P(3,"ui-image",56),o(4,"div",28),E(5,20),r(),o(6,"ui-stack",29),S(7,f_,5,4,"p"),o(8,"p"),E(9,21),r()()(),o(10,"bw-modal-footer")(11,"ui-stack",39)(12,"ui-button",40),m("clicked",function(){M(t);let _=R();return p(_.onCancelSuccess());}),E(13,22),r(),o(14,"ui-button",41),m("clicked",function(){M(t);let _=R();return p(_.onCancelSuccess());}),E(15,23),r()()()()();}if(i&2){let t=R();n(3),d("image_src",t.rewardsImages.welcomeBack),n(4),C(t.dateToUpdate()?7:-1);}}var V_={bandw:{earnPoints:"https://images.ctfassets.net/1d9ajmvjpuhw/7uUpD9IhGJdEJjYHZvcgmH/374912d4e3d646cfb8746b337ad5cb58/rewards-earn-points.svg",birthdayTreat:"https://images.ctfassets.net/1d9ajmvjpuhw/5qbd5zgq7qlgwJG1C7rj3c/96e25d35b8a0c7df4a169be194f6dc73/rewards-birthday-treat.svg",sneakPeeks:"https://images.ctfassets.net/1d9ajmvjpuhw/59c51YAfI1osnm8yjwH1JT/233cbdbb49a35efc1cb1d5e9304ee117/rewards-sneak-peeks.svg",secretSales:"https://images.ctfassets.net/1d9ajmvjpuhw/4UIqeshN9cTdSUqAQ1goij/fde751ca765a0799791e9bec6962be7f/rewards-secret-sales.svg",bottomImage:"https://images.ctfassets.net/1d9ajmvjpuhw/7v5r3p7iGt99s7V5xuAwhO/c59074e13888e9307eb91acd8ceb220e/subscription-rewards-resume-bandw.png",welcomeBack:"https://images.ctfassets.net/1d9ajmvjpuhw/3AnKvVf97MedeTe9yiOZdE/e9d42b2360172bf96ba4221f8d2a48de/Welcome_back.jpg"},bloomon:{earnPoints:"https://images.ctfassets.net/1d9ajmvjpuhw/71aAdG7lDpoMNwcBkUdLpJ/99a1cb64b9e43165e52847bd0042fec6/Earn-points.png",birthdayTreat:"https://images.ctfassets.net/1d9ajmvjpuhw/71aAdG7lDpoMNwcBkUdLpJ/00ad3a6df5584adbd33ec359d44a5e8a/Birthday-reward.png",sneakPeeks:"https://images.ctfassets.net/1d9ajmvjpuhw/71aAdG7lDpoMNwcBkUdLpJ/7a546c60df2aee3022f31ab6185abbb9/Sneak-peeks.png",secretSales:"https://images.ctfassets.net/1d9ajmvjpuhw/71aAdG7lDpoMNwcBkUdLpJ/1221947d84bb8ebb6658ba3c691d4827/Secret-sales.png",bottomImage:"https://images.ctfassets.net/1d9ajmvjpuhw/5WE66kBkJVzGJYjn1eW3yZ/a5055524b468b3db97d03affa5c02a86/flower-bloom.gif",welcomeBack:"https://images.ctfassets.net/1d9ajmvjpuhw/3AnKvVf97MedeTe9yiOZdE/e9d42b2360172bf96ba4221f8d2a48de/Welcome_back.jpg"}},ae=function(i){return i.Confirm="confirm",i.NewRewardsMembership="newRewardsMembership",i;}(ae||{}),N_=(()=>{let s=class s extends T_{constructor(){super(...arguments),this.analyticsService=I(ee),this.bwAppStore=I(re),this.loyaltyService=I(r_),this.tierConfigThemeName=ye(()=>this.bwAppStore.loyaltyTierConfig()?.theme.name),this.order=Z(void 0),this.dateToRestart=Z(void 0),this.newLoyaltySchemeMembershipCreated=Z(!1),this.rewardsInfoCollapsed=A(!1),this.resumeFlowScreen=A(ae.Confirm),this.dateToUpdate=A(void 0),this.welcomePoints=A(0),this.dateFormat="D MMMM YYYY";}async ngOnInit(){return this.rewardsImages=this.getBrandedImages(),this.isRewardsFeatureActive()&&this.newLoyaltySchemeMembershipCreated()?(this.dateToUpdate.set(this.dateToRestart()??void 0),await this.loyaltyService.welcomePoints$.then(e=>{this.welcomePoints.set(e);}),this.resumeFlowScreen.set(ae.NewRewardsMembership),this.analyticsService.trackJoiningRewards("webRestartSubscription")):(this.dateToUpdate.set(this.dateToRestart()??void 0),this.resumeFlowScreen.set(ae.Confirm)),Promise.resolve();}onCancel(){super.closeAsReject({});}onCancelSuccess(){super.closeAsResolve({});}toggleRewardsInfo(){this.rewardsInfoCollapsed.update(e=>!e);}isRewardsFeatureActive(){return this.loyaltyService.isRewardsFeatureActive;}getBrandedImages(){let e=Q.brandShort;return V_[e];}};s.ɵfac=(()=>{let e;return function(a){return(e||(e=fe(s)))(a||s);};})(),s.ɵcmp=q({type:s,selectors:[["bw-order-subscription-resume-modal"]],inputs:{order:[1,"order"],dateToRestart:[1,"dateToRestart"],newLoyaltySchemeMembershipCreated:[1,"newLoyaltySchemeMembershipCreated"]},features:[Ue],decls:2,vars:2,consts:()=>{let e;e="Klaar";let _;_="Welkom terug!";let a;a="Je leveringen starten weer op";let T;T="En welkom bij bloomon Rewards! Je verdient nu punten op al je bestellingen.";let c;c="Wat is bloomon Rewards?";let l;l="Ga naar mijn abonnement";let N;N="Ga naar mijn abonnement";let V;V="welkomstpunten";let h;h="\u20AC5 korting per 500 punten";let f;f="Verjaardagstraktatie";let L;L="Verdien punten bij elke aankoop";let x;x="Verjaardagstraktatie";let G;G="Exclusieve previews";let $;$="Geheime sales";let W;W="Hou je van zorgzaamheid? Doe dan mee. Rewards is onze manier om je te bedanken voor je attentie.";let u;u="Verdien punten bij elke aankoop";let le;le="En ontgrendel vouchers. (Ze lopen snel op.)";
1let ce;ce="Verjaardagstraktatie";let Se;Se="50% korting op alles wat je wilt.";let Ce;Ce="Exclusieve previews";let Te;Te="Wees de eerste om nieuwe lanceringen te shoppen.";let Ne;Ne="Geheime sales";let ue;ue="En kortingen alleen voor leden.";let Ie;Ie="Je kunt";let Me;Me="onze volledige voorwaarden lezen";let pe;pe="Gelukt!";let Ae;Ae="Gelukt!";let me;me="Welkom terug!";let Pe;Pe="We zijn blij dat we je weer bloemen mogen bezorgen.";let De;De="Ga naar je account";let be;be="Ga naar je account";let ge;return ge="Je leveringen starten weer op",[_,a,T,c,l,N,V,h,f,W,u,le,ce,Se,Ce,Te,Ne,ue,Ie,Me,me,Pe,De,be,ge,[1,"bw-order-subscription-resume-modal"],["modalTitle",e,3,"modalClose"],["stack_gap","near",1,"rewards-confirmation-modal"],[1,"text-body--expressive"],["stack_gap","tight"],["box_space","none","box_space_top","near"],["stack_collapse_below","tablet","stack_direction","y","stack_distribute","start","stack_gap","near",3,"stack_wrap"],["box_fill_mode","fit","box_space","none"],["box_space","none","box_space_bottom","near","box_space_top","near"],["stack_align","center","stack_direction","x","stack_distribute","center","stack_gap","tight"],["box_border_radius","round","box_border_width","primary","box_fill_mode","fit","box_space","none"],["icon_name","info","icon_size","small"],[1,"text-link--paragraph","text-body--supporting",3,"click"],["loading","auto",1,"bw-rewards-info-modal__image",3,"image_src"],["stack_align","center"],["button_type","primary","size","large",1,"hidden-mobile",3,"clicked"],["button_full_width","true","button_type","primary","data-testid","subscription-resume-confirmation-cta","size","large",1,"hidden-tablet","hidden-laptop","hidden-desktop",3,"clicked"],["stack_align","center","stack_direction","x","stack_gap","tight"],["box_background","tertiary","box_border_radius","round","box_fill_mode","fit","box_space","tiny",3,"ui-theme"],["icon_name","tick"],[1,"text-body--supporting"],["image_alt_text",L,"loading","auto",1,"bw-rewards-info-modal__info-image",3,"image_src"],[1,"text-body--default","text-body--emphasis"],["image_alt_text",x,"loading","auto",1,"bw-rewards-info-modal__info-image",3,"image_src"],["image_alt_text",G,"loading","auto",1,"bw-rewards-info-modal__info-image",3,"image_src"],["image_alt_text",$,"loading","auto",1,"bw-rewards-info-modal__info-image",3,"image_src"],["box_space","none","box_space_bottom","near"],[1,"text-body--supporting","text-color--supporting"],["href","/bw-rewards-terms","target","_blank",1,"text-link--paragraph"],["modalTitle",pe,3,"modalClose"],["stack_gap","near"],["image_alt_text",Ae,"loading","eager",1,"full-width-image",3,"image_src"]];},template:function(_,a){_&1&&(S(0,g_,31,8,"div",25),S(1,U_,16,2,"div",25)),_&2&&(C(a.resumeFlowScreen()==="newRewardsMembership"?0:-1),n(),C(a.resumeFlowScreen()==="confirm"?1:-1));},dependencies:[n_,o_,te,ie,ne,He,oe,i_,R_],styles:[".full-width-image[_ngcontent-%COMP%]{width:100%}"]});let i=s;return i;})();var v_=()=>({mobile:"near",tablet:"none",laptop:"none",desktop:"none"}),h_=()=>({mobile:"near",tablet:"near",laptop:"none",desktop:"none"}),y_=(i,s)=>s==null?null:s.id;function w_(i,s){if(i&1&&(o(0,"ui-box",28)(1,"ui-stack",30)(2,"div")(3,"ui-stack",31),P(4,"ui-icon",32),o(5,"p",33),b(6),r()()()()()),i&2){let t,e,_=R(4);n(5),j("aria-label",(t=_.discountCode())==null?null:t.description),n(),g(" ",(e=_.discountCode())==null?null:e.description," ");}}function G_(i,s){if(i&1&&(o(0,"ui-stack",34)(1,"p",36),E(2,4),r(),o(3,"div",36)(4,"ui-stack",37)(5,"p",38),D(6,"price"),k(7,9),b(8),D(9,"price"),r(),o(10,"span",39),D(11,"price"),k(12,10),b(13),D(14,"price"),r()()()()),i&2){let t=R(5);n(5),Y(v(6,4,t.previewCharge(),"original")),J(7),n(3),g(" ",v(9,7,t.previewCharge(),"original")," "),n(2),Y(X(11,10,t.previewCharge())),J(12),n(3),g(" ",X(14,12,t.previewCharge())," ");}}function B_(i,s){if(i&1){let t=U();o(0,"ui-stack",29),S(1,G_,15,14,"ui-stack",34),o(2,"ui-button",35),m("clicked",function(){M(t);let _=R(4);return p(_.onSubmit());}),E(3,3),r()();}if(i&2){let t=R(4);n(),C(t.previewCharge()?1:-1),n(),d("button_full_width",!0),j("aria-labelledby","resumeSubmitSummary");}}
1function L_(i,s){if(i&1&&(o(0,"ui-stack",34)(1,"p",36),E(2,6),r(),o(3,"div",36)(4,"ui-stack",37)(5,"p",38),D(6,"price"),k(7,11),b(8),D(9,"price"),r(),o(10,"span",39),D(11,"price"),k(12,12),b(13),D(14,"price"),r()()()()),i&2){let t=R(5);n(5),Y(v(6,4,t.previewCharge(),"original")),J(7),n(3),g(" ",v(9,7,t.previewCharge(),"original")," "),n(2),Y(X(11,10,t.previewCharge())),J(12),n(3),g(" ",X(14,12,t.previewCharge())," ");}}function x_(i,s){if(i&1){let t=U();o(0,"ui-stack",29),S(1,L_,15,14,"ui-stack",34),o(2,"ui-button",35),m("clicked",function(){M(t);let _=R(4);return p(_.onSubmit());}),E(3,5),r()();}if(i&2){let t=R(4);n(),C(t.previewCharge()?1:-1),n(),d("button_full_width",!0),j("aria-labelledby","resumeSubmitSummary");}}function $_(i,s){if(i&1&&(o(0,"ui-stack",27),S(1,w_,7,2,"ui-box",28),S(2,B_,4,3,"ui-stack",29),S(3,x_,4,3,"ui-stack",29),r()),i&2){let t,e,_,a=R(3);n(),C((t=a.discountCode())!=null&&t.description&&a.previewCharge()?1:-1),n(),C(((e=a.order())==null?null:e.state)==="paused"?2:-1),n(),C(((_=a.order())==null?null:_.state)==="cancelled"?3:-1);}}function W_(i,s){if(i&1){let t=U();o(0,"ui-combobox",46),m("didChange",function(_){M(t);let a=R(4);return p(a.didSelectFrequency(_));}),r();}if(i&2){let t=R(4);d("options",t.frequencyList)("selected",t.selectedFrequency());}}function k_(i,s){if(i&1){let t=U();o(0,"bw-date-picker",47),m("dateChanged",function(_){M(t);let a=R(4);return p(a.onDateChange(_));})("monthChanged",function(_){M(t);let a=R(4);return p(a.onMonthChange(_));}),r();}if(i&2){let t,e=R(4);d("dates",e.availableDates())("defaultDate",(t=e.form.get("nextDeliveryDate"))==null?null:t.value)("minDate",e.serverTime)("onlyShowValidDates",!0);}}function Y_(i,s){i&1&&(o(0,"p"),E(1,7),r());}function J_(i,s){i&1&&(o(0,"p"),E(1,8),r());}function F_(i,s){if(i&1){let t=U();o(0,"ui-chip",52),m("didChange",function(){let _=M(t).$implicit,a=R(6);return p(a.onTimeSlotChange(_));}),r();}if(i&2){let t=s.$implicit;d("label",t==null?null:t.message)("value",(t==null?null:t.id)+"");}}function X_(i,s){if(i&1&&(o(0,"ui-stack",48),S(1,Y_,2,0,"p"),S(2,J_,2,0,"p"),o(3,"ui-box",49)(4,"ui-stack",50),K(5,F_,1,2,"ui-chip",51,y_),r()()()),i&2){let t,e,_,a=R(5);n(),C(((t=a.selectedDate())==null?null:t.shippingOptions.length)>1?1:-1),n(),C(((e=a.selectedDate())==null?null:e.shippingOptions.length)===1?2:-1),n(2),d("stack_wrap",!0),n(),H((_=a.selectedDate())==null?null:_.shippingOptions);}}function z_(i,s){if(i&1&&(y(0),S(1,X_,7,3,"ui-stack",48),w()),i&2){let t,e=R(4);n(),C(((t=e.selectedDate())==null?null:t.shippingOptions.length)>0?1:-1);}}
1function q_(i,s){if(i&1&&(o(0,"form",21)(1,"ui-form-group",40)(2,"ui-stack",41),S(3,W_,1,2,"ui-combobox",42),o(4,"ui-box",43),S(5,k_,1,4,"bw-date-picker",44),r(),Ee(6,z_,2,1,"ng-container",45),r()()()),i&2){let t=R(3);d("formGroup",t.form),n(),d("group_title_hidden",!0),n(2),C(t.frequencyList?3:-1),n(),d("box_content_fill_width",!0),n(),C(t.availableDates()?5:-1),n(),d("featureEnabled","SUBSCRIPTION_TIMESLOT");}}function j_(i,s){if(i&1&&(o(0,"ui-grid",15),Ee(1,$_,4,3,"ng-template",null,0,he),o(3,"ui-column",16)(4,"ui-box",17)(5,"h1",18),E(6,1),r(),o(7,"p",19),E(8,2),r(),o(9,"ui-box",20),S(10,q_,7,6,"form",21),r()()(),o(11,"ui-column",22)(12,"ui-box",23),Re(13,24),r()(),o(14,"ui-column",25)(15,"ui-stack",26),Re(16,24),r()()()),i&2){let t=ve(2),e=R(2);n(3),d("columns",7),n(),d("box_space",F(8,v_)),n(6),C(e.form?10:-1),n(),d("columns",5),n(),d("box_space",F(9,h_)),n(),d("ngTemplateOutlet",t),n(),d("columns",5),n(2),d("ngTemplateOutlet",t);}}function K_(i,s){if(i&1&&(o(0,"div",13),S(1,j_,17,10,"ui-grid",15),r()),i&2){let t=R();n(),C(t.order()?1:-1);}}function H_(i,s){i&1&&P(0,"bw-loading-spinner",14),i&2&&d("fullscreen",!1);}var kt=(()=>{let s=class s{constructor(){this.toastr=I(de),this.stateService=I(Ge),this.deliveryDateService=I(Ye),this.configService=I(Le),this.orderService=I(s_),this.toastrService=I(de),this.analyticsService=I(ee),this.discountService=I(We),this.chargesService=I(ke),this.modalService=I(C_),this.bwAppStore=I(re),this.availableDates=A([]),this.order=A(void 0),this.discountCode=A(void 0),this.previewCharge=A(void 0),this.selectedDate=A(void 0),this.selectedFrequency=A(void 0),this.loading=A(!1),this.newLoyaltySchemeMembershipCreated=A(!1),this.frequencyList=d_;}async ngOnInit(){this.loading.set(!0);try{let e=this.stateService.getCurrent().params?.orderId;if(!e){this.toastr.error("Probeer een ander account of neem contact op met onze klantenservice.","Oeps! We konden die bestelling niet vinden."),this.stateService.go("account.orders");return;}this.buildForm();let _=new Oe();_.id=Number(e);let a=await this.orderService.getInfo(_);if(!a||a.subscription?.isActive){this.stateService.go("subscriptionNextDelivery",{orderId:e});return;}this.order.set(a),await this.onFormLoad();let T=this.getDiscountCodeFromURL();this.discountCode.set(T),await this.checkDiscountCode(T);}catch(e){e instanceof B&&this.toastrService.error(e.message,e.title);}finally{this.loading.set(!1);}}async onSubmit(){try{this.loading.set(!1);let e=this.order();if(!e)return;let _=new Oe();_.id=e.id;let a=this.form.get("nextDeliveryDate")?.value;if(!a)return;_.nextDeliveryDate=a;let T=new xe(),c=this.form.get("deliverySlot")?.value.shippingOptionId;c&&(T.id=c),_.subscription={frequency:this.form.get("frequency")?.value??e.frequency,shippingOption:T},await this.orderService.resume(_).then(N=>{this.newLoyaltySchemeMembershipCreated.set(N.hasJoinedLoyaltySchemeMembership);});let l=this.discountCode();if(this.analyticsService.trackInHeap(e.state==="paused"?"orderViewResumeSubscriptionModal":"orderViewReactivateSubscriptionModal",{order:e,fromSubFrequency:e.subscription?.frequency??void 0,subsFrequency:_.frequency,modalLocation:"subsription_resume_modal",promoCode:l?.code}),l)try{await this.orderService.redeemSubscriptionDiscount(e,l.code);}catch(N){N instanceof B&&this.toastrService.error(N.message,N.title);}await this.onCancelSuccess();}catch(e){e instanceof B&&this.toastrService.error(e.message,e.title);}finally{this.loading.set(!1);}}didSelectFrequency(e){let _=e.value;this.form.get("frequency")?.setValue(_);}onDateChange(e){this.form.get("nextDeliveryDate")?.setValue(e),this.setDeliverySlot(e);}onTimeSlotChange(e){let _=new l_();_.shippingOptionId=e.id,this.form.get("deliverySlot")?.setValue(_),this.form.get("deliverySlotId")?.setValue(_.shippingOptionId?.toString());}async onMonthChange(e){try{let _=e?.clone().startOf("month"),a=e?.clone().endOf("month").add(10,"day"),c=(0,se.default)().add(c_,"day"),l=a?.isBefore(c)?a:c,N=this.order();if(!N?.address||!N.product)return;let h=(await this.deliveryDateService.getDates(N.address,N.product,this.serverTime,_,l)).map(f=>({date:f.date,shippingOptions:f.shippingOptions,enabled:!!f.shippingOptions.length}));this.availableDates.set(h);}catch(_){_ instanceof B&&this.toastrService.error(_.message,_.title);}}
1async onFormLoad(){try{let e=this.order();if(!e)return;let _=this.frequencyList.find(V=>V.value===(e.subscription?.frequency??e.frequency))??this.frequencyList[0];this.selectedFrequency.set(_);let a=this.selectedFrequency()?.value;a!==void 0&&this.form.get("frequency")?.setValue(a);let T=(0,se.default)(),c=e.nextDeliveryDate,l=c?.isBefore(T)?T:c;l&&this.form.get("nextDeliveryDate")?.setValue(l),this.serverTime=this.configService.getConfig().serverTime,await this.onMonthChange(l),l=l??this.availableDates()[0]?.date;let N=this.setNextDeliveryDate(l);this.setDeliverySlot(N);}catch(e){this.toastrService.error("Sorry, er is iets fout gegaan. Neem contact op met ons serviceteam",void 0,e);}}getDiscountCodeFromURL(){let _=this.stateService.getCurrent().params?.discountCodeOrder;return _?new $e(_):void 0;}async checkDiscountCode(e){try{if(!e)return;let _=new Be();_.codes=[Q.country];let a=this.bwAppStore.getUser(),T=await this.discountService.check(e,_,void 0,void 0,a);this.discountCode.set(T);let c=this.order(),l=this.discountCode();if(a&&c?.subscription&&l){let N=await this.chargesService.previewDiscountedPrice(a,c.subscription,l.code);this.previewCharge.set(N);}}catch(_){_ instanceof B&&this.toastrService.error(_.message,_.title);}}setNextDeliveryDate(e){let _=this.availableDates().filter(l=>l.enabled),a=(0,se.default)(e).format("DD-MM-YYYY"),c=(_.find(l=>a===l.date.format("DD-MM-YYYY"))??_[0]).date;return this.form.get("nextDeliveryDate")?.setValue(c),c;}setDeliverySlot(e){let _=this.availableDates().find(c=>c.date.isSame(e));this.selectedDate.set(_);let a=this.order(),T=(_?.shippingOptions??[]).find(c=>c.id===a?.subscription?.shippingOption?.id);T?this.onTimeSlotChange(T):_?.shippingOptions?.length&&this.onTimeSlotChange(_.shippingOptions[0]);}buildForm(){this.form=new Xe({frequency:new z(null,{validators:[_e.required]}),nextDeliveryDate:new z(null,{validators:[_e.required]}),deliverySlot:new z(null,{validators:[_e.required]}),deliverySlotId:new z(null)});}onCancelSuccess(){return this.modalService.show(N_,{initialInputValues:{order:this.order(),dateToRestart:this.selectedDate()?.date,newLoyaltySchemeMembershipCreated:this.newLoyaltySchemeMembershipCreated()},trackingKey:"subscription-resume",keyboard:!0}).finally(()=>{this.stateService.go("subscriptionNextDelivery",{orderId:this.order()?.id});});}};s.ɵfac=function(_){return new(_||s)();},s.ɵcmp=q({type:s,selectors:[["bw-order-view-subscription-reactivation"]],decls:2,vars:2,consts:()=>{let e;e="Abonnement heractiveren";let _;_="Kies de dag uit waarop je de volgende bezorging wilt ontvangen";let a;a="Korting toegepast!";let T;T="Abonnement heractiveren";let c;c="Originele Prijs "+"\uFFFD0\uFFFD"+"";let l;l="Gereduceerde eindprijs "+"\uFFFD0\uFFFD"+"";let N;N="Totaal";let V;V="Abonnement heractiveren";let h;h="Originele Prijs "+"\uFFFD0\uFFFD"+"";let f;f="Gereduceerde eindprijs "+"\uFFFD0\uFFFD"+"";let L;L="Totaal";let x;x="Abonnement heractiveren";let G;G="Elke";let $;$="Beschikbare tijdsvakken bezorging";let W;return W="Beschikbare bezorgmomenten",[["submitColumnTemplate",""],e,_,T,N,V,L,$,W,["aria-label",c],["aria-label",l],["aria-label",h],["aria-label",f],[1,"order-view-subscription-reactivation"],[3,"fullscreen"],["grid_collapse_below","tablet","grid_gap","expanded"],[3,"columns"],[3,"box_space"],[1,"text-heading--functional--secondary"],[1,"text-body--regular","text-body--emphasis"],["box_space","none","box_space_top","default"],[3,"formGroup"],[1,"stick-column-bottom","footer-shadow","hidden-desktop","hidden-laptop","hidden-tablet",3,"columns"],["box_fill_mode","fill","box_space_bottom","near","box_space_top","near",3,"box_space"],[3,"ngTemplateOutlet"],[1,"hidden-mobile",3,"columns"],["stack_gap","near",1,"stick-column-top"],["id","resumeSubmitSummary","stack_gap","near"],["aria-label",a,"box_background","secondary","box_fill_mode","fill","box_space","tiny","box_space_left","tight","box_space_right","tight"],["stack_gap","near"],["stack_direction","x","stack_distribute","space-between","stack_gap","tight"],["stack_align","center","stack_direction","x","stack_gap","tight"],["icon_name","tag"],[1,"text-body--supporting","text-body--emphasis"],["stack_direction","x","stack_distribute","space-between"],["data-testid","resume-subscription-cta",3,"clicked","button_full_width"],[1,"text-body--emphasis"],["stack_align","center","stack_direction","x","stack_gap","near"],["data-testid","prepay-display-original-price",1,"text-body--line-through",6,"aria-label"],["data-testid","prepay-display-discounted-price",6,"aria-label"],["group_title",x,3,"group_title_hidden"],["stack_align","center","stack_gap","near"],["displayKey","label","label",G,"valueKey","value",3,"options","selected"],["box_space","none",3,"box_content_fill_width"],["format","D MMMM","theme","dark",3,"dates","defaultDate","minDate","onlyShowValidDates"],[4,"featureEnabled"],["displayKey","label","label",G,"valueKey","value",3,"didChange","options","selected"],["format","D MMMM","theme","dark",3,"dateChanged","monthChanged","dates","defaultDate","minDate","onlyShowValidDates"],["stack_gap","tight"],["box_space","none","role","chipgroup"],["stack_direction","x","stack_gap","near",3,"stack_wrap"],["chip_type","radio","formControlName","deliverySlotId",3,"label","value"],["chip_type","radio","formControlName","deliverySlotId",3,"didChange","label","value"]];},template:function(_,a){_&1&&(S(0,K_,2,1,"div",13),S(1,H_,1,1,"bw-loading-spinner",14)),_&2&&(C(a.loading()?-1:0),n(),C(a.loading()?1:-1));},dependencies:[te,__,e_,ie,ne,we,oe,Qe,Ze,S_,t_,Ke,ze,Je,Fe,je,qe,O_,a_,E_],styles:[".stick-column-top[_ngcontent-%COMP%]{position:sticky;top:150px}.stick-column-bottom[_ngcontent-%COMP%]{box-shadow:0 5px 30px color-mix(in srgb,var(--oasys-color-brand-foreground-primary) 12%,transparent);position:fixed;bottom:0;width:100%;z-index:3}"]});let i=s;return i;})();export{kt as OrderViewSubscriptionReactivationComponent};/**i18n:6718ca96c746c18e798e9866f4d6900209c4ebd86de26416ac53d18c4b85b1fe*/

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.