PageSourceSearch

https://www.thortful.com/9806-es2015.16fea99264d66fb5c504.js

js thortful.com collected 2026-10-02 05:32:56 UTC 413,382 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkthor_app=self.webpackChunkthor_app||[]).push([[9806],{9806:function(e,t,n){n.r(t),n.d(t,{AccountModule:function(){return va}});var i=n(92674),r=n(13074),o=n(6650),a=n(86243),s=n(38135),c=n(21773),d=n(15326),l=n(62415),p=n(17291),m=n(25801),g=n(61878),u=n(37403),h=n(25377),f=n(85572),C=n(31530),x=n(20820);let _=(()=>{class e{constructor(e){this.photoCardApi=e,this.fetchingDrafts=new C.X(!0),this.fetchedDrafts=new C.X([]),this.removedDrafts=new C.X([]),this.drafts=(0,x.aj)(this.fetchedDrafts,this.removedDrafts).map(([e,t])=>e.filter(e=>!t.includes(e.draft_id))),this.fetching=this.fetchingDrafts.asObservable(),this.hasDrafts=this.drafts.map(e=>e&&Boolean(e.length)),this.draftOverviews=this.drafts.map(e=>e&&e.map(this.mapDraftToOverview)||[]),this.draftsLength=this.drafts.map(e=>e&&e.length),this.mapDraftToOverview=e=>({id:e.draft_id,templateId:e.card_template_id,thumbnail:e.completed_template_image?e.completed_template_image.medium:e.card_template.image.medium})}refreshDrafts(){return(0,f.mG)(this,void 0,void 0,function*(){this.fetchingDrafts.next(!0);const e=yield this.photoCardApi.fetchDrafts(!1);this.fetchedDrafts.next(e),this.removedDrafts.next([]),this.fetchingDrafts.next(!1)})}deleteDraft(e){const t=this.removedDrafts.getValue();return this.removedDrafts.next([...t,e]),this.photoCardApi.deleteDraft(e)}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275inject(c.b))},e.\u0275prov=l.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac}),e})();var P=n(95178),O=n(68076),M=n(70013),v=n(17419),b=n(23576),y=n(839),w=n(82459);function S(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",11),l.\u0275\u0275elementStart(1,"div",12),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).showUploadImagePopUp=!0}),l.\u0275\u0275element(2,"img",13),l.\u0275\u0275element(3,"img",14),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(2),l.\u0275\u0275property("src",e.profile.public_profile.profile_picture.large,l.\u0275\u0275sanitizeUrl)}}function k(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",15),l.\u0275\u0275elementStart(1,"div",16),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).showUploadImagePopUp=!0}),l.\u0275\u0275elementStart(2,"div",17),l.\u0275\u0275text(3),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(4,"img",14),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate1("",e.profile&&e.profile.contact?e.profile.contact.firstname.charAt(0).toUpperCase()+(e.profile.contact.surname?e.profile.contact.surname.charAt(0).toUpperCase():""):""," ")}}function E(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",2),l.\u0275\u0275elementStart(1,"div",3),l.\u0275\u0275elementStart(2,"div",4),l.\u0275\u0275template(3,S,4,1,"div",5),l.\u0275\u0275template(4,k,5,1,"div",6),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",7),l.\u0275\u0275elementStart(6,"p",8),l.\u0275\u0275text(7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"p",9),l.\u0275\u0275text(9),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(10,"p",10),l.\u0275\u0275text(11),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",e.type),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",e.profile.public_profile.profile_picture.large),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.profile.public_profile.profile_picture.large),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngClass",e.type),l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e.profile&&e.profile.contact?e.profile.contact.firstname+" "+(e.profile.contact.surname||""):""),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.profile&&e.profile.contact?e.profile.contact.email:""),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",e.type),l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e.profile&&e.profile.contact?e.profile.contact.firstname+" "+(e.profile.contact.surname||""):"")}}function I(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"upload-image",18),l.\u0275\u0275listener("uploadImage",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().onUploadImage(t)}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("currentImage",null==e.profile.public_profile.profile_picture?null:e.profile.public_profile.profile_picture.large)}}let D=(()=>{class e{constructor(e){this.UserUtils=e}onUploadImage({image:e,action:t}){"cancel"!==t&&(this.profile.public_profile.profile_picture.large=e),this.showUploadImagePopUp=!1}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(u.f))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-info"]],inputs:{show:"show",type:"type",profile:"profile"},decls:2,vars:2,consts:[["class","show-container",4,"ngIf"],["type","profile",3,"currentImage","uploadImage",4,"ngIf"],[1,"show-container"],[1,"content","info-container",3,"ngClass"],[1,"container"],["class","photo-container",4,"ngIf"],["class","no-photo-container",4,"ngIf"],[1,"text-container"],[1,"name",3,"ngClass"],[1,"email"],[1,"name-2","content",3,"ngClass"],[1,"ph
1oto-container"],[1,"cont",3,"click"],[1,"photo",3,"src"],["imgSrc","img/action/camera.png",1,"camera"],[1,"no-photo-container"],[1,"no-photo",3,"click"],[1,"initials"],["type","profile",3,"currentImage","uploadImage"]],template:function(e,t){1&e&&(l.\u0275\u0275template(0,E,12,8,"div",0),l.\u0275\u0275template(1,I,1,1,"upload-image",1)),2&e&&(l.\u0275\u0275property("ngIf",t.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.showUploadImagePopUp))},directives:[i.O5,i.mk,M.t1,w.I],styles:[".show-container[_ngcontent-%COMP%]{min-height:86px}.show-container[_ngcontent-%COMP%]   .upload-container.type-B[_ngcontent-%COMP%]{left:16.5%}.info-container[_ngcontent-%COMP%]{text-align:center;min-height:86px;margin-bottom:20px}.info-container[_ngcontent-%COMP%]   .photo-container[_ngcontent-%COMP%]   .cont[_ngcontent-%COMP%]{cursor:pointer;position:relative;width:80px;margin:0 auto}.info-container[_ngcontent-%COMP%]   .photo-container[_ngcontent-%COMP%]   .cont[_ngcontent-%COMP%]   .camera[_ngcontent-%COMP%]{width:27px;height:27px;position:absolute;top:62px;left:57px}.info-container.type-B[_ngcontent-%COMP%]{position:relative;padding:0 25px;text-align:left;margin-bottom:20px}.info-container.type-B[_ngcontent-%COMP%]   .photo-container[_ngcontent-%COMP%]{display:inline-block}.info-container.type-B[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]{display:inline-block;position:absolute;left:122px;top:17px}.info-container.type-B[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:28px}.info-container.type-B[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]   .email[_ngcontent-%COMP%]{font-size:14px}.info-container.type-B[_ngcontent-%COMP%]   .no-photo-container[_ngcontent-%COMP%]{margin:0;width:86px;position:relative}.info-container.type-B[_ngcontent-%COMP%]   .no-photo-container[_ngcontent-%COMP%]   .no-photo[_ngcontent-%COMP%]{background:#BCBCBC;border-radius:50%;width:84px;height:84px;z-index:-1}.info-container.type-B[_ngcontent-%COMP%]   .no-photo-container[_ngcontent-%COMP%]   .no-photo[_ngcontent-%COMP%]   .camera[_ngcontent-%COMP%]{width:27px;height:27px;left:60px;top:55px;position:absolute}.info-container[_ngcontent-%COMP%]   .photo[_ngcontent-%COMP%]{position:relative;top:0px;border-radius:50%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:84px;height:84px}.info-container[_ngcontent-%COMP%]   .no-photo-container[_ngcontent-%COMP%]{margin:0 auto;width:86px;position:relative}.info-container[_ngcontent-%COMP%]   .no-photo-container[_ngcontent-%COMP%]   .no-photo[_ngcontent-%COMP%]{cursor:pointer;background:#BCBCBC;border-radius:50%;width:84px;height:84px;z-index:-1}.info-container[_ngcontent-%COMP%]   .no-photo-container[_ngcontent-%COMP%]   .initials[_ngcontent-%COMP%]{font-size:30px;color:#fff;font-weight:900;z-index:0;position:relative;top:28px;text-align:center}.info-container[_ngcontent-%COMP%]   .no-photo-container[_ngcontent-%COMP%]   .camera[_ngcontent-%COMP%]{width:27px;height:27px;left:60px;top:55px;position:absolute}.info-container[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-family:Roboto;font-weight:900;margin-bottom:0}.info-container[_ngcontent-%COMP%]   .name.type-A[_ngcontent-%COMP%]{font-size:28px}.info-container[_ngcontent-%COMP%]   .name.type-B[_ngcontent-%COMP%]{font-size:20px}.info-container[_ngcontent-%COMP%]   .email[_ngcontent-%COMP%]{font-size:12px}.name-2[_ngcontent-%COMP%]{top:0;text-align:center;position:fixed;opacity:0;font-size:15px;font-weight:700;width:100%;height:0}"]}),e})();var A=n(56688),F=n(34299),j=n(72890),U=n(47623),V=n(47834),N=n(95947),T=n(51006);const R=function(e){return{active:e}};function L(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"button",8),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().selectPaymentOption("apple")}),l.\u0275\u0275element(1,"img",13),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(2,R,"apple"===e.selected)),l.\u0275\u0275advance(1),l.\u0275\u0275property("imgSrc","apple"===e.selected?"svg/apple_pay-white.svg":"svg/apple_pay.svg")}}function z(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"button",8),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().selectPaymentOption("google")}),l.\u0275\u0275element(1,"img",14),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(2,R,"google"===e.selected)),l.\u0275\u0275advance(1),l.\u0275\u0275property("imgSrc","svg/google-pay-full.svg")}}function B(e,t){if(1&e&&l.\u0275\u0275element(0,"payment-info-banner",15),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("message",e.paymentInfoBanner)}}function q(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",16),l.\u0275\u0275elementStart(1,"stripe-component",17),l.\u0275\u0275listener("valid",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().onStripeValidation(t)}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(2,"div",18),l.\u0275\u0275text(3,"Billing Address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"thor-address",19),l.\u0275\u0275listener("onAddressConfirmation",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().changePaymentMethodToCreditCard(t)}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(4),l.\u0275\u0275classMap("accountAddress"),l.\u0275\u0275property("addressSettings",e.addressSettings)}}let H=(()=>{class e{constructor(e,t){this.thortfulSubscription=e,this.sanitizer=t,this.dueDate="",this.googleAvailable=!1,this.appleAvailable=!1,this.selected=null,this.paymentInfoBanner="",this.addressSettings={confirmTitle:"Continue with payment method",billingAddress:!0},this.closeChangePaymentMethod=new l.EventEmitter}ngOnInit(){var e;return(0,f.mG)(this,void 0,void 0,function*(){yield Promise.all([this.thortfulSubscription.appleAvailable(),this.thortfulSubscription.googleAvailable()]).then(([e,t])=>{this.appleAvailable=e.available,this.googleAvailable=t.available,!this.appleAvailable&&!this.googleAvailable&&(this.selected="card")}),this.paymentInfoBanner=this.sanitizer.bypassSecurityTrustHtml(`<p>In order for you to change your payment you need to re-enter your card details. </p> <p class="bold-text">We\u2019ll charge \xa3${null===(e=this.thortfulSubscription.subscriptionItemOption)||void 0===e?void 0:e.cost} on ${this.dueDate} to your new card<p/> `)})}selectPaymentOption(e){this.selected=e,"card"!==this.selected&&this.changePaymentMethodToDigitalWallet()}close(){this.closeChangePaymentMethod.emit()}changePaymentMethodToDigitalWallet(){return this.thortfulSubscription.changeUserSubscriptionPaymentMethod(null,this.selected).then(()=>{this.close()})}changePaymentMethodToCreditCard(e){if(this.cardIsValid)return this.thortfulSubscription.changeUserSubscriptionPaymentMethod(e,this.selected).then(()=>{this.thortfulSubscription.subscriptionChangePaymentMethodConfirmedEvent(),this.close()})}onStripeValidation(e){this.cardIsValid=e}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(b._),l.\u0275\u0275directiveInject(U.H7))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["thortful-subscription-change-payment"]],inputs:{dueDate:"dueDate"},outputs:{closeChangePaymentMethod:"closeChangePaymentMethod"},decls:18,vars:8,consts:[[1,"change-payment"],[1,"change-payment-container"],[1,"close-btn"],[1,"mdi","mdi-window-close",3,"click"],[1,"title"],[1,"description"],[1,"options-container"],["class","option-btn",3,"ngClass","click",4,"ngIf"],[1,"option-btn",3,"ngClass","click"],[1,"card",3,"imgSrc"],[1,"info-banner-container"],[3,"message",4,"ngIf"],["class","credit-card-container",4,"ngIf"],[1,"apple",3,"imgSrc"],[1,"google",3,"imgSrc"],[3,"message"],[1,"credit-card-container"],[3,"valid"],[1,"sub-title"],[3,"addressSettings","onAddressConfirmation"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275elementStart(2,"div",2),l.\u0275\u0275elementStart(3,"a",3),l.\u0275\u0275listener("click",function(){return t.close()}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"div",4),l.\u0275\u0275text(5,"Update subscription payment method "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"div",5),l.\u0275\u0275text(7,"Upd
1ate your subscription payment method using one of these methods "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"div",6),l.\u0275\u0275template(9,L,2,4,"button",7),l.\u0275\u0275template(10,z,2,4,"button",7),l.\u0275\u0275elementStart(11,"button",8),l.\u0275\u0275listener("click",function(){return t.selectPaymentOption("card")}),l.\u0275\u0275element(12,"img",9),l.\u0275\u0275elementStart(13,"span"),l.\u0275\u0275text(14,"Debit/Credit Card"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(15,"div",10),l.\u0275\u0275template(16,B,1,1,"payment-info-banner",11),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(17,q,5,3,"div",12),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(9),l.\u0275\u0275property("ngIf",t.appleAvailable),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.googleAvailable),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(6,R,"card"===t.selected)),l.\u0275\u0275advance(1),l.\u0275\u0275property("imgSrc","card"===t.selected?"svg/creditcard-icon-white.svg":"svg/creditcard-icon-black.svg"),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngIf","card"===t.selected),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","card"===t.selected))},directives:[i.O5,i.mk,M.t1,V.a,N.g,T.n],styles:[".change-payment[_ngcontent-%COMP%]{width:100vw;height:100vh;position:fixed;top:0;right:0;z-index:20;
1-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;background-color:#3b3b3b99}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]{position:relative;background-color:#fff;max-width:600px;padding:48px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;text-align:center;grid-gap:16px;gap:16px;color:#000;height:100%;margin:auto;overflow:scroll}@media (min-width: 992px){.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]{padding:48px;height:80%}}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .close-btn[_ngcontent-%COMP%]{position:absolute;top:24px;right:16px}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .close-btn[_ngcontent-%COMP%]   .mdi-window-close[_ngcontent-%COMP%]{font-size:24px;font-weight:800}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font:normal 800 28px Roboto,Arial,Helvetica,sans-serif}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{font:normal 400 16px Roboto,Arial,Helvetica,sans-serif}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;grid-gap:16px;gap:16px}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]   .option-btn[_ngcontent-%COMP%]{border:solid 2px #787878;background-color:#fff;width:100%;height:60px;font:normal 700 16px Roboto,Arial,Helvetica,sans-serif;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]   .option-btn.active[_ngcontent-%COMP%]{background-color:#ff6900;border:none}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]   .option-btn.active[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#fff}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]   .option-btn[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:auto}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]   .option-btn[_ngcontent-%COMP%]   img.card[_ngcontent-%COMP%]{width:20px}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]   .option-btn[_ngcontent-%COMP%]   img.google[_ngcontent-%COMP%]{width:70px}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]   .option-btn[_ngcontent-%COMP%]   img.apple[_ngcontent-%COMP%]{width:70px}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]   .option-btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{padding-left:12px}@media (min-width: 769px){.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .options-container[_ngcontent-%COMP%]   .option-btn[_ngcontent-%COMP%]{max-width:360px}}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .credit-card-container[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;grid-gap:16px;gap:16px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;text-align:start;padding:0}.change-payment[_ngcontent-%COMP%]   .change-payment-container[_ngcontent-%COMP%]   .credit-card-container[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{font:normal 800 20px Roboto,Arial,Helvetica,sans-serif}.change-payment[_ngcontent-%COMP%]     thor-address .confirm-button .thor-btn.block-btn.orange-btn{text-transform:none;border-radius:4px;
1height:50px;max-width:100%}"]}),e})();function $(e,t){1&e&&(l.\u0275\u0275elementStart(0,"span",23),l.\u0275\u0275text(1," Active"),l.\u0275\u0275elementEnd())}function Y(e,t){1&e&&(l.\u0275\u0275elementStart(0,"span",31),l.\u0275\u0275text(1," Cancelled"),l.\u0275\u0275elementEnd())}function G(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"p",32),l.\u0275\u0275text(1,"Renews on "),l.\u0275\u0275elementStart(2,"span",20),l.\u0275\u0275text(3),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(e.userSubscriptionDueDate)}}function X(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"p",32),l.\u0275\u0275text(1,"You can still access your benefits until "),l.\u0275\u0275elementStart(2,"span",20),l.\u0275\u0275text(3),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(e.userSubscriptionDueDate)}}function W(e,t){1&e&&l.\u0275\u0275element(0,"img",33),2&e&&l.\u0275\u0275property("imgSrc","img/hosted/bvi-hatch-square-yay.png")}function Q(e,t){1&e&&l.\u0275\u0275element(0,"img",34),2&e&&l.\u0275\u0275property("imgSrc","img/hosted/bvi-hatch-square-aww.png")}function J(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"p",42),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate1("You've saved ",e.userSubscriptionSavings," - nice one!")}}function Z(e,t){1&e&&(l.\u0275\u0275elementStart(0,"p",42),l.\u0275\u0275text(1,"The more you buy, the more you save!"),l.\u0275\u0275elementEnd())}function K(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",35),l.\u0275\u0275elementStart(1,"div",36),l.\u0275\u0275elementStart(2,"div",37),l.\u0275\u0275template(3,J,2,1,"p",38),l.\u0275\u0275template(4,Z,2,0,"p",38),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",39),l.\u0275\u0275elementStart(6,"a",40),l.\u0275\u0275text(7,"Shop Cards"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"a",41),l.\u0275\u0275text(9,"View Reminders"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275property("ngIf",e.rawSavings>=10),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.rawSavings<10),l.\u0275\u0275advance(4),l.\u0275\u0275property("routerLink","/account/reminders")}}function ee(e,t){1&e&&(l.\u0275\u0275elementStart(0,"p",43),l.\u0275\u0275text(1,"About your subscription"),l.\u0275\u0275elementEnd())}function te(e,t){1&e&&(l.\u0275\u0275elementStart(0,"p",43),l.\u0275\u0275text(1,"Missing your XTRAS?"),l.\u0275\u0275elementEnd())}function ne(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"p"),l.\u0275\u0275text(1,"As an XTRAthortful person, you're currently enjoying"),l.\u0275\u0275elementStart(2,"span",20),l.\u0275\u0275text(3),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(4," every card you send!"),l.\u0275\u0275elementStart(5,"span",20),l.\u0275\u0275text(6," First card & postage is totally FREE"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate1(" ",null==e.subscriptionPrices?null:e.subscriptionPrices.subscriptionDiscountPercentage,"% OFF")}}function ie(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"p"),l.\u0275\u0275text(1,"Renew your XTRAthortful subscription to enjoy"),l.\u0275\u0275elementStart(2,"span",20),l.\u0275\u0275text(3),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(4," every card you send!"),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate1(" ",null==e.subscriptionPrices?null:e.subscriptionPrices.subscriptionDiscountPercentage,"% OFF")}}function re(e,t){if(1&e&&(l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275elementStart(1,"div",44),l.\u0275\u0275elementStart(2,"p",45),l.\u0275\u0275text(3),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"p",46),l.\u0275\u0275text(5),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"p",47),l.\u0275\u0275text(7,"Default payment method"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"div",48),l.\u0275\u0275element(9,"img",49),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementContainerEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate2("",e.userSubscriptionPaymentDetails.brand," (",e.userSubscriptionPaymentDetails.last4,")"),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate2("Exp: ",e.userSubscriptionPaymentDetails.expiration_month,"/",e.userSubscriptionPaymentDetails.expiration_year,""),l.\u0275\u0275advance(4),l.\u0275\u0275property("imgSrc",e.cardBrands[e.userSubscriptionPaymentDetails.brand])}}function oe(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",50),l.\u0275\u0275text(1,"No subscription payment method saved"),l.\u0275\u0275elementEnd())}function ae(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",51),l.\u0275\u0275elementStart(1,"app-button",52),l.\u0275\u0275listener("buttonClicked",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).toggleDisplayChangePaymentMethod()}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}2&e&&(l.\u0275\u0275advance(1),l.\u0275\u0275property("isSolid",!0))}function se(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",53),l.\u0275\u0275elementStart(1,"a",54),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).cancelSubscriptionClicked()}),l.\u0275\u0275text(2,"Cancel XTRAthortful subscription"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}}const ce=function(e,t){return{"creamy-bg":e,"red-bg":t}};function de(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",6),l.\u0275\u0275elementStart(1,"div",7),l.\u0275\u0275elementStart(2,"div",8),l.\u0275\u0275elementStart(3,"p",9),l.\u0275\u0275text(4,"Your subscription is:"),l.\u0275\u0275template(5,$,2,0,"span",10),l.\u0275\u0275template(6,Y,2,0,"span",11),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(7,G,4,1,"p",12),l.\u0275\u0275template(8,X,4,1,"p",12),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(9,W,1,1,"img",13),l.\u0275\u0275template(10,Q,1,1,"img",14),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(11,K,10,3,"div",15),l.\u0275\u0275elementStart(12,"div",16),l.\u0275\u0275elementStart(13,"div",17),l.\u0275\u0275template(14,ee,2,0,"p",18),l.\u0275\u0275template(15,te,2,0,"p",18),l.\u0275\u0275template(16,ne,7,1,"p",19),l.\u0275\u0275template(17,ie,5,1,"p",19),l.\u0275\u0275elementStart(18,"p",20),l.\u0275\u0275text(19,"That includes:"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(20,"ul"),l.\u0275\u0275elementStart(21,"li"),l.\u0275\u0275text(22,"All A5 cards"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(23,"li"),l.\u0275\u0275text(24,"All A4 Cards"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(25,"li"),l.\u0275\u0275text(26,"Face Swap and Photo Cards"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(27,"li"),l.\u0275\u0275text(28,"A warm, fuzzy feeling every time you send more thorts to someone special."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(29,"li"),l.\u0275\u0275text(30,"Or stock up and get "),l.\u0275\u0275elementStart(31,"span",20),l.\u0275\u0275text(32,"4 A5 cards for \xa39"),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(33," (yep, XTRAthortful members only)."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(34,"div",21),l.\u0275\u0275elementStart(35,"div",22),l.\u0275\u0275elementStart(36,"p",23),l.\u0275\u0275text(37,"See full "),l.\u0275\u0275elementStart(38,"a",24),l.\u0275\u0275text(39," Terms and Conditions "),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(40,"here"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(41,"div",25),l.\u0275\u0275elementStart(42,"div",26),l.\u0275\u0275elementStart(43,"div",27),l.\u0275\u0275template(44,re,10,5,"ng-container",19),l.\u0275\u0275template(45,oe,2,0,"div",28),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(46,ae,2,1,"div",29),l.\u0275\u0275template(47,se,3,0,"div",30),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction2(16,ce,e.isUserSubscriptionActive,!e.isUserSubscriptionActive)),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngIf",e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.userSubscriptionSavings),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngIf",e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isUserSubscriptionActive),l.\u0275\u0275advance(27),l.\u0275\u0275property("ngIf",e.isUserSubscriptionActive&&e.userSubscriptionPaymentDetails),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!(e.isUserSubscriptionActive&&e.userSubscriptionPaymentDetails)),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isUserSubscriptionActive),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isUserSubscriptionActive)}}function le(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"thortful-subscription-change-payment",55),l.\u0275\u0275listener("closeChangePaymentMethod",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().toggleDisplayChangePaymentMethod()}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("dueDate",e.userSubscriptionDueDate)}}let pe=(()=>{class e{constructor(e,t,n){this.thortfulSubscription=e,this.router=t,this.Segment=n,this.displayCancelPopup=!1,this.isUserSubscriptionActive=null,this.userSubscriptionDueDate=null,this.userSubscriptionSavings=null,this.rawSavings=0,this.displayChangePayment=!1,this.userSubscriptionPaymentDetails=null,this.cardBrands={visa:"img/action/visa.svg",Visa:"img/action/visa.svg",Mastercard:"img/action/mastercard.svg",mastercard:"img/action/mastercard.svg",MasterCard:"img/action/mastercard.svg",amex:"img/action/amex.svg",Amex:"img/action/amex.svg"}}ngOnInit(){return(0,f.mG)(this,void 0,void 0,function*(){this.getUserSubscriptionDetail
1s(),this.getUserSubscriptionPaymentDetails()})}getUserSubscriptionDetails(){return(0,f.mG)(this,void 0,void 0,function*(){yield this.thortfulSubscription.getUserSubscriptionDetails().then(()=>{this.isUserSubscriptionActive=this.thortfulSubscription.userSubscriptionDetails.active||!1,this.userSubscriptionDueDate=this.thortfulSubscription.userSubscriptionDetails.dueDate,this.userSubscriptionSavings=this.thortfulSubscription.userSubscriptionDetails.savedWithSubscription,this.rawSavings=this.thortfulSubscription.userSubscriptionDetails.rawSavedWithSubscription,this.detailsReady=!0}).catch(()=>{this.router.navigate(["/page-not-found"])})})}getUserSubscriptionPaymentDetails(){return(0,f.mG)(this,void 0,void 0,function*(){yield this.thortfulSubscription.getUserSubscriptionPaymentDetails().then(e=>{this.userSubscriptionPaymentDetails=e}).catch(e=>{console.error("Failed to fetch payment details:",e)})})}toggleDisplayChangePaymentMethod(){this.displayChangePayment=!this.displayChangePayment,this.displayChangePayment&&this.thortfulSubscription.subscriptionChangePaymentMethodStartedEvent()}cancelSubscriptionClicked(){this.toggleCancelPopup()}toggleCancelPopup(){this.displayCancelPopup=!this.displayCancelPopup,this.displayCancelPopup&&this.thortfulSubscription.subscriptionCancelModalViewedEvent()}removeSubscription(){this.thortfulSubscription.removeSubscriptionFromUser().then(()=>{this.Segment.trackCustom({name:"Subscription Account Page Remove Subscription Success",data:{}}),this.triggerHotjarSubscriptionCancelSurvey()}).catch(()=>{this.Segment.trackCustom({name:"Subscription Account Page Remove Subscription Error",data:{}})}).finally(()=>{this.getUserSubscriptionDetails()})}triggerHotjarSubscriptionCancelSurvey(){window.hj&&window.hj("event","subscription_cancel")}get subscriptionPrices(){return this.thortfulSubscription.subscriptionPrices}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(b._),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(M.BP))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["thortful-subscription-manage-page"]],decls:7,vars:4,consts:[[1,"subscription-manage"],[1,"account-content"],[1,"title"],["class","container",4,"ngIf"],["cancelType","renewal",3,"open","expirationDate","close","removeSubscription"],[3,"dueDate","closeChangePaymentMethod",4,"ngIf"],[1,"container"],[1,"subscription-status-container",3,"ngClass"],[1,"subscription-status"],[1,"subscription-status-active-text"],["class","orange",4,"ngIf"],["class","red",4,"ngIf"],["class","subscription-status-renews-text",4,"ngIf"],["class","hatch-subscription-status-active",3,"imgSrc",4,"ngIf"],["class","hatch-subscription-status-cancelled",3,"imgSrc",4,"ngIf"],["class","subscription-savings-container",4,"ngIf"],[1,"subscription-info-container"],[1,"subscription-info"],["class","about-heading",4,"ngIf"],[4,"ngIf"],[1,"bold"],[1,"subscription-terms-container"],[1,"subscription-terms"],[1,"orange"],["href","/info/xtrathortful/terms-of-use",1,"bold","underline"],[1,"subscription-payment-details"],[1,"payment-card"],[1,"card-details-wrapper"],["class","no-payment-method",4,"ngIf"],["class","subscription-payment-button-container",4,"ngIf"],["class","subscription-cancel-container",4,"ngIf"],[1,"red"],[1,"subscription-status-renews-text"],[1,"hatch-subscription-status-active",3,"imgSrc"],[1,"hatch-subscription-status-cancelled",3,"imgSrc"],[1,"subscription-savings-container"],[1,"subscription-savings-wrapper"],[1,"subscription-savings"],["class","subscription-savings-text",4,"ngIf"],[1,"subscription-buttons"],["href","cards/birthday",1,"button","black-button"],[1,"button","white-button",3,"routerLink"],[1,"subscription-savings-text"],[1,"about-heading"],[1,"card-info"],[1,"card-type"],[1,"card-expiry"],[1,"card-default"],[1,"card-brand"],[3,"imgSrc"],[1,"no-payment-method"],[1,"subscription-payment-button-container"],["buttonText","Change payment method",1,"change-payment-button",3,"isSolid","buttonClicked"],[1,"subscription-cancel-container"],[1,"subscription-cancel",3,"click"],[3,"dueDate","closeChangePaymentMethod"]
1],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275elementStart(2,"h4",2),l.\u0275\u0275text(3,"XTRAthortful Subscription"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(4,de,48,19,"div",3),l.\u0275\u0275elementStart(5,"thortful-subscription-cancel-modal",4),l.\u0275\u0275listener("close",function(){return t.toggleCancelPopup()})("removeSubscription",function(){return t.removeSubscription()}),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(6,le,1,1,"thortful-subscription-change-payment",5),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(4),l.\u0275\u0275property("ngIf",t.detailsReady),l.\u0275\u0275advance(1),l.\u0275\u0275property("open",t.displayCancelPopup)("expirationDate",t.userSubscriptionDueDate),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.displayChangePayment))},directives:[i.O5,F.$,i.mk,M.t1,r.yS,j.V,H],styles:['.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{display:block}@media (min-width: 769px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{padding:0 10px}}@media (min-width: 992px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{padding:0 25px}}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]{background-color:#f7efe5;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]   .subscription-status[_ngcontent-%COMP%]{padding:24px 0 24px 24px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]   .subscription-status[_ngcontent-%COMP%]   .subscription-status-active-text[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin-bottom:6px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]   .subscription-status[_ngcontent-%COMP%]   .subscription-status-renews-text[_ngcontent-%COMP%]{margin-bottom:0;font-size:16px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]   .subscription-status[_ngcontent-%COMP%]   .orange[_ngcontent-%COMP%]{color:#ff6900;font-weight:bold}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]   .subscription-status[_ngcontent-%COMP%]   .red[_ngcontent-%COMP%]{color:#c90000;font-weight:bold}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]   .hatch-subscription-status-active[_ngcontent-%COMP%]{padding-right:8px;max-width:105px;min-height:77px}@media (min-width: 769px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]   .hatch-subscription-status-active[_ngcontent-%COMP%]{max-width:120px;margin-right:48px}}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]   .hatch-subscription-status-cancelled[_ngcontent-%COMP%]{padding-right:8px;max-width:81px;min-height:70px}@media (min-width: 769px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-status-container[_ngcontent-%COMP%]   .hatch-subscription-status-cancelled[_ngcontent-%COMP%]{max-width:115px;margin-right:48px}}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]{overflow:hidden;background:#000000 url(https://images-fe.thortful.com/img/hosted/brick-pattern-xtrathortful.png) center repeat;background-size:auto 180px;min-height:140px;display:-webkit-box;display:-ms-flexbox;display:flex}@media (min-width: 992px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]{min-height:180px}}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]{background:url(https://images-fe.thortful.com/img/hosted/xtrathortful-creamy-bg-mobile.svg) center center no-repeat;background-size:auto 130px;padding:20px 18px;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;max-width:100%;-ms-flex-negative:0;flex-shrink:0}@media (min-width: 992px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]{background:url(https://images-fe.thortful.com/img/hosted/xtrathortful-creamy-bg.svg) center center no-repeat;background-size:auto 130px;max-width:550px;margin:0 auto}}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]   .subscription-savings[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;grid-gap:10px;gap:10px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]   .subscription-savings[_ngcontent-%COMP%]   .subscription-savings-text[_ngcontent-%COMP%]{color:#000;font-size:12px;font-family:"Sunday-Best",sans-serif;width:100%;text-align:center;text-transform:uppercase}@media (min-width: 769px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]   .subscription-savings[_ngcontent-%COMP%]   .subscription-savings-text[_ngcontent-%COMP%]{text-align:start}}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]   .subscription-buttons[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;grid-gap:10px;gap:10px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 769px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]   .subscription-buttons[_ngcontent-%COMP%]{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start}}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]   .subscription-buttons[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;height:45px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;min-width:150px;padding:0 8px;letter-spacing:0;border-radius:4px;border:black 1px solid;font-size:16px;font-weight:700;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]   .subscription-buttons[_ngcontent-%COMP%]   .black-button[_ngcontent-%COMP%]{background-color:#ff6900;color:#fff;border-color:#ff6900}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-savings-container[_ngcontent-%COMP%]   .subscription-savings-wrapper[_ngcontent-%COMP%]   .subscription-buttons[_ngcontent-%COMP%]   .white-button[_ngcontent-%COMP%]{background-color:#fff;color:#000}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-info-container[_ngcontent-%COMP%]{padding:24px}@media (min-width: 769px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-info-container[_ngcontent-%COMP%]{padding:24px 0}}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-info-container[_ngcontent-%COMP%]   .subscription-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-info-container[_ngcontent-%COMP%]   .subscription-info[_ngcontent-%COMP%]   .about-heading[_ngcontent-%COMP%]{font-size:18px;font-weight:bold}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-info-container[_ngcontent-%COMP%]   .subscription-info[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{list-style-position:outside}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-terms-container[_ngcontent-%COMP%]{padding:0 24px;text-align:start}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-terms-container[_ngcontent-%COMP%]   .subscription-terms[_ngcontent-%COMP%]{border-bottom:1px solid #D3D3D3}@media (min-width: 769px){.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-terms-container[_ngcontent-%COMP%]   .subscription-terms[_ngcontent-%COMP%]{text-align:center;border:0}}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-terms-container[_ngcontent-%COMP%]   .subscription-terms[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-size:14px;width:100%;text-align:center;color:#ff6900;cursor:pointer}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]{padding:0 24px;margin-top:24px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]   .payment-card[_ngcontent-%COMP%]{border:1px solid #D3D3D3;border-radius:8px;padding:16px 20px;-webkit-box-shadow:0px 4px 4px 0px rgba(196,196,196,.25);box-shadow:0 4px 4px #c4c4c440}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]   .payment-card[_ngcontent-%COMP%]   .card-detail
1s-wrapper[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;min-height:77px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]   .payment-card[_ngcontent-%COMP%]   .card-details-wrapper[_ngcontent-%COMP%]   .no-payment-method[_ngcontent-%COMP%]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:77px;color:#495057}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]   .payment-card[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;font-size:16px;line-height:1.5}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]   .payment-card[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]   .card-type[_ngcontent-%COMP%]{font-weight:400;color:#000;margin-bottom:4px;text-transform:uppercase}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]   .payment-card[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]   .card-expiry[_ngcontent-%COMP%]{font-weight:400;color:#000;margin-bottom:4px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]   .payment-card[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]   .card-default[_ngcontent-%COMP%]{font-weight:400;color:#999;font-size:14px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]   .payment-card[_ngcontent-%COMP%]   .card-brand[_ngcontent-%COMP%]{width:60px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-details[_ngcontent-%COMP%]   .payment-card[_ngcontent-%COMP%]   .card-brand[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:auto}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-button-container[_ngcontent-%COMP%]{padding:0 24px;margin-top:12px;margin-bottom:24px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-payment-button-container[_ngcontent-%COMP%]   .change-payment-button[_ngcontent-%COMP%]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:350px}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-cancel-container[_ngcontent-%COMP%]{padding:0 24px;text-align:center}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .subscription-cancel-container[_ngcontent-%COMP%]   .subscription-cancel[_ngcontent-%COMP%]{font-size:18px;font-weight:500;width:100%;text-align:center;text-decoration:underline;cursor:pointer}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .bold[_ngcontent-%COMP%]{font-weight:bold;color:inherit;font-size:inherit}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .underline[_ngcontent-%COMP%]{text-decoration:underline}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .creamy-bg[_ngcontent-%COMP%]{background-color:#f7efe5}.subscription-manage[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .red-bg[_ngcontent-%COMP%]{background-color:#fbd8d5}.subscription-manage[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:18px;padding:0 18px;text-align:start}@media (min-width: 769px){.subscription-manage[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{padding:0 24px}}']}),e})();var me=n(4102);function ge(e,t){1&e&&(l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275element(1,"thortful-subscription-manage-page"),l.\u0275\u0275elementContainerEnd())}function ue(e,t){1&e&&l.\u0275\u0275element(0,"thortful-subscription-landing-page")}const he=function(e){return{"landing-page":e}};function fe(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",1),l.\u0275\u0275template(1,ge,2,0,"ng-container",2),l.\u0275\u0275template(2,ue,1,0,"ng-template",null,3,l.\u0275\u0275templateRefExtractor),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275reference(3),t=l.\u0275\u0275nextContext();l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(3,he,!t.isUserSubscribed)),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.isUserSubscribed)("ngIfElse",e)}}let Ce=(()=>{class e{constructor(e){this.thortfulSubscription=e,this.isUserSubscribed=!1}ngOnInit(){return(0,f.mG)(this,void 0,void 0,function*(){this.isUserSubscribed=this.thortfulSubscription.userIsSubscribed()})}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(b._))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-xtrathortful"]],decls:1,vars:1,consts:[["class","account-xtrathortful",3,"ngClass",4,"featureFlag"],[1,"account-xtrathortful",3,"ngClass"],[4,"ngIf","ngIfElse"],["landingPage",""]],template:function(e,t){1&e&&l.\u0275\u0275template(0,fe,4,5,"div",0),2&e&&l.\u0275\u0275property("featureFlag","WAL-1461")},directives:[M.Hl,i.mk,i.O5,pe,me.S],styles:[".account-xtrathortful[_ngcontent-%COMP%]{max-width:700px;margin:0 auto}@media (min-width: 769px){.account-xtrathortful.landing-page[_ngcontent-%COMP%]{max-width:unset}}"]}),e})();var xe=n(36644),_e=n(84552),Pe=n(49525),Oe=n(9691),Me=n(24521),ve=n(65061),be=n(31707),ye=n(85738),we=n(37090),Se=n(83281);function ke(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",2),l.\u0275\u0275elementStart(1,"div",3),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeForm()}),l.\u0275\u0275element(2,"thor-ico",4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"h4",5),l.\u0275\u0275text(4,"Address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"thor-search-country",6),l.\u0275\u0275listener("action",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().useSelectedCountry(t)}),l.\u0275\u0275elementStart(6,"div",7),l.\u0275\u0275elementStart(7,"label"),l.\u0275\u0275text(8,"Delivery Country"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(9,"p",8),l.\u0275\u0275element(10,"br"),l.\u0275\u0275text(11),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(12,"div",9),l.\u0275\u0275elementStart(13,"thor-search-postcode",10),l.\u0275\u0275listener("action",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().postcodeLookUp(t)}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(14,"h6",11),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().lookup=!1}),l.\u0275\u0275text(15,"Add Address Manually"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(2),l.\u0275\u0275property("p","cancel"),l.\u0275\u0275advance(3),l.\u0275\u0275property("model",e.details.address.country),l.\u0275\u0275advance(6),l.\u0275\u0275textInterpolate(e.details.address.country),l.\u0275\u0275advance(2),l.\u0275\u0275property("model",e.details.address)("listener",e.obs)}}function Ee(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",44),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).addressToReminder("close")}),l.\u0275\u0275element(1,"i",45),l.\u0275\u0275elementEnd()}}function Ie(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",3),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).closeForm()}),l.\u0275\u0275element(1,"thor-ico",4),l.\u0275\u0275elementEnd()}2&e&&(l.\u0275\u0275advance(1),l.\u0275\u0275property("p","cancel"))}function De(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",49),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e.invalidPostcode(e.details.address.country_code,e.details.address.postcode))}}
1const Ae=function(e){return{invalid:e}};function Fe(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275elementStart(1,"p",18),l.\u0275\u0275elementStart(2,"label",46),l.\u0275\u0275text(3,"Postcode"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"input",47),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).details.address.postcode=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(5,De,2,1,"div",48),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementContainerEnd()}if(2&e){l.\u0275\u0275nextContext();const e=l.\u0275\u0275reference(7),t=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(3,Ae,t.invalidPostcode(t.details.address.country_code,t.details.address.postcode)&&(null==e.controls.postcode?null:e.controls.postcode.touched))),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.address.postcode),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.invalidPostcode(t.details.address.country_code,t.details.address.postcode)&&(null==e.controls.postcode?null:e.controls.postcode.touched))}}function je(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275elementStart(1,"p",18),l.\u0275\u0275elementStart(2,"label",46),l.\u0275\u0275text(3,"Postcode"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"input",47),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).details.address.postcode=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementContainerEnd()}if(2&e){l.\u0275\u0275nextContext();const e=l.\u0275\u0275reference(7),t=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(2,Ae,t.invalidInput(t.details.address.postcode)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.address.postcode)}}function Ue(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"option",50),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("value",e.key)("selected",n.details.address.country_code===e.key),l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e.label)}}const Ve=function(e){return{disabled:e}};function Ne(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",51),l.\u0275\u0275elementStart(1,"button",52),l.\u0275\u0275listener("click",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).openDeletePopup(t)}),l.\u0275\u0275text(2,"Delete address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"button",53),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).updateAddress()}),l.\u0275\u0275text(4,"Save address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275property("disabled",!e.formValidation())("ngClass",l.\u0275\u0275pureFunction1(2,Ve,!e.formValidation()))}}function Te(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",51),l.\u0275\u0275elementStart(1,"button",54),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).saveNewAddress()}),l.\u0275\u0275text(2,"Save address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275property("disabled",!e.formValidation())("ngClass",l.\u0275\u0275pureFunction1(2,Ve,!e.formValidation()))}}function Re(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",51),l.\u0275\u0275elementStart(1,"button",54),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).addressToReminder("save")}),l.\u0275\u0275text(2,"Save address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275property("disabled",!e.formValidation())("ngClass",l.\u0275\u0275pureFunction1(2,Ve,!e.formValidation()))}}const Le=function(e){return{active:e}};function ze(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",12),l.\u0275\u0275elementStart(1,"h4",5),l.\u0275\u0275text(2,"Address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(3,Ee,2,0,"div",13),l.\u0275\u0275template(4,Ie,2,1,"div",14),l.\u0275\u0275elementStart(5,"div",15),l.\u0275\u0275elementStart(6,"form",16,17),l.\u0275\u0275elementStart(8,"p",18),l.\u0275\u0275elementStart(9,"label",19),l.\u0275\u0275text(10,"Name"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(11,"input",20),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.address.recipient=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(12,"p",18),l.\u0275\u0275elementStart(13,"label",21),l.\u0275\u0275text(14,"Address Line 1 "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(15,"input",22),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.address.address1=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(16,"p",23),l.\u0275\u0275elementStart(17,"label",24),l.\u0275\u0275text(18,"Address Line 2"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(19,"input",25),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.address.address2=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(20,"p",23),l.\u0275\u0275elementStart(21,"label",26),l.\u0275\u0275text(22,"Address Line 3"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(23,"input",27),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.address.address3=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(24,"p",18),l.\u0275\u0275elementStart(25,"label",28),l.\u0275\u0275text(26,"City"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(27,"input",29),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.address.city=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(28,Fe,6,5,"ng-container",30),l.\u0275\u0275template(29,je,5,4,"ng-container",31),l.\u0275\u0275elementStart(30,"p",23),l.\u0275\u0275elementStart(31,"label",32),l.\u0275\u0275text(32,"Country"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(33,"select",33),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.address.country_code=t}),l.\u0275\u0275template(34,Ue,2,3,"option",34),l.\u0275\u0275pipe(35,"orderBy"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(36,Ne,5,4,"div",35),l.\u0275\u0275template(37,Te,3,4,"div",35),l.\u0275\u0275template(38,Re,3,4,"div",35),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(39,"div",36),l.\u0275\u0275elementStart(40,"div",37),l.\u0275\u0275listener("clickOutside",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeDeletePopup()}),l.\u0275\u0275elementStart(41,"div",38),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeDeletePopup()}),l.\u0275\u0275element(42,"thor-ico",4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(43,"p",39),l.\u0275\u0275text(44,"Are you sure you want to delete this address?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(45,"div",40),l.\u0275\u0275elementStart(46,"a",41),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().deleteAddress()}),l.\u0275\u0275text(47,"Yes"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(48,"a",42),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeDeletePopup()}),l.\u0275\u0275text(49,"No"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(50,"p",43),l.\u0275\u0275elementStart(51,"strong"),l.\u0275\u0275text(52,"Note: "),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(53,"This action cannot be undone."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275reference(7),t=l.\u0275\u0275nextContext();l.\u0275\u0275advance(3),l.\u0275\u0275property("ngIf",t.reminder),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!t.reminder),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(24,Ae,t.invalidInput(t.details.address.recipient)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("disabled","homefill"==t.type)("ngClass",l.\u0275\u0275pureFunction1(26,Ve,"homefill"==t.type))("ngModel",t.details.address.recipient),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(28,Ae,t.invalidInput(t.details.address.address1)&&
1!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.address.address1),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngModel",t.details.address.address2),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngModel",t.details.address.address3),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(30,Ae,t.invalidInput(t.details.address.city)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.address.city),l.\u0275\u0275advance(1),l.\u0275\u0275property("featureFlag","TSN-851"),l.\u0275\u0275advance(1),l.\u0275\u0275property("featureFlagDisabled","TSN-851"),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngModel",t.details.address.country_code),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngForOf",l.\u0275\u0275pipeBind2(35,21,t.countries,"label")),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf","address"===t.type&&!t.reminder),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",("new address"===t.type||"homefill"===t.type)&&!t.reminder),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.reminder),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(32,Le,t.deleteAddressPopupVisible)),l.\u0275\u0275advance(3),l.\u0275\u0275property("p","cross")}}let Be=(()=>{class e{constructor(e,t,n,i){this.elementRef=e,this.AccountAddressesUtils=t,this.AccountOverviewUtils=n,this.Store=i,this.details={address:{}},this.obs=new s.y(e=>{this.sub=e}),this.enableValidatePostcode=!1,this.Store.select("featureFlag","config","TSN-851").pipe((0,o.P)(e=>"boolean"==typeof e)).subscribe(e=>{e&&(this.enableValidatePostcode=e)})}ngOnInit(){this.address&&(this.address.homefill?(this.lookup=!0,this.details.address=(0,xe.Z)(this.address.address),this.details.address.country="United Kingdom",this.type="homefill"):(this.details.address=(0,xe.Z)(this.address),this.type="address")),this.reminder&&(this.address.address1||this.address.address2||this.address.address3||this.address.city?this.lookup=!1:(this.lookup=!0,this.details.address=this.AccountAddressesUtils.initEmptyAddressObj(),this.details.address.country="United Kingdom"))}ngOnChanges(e){e.address&&null===e.address.currentValue&&(this.type="new address",this.lookup=!0,this.details.address=this.AccountAddressesUtils.initEmptyAddressObj(),this.details.address.country="United Kingdom")}ngOnDestroy(){}useSelectedCountry(e){this.details.address.country=e[0],this.details.address.country_code=e[1],this.sub&&this.sub.next(e[1])}postcodeLookUp(e){this.details.address=e,this.lookup=!1}saveNewAddress(){this.update.next(["passFormData",{payload:this.details.address,type:"new"}])}updateAddress(){this.update.next(["passFormData",{id:this.details.address.id,payload:{recipient:this.details.address.recipient,address1:this.details.address.address1,address2:this.details.address.address2,address3:this.details.address.address3,postcode:this.details.address.postcode,city:this.details.address.city,country_code:this.details.address.country_code},type:"update"}])}deleteAddress(){this.deleteAddressPopupVisible=!1,this.update.next(["passFormData",{id:this.details.address.id,type:"delete"}])}closeForm(){this.update.next(["closeForm"])}addressToReminder(e){this.reminderObs.next("close"===e?{address:null}:{address:this.details.address})}formValidation(){return this.enableValidatePostcode?this.elementRef.nativeElement.getElementsByTagName("form")[0].checkValidity()&&!this.invalidPostcode(this.details.address.country_code,this.details.address.postcode):this.elementRef.nativeElement.getElementsByTagName("form")[0].checkValidity()}invalidInput(e){return this.AccountOverviewUtils.invalidInput(e)}invalidPostcode(e,t){return this.AccountOverviewUtils.invalidPostcode(e,t)}openDeletePopup(e){e.stopPropagation(),this.deleteAddressPopupVisible=!0}closeDeletePopup(){this.deleteAddressPopupVisible=!1}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(_e.g),l.\u0275\u0275directiveInject(g.e),l.\u0275\u0275directiveInject(v.yh))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-edit-address"]],inputs:{profile:"profile",update:"update",address:"address",countries:"countries",reminder:"reminder",reminderObs:"reminderObs"},features:[l.\u0275\u0275NgOnChangesFeature],decls:2,vars:2,consts:[["class","address-lookup",4,"ngIf"],["class","account-edit-address",4,"ngIf"],[1,"address-lookup"],[1,"cancel-icon",3,"click"],[3,"p"],[1,"center","address-title-desktop"],[3,"model","action"],[1,"thor-input"],[1,"lg"],[1,"lookup"],[3,"model","listener","action"],[1,"orange","w600","center",3,"click"],[1,"account-edit-address"],["class","icon",3,"click",4,"ngIf"],["class","cancel-icon",3,"click",4,"ngIf"],[1,"account-content","content"],["name","AccountAddressForm","novalidate",""],["AccountAddressForm","ngForm"],[1,"thor-input","new-input",3,"ngClass"],["for","firstName"],["type","text","required","","placeholder","Name","id","name","name","name","maxlength","25","text-filtering","",3,"disabled","ngClass","ngModel","ngModelChange"],["for","addressLine1"],["type","text","required","","placeholder","Add address","id","addressLine1","name","addressLine1","max-length","50","text-filtering","",3,"ngModel","ngModelChange"],[1,"thor-input","new-input"],["for","addressLine2"],["type","text","placeholder","Add address","id","addressLine2","name","addressLine2","text-filtering","",3,"ngModel","ngModelChange"],["for","addressLine3"],["type","text","placeholder","Add address","id","addressLine3","name","addressLine3","text-filtering","",3,"ngModel","ngModelChange"],["for","city"],["type","text","required","","placeholder","Add city","id","city","name","city","max-length","20","text-filtering","",3,"ngModel","ngModelChange"],[4,"featureFlag"],[4,"featureFlagDisabled"],["for","newAddressCountry"],["id","newAddressCountry","name","newAddressCountry",3,"ngModel","ngModelChange"],["required","",3,"value","selected",4,"ngFor","ngForOf"],["class","account-buttons",4,"ngIf"],[1,"update-form","card-delete",3,"ngClass"],[1,"update-form-inner","active",3,"clickOutside"],[1,"cross-container",3,"click"],[1,"question"],[1,"delete-buttons"],["href","javascript:;",1,"btn-thor-white",3,"click"],["href","javascript:;
1",1,"btn-thor-orange",3,"click"],[1,"note"],[1,"icon",3,"click"],[1,"mdi","mdi-chevron-left"],["for","postcode"],["type","text","required","","placeholder","Add postcode","id","postcode","name","postcode","max-length","10","text-filtering","",3,"ngModel","ngModelChange"],["class","alert-tooltip",4,"ngIf"],[1,"alert-tooltip"],["required","",3,"value","selected"],[1,"account-buttons"],[1,"btn-thor-white","large",3,"click"],[1,"btn-thor-orange",3,"disabled","ngClass","click"],[1,"btn-thor-orange","new-address",3,"disabled","ngClass","click"]],template:function(e,t){1&e&&(l.\u0275\u0275template(0,ke,16,5,"div",0),l.\u0275\u0275template(1,ze,54,34,"div",1)),2&e&&(l.\u0275\u0275property("ngIf",t.lookup),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!t.lookup))},directives:[i.O5,Pe.n,ye.S,we.l,ve._Y,ve.JL,ve.F,i.mk,ve.Fj,ve.Q7,ve.nD,ve.JJ,ve.On,M.Hl,M.oT,ve.EJ,i.sg,Oe.L,ve.YN,ve.Kr],pipes:[Se.d],styles:[".address-lookup[_ngcontent-%COMP%]   .cancel-icon[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.address-lookup[_ngcontent-%COMP%]   .cancel-icon[_ngcontent-%COMP%]{display:block;width:25px;top:58px;left:0;position:absolute}}@media (min-width: 840px){.address-lookup[_ngcontent-%COMP%]{position:relative;width:500px;margin:0 auto;padding-top:50px}}.address-lookup[_ngcontent-%COMP%]   .address-title-desktop[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.address-lookup[_ngcontent-%COMP%]   .address-title-desktop[_ngcontent-%COMP%]{display:block}}.address-lookup[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{margin-top:20px}.account-edit-address[_ngcontent-%COMP%]{padding-top:0}@media (min-width: 840px){.account-edit-address[_ngcontent-%COMP%]{padding-top:50px}}.account-edit-address[_ngcontent-%COMP%]   .cancel-icon[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-edit-address[_ngcontent-%COMP%]   .cancel-icon[_ngcontent-%COMP%]{display:block;width:25px;top:60px;left:19px;position:absolute}}@media (min-width: 840px){.account-edit-address[_ngcontent-%COMP%]{position:relative;width:725px;margin:0 auto}}.account-edit-address[_ngcontent-%COMP%]   .address-title-desktop[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-edit-address[_ngcontent-%COMP%]   .address-title-desktop[_ngcontent-%COMP%]{display:block}}.account-edit-address[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{position:absolute;top:15px;font-size:35px;left:13px}"]}),e})();function qe(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"i",6),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().ResetOverlays()}),l.\u0275\u0275elementEnd()}}function He(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"option",28),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("value",e.Dial)("selected",n.details.personal_info.phone_number.country_code===e.Dial),l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate3("",e.Dial," ",e.Unicode," ",e.Name,"")}}const $e=function(e){return{invalid:e}},Ye=function(e){return{disabled:e}};function Ge(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"form",7,8),l.\u0275\u0275elementStart(2,"p",9),l.\u0275\u0275elementStart(3,"label",10),l.\u0275\u0275text(4,"First Name"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"input",11),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.contact.firstname=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"p",9),l.\u0275\u0275elementStart(7,"label",12),l.\u0275\u0275text(8,"Last Name"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(9,"input",13),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.contact.surname=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(10,"p",9),l.\u0275\u0275elementStart(11,"label",14),l.\u0275\u0275text(12,"Date of Birth"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(13,"input",15),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().dateOfBirthChange(t)}
1),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(14,"p",16),l.\u0275\u0275elementStart(15,"label",17),l.\u0275\u0275text(16,"Code"),l.\u0275\u0275elementStart(17,"select",18),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.personal_info.phone_number.country_code=t}),l.\u0275\u0275template(18,He,2,5,"option",19),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(19,"p",20),l.\u0275\u0275elementStart(20,"label",21),l.\u0275\u0275text(21,"Phone number"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(22,"input",22),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.personal_info.phone_number.number=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(23,"p",23),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().changeOverlay("passwordOverlay")}),l.\u0275\u0275elementStart(24,"label",24),l.\u0275\u0275text(25,"Password"),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(26,"input",25),l.\u0275\u0275element(27,"img",26),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(28,"button",27),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().emitData()}),l.\u0275\u0275text(29,"Save"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275reference(1),t=l.\u0275\u0275nextContext();l.\u0275\u0275advance(2),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(11,$e,t.invalidInput(t.details.contact.firstname)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.contact.firstname),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(13,$e,t.invalidInput(t.details.contact.surname)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.contact.surname),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(15,$e,!t.validateDob(t.dateOfBirth)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.dateOfBirth),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngModel",t.details.personal_info.phone_number.country_code),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngForOf",t.countryDialCodes),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngModel",t.details.personal_info.phone_number.number),l.\u0275\u0275advance(6),l.\u0275\u0275property("disabled",!t.validateDob(t.dateOfBirth)||!e.valid)("ngClass",l.\u0275\u0275pureFunction1(17,Ye,!e.valid||!t.validateDob(t.dateOfBirth)))}}function Xe(e,t){1&e&&(l.\u0275\u0275elementStart(0,"form",29,30),l.\u0275\u0275element(2,"reset-password",31),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(2),l.\u0275\u0275property("type","profile"))}function We(e,t){if(1&e&&l.\u0275\u0275element(0,"account-edit-address",32),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("profile",e.profile)("address",e.billingAddress)("update",e.update)("countries",e.countries)}}let Qe=(()=>{class e{constructor(e,t,n){this.elementRef=e,this.http=t,this.AccountOverviewUtils=n,this.billingAddress=[],this.overlayBools={passwordOverlay:!1,addressOverlay:!1},this.details={contact:{},personal_info:{date_of_birth:{day:null,month:null,year:null},phone_number:{country_code:"+44",number:void 0}}}}ngOnInit(){this.http.get("../info/phone_number_country_codes.json").subscribe(e=>{this.countryDialCodes=e}),this.profile&&(this.details.contact=(0,xe.Z)(this.profile.contact),this.profile.personal_info&&(this.profile.personal_info.date_of_birth?(this.details.personal_info.date_of_birth=(0,xe.Z)(this.profile.personal_info.date_of_birth),this.setDateOfBirth(this.details.personal_info.date_of_birth)):this.details.personal_info.date_of_birth={day:"",month:"",year:""},this.profile.personal_info.phone_number?this.details.personal_info.phone_number=(0,xe.Z)(this.profile.personal_info.phone_number):(this.details.personal_info.phone_number={},this.details.personal_info.phone_number.country_code="+44",this.details.personal_info.phone_number.number=null)))}ngOnDestroy(){}emitData(){this.update.next(["passFormData",{payload:this.details,type:"details"}])}emitOverlayData(e){this.ResetOverlays(),this.update.next(["passOverlayData",{payload:this.details,type:e}])}
1ResetOverlays(){Object.keys(this.overlayBools).forEach(e=>this.overlayBools[e]=!1)}dobEmptyCheck(){Object.values(this.details.personal_info.date_of_birth).every(e=>""==e)&&(this.details.personal_info.date_of_birth=null)}changeOverlay(e){switch(e){case"passwordOverlay":this.overlayBools.passwordOverlay=!0;break;case"addressOverlay":this.overlayBools.addressOverlay=!0}}detailsFormValidation(){return this.elementRef.nativeElement.getElementsByTagName("form").AccountDetailsForm.checkValidity()}invalidInput(e){return this.AccountOverviewUtils.invalidInput(e)}dateOfBirthChange(e){if(!e)return this.dateOfBirth=null,void(this.details.personal_info.date_of_birth=null);this.dateOfBirth=this.AccountOverviewUtils.dateOfBirthChange(e),this.details.personal_info.date_of_birth=this.dateOfBirth,this.organiseDateOfBirth()}organiseDateOfBirth(){if(this.dateOfBirth){let e=this.dateOfBirth.split("-");this.details.personal_info.date_of_birth={},this.details.personal_info.date_of_birth.year=Number(e[2]),this.details.personal_info.date_of_birth.month=Number(e[1]),this.details.personal_info.date_of_birth.day=Number(e[0])}else this.setDateOfBirth(this.details.personal_info.date_of_birth)}setDateOfBirth(e){if(e&&e.month){let t=[];[e.day,e.month,e.year].map((e,n)=>{2!==n&&1===e.toString().length&&(e=("0"+e).slice(-2)),t.push(e)}),this.dateOfBirth=t.join(" - ")}}validateDob(e){return this.AccountOverviewUtils.validateDob(e)}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(Me.eN),l.\u0275\u0275directiveInject(g.e))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-edit-details"]],inputs:{profile:"profile",update:"update",billingAddress:"billingAddress",title:"title",countries:"countries"},decls:6,vars:4,consts:[[1,"account-edit-details"],[1,"account-content","content"],["class","mdi mdi-chevron-left",3,"click",4,"ngIf"],["name","AccountDetailsForm","novalidate","",4,"ngIf"],["name","AccountPasswordForm","novalidate","",4,"ngIf"],[3,"profile","address","update","countries",4,"ngIf"],[1,"mdi","mdi-chevron-left",3,"click"],["name","AccountDetailsForm","novalidate",""],["AccountDetailsForm","ngForm"],[1,"thor-input","new-input",3,"ngClass"],["for","firstName"],["type","text","required","","placeholder","Name","id","firstName","name","firstName","max-length","50","text-filtering","",3,"ngModel","ngModelChange"],["for","lastName"],["type","text","required","","placeholder","Name","id","lastName","name","lastName","max-length","50","text-filtering","",3,"ngModel","ngModelChange"],["for","dateOfBirth"],["type","text","inputmode","decimal","id","dateOfBirth","placeholder","dd - mm - yyyy","name","dateOfBirth","minlength","14","maxlength","14","text-filtering","",3,"ngModel","ngModelChange"],[1,"thor-input","new-input","country-code"],["for","country"],["id","countryCode","name","countryCode",3,"ngModel","ngModelChange"],["required","",3,"value","selected",4,"ngFor","ngForOf"],[1,"thor-input","new-input","phone-number"],["for","number"],["type","text","inputmode","tel","placeholder","Add Number","id","number","name","number","max-length","20","text-filtering","",3,"ngModel","ngModelChange"],[1,"thor-input","new-input","password",3,"click"],["for","password"],["type","text","required","","id","password","name","password","value","\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","max-length","20","text-filtering",""],["imgSrc","img/template/arrow-right.svg"],[1,"btn-thor-orange",3,"disabled","ngClass","click"],["required","",3,"value","selected"],["name","AccountPasswordForm","novalidate",""],["AccountPasswordForm","ngForm"],[3,"type"],[3,"profile","address","update","countries"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275template(2,qe,1,0,"i",2),l.\u0275\u0275template(3,Ge,30,19,"form",3),l.\u0275\u0275template(4,Xe,3,1,"form",4),l.\u0275\u0275template(5,We,1,4,"account-edit-address",5),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",t.overlayBools.passwordOverlay||t.overlayBools.addressOverlay),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!t.overlayBools.passwordOverlay&&!t.overlayBools.addressOverlay),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.overlayBools.passwordOverlay),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.overlayBools.addressOverlay))},directives:[i.O5,ve._Y,ve.JL,ve.F,i.mk,ve.Fj,ve.Q7,ve.JJ,ve.On,ve.wO,ve.nD,ve.EJ,i.sg,M.t1,ve.YN,ve.Kr,be.t,Be],styles:[".account-edit-details[_ngcontent-%COMP%]   .new-input.country-code[_ngcontent-%COMP%]{display:inline-block;width:35%;margin-right:2%}.account-edit-details[_ngcontent-%COMP%]   .new-input.country-code[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{font-size:16px;height:33px;padding:0 16px 0 0;-webkit-appearance:none;background-image:url(https://images-fe.thortful.com/img/template/arrow-right.svg);background-position:98% center;background-size:17px 17px;background-repeat:no-repeat;-moz-appearance:none;-webkit-box-shadow:none;box-shadow:none;border-radius:2px}@media (min-width: 769px){.account-edit-details[_ngcontent-%COMP%]   .new-input.country-code[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{height:34px}}@media (min-width: 1200px){.account-edit-details[_ngcontent-%COMP%]   .new-input.country-code[_ngcontent-%COMP%]{width:35%;margin-right:3%}}.account-edit-details[_ngcontent-%COMP%]   .new-input.phone-number[_ngcontent-%COMP%]{display:inline-block;width:63%;vertical-align:top;height:57px}@media (min-width: 1200px){.account-edit-details[_ngcontent-%COMP%]   .new-input.phone-number[_ngcontent-%COMP%]{width:62%}}@media (min-width: 769px){.account-edit-details[_ngcontent-%COMP%]   .new-input.password[_ngcontent-%COMP%]{display:none}}.account-edit-details.billing-address[_ngcontent-%COMP%]   input[type=text].billing-address-input[_ngcontent-%COMP%]{text-overflow:ellipsis;max-width:27ch}.account-edit-details[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{position:absolute;top:26px;font-size:35px;left:94%}.account-edit-details[_ngcontent-%COMP%]   .date-of-birth-form[_ngcontent-%COMP%]   .form[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.account-edit-details[_ngcontent-%COMP%]   .date-of-birth-form[_ngcontent-%COMP%]   .form[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:25%}.account-edit-details[_ngcontent-%COMP%]   .btn-thor-orange[_ngcontent-%COMP%]{display:block;text-align:center;width:100%}.account-edit-details[_ngcontent-%COMP%]   .mdi-chevron-left[_ngcontent-%COMP%]{font-size:37px;position:absolute;top:10px;left:4%}"]}),e})();var Je=n(89886);function Ze(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",24),l.\u0275\u0275elementStart(1,"div",25),l.\u0275\u0275text(2,"Date of birth"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div"),l.\u0275\u0275text(4),l.\u0275\u0275pipe(5,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=t.ngIf;l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(5,1,e.year+"-"+e.month+"-"+e.day,"d MMMM"))}}function Ke(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",24),l.\u0275\u0275elementStart(1,"div",25),l.\u0275\u0275text(2,"Phone number"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div"),l.\u0275\u0275text(4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=t.ngIf;l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate2("",e.country_code," ",e.number,"")}}function et(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",23),l.\u0275\u0275elementStart(1,"div",24),l.\u0275\u0275elementStart(2,"div",25),l.\u0275\u0275text(3,"Name"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"div"),l.\u0275\u0275text(5),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(6,Ze,6,4,"div",26),l.\u0275\u0275template(7,Ke,5,2,"div",26),l.\u0275\u0275elementStart(8,"div",27),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().toggleEditDesktop("info")}),l.\u0275\u0275text(9,"Edit"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate2("",e.profile.contact.firstname," ",e.profile.contact.surname,""),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",(null==e.profile.personal_info||null==e.profile.personal_info.date_of_birth?null:e.profile.personal_info.date_of_birth.month)&&(null==e.profile.personal_info?null:e.profile.personal_info.date_of_birth)),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",(null==e.profile.personal_info||null==e.profile.personal_info.phone_number||null==e.profile.personal_info.phone_number.number?null:e.profile.personal_info.phone_number.number.length)&&(null==e.profile.personal_info?null:e.profile.personal_info.phone_number))}}function tt(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",28),l.\u0275\u0275elementStart(1,"account-edit-details",29),l.\u0275\u0275listener("profileChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().profile=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("profile",e.profile)("title","")("billingAddress",e.billingAddressObj)("update",e.update)("countries",e.countries)}}function nt(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",23),l.\u0275\u0275elementStart(1,"div",24),l.\u0275\u0275elementStart(2,"div",25),l.\u0275\u0275text(3,"Password"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"div"),l.\u0275\u0275text(5,"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"div",27),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().toggleEditDesktop("password")}),l.\u0275\u0275text(7,"Edit"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}}function it(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",30),l.\u0275\u0275elementStart(1,"div",24),l.\u0275\u0275elementStart(2,"div",25),l.\u0275\u0275text(3,"Password"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"reset-password",31),l.\u0275\u0275listener("closeOverlay",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closePassword()}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}2&e&&(l.\u0275\u0275advance(4),l.\u0275\u0275property("type","profile"))}function rt(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",34),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit;l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e)}}function ot(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",23),l.\u0275\u0275elementStart(1,"div",32),l.\u0275\u0275elementStart(2,"div",25),l.\u0275\u0275text(3,"Billing address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(4,rt,2,1,"div",33),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(4),l.\u0275\u0275property("ngForOf",e.billingAddress)}}function at(e,t){1&e&&l.\u0275\u0275element(0,"div",23)}function st(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",46),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit;l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e)}}function ct(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",39),l.\u0275\u0275elementStart(1,"div",40),l.\u0275\u0275text(2,"HOME"),l.\u0275\u0275elementStart(3,"div",3),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(2).editAddress(t)}),l.\u0275\u0275element(4,"thor-ico",4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",41),l.\u0275\u0275template(6,st,2,1,"div",42),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"div",43),l.\u0275\u0275elementStart(8,"div",44),l.\u0275\u0275listener("click",function(t){const n=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(2).openDeletePopup(t,n.id)}),l.\u0275\u0275text(9,"Delete"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(10,"div",45),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(2).editAddressDesktop(t)}),l.\u0275\u0275text(11,"Edit"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit;l.\u0275\u0275advance(6),l.\u0275\u0275property("ngForOf",e.address)}}function dt(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",35),l.\u0275\u0275elementStart(1,"div",36),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().newAddressDesktop()}),l.\u0275\u0275elementStart(2,"div",37),l.\u0275\u0275elementStart(3,"div",13),l.\u0275\u0275text(4,"+"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"h6"),l.\u0275\u0275text(6,"Add new address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(7,ct,12,1,"div",38),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass","add-button"),l.\u0275\u0275advance(6),l.\u0275\u0275property("ngForOf",e.homeAddresses)}}const lt=function(){return[250,250,250,250,250]};function pt(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",47),l.\u0275\u0275elementStart(1,"div",48),l.\u0275\u0275elementStart(2,"div"),l.\u0275\u0275elementStart(3,"div",36),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().newAddressDesktop()}),l.\u0275\u0275elementStart(4,"div",37),l.\u0275\u0275elementStart(5,"div",13),l.\u0275\u0275text(6,"+ "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"h6"),l.\u0275\u0275text(8,"Add new address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}2&e&&(l.\u0275\u0275advance(1),l.\u0275\u0275property("itemsNumber",l.\u0275\u0275pureFunction0(3,lt))("spacing",15),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngClass","add-button"))}const mt=function(e){return{active:e}};let gt=(()=>{class e{constructor(e,t,n,i,r,o,a){this.elementRef=e,this.ShareData=t,this.Notification=n,this.ProfileUtils=i,this.UserUtils=r,this.AccountAddressesUtils=o,this.AccountOverviewUtils=a,this.editToggles={detailsEdit:!1,passwordEdit:!1,billingAddressEdit:!1},this.details={contact:{},address:{},personal_info:{date_of_birth:void 0,phone_number:{country_code:void 0,number:void 0}}},this.password={old_password:"",new_password:""},this.headerHight=0,this.headerTranslate=0,this.scrollOffset=0,this.homeAddresses=[],this.primaryAddress=!0,this.billingAddressObj={}}ngOnInit(){this.setDetails(),this.getBillingAddress()}ngOnChanges(e){if(e.formData&&e.formData.currentValue){let t=e.formData.currentValue;switch(e.formData.currentValue.type){case"new":this.saveNewAddress(t.payload);break;case"update":this.changeAddress(t.id,t.payload);break;case"delete":this.deleteAddress(t.id);break;case"details":this.updateProfileInfo(t.payload)}}e.profile&&e.profile.currentValue&&this.setDetails(),e.device&&this.toggleAllEdits()}setDetails(){this.billingAddress=this.getBillingAddress(),this.homeAddresses=this.getHomeAddress(),this.profile&&(this.details.contact=(0,xe.Z)(this.profile.contact),this.profile.personal_info&&(this.details.personal_info=(0,xe.Z)(this.profile.personal_info),this.profile.personal_info.date_of_birth&&(this.details.personal_info.date_of_birth=(0,xe.Z)(this.profile.personal_info.date_of_birth))),this.details.personal_info.phone_number||(this.details.personal_info.phone_number={},this.details.personal_info.phone_number.country_code="+
144",this.details.personal_info.phone_number.number=null))}toggleEditDesktop(e){switch(e){case"info":this.editToggles.detailsEdit=!this.editToggles.detailsEdit;break;case"password":this.editToggles.passwordEdit=!this.editToggles.passwordEdit;break;case"billingAddress":this.editToggles.billingAddressEdit=!this.editToggles.billingAddressEdit}}toggleAllEdits(){Object.keys(this.editToggles).forEach(e=>this.editToggles[e]=!1)}editInfo(){this.update.next(["details",this.billingAddressObj])}editAddress(e){this.update.next(["address",e])}addNewAddress(){let e=this.initNewHomeFillAddress();this.update.next(["new address",{address:e,homefill:!0}])}editAddressDesktop(e){this.update.next(["editAddressDesktop",e])}newAddressDesktop(){let e=this.initNewHomeFillAddress();this.update.next(["newAddressDesktop",{address:e,homefill:!0}])}initNewHomeFillAddress(){let e=this.AccountAddressesUtils.initEmptyAddressObj();return e.recipient=this.profile.contact.firstname+" "+this.profile.contact.surname,e.country_code="GB",e}getBillingAddress(){let e=this.profile.addresses.find(e=>e.source&&"BILLING_ADDRESS"==e.source.origin||e.address_types&&e.address_types.indexOf("BILLING_ADDRESS")>=0);return this.billingAddressObj=e,e&&this.addressFormation(e,"billing")}getHomeAddress(){return this.profile.addresses.filter(e=>e.source&&"HOME_FILL"==e.source.origin||e.address_types&&e.address_types.indexOf("DELIVERY_ADDRESS_HOME_FILL")>=0).map((e,t)=>(e.primary=0==t,e.address=this.addressFormation(e,"home"),e))}addressFormation(e,t){return[e.recipient,"billing"!==t?[e.address1,e.address2,e.address3].filter(e=>e).join(", "):e.address1,e.address2,e.address3,[e.city,e.postcode].filter(e=>e).join(", "),,e.state,e.country].filter(e=>e)}updateProfileInfo(e){let t=e||this.details;t.personal_info.phone_number.number||(t.personal_info.phone_number=null),(!t.personal_info.date_of_birth||!t.personal_info.date_of_birth.month)&&(t.personal_info.date_of_birth=null),this.ProfileUtils.putEditableContent(t).then(e=>{e&&(this.profile.contact=t.contact,this.profile.personal_info=t.personal_info,this.setDetails(),this.Notification.success("profileUpdateSuccess"))}).catch(e=>{this.ShareData.trigger("showError","profileUpdateError")}),("tablet"===this.device||"desktop"===this.device||"desktop-large"===this.device)&&this.toggleEditDesktop("info")}changeAddress(e,t){let n;n=e||this.billingAddressObj.id,this.AccountAddressesUtils.editAddress(n,t||this.billingAddressObj||this.addressPayload).then(e=>{this.profile.addresses.some((t,n)=>{if(e.id===t.id)return this.profile.addresses[n]=e,!0}),this.setDetails(),this.Notification.success("Your address was successfully updated!")}).catch(e=>{this.ShareData.trigger("showError","updateAddressError")}),("tablet"===this.device||"desktop"===this.device||"desktop-large"===this.device)&&this.editToggles.billingAddressEdit&&this.toggleEditDesktop("billingAddress")}saveNewAddress(e){let t=e||this.details.address;t.address_types=["DELIVERY_ADDRESS_HOME_FILL"],this.AccountAddressesUtils.postAddress(t).then(e=>{this.profile.addresses.push(e),this.setDetails(),this.Notification.success("Your address was successfully added!")}).catch(e=>{this.Notification.error(e.data.code)})}deleteAddress(e){this.deleteAddressPopupVisible=!1,this.UserUtils.deleteAddress(e).then(t=>{this.profile.addresses.some((t,n)=>{if(t.id===e)return this.profile.addresses.splice(n,1),!0}),this.setDetails(),this.Notification.success("addressDeleteSuccess")}).catch(e=>{this.Notification.warning(e.data.code),console.log(e)})}closePassword(){this.editToggles.passwordEdit=!1}openDeletePopup(e,t){e.stopPropagation(),this.addressIdToDelete=t,this.deleteAddressPopupVisible=!0}closeDeletePopup(){this.deleteAddressPopupVisible=!1}ngOnDestroy(){}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(m.P),l.\u0275\u0275directiveInject(h.R),l.\u0275\u0275directiveInject(u.f),l.\u0275\u0275directiveInject(_e.g),l.\u0275\u0275directiveInject(g.e))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-details"]],inputs:{className:"className",profile:"profile",update:"update",formData:"formData",device:"device",countries:"countries"},features:[l.\u0275\u0275NgOnChangesFeature],decls:38,vars:13,consts:[[1,"account-details"],[1,"account-content","content"],[1,"title"],[1,"icon",3,"click"],["p","pencil","className","orange"],[1,"container","content"],["class","column",4,"ngIf"],["class","column form",4,"ngIf"],["class","column password",4,"ngIf"],[1,"title","delivery"],["class","home-address content",4,"ngIf"],["class","home-address",4,"ngIf"],[1,"add-address","text-center",3,"click"],[1,"plus-icon"],[1,"update-form","card-delete",3,"ngClass"],[1,"update-form-inner","active",3,"clickOutside"],[1,"cross-container",3,"click"],[3,"p"],[1,"question"],[1,"delete-buttons"],["href","javascript:;",1,"btn-thor-white",3,"click"],["href","javascript:;
1",1,"btn-thor-orange",3,"click"],[1,"note"],[1,"column"],[1,"details-line"],[1,"label","w700"],["class","details-line",4,"ngIf"],[1,"btn-thor-white",3,"click"],[1,"column","form"],[3,"profile","title","billingAddress","update","countries","profileChange"],[1,"column","password"],[3,"type","closeOverlay"],[1,"details-line","billing-address"],["class","address-info",4,"ngFor","ngForOf"],[1,"address-info"],[1,"home-address","content"],[1,"box",3,"ngClass","click"],[1,"inner-button","text-center"],["class","box",4,"ngFor","ngForOf"],[1,"box"],[1,"title-1"],[1,"address"],["class","line",4,"ngFor","ngForOf"],[1,"buttons"],[1,"btn-thor-white","delete",3,"click"],[1,"btn-thor-white","edit",3,"click"],[1,"line"],[1,"home-address"],["dynamic-carousel","","carouselId","address-carousel",1,"address-carousel",3,"itemsNumber","spacing"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275elementStart(2,"h4",2),l.\u0275\u0275text(3,"My Info"),l.\u0275\u0275elementStart(4,"div",3),l.\u0275\u0275listener("click",function(){return t.editInfo()}),l.\u0275\u0275element(5,"thor-ico",4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"div",5),l.\u0275\u0275template(7,et,10,4,"div",6),l.\u0275\u0275template(8,tt,2,5,"div",7),l.\u0275\u0275template(9,nt,8,0,"div",6),l.\u0275\u0275template(10,it,5,1,"div",8),l.\u0275\u0275template(11,ot,5,1,"div",6),l.\u0275\u0275template(12,at,1,0,"div",6),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(13,"div",1),l.\u0275\u0275elementStart(14,"h4",9),l.\u0275\u0275text(15),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(16,dt,8,2,"div",10),l.\u0275\u0275template(17,pt,9,4,"div",11),l.\u0275\u0275elementStart(18,"div",1),l.\u0275\u0275elementStart(19,"div",12),l.\u0275\u0275listener("click",function(){return t.addNewAddress()}),l.\u0275\u0275elementStart(20,"span",13),l.\u0275\u0275text(21,"+"),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(22,"Add address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(23,"div",14),l.\u0275\u0275elementStart(24,"div",15),l.\u0275\u0275listener("clickOutside",function(){return t.closeDeletePopup()}),l.\u0275\u0275elementStart(25,"div",16),l.\u0275\u0275listener("click",function(){return t.closeDeletePopup()}),l.\u0275\u0275element(26,"thor-ico",17),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(27,"p",18),l.\u0275\u0275text(28,"Are you sure you want to delete this address?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(29,"div",19),l.\u0275\u0275elementStart(30,"a",20),l.\u0275\u0275listener("click",function(){return t.deleteAddress(t.addressIdToDelete)}),l.\u0275\u0275text(31,"Yes"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(32,"a",21),l.\u0275\u0275listener("click",function(){return t.closeDeletePopup()}),l.\u0275\u0275text(33,"No"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(34,"p",22),l.\u0275\u0275elementStart(35,"strong"),l.\u0275\u0275text(36,"Note: "),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(37,"This action cannot be undone."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(7),l.\u0275\u0275property("ngIf",!t.editToggles.detailsEdit),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.editToggles.detailsEdit),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!t.editToggles.passwordEdit),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.editToggles.passwordEdit),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.billingAddress&&!t.editToggles.billingAddressEdit),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.editToggles.billingAddressEdit),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate1("My delivery address",t.homeAddresses.length>2?"es":"",""),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.homeAddresses.length),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!t.homeAddresses.length),l.\u0275\u0275advance(6),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(11,mt,t.deleteAddressPopupVisible)),l.\u0275\u0275advance(3),l.\u0275\u0275property("p","cross"))},directives:[Pe.n,i.O5,i.mk,Oe.L,Qe,be.t,i.sg,Je.f],pipes:[i.uU],styles:[".account-details[_ngcontent-%COMP%]   .account-content[_ngcontent-%COMP%]{padding:0 20px}@media (min-width: 769px){.account-details[_ngcontent-%COMP%]   .account-content[_ngcontent-%COMP%]{padding:0 10px}}@media (min-width: 992px){.account-details[_ngcontent-%COMP%]   .account-content[_ngcontent-%COMP%]{padding:0 25px}}.account-details[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{padding:0 20px;display:block}@media (min-width: 769px){.account-details[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{padding:0 10px}}@media (min-width: 992px){.account-details[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{padding:0 25px}}.account-details[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]{margin-right:10%}.account-details[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .column.form[_ngcontent-%COMP%]{margin-left:-17px}@media (min-width: 992px){.account-details[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .column.form[_ngcontent-%COMP%]{width:335px}}@media (min-width: 840px){.account-details[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}}.account-details[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .btn-thor-white[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-details[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .btn-thor-white[_ngcontent-%COMP%]{display:block;width:90px;height:30px;line-height:30px;padding:0 30px}}.account-details[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:18px}.account-details[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:28px;height:18px;margin-top:4px;margin-left:7px}@media (min-width: 840px){.account-details[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:none}}.account-details[_ngcontent-%COMP%]   .title.delivery[_ngcontent-%COMP%]{margin-top:70px;margin-bottom:16px}.account-details[_ngcontent-%COMP%]   .details-line[_ngcontent-%COMP%]{width:100%;margin-bottom:23px}.account-details[_ngcontent-%COMP%]   .details-line[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{font-size:16px;margin-bottom:9px}.account-details[_ngcontent-%COMP%]   .details-line[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{font-size:16px}.account-details[_ngcontent-%COMP%]   .details-line.billing-address[_ngcontent-%COMP%]{margin-bottom:40px}.account-details[_ngcontent-%COMP%]   .details-line.billing-address[_ngcontent-%COMP%]   .address-info[_ngcontent-%COMP%]{font-size:16px;margin-bottom:5px}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]{padding:0 25px}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]{display:inline-block;margin-right:15px;margin-bottom:15px;width:250px;min-height:165px;border:solid 1px black;border-radius:3px;padding:14px 5px 14px 18px;vertical-align:top}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box.add-button[_ngcontent-%COMP%]{display:none!important}@media (min-width: 840px){.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box.add-button[_ngcontent-%COMP%]{cursor:pointer;border-color:#ff6900;display:inline-block!important}}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box.add-button[_ngcontent-%COMP%]   .inner-button[_ngcontent-%COMP%]{position:relative;margin-top:133px;top:-60px}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box.add-button[_ngcontent-%COMP%]   .inner-button[_ngcontent-%COMP%]   .plus-icon[_ngcontent-%COMP%]{width:58px;height:58px;line-height:58px;font-size:43px;font-weight:100;margin-bottom:10px}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box.add-button[_ngcontent-%COMP%]   .inner-button[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{color:#ff6900;padding-top:5px;margin-right:10px;font-size:16px}@media (min-width: 840px){.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:none}}@media (min-width: 840px){.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]{width:250px;height:270px}}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .title-1[_ngcontent-%COMP%]{color:#ff6900;font-weight:700;margin-bottom:5px}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .title-1[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{float:right;width:28px}@media (min-width: 840px){.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .address[_ngcontent-%COMP%]{height:150px}}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .address[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{white-space:normal;font-size:16px;line-height:21px;letter-spacing:.2px;max-width:24ch;overflow:hidden;text-overflow:ellipsis}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .address[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]:first-child{font-weight:700}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .address[_ngcontent-%COMP%]   .radio[_ngcontent-%COMP%]{font-size:14px}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]{display:block;margin:30px 0 0 7px}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:90px;height:30px;line-height:30px;padding:0 22px}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .delete[_ng
1content-%COMP%]{margin-right:19px}.account-details[_ngcontent-%COMP%]   .home-address[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .edit[_ngcontent-%COMP%]{padding:0 30px}}.account-details[_ngcontent-%COMP%]   .add-address[_ngcontent-%COMP%]{border:solid 1px #ff6900;border-radius:3px;height:50px;padding:12px;color:#ff6900;font-size:16px;font-weight:700}@media (min-width: 840px){.account-details[_ngcontent-%COMP%]   .add-address[_ngcontent-%COMP%]{display:none}}.account-details[_ngcontent-%COMP%]   .plus-icon[_ngcontent-%COMP%]{background-color:#ff6900;color:#fff;border-radius:200px;height:25px;width:25px;display:inline-block;margin-right:6.3px;font-weight:300;font-size:21px;vertical-align:middle;padding:0 6.7px}"]}),e})();var ut=n(64084),ht=n(47435),ft=n(28591);function Ct(e,t){1&e&&(l.\u0275\u0275elementStart(0,"p",7),l.\u0275\u0275text(1,"You don't have any previous orders."),l.\u0275\u0275elementEnd())}const xt=function(e){return[null,e]};function _t(e,t){if(1&e&&l.\u0275\u0275element(0,"img",23),2&e){const e=l.\u0275\u0275nextContext(2).$implicit,t=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("src",e.isCardPack?t.cardPackImages[e.format]:e.cards[0].image.medium,l.\u0275\u0275sanitizeUrl)("card-alt-text",l.\u0275\u0275pureFunction1(2,xt,null==e||null==e.cards[0]||null==e.cards[0].card||null==e.cards[0].card.owner||null==e.cards[0].card.owner.public_profile?null:e.cards[0].card.owner.public_profile.nickname))}}function Pt(e,t){1&e&&l.\u0275\u0275element(0,"img",24)}function Ot(e,t){1&e&&l.\u0275\u0275element(0,"span")}const Mt=function(e){return{portrait:e}};function vt(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",25),l.\u0275\u0275elementStart(1,"div",26),l.\u0275\u0275text(2),l.\u0275\u0275pipe(3,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"div",27),l.\u0275\u0275text(5,"XTRAthortful Subscription"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2).$implicit;l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(5,Mt,"PORTRAIT"==e.cards[0].orientation)),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate1("Purchased ",l.\u0275\u0275pipeBind2(3,2,e.created,"dd MMM y")," ")}}function bt(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",25),l.\u0275\u0275elementStart(1,"div",26),l.\u0275\u0275text(2),l.\u0275\u0275pipe(3,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"div",28),l.\u0275\u0275text(5),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"div",29),l.\u0275\u0275text(7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"div",27),l.\u0275\u0275text(9),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(10,"div",30),l.\u0275\u0275text(11),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2).$implicit;l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(9,Mt,"PORTRAIT"==e.cards[0].orientation)),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(3,6,e.created,"dd MMM y")),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(e.delivery_address.recipient),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate1("\xa3",e.final_cost.toFixed(2),""),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.productName),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.dis
1playStatus)}}const yt=function(e){return{landscape:e}};function wt(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",16),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext().$implicit,n=l.\u0275\u0275nextContext().$implicit;return l.\u0275\u0275nextContext(2).showOrder(t,n)}),l.\u0275\u0275elementStart(1,"div",17),l.\u0275\u0275template(2,_t,1,4,"img",18),l.\u0275\u0275template(3,Pt,1,0,"img",19),l.\u0275\u0275template(4,Ot,1,0,"span",20),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(5,vt,6,7,"div",21),l.\u0275\u0275template(6,bt,12,11,"div",21),l.\u0275\u0275element(7,"div",22),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext().$implicit;l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(7,yt,"LANDSCAPE"==e.cards[0].orientation)),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isSubscription),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isSubscription),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.cardsQuantity>1),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isSubscription),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isSubscription),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(9,Mt,"PORTRAIT"==e.cards[0].orientation))}}function St(e,t){if(1&e&&l.\u0275\u0275element(0,"img",23),2&e){const e=l.\u0275\u0275nextContext(2).$implicit,t=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("src",e.isCardPack?t.cardPackImages[e.format]:e.cards[0].image.medium,l.\u0275\u0275sanitizeUrl)("card-alt-text",l.\u0275\u0275pureFunction1(2,xt,null==e||null==e.cards[0]||null==e.cards[0].card||null==e.cards[0].card.owner||null==e.cards[0].card.owner.public_profile?null:e.cards[0].card.owner.public_profile.nickname))}}function kt(e,t){1&e&&l.\u0275\u0275element(0,"img",24)}function Et(e,t){1&e&&l.\u0275\u0275element(0,"span")}function It(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275elementStart(1,"div",36),l.\u0275\u0275text(2),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",27),l.\u0275\u0275text(4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",30),l.\u0275\u0275text(6),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"button",37),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2).$implicit,n=l.\u0275\u0275nextContext().$implicit;return l.\u0275\u0275nextContext(2).showOrder(t,n)}),l.\u0275\u0275text(8,"See Order"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementContainerEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2).$implicit;l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.delivery_address.recipient),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate2("",e.productName," / \xa3",e.final_cost.toFixed(2),""),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.dis
1playStatus)}}function Dt(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275elementStart(1,"div",38),l.\u0275\u0275text(2,"XTRAthortful Subscription"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"button",37),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2).$implicit,n=l.\u0275\u0275nextContext().$implicit;return l.\u0275\u0275nextContext(2).showOrder(t,n)}),l.\u0275\u0275text(4,"Manage subscription"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementContainerEnd()}}function At(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",31),l.\u0275\u0275elementStart(1,"div",32),l.\u0275\u0275elementStart(2,"div",33),l.\u0275\u0275text(3),l.\u0275\u0275pipe(4,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",34),l.\u0275\u0275elementStart(6,"div",35),l.\u0275\u0275template(7,St,1,4,"img",18),l.\u0275\u0275template(8,kt,1,0,"img",19),l.\u0275\u0275template(9,Et,1,0,"span",20),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(10,It,9,4,"ng-container",20),l.\u0275\u0275template(11,Dt,5,0,"ng-container",20),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext().$implicit;l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(4,7,e.created,"dd MMM y")),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(10,yt,"LANDSCAPE"==e.cards[0].orientation)),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isSubscription),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isSubscription),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.cardsQuantity>1),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isSubscription),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isSubscription)}}function Ft(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",13),l.\u0275\u0275template(1,wt,8,11,"div",14),l.\u0275\u0275template(2,At,12,12,"div",15),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.isMobile),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.isMobile)}}function jt(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",11),l.\u0275\u0275template(1,Ft,3,2,"div",12),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit;l.\u0275\u0275advance(1),l.\u0275\u0275property("ngForOf",e.orders)}}function Ut(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",8),l.\u0275\u0275elementStart(1,"h2",9),l.\u0275\u0275text(2),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(3,jt,2,1,"div",10),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit;l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.month),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngForOf",e.orders)}}function Vt(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",39),l.\u0275\u0275text(1,"Loading ..."),l.\u0275\u0275elementEnd())}let Nt=(()=>{class e{constructor(e,t,n,i,r,o,a,s){this.elementRef=e,this.ShareData=t,this.Notification=n,this.Authentication=i,this.OrdersUtils=r,this.GeneralUtils=o,this.route=a,this.router=s,this.ordersLoaded=!1,this.months=this.GeneralUtils.fullMonths,this.groupedOrders=[],this.inProgress=!1,this.isMobile=!0,this.cardPackImages={},this.cardsFormat=["A4","A5","A6"],this.scrollEvent=()=>{let e=document.getElementById("end-of-list");if(e&&this.GeneralUtils.offsetPosition(e)<2*window.innerHeight+window.scrollY&&this.data&&this.data.totalPages&&this.data.totalPages>=this.data.page+1){if(this.inProgress)return!1;this.inProgress=!0,this.getOrders().then(e=>{this.inProgress=!1})}},this.selectUpdatingTextItem=(e,t,n)=>{this.currentCard=this.orders.orders[e].orders[t].cards[n],this.showThorText=!0,this.orderId=this.orders.orders[e].id,this.itemId=this.orders.orders[e].orders[t].id,this.cardId=this.orders.orders[e].orders[t].cards[n].id}}onResize(){this.scrollEvent()}onScroll(){this.scrollEvent()}ngOnInit(){this.isMobile=this.ShareData.getProperty("device").indexOf("mobile")>=0,this.event1=this.ShareData.listen("device-change",e=>{this.isMobile=e.indexOf("mobile")>=0}
1),this.idParam=this.route.snapshot.queryParamMap.get("order_id"),this.getCardPackImages()}ngOnChanges(e){e.data&&(this.groupedOrders=this.data.groupedOrders,this.init())}ngOnDestroy(){}init(){this.getOrders().then(this.scrollEvent)}getOrders(){return this.loading=!0,this.OrdersUtils.getOrders(this.data.page).then(e=>{this.data.page++,this.data.totalPages=e.total_pages,e.orders.map(e=>{if(e.orders.map(t=>{if(t.displayStatus=this.getOrderStatus(t.status,e.status,t.order_delivery.dispatch_type),t.cardsQuantity=t.cards.map(e=>e.quantity).reduce((e,t)=>e+t),this.idParam&&t.id===this.idParam&&this.showOrder(t,e),t.cards.every(e=>this.cardsFormat.includes(e.format)&&e.format===t.cards[0].format)){const e=t.cards[0].format;t.productName="A6"===e?`${t.cardsQuantity} Pack${t.cardsQuantity>1?"s":""} of A6 cards`:`${t.cardsQuantity} ${e} Card${t.cardsQuantity>1?"s":""}`}else t.cards[0].item_options[0]?(t.format.includes("CARDPACK")?(t.isCardPack=!0,t.productName="Card Pack"):t.productName="A5 Card + Gift",t.productName=t.cardsQuantity>1?t.productName+` (+${t.cardsQuantity-1})`:`1 ${t.productName}`,t.format.includes("XTRATHORTFUL")&&(t.isSubscription=!0)):t.productName=t.cardsQuantity>1?`${t.format} Card (+${t.cardsQuantity-1})`:`${t.format} Card`}),this.groupedOrders.length){let t=this.groupedOrders[this.groupedOrders.length-1];t.month===this.getOrderDate(e.created)?t.orders.push(e):this.createOrderGroup(e)}else this.createOrderGroup(e);this.loading=!1})}).catch(e=>{this.loading=!1,this.Notification.error("serverError")})}createOrderGroup(e){let t={month:this.getOrderDate(e.created),orders:[e]};this.groupedOrders.push(t)}getOrderDate(e){let t=new Date(e).getFullYear();return this.months[new Date(e).getMonth()]+" "+t}showOrder(e,t){var n;(null==e?void 0:e.isSubscription)?this.router.navigate(["/account/xtrathortful"]):(null===(n=null==t?void 0:t.orders)||void 0===n?void 0:n.find(e=>null==e?void 0:e.format.includes("XTRATHORTFUL")))?this.router.navigate(["/info/help/contact-us"]):this.update.next([this.isMobile?"order":"orderDesktop",[e,t,this.isMobile]])}toggleUpdatePopup(e){for(let t=0;t<this.orders.orders.length;t++)for(let n=0;n<this.orders.orders[t].orders.length;n++)if(e.id===this.orders.orders[t].orders[n].id){this.orders.orders[t].orders[n].updatable_flag=!0,this.updatableOrderModel=this.OrdersUtils.constructAddressObject(this.orders.orders[t].orders[n].delivery_address);break}}updatePaidOrderAddress(e){let t;for(let n=0;n<this.orders.orders.length;n++)for(let i=0;i<this.orders.orders[n].orders.length;i++)if(e.id===this.orders.orders[n].orders[i].id){t=this.orders.orders[n].orders[i];break}this.OrdersUtils.updatePaidOrderAddress(t,this.updatableOrderModel).then(e=>{for(let t=0;t<this.orders.orders.length;t++)for(let e=0;e<this.orders.orders[t].orders.length;e++)this.orders.orders[t].orders[e].updatable_flag=!1;this.Notification.success("Your order was successfully updated!"),this.getOrders()}).catch(e=>{this.ShareData.trigger("showError","orderUpdateError")})}trackByFunction(e,t){return t?null:e}getOrderStatus(e,t,n){return this.OrdersUtils.getOrderStatus(e,t,n)}getCardPackImages(){return this.GeneralUtils.serviceOptions.then(e=>{const t={};e.card_variations.forEach(e=>{e.available_options.forEach(e=>{var n,i;if(e.printer_format.includes("CARDPACK")){const r=e.product_assets.find(e=>"gifting"===e.name);t[e.printer_format]=null===(i=null===(n=null==r?void 0:r.images)||void 0===n?void 0:n[0])||void 0===i?void 0:i.image}})}),this.cardPackImages=t})}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(m.P),l.\u0275\u0275directiveInject(ut.Vy),l.\u0275\u0275directiveInject(ht.P),l.\u0275\u0275directiveInject(P.w),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(r.F0))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-orders"]],hostBindings:function(e,t){1&e&&l.\u0275\u0275listener("resize",function(e){return t.onResize(e)},!1,l.\u0275\u0275resolveWindow)("scroll",function(e){return t.onScroll(e)},!1,l.\u0275\u0275resolveWindow)},inputs:{data:"data",update:"update"},features:[l.\u0275\u0275NgOnChangesFeature],decls:9,vars:3,consts:[[1,"account-orders"],[1,"content"],["class","no-mb",4,"ngIf"],[1,"grouped-orders"],["class","grouped-orders-content",4,"ngFor","ngForOf"],["id","end-of-list"],["class","loading",4,"ngIf"],[1,"no-mb"],[1,"grouped-orders-content"],[1,"grouped-orders-month"],["class","grouped-orders-display",4,"ngFor","ngForOf"],[1,"grouped-orders-display"],["class","orders",4,"ngFor","ngForOf"],[1,"orders"],["class","two-cols",3,"click",4,"ngIf"],["class","box text-center",4,"ngIf"],[1,"two-cols",3,"click"],[1,"order-image",3,"ngClass"],[3,"src","card-alt-text",4,"ngIf"],["imgSrc","/img/hosted/xtrathortful-display-account.png","card-alt-text","XTRAthortful Subscription",4,"ngIf"],[4,"ngIf"],["class","details",3,"ngClass",4,"ngIf"],[1,"icon",3,"ngClass"],[3,"src","card-alt-text"],["imgSrc","/img/hosted/xtrathortful-display-account.png","card-alt-text","XTRAthortful Subscription"],[1,"details",3,"ngClass"],[1,"date"],[1,"cards"],[1,"recipient"],[1,"cost"],[1,"status"],[1,"box","text-center"],[1,"borders"],[1,"date","w700"],[1,"order-image"],[1,"image-content",3,"ngClass"],[1,"recipient","w700"],[1,"button",3,"click"],[1,"subscription-name"],[1,"loading"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275elementStart(2,"h1"),l.\u0275\u0275text(3,"Orders"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(4,Ct,2,0,"p",2),l.\u0275\u0275elementStart(5,"div",3),l.\u0275\u0275template(6,Ut,4,2,"div",4),l.\u0275\u0275elementStart(7,"div",5),l.\u0275\u0275template(8,Vt,2,0,"div",6),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(4),l.\u0275\u0275property("ngIf",!t.loading&&!t.groupedOrders.length),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngForOf",t.groupedOrders
1),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",t.loading))},directives:[i.O5,i.sg,i.mk,ft.A,M.t1],pipes:[i.uU],styles:[".account-orders[_ngcontent-%COMP%]{padding:0 20px}@media (min-width: 769px){.account-orders[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding:0 10px}}@media (min-width: 992px){.account-orders[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding:0 24px}}.account-orders[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:30px;margin-bottom:20px;font-weight:bold}.account-orders[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:17px;margin-bottom:20px;font-weight:800}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]{vertical-align:top}@media (min-width: 769px){.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]{display:inline-block;vertical-align:top}}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]{margin-bottom:28px}@media (min-width: 769px){.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]{display:inline-block;vertical-align:top}}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .order-image[_ngcontent-%COMP%]{width:100px;-ms-flex-negative:0;flex-shrink:0;line-height:0;position:relative;margin-right:22px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .order-image.landscape[_ngcontent-%COMP%]{margin-top:16px;height:-webkit-min-content;height:-moz-min-content;height:min-content}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .order-image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:auto;-webkit-box-shadow:0 2px 4px 0 rgba(133,133,133,.5);box-shadow:0 2px 4px #85858580}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .order-image[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{z-index:-1;-webkit-box-shadow:0 2px 4px 0 rgba(133,133,133,.5);box-shadow:0 2px 4px #85858580;position:absolute;left:0;top:0;right:0;bottom:0;-webkit-transform:translateX(6px);transform:translate(6px)}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .details[_ngcontent-%COMP%]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .details.portrait[_ngcontent-%COMP%]{padding-top:18px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .details[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin-bottom:6px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .details[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-size:15px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .details[_ngcontent-%COMP%]   .recipient[_ng
1content-%COMP%]{max-width:16ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:18px;font-weight:700}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .details[_ngcontent-%COMP%]   .cost[_ngcontent-%COMP%]{font-size:16px;font-weight:700}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .details[_ngcontent-%COMP%]   .cards[_ngcontent-%COMP%]{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .details[_ngcontent-%COMP%]   .status[_ngcontent-%COMP%]{font-size:15px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:12px;height:12px;display:block;position:absolute;right:0;top:44px;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:none;transition-property:none;-webkit-transition-property:initial;transition-property:initial;border:solid 2px #ff6900;border-bottom:none;border-left:none;-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .two-cols[_ngcontent-%COMP%]   .icon.portrait[_ngcontent-%COMP%]{top:60px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]{margin-right:22px;width:170px;height:300px;display:inline-block}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]{padding:8px 0;border-radius:3px;border:solid 1px #000000;min-height:290px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-size:14px;margin-bottom:10px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .order-image[_ngcontent-%COMP%]{width:100px;min-height:142px;margin:auto auto 5px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .order-image[_ngcontent-%COMP%]   .image-content[_ngcontent-%COMP%]{position:relative}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .order-image[_ngcontent-%COMP%]   .image-content.landscape[_ngcontent-%COMP%]{padding-top:16px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .order-image[_ngcontent-%COMP%]   .image-content.landscape[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{top:16px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .order-image[_ngcontent-%COMP%]   .image-content[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:auto;-webkit-box-shadow:0 2px 4px 0 rgba(133,133,133,.5);box-shadow:0 2px 4px #85858580}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .order-image[_ngcontent-%COMP%]   .image-content[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{z-index:-1;-webkit-box-shadow:0 2px 4px 0 rgba(133,133,133,.5);box-shadow:0 2px 4px #85858580;position:absolute;
1left:0;top:0;right:0;bottom:0;-webkit-transform:translateX(6px);transform:translate(6px)}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .recipient[_ngcontent-%COMP%]{max-width:18ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;margin:0 auto 7px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .cards[_ngcontent-%COMP%], .account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .status[_ngcontent-%COMP%]{font-size:14px}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .cards[_ngcontent-%COMP%]{font-size:14px;margin-bottom:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:90%}.account-orders[_ngcontent-%COMP%]   .grouped-orders[_ngcontent-%COMP%]   .grouped-orders-content[_ngcontent-%COMP%]   .grouped-orders-display[_ngcontent-%COMP%]   .orders[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .borders[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{margin:5px auto;border-radius:3px;border:solid 1px #ff6900;color:#ff6900;font-size:14px;padding:8px;background-color:#fff;font-weight:500;cursor:pointer}.subscription-name[_ngcontent-%COMP%]{font-size:14px;padding:12px}"]}),e})();var Tt=n(73343);function Rt(e,t){1&e&&l.\u0275\u0275element(0,"thor-popups",7)}function Lt(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",8),l.\u0275\u0275elementStart(1,"p",9),l.\u0275\u0275text(2,"Looks like you haven't got any drafts!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"a",10),l.\u0275\u0275text(4,"Create your Card"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}function zt(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"a",16),l.\u0275\u0275text(1,"Continue Editing"),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext().$implicit,t=l.\u0275\u0275nextContext();l.\u0275\u0275property("routerLink",t.editLink(e.pdp_url||e.templateId))("queryParams",t.editLinkQueryParams(e.id))}}function Bt(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"a",16),l.\u0275\u0275text(1,"Continue Editing"),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext().$implicit,t=l.\u0275\u0275nextContext();l.\u0275\u0275property("routerLink",t.editLink(e.templateId))("queryParams",t.editLinkQueryParams(e.id))}}function qt(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",11),l.\u0275\u0275element(1,"img",12),l.\u0275\u0275template(2,zt,2,2,"a",13),l.\u0275\u0275template(3,Bt,2,2,"a",14),l.\u0275\u0275elementStart(4,"a",15),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext().deleteDraft(t.id)}),l.\u0275\u0275text(5,"Delete"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit;l.\u0275\u0275advance(1),l.\u0275\u0275property("src",e.thumbnail,l.\u0275\u0275sanitizeUrl),l.\u0275\u0275advance(1),l.\u0275\u0275property("featureFlag","WAL-280"),l.\u0275\u0275advance(1),l.\u0275\u0275property("featureFlagDisabled","WAL-280")}}const Ht=function(e){return{center:e}};let $t=(()=>{class e{constructor(e){this.accountDraftsService=e,this.hasDrafts=this.accountDraftsService.hasDrafts,this.isFetching=this.accountDraftsService.fetching,this.draftOverviews=this.accountDraftsService.draftOverviews}editLink(e){return`/personalised-photo-card-upload/${e}`}editLinkQueryParams(e){return{draftId:e}}deleteDraft(e){return(0,f.mG)(this,void 0,void 0,function*(){return this.accountDraftsService.deleteDraft(e)})}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(_))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-drafts"]],features:[l.\u0275\u0275ProvidersFeature([c.b])],decls:13,vars:16,consts:[[1,"AccountDraftsPage"],[1,"content"],[3,"ngClass"],["type","loading","title","Please wait...",4,"ngIf"],["class","AccountDraftsPage__NoDraftsMessage",4,"ngIf"],[1,"AccountDraftsPage__Drafts"],["class","Draft",4,"ngFor","ngForOf"],["type","loading","title","Please wait..."],[1,"AccountDraftsPage__NoDraftsMessage"],[1,"AccountDraftsPage__NoDraftsMessageCopy"],["routerLink","/personalised-photo-cards",1,"Draft__Button"],[1,"Draft"],[1,"Draft__Thumbnail",3,"src"],["class","Draft__Button",3,"routerLink","queryParams",4,"featureFlag"],["class","Draft__Button",3,"routerLink","queryParams",4,"featureFlagDisabled"],[1,"Draft__ButtonSecondary",3,"click"],[1,"Draft__Button",3,"routerLink","queryParams"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275elementStart(2,"h1",2),l.\u0275\u0275pipe(3,"async"),l.\u0275\u0275text(4,"Photo Card Drafts"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(5,Rt,1,0,"thor-popups",3),l.\u0275\u0275pipe(6,"async"),l.\u0275\u0275template(7,Lt,5,0,"div",4),l.\u0275\u0275pipe(8,"async"),l.\u0275\u0275pipe(9,"async"),l.\u0275\u0275elementStart(10,"div",5),l.\u0275\u0275template(11,qt,6,3,"div",6),l.\u0275\u0275pipe(12,"async"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(2),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(14,Ht,!l.\u0275\u0275pipeBind1(3,4,t.hasDrafts
1))),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngIf",l.\u0275\u0275pipeBind1(6,6,t.isFetching)),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!l.\u0275\u0275pipeBind1(8,8,t.hasDrafts)&&!l.\u0275\u0275pipeBind1(9,10,t.isFetching)),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngForOf",l.\u0275\u0275pipeBind1(12,12,t.draftOverviews)))},directives:[i.mk,i.O5,i.sg,Tt.j,r.yS,M.Hl,M.oT],pipes:[i.Ov],styles:['.AccountDraftsPage[_ngcontent-%COMP%]{margin:20px;padding:0}@media (min-width: 769px){.AccountDraftsPage[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding:0 10px}}@media (min-width: 992px){.AccountDraftsPage[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding:0 25px}}.AccountDraftsPage[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:30px;margin-bottom:20px}@media (min-width: 840px){.AccountDraftsPage[_ngcontent-%COMP%]{margin:0}}.AccountDraftsPage__NoDraftsMessage[_ngcontent-%COMP%]{text-align:center}.AccountDraftsPage__NoDraftsMessageCopy[_ngcontent-%COMP%]{padding-bottom:1em}.AccountDraftsPage__Drafts[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-left:-20px;margin-right:-20px}@media (max-width: 734px){.AccountDraftsPage__Drafts[_ngcontent-%COMP%]{-ms-flex-pack:distribute;justify-content:space-around}}.AccountDraftsPage__Drafts[_ngcontent-%COMP%]:after{content:"";-webkit-box-flex:1;-ms-flex:auto;flex:auto;-webkit-box-flex:5;-ms-flex-positive:5;flex-grow:5}@media (max-width: 734px){.AccountDraftsPage__Drafts[_ngcontent-%COMP%]:after{content:unset}}.Draft[_ngcontent-%COMP%]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-ms-flex-preferred-size:140px;flex-basis:140px;margin:0 20px 40px}@media (min-width: 840px){.Draft[_ngcontent-%COMP%]{-ms-flex-preferred-size:205px;flex-basis:205px}}@media (max-width: 359px){.Draft[_ngcontent-%COMP%]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}}.Draft__Thumbnail[_ngcontent-%COMP%]{width:100%;-webkit-box-shadow:0 5px 5px #c8c8c8;box-shadow:0 5px 5px #c8c8c8;margin-bottom:10px}.Draft__Button[_ngcontent-%COMP%]{width:100%;margin:10px 0 0;padding:12px;font-size:14px;font-weight:normal;text-align:center;border-radius:3px;color:#fff;background:#ff6900}.Draft__ButtonSecondary[_ngcontent-%COMP%]{width:100%;margin:10px 0 0;padding:12px;font-size:14px;font-weight:normal;text-align:center;border-radius:3px;color:#ff6900;background:#ffffff;-webkit-box-shadow:inset 0 0 0 1px #ff6900;box-shadow:inset 0 0 0 1px #ff6900}']}),e})();var Yt=n(55519);function Gt(e,t){1&e&&(l.\u0275\u0275elementStart(0,"p",14),l.\u0275\u0275text(1,"You don't have any payment methods saved."),l.\u0275\u0275elementEnd())}function Xt(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"span",31),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(4);l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e.profile.contact.firstname+" "+e.profile.contact.surname)}}const Wt=function(e){return{"center-card":e}};function Qt(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"li",18),l.\u0275\u0275elementStart(1,"div",19),l.\u0275\u0275elementStart(2,"div",20),l.\u0275\u0275element(3,"img",21),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"div",22),l.\u0275\u0275elementStart(5,"span",23),l.\u0275\u0275text(6,"XXXX XXXX XXXX\n"),l.\u0275\u0275element(7,"span",24),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"span",25),l.\u0275\u0275element(9,"span",26),l.\u0275\u0275text(10," / "),l.\u0275\u0275element(11,"span",26),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(12,Xt,2,1,"span",27),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(13,"a",28),l.\u0275\u0275listener("click",function(t){const n=l.\u0275\u0275restoreView(e),i=n.$implicit,r=n.index;return l.\u0275\u0275nextContext(3).openDeletePopup(i.method_id,r,t)}),l.\u0275\u0275element(14,"img",29),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(15,"div",30),l.\u0275\u0275listener("click",function(t){const n=l.\u0275\u0275restoreView(e),i=n.$implicit,r=n.index;return l.\u0275\u0275nextContext(3).openDeletePopup(i.method_id,r,t)}),l.\u0275\u0275elementStart(16,"p"),l.\u0275\u0275text(17,"Delete"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(6,Wt,1==n.paymentMethods.length)),l.\u0275\u0275advance(3),l.\u0275\u0275property("imgSrc",n.cardBrands[e.brand]),l.\u0275\u0275advance(4),l.\u0275\u0275property("textContent",e.last4),l.\u0275\u0275advance(2),l.\u0275\u0275property("textContent",e.exp_month),l.\u0275\u0275advance(2),l.\u0275\u0275property("textContent",e.exp_year),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",n.profile.contact.surname)}}function Jt(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",15),l.\u0275\u0275elementStart(1,"ul",16),l.\u0275\u0275template(2,Qt,18,8,"li",17),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(2),l.\u0275\u0275property("ngForOf",e.paymentMethods)}}const Zt=function(e){return{active:e}};function Kt(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",1),l.\u0275\u0275elementStart(1,"div",2),l.\u0275\u0275elementStart(2,"h4"),l.\u0275\u0275text(3,"Payment Methods"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(4,Gt,2,0,"p",3),l.\u0275\u0275template(5,Jt,3,1,"div",4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"div",5),l.\u0275\u0275elementStart(7,"div",6),l.\u0275\u0275listener("clickOutside",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeDeletePopup()}),l.\u0275\u0275elementStart(8,"div",7),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeDeletePopup()}),l.\u0275\u0275element(9,"thor-ico",8),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(10,"p",9),l.\u0275\u0275text(11,"Are you sure you want to delete this card?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(12,"div",10),l.\u0275\u0275elementStart(13,"a",11),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().deletePaymentMechanism()}),l.\u0275\u0275text(14,"Yes"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(15,"a",12),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeDeletePopup()}),l.\u0275\u0275text(16,"No"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(17,"p",13),l.\u0275\u0275elementStart(18,"strong"),l.\u0275\u0275text(19,"Note: "),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(20,"This action cannot be undone."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(4),l.\u0275\u0275property("ngIf",!e.paymentMethods.length),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.paymentMethods.length),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(4,Zt,e.isDeletePopupVisible)),l.\u0275\u0275advance(3),l.\u0275\u0275property("p","cross")}}let en=(()=>{class e{constructor(e,t,n,i){this.Notification=e,this.PaymentMethodsUtils=t,this.ShareData=n,this.UserUtils=i,this.isDeletePopupVisible=!1,this.cardToDelete={},this.cardBrands={visa:"img/action/visa.svg",Visa:"img/action/visa.svg",Mastercard:"img/action/mastercard.svg",mastercard:"img/action/mastercard.svg",MasterCard:"img/action/mastercard.svg",amex:"img/action/amex.svg",Amex:"img/action/amex.svg"},this.deletePaymentMechanism=()=>{this.PaymentMethodsUtils.deletePaymentMechanism(this.cardToDelete.id).then(e=>{this.paymentMethods.splice(this.cardToDelete.index,1),this.closeDeletePopup(),this.Notification.success("paymentMechDeleteSuccess")}
1).catch(e=>{console.log(e),this.Notification.warning("paymentMechDeleteError"),this.closeDeletePopup()})}}ngOnInit(){this.device=this.ShareData.getProperty("device"),this.event=this.ShareData.listen("device-change",e=>{this.device=e}),this._getPaymentMethods(),this.UserUtils.options.isProfileLoaded&&(this.profile=this.UserUtils.fullProfile)}ngOnDestroy(){this.event.unsubscribe()}_getPaymentMethods(){this.PaymentMethodsUtils.getPaymentMethods().then(e=>{this.paymentMethods=e}).catch(e=>{this.Notification.error("serverError"),console.log("error retreiving payment methods:",e)})}openDeletePopup(e,t,n){n.stopPropagation(),this.cardToDelete.id=e,this.cardToDelete.index=t,this.isDeletePopupVisible=!0}closeDeletePopup(){this.isDeletePopupVisible=!1,Object.keys(this.cardToDelete).forEach(e=>{this.cardToDelete[e]=null})}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(m.P),l.\u0275\u0275directiveInject(Yt.t),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(u.f))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-payment"]],decls:1,vars:1,consts:[["class","account-payments content",4,"ngIf"],[1,"account-payments","content"],[1,"payment-carousel"],["class","no-payments no-mb",4,"ngIf"],["class","payment-methods",4,"ngIf"],[1,"update-form","card-delete",3,"ngClass"],[1,"update-form-inner","active",3,"clickOutside"],[1,"cross-container",3,"click"],[3,"p"],[1,"question"],[1,"delete-buttons"],["href","javascript:;",1,"btn-thor-white",3,"click"],["href","javascript:;",1,"btn-thor-orange",3,"click"],[1,"note"],[1,"no-payments","no-mb"],[1,"payment-methods"],[1,"no-list","list-cards"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"credit-card"],[1,"card-brand"],[3,"imgSrc"],[1,"card-number"],[1,"block","card-num-text"],[1,"card-num-text",3,"textContent"],[1,"block","card-exp"],[1,"card-exp",3,"textContent"],["class","block name",4,"ngIf"],["href","javascript:;",1,"mobile-delete-button",3,"click"],["imgSrc","svg/plus.svg"],[1,"desktop-delete-button",3,"click"],[1,"block","name"]],template:function(e,t){1&e&&l.\u0275\u0275template(0,Kt,21,6,"div",0),2&e&&l.\u0275\u0275property("ngIf",t.paymentMethods)},directives:[i.O5,i.mk,Oe.L,Pe.n,i.sg,M.t1],styles:[".account-payments[_ngcontent-%COMP%]{padding:0 20px}@media (min-width: 769px){.account-payments[_ngcontent-%COMP%]{padding:0 10px}}@media (min-width: 992px){.account-payments[_ngcontent-%COMP%]{padding:0 25px}}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{padding:0;height:0;overflow:hidden}@media (min-width: 840px){.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{height:35px;visibility:visible}}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .no-payments[_ngcontent-%COMP%]{margin-bottom:20px}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch}@media (min-width: 840px){.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]{height:100%;display:block;overflow-x:visible}}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   .payment-method[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   .payment-method[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex}}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   .add-payment-method-card[_ngcontent-%COMP%]{visibility:visible;position:relative;border:1px solid #ff6900;width:300px;height:180px;border-radius:14px;-webkit-box-shadow:0 2px 3px 0 rgba(0,0,0,.5);box-shadow:0 2px 3px #00000080}
1.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   .add-payment-method-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{text-align:center;color:#ff6900;position:absolute;top:110px;left:53px;font-size:18px}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   .big-plus[_ngcontent-%COMP%]{position:absolute;top:50px;left:128px;width:53px}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{scroll-snap-align:start;-ms-flex-negative:0;flex-shrink:0;width:300px;height:220px;margin-right:50px;border-radius:10px;-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:scale(1);transform:scale(1);-webkit-transition:-webkit-transform .5s;transition:-webkit-transform .5s;transition:transform .5s;transition:transform .5s,-webkit-transform .5s;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media (min-width: 840px){.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:inline-block;height:270px}}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li.center-card[_ngcontent-%COMP%]{margin:0 auto}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .mobile-delete-button[_ngcontent-%COMP%]{opacity:0;position:absolute;top:30px;right:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .desktop-delete-button[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .desktop-delete-button[_ngcontent-%COMP%]{cursor:pointer;display:block;position:absolute;top:220px;border:1px solid #ff6900;width:90px;height:30px;border-radius:3px;left:100px}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .desktop-delete-button[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#ff6900;position:absolute;top:6px;left:22px}}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:hover   .mobile-delete-button[_ngcontent-%COMP%]{opacity:1}@media (min-width: 840px){.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:hover   .mobile-delete-button[_ngcontent-%COMP%]{display:none;opacity:0}}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .credit-card[_ngcontent-%COMP%]{width:300px;height:180px;position:relative;border-radius:16px;-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.5);box-shadow:0 2px 4px #00000080;background-image:-webkit-gradient(linear,left top,left bottom,from(#d5d5d5),to(#a1a1a1));background-image:linear-gradient(#d5d5d5,#a1a1a1)}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .credit-card[_ngcontent-%COMP%]   .card-brand[_ngcontent-%COMP%]{margin:11px 0 9px 12px;width:72px}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .credit-card[_ngcontent-%COMP%]   .card-brand[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%}@media (min-width: 840px){.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .credit-card[_ngcontent-%COMP%]   .card-brand[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-top:12px}}
1.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .credit-card[_ngcontent-%COMP%]   .card-number[_ngcontent-%COMP%]{width:100%;padding:0 20px 8px}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .credit-card[_ngcontent-%COMP%]   .card-number[_ngcontent-%COMP%]   .card-num-text[_ngcontent-%COMP%]{padding-bottom:15px;font-size:18px;letter-spacing:3px}.account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .credit-card[_ngcontent-%COMP%]   .card-number[_ngcontent-%COMP%]   .card-exp[_ngcontent-%COMP%], .account-payments[_ngcontent-%COMP%]   .payment-carousel[_ngcontent-%COMP%]   .list-cards[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .credit-card[_ngcontent-%COMP%]   .card-number[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:15px;letter-spacing:1.8px;padding-bottom:15px}.account-payments[_ngcontent-%COMP%]   .add-payment-container[_ngcontent-%COMP%]{margin:0 auto;text-align:center;border-radius:3px;border:solid 1px #ff6900;width:335px;height:70px;vertical-align:middle;line-height:70px}.account-payments[_ngcontent-%COMP%]   .add-payment-container[_ngcontent-%COMP%]   .button-text[_ngcontent-%COMP%]{color:#ff6900;font-size:16px}@media (min-width: 840px){.account-payments[_ngcontent-%COMP%]   .add-payment-container[_ngcontent-%COMP%]{height:0;padding:0;overflow:hidden;border:none}}"]}),e})();var tn=n(95410);function nn(e,t){1&e&&(l.\u0275\u0275elementStart(0,"p",4),l.\u0275\u0275text(1,"Simply apply your credits on the final stage of checkout"),l.\u0275\u0275elementEnd())}let rn=(()=>{class e{constructor(){}ngOnInit(){}ngOnDestroy(){}calcCredits(){return tn.g.Price*this.credits/100}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-credits"]],inputs:{credits:"credits"},decls:11,vars:6,consts:[[1,"account-credits"],[1,"title"],[1,"worthText"],["class","directionsText",4,"ngIf"],[1,"directionsText"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"p"),l.\u0275\u0275text(2,"You currently have"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"h1"),l.\u0275\u0275text(4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"p",1),l.\u0275\u0275text(6,"thortful credits"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"p",2),l.\u0275\u0275text(8),l.\u0275\u0275pipe(9,"currency"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(10,nn,2,0,"p",3),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate(t.credits),l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate1("worth ",l.\u0275\u0275pipeBind2(9,3,t.calcCredits(),"GBP"),""),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",t.credits))},directives:[i.O5],pipes:[i.H9],styles:[".account-credits[_ngcontent-%COMP%]{text-align:center}.account-credits[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:72px}.account-credits[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:16px;margin:-12px 0 30px}.account-credits[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:15px;margin-top:-16px;font-weight:800}.account-credits[_ngcontent-%COMP%]   .worthText[_ngcontent-%COMP%]{margin-top:-10px}.account-credits[_ngcontent-%COMP%]   .directionsText[_ngcontent-%COMP%]{margin:35px 25px;font-size:12px}@media (min-width: 769px){.account-credits[_ngcontent-%COMP%]   .directionsText[_ngcontent-%COMP%]{font-size:14px;margin:0 25px}}"]}),e})();var on=n(8355),an=n(91223);let sn=(()=>{class e{constructor(e,t,n,i){this.ShareData=e,this.GeneralUtils=t,this.Analytics=n,this.freshChatService=i,this.chatOpen=this.freshChatService.freshChatStatus}ngOnInit(){this.GeneralUtils.serviceOptions.then(e=>{this.csStart=this.GeneralUtils.getTime(e.date_information.date_support_opened,!1),this.csEnd=this.GeneralUtils.getTime(e.date_information.date_support_closed,!1)})}showChat(){return(0,f.mG)(this,void 0,void 0,function*(){this.customEvent("chat"),(yield this.chatOpen.pipe((0,on.q)(1)).toPromise())&&this.freshChatService.showChat()})}customEvent(e){this.Analytics.customEvent("Contact Us","Click",e)}ngOnDestroy(){}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(P.w),l.\u0275\u0275directiveInject(O.c),l.\u0275\u0275directiveInject(an.q))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-contact"]],decls:42,vars:10,consts:[[1,"account-contact","content"],[1,"boxes-container"],[1,"container"],["href","tel:02080501462",3,"click"],[1,"box"],[1,"icon"],["p","phone","className","orange"],[1,"title"],[1,"text","t
1itle"],[1,"text","time"],[1,"text","orange","w700"],["href","mailto:[email protected]",3,"click"],["p","email","className","orange"],[3,"click"],["p","chat",1,"icon","chat"],["imgSrc","svg/chat2.svg"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275elementStart(2,"div",2),l.\u0275\u0275elementStart(3,"a",3),l.\u0275\u0275listener("click",function(){return t.customEvent("phone")}),l.\u0275\u0275elementStart(4,"div",4),l.\u0275\u0275elementStart(5,"div",5),l.\u0275\u0275element(6,"thor-ico",6),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"div",7),l.\u0275\u0275text(8,"Call us"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(9,"div",8),l.\u0275\u0275text(10,"Opening Hours:"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(11,"div",9),l.\u0275\u0275text(12),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(13,"div",10),l.\u0275\u0275text(14,"020 8050 1462 "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(15,"div",2),l.\u0275\u0275elementStart(16,"a",11),l.\u0275\u0275listener("click",function(){return t.customEvent("email")}),l.\u0275\u0275elementStart(17,"div",4),l.\u0275\u0275elementStart(18,"div",5),l.\u0275\u0275element(19,"thor-ico",12),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(20,"div",7),l.\u0275\u0275text(21,"Email us"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(22,"div",8),l.\u0275\u0275text(23,"Team available:"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(24,"div",9),l.\u0275\u0275text(25),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(26,"div",10),l.\u0275\u0275text(27,"[email protected]"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(28,"div",2),l.\u0275\u0275elementStart(29,"a",13),l.\u0275\u0275listener("click",function(){return t.showChat()}),l.\u0275\u0275elementStart(30,"div",4),l.\u0275\u0275pipe(31,"async"),l.\u0275\u0275elementStart(32,"div",14),l.\u0275\u0275element(33,"img",15),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(34,"div",7),l.\u0275\u0275text(35,"Chat with us"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(36,"div",8),l.\u0275\u0275text(37,"How can we help? "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(38,"div",9),l.\u0275\u0275text(39),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(40,"div",10),l.\u0275\u0275text(41,"Start chat"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(12),l.\u0275\u0275textInterpolate2("Monday - Friday / ",t.csStart," - ",t.csEnd,""),l.\u0275\u0275advance(13),l.\u0275\u0275textInterpolate2("Monday - Friday / ",t.csStart," - ",t.csEnd,""),l.\u0275\u0275advance(5),l.\u0275\u0275classProp("gray",!l.\u0275\u0275pipeBind1(31,8,t.chatOpen)),l.\u0275\u0275advance(9),l.\u0275\u0275textInterpolate2("Monday - Friday / ",t.csStart," - ",t.csEnd,""))},directives:[Pe.n,M.t1],pipes:[i.Ov],styles:[".account-contact.content[_ngcontent-%COMP%]{padding:0 15px}@media (min-width: 769px){.account-contact.content[_ngcontent-%COMP%]{padding:0 10px}}@media (min-width: 992px){.account-contact.content[_ngcontent-%COMP%]{padding:0 25px}}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]{width:100%;margin:auto}@media (min-width: 840px){.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]{width:400px}}@media (min-width: 1200px){.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]{max-width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:30px}}@media (min-width: 1200px){.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{margin-right:25%}}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]{position:relative;border-radius:2px;border:solid 1px black;padding:18px 17px 16px;width:100%;margin:0 auto 20px}@media (min-width: 450px){.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]{width:300px}}@media (min-width: 1200px){.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]{width:309px}}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box.gray[_ngcontent-%COMP%]{opacity:.3}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{position:absolute;right:3%;width:35px;top:10px}@media (min-width: 992px){.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{right:4%;width:36px}}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .icon.chat[_ngcontent-%COMP%]{right:-1%;width:42px}@media (min-width: 992px){.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .icon.chat[_ngcontent-%COMP%]{right:0;width:40px}}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:22px;font-weight:900;margin-bottom:6px}@media (min-width: 992px){.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:24px;margin-bottom:16px}}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:14px;margin-bottom:3px}@media (min-width: 840px){.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:16px}}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .text.orange[_ngcontent-%COMP%]{color:#ff6900}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .text.time[_ngcontent-%COMP%]{margin-bottom:12px}.account-contact.content[_ngcontent-%COMP%]   .boxes-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .text.title[_ngcontent-%COMP%]{font-weight:500}"]}),e})();var cn=n(75193);function dn(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",4),l.\u0275\u0275element(1,"div",5),l.\u0275\u0275elementEnd())}function ln(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",6),l.\u0275\u0275elementStart(1,"div",7),l.\u0275\u0275text(2,"This page cannot be displayed due to your cookie preferences. Functional cookies must be enabled for this feature. "),l.\u0275\u0275element(3,"p"),l.\u0275\u0275text(4,"Check our "),l.\u0275\u0275elementStart(5,"a",8),l.\u0275\u0275text(6,"Cookie Policy page "),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(7,"to change your preferences."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}let pn=(()=>{class e{constructor(e){this.MentionMeService=e}ngOnInit(){this.functionalConsentGiven=this.hasFunctionalConsent(),this.functionalConsentGiven&&this.MentionMeService.referEmbed(this.profile)}ngOnDestroy(){this.MentionMeService.deleteaMentionMeFiredTags()}hasFunctionalConsent(){return window.OnetrustActiveGroups&&window.OnetrustActiveGroups.includes(",C0003,")}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(cn.R))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-invite"]],inputs:{profile:"profile"},decls:5,vars:2,consts:[[1,"account-invite","content"],[1,"invite-content"],["class","refer-container",4,"ngIf","ngIfElse"],["manageConsent",""],[1,"refer-container"],["id","mmWrapper","mention-me-attribute",""],[1,"manage-preferences-container"],[1,"manage-preferences-text"],["routerLink","/legal/cookie-policy"]],template:function(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275template(2,dn,2,0,"div",2),l.\u0275\u0275template(3,ln,8,0,"ng-template",null,3,l.\u0275\u0275templateRefExtractor),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275reference(4);l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",t.functionalConsentGiven)("ngIfElse",e)}},directives:[i.O5,r.yS],styles:[".account-invite[_ngcontent-%COMP%]{padding:0 20px}@media (min-width: 769px){.account-invite[_ngcontent-%COMP%]{padding:0}}@media (min-width: 992px){.account-invite[_ngcontent-%COMP%]{padding:0 15px}}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]{margin:0 auto 20px;text-align:center;width:307px}@media (min-width: 840px){.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .text-container[_ngcontent-%COMP%]{width:100%}}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .text-button-container[_ngcontent-%COMP%]{text-align:center}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .text-button-container[_ngcontent-%COMP%]   .offer-text[_ngcontent-%COMP%]{font-size:16px}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .text-button-container[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin:20px auto;max-width:335px;height:50px;border-radius:3px}@media (min-width: 840px){.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .text-button-container[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin:20px auto 25px;width:100%}}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .text-button-container[_ngcontent-%COMP%]   p.small-print[_ngcontent-%COMP%]{font-size:12px}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .text-button-container[_ngcontent-%COMP%]   p.smaller-print[_ngcontent-%COMP%]{font-size:10px}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-size:16px;color:#ff6900;font-weight:700}@media (min-width: 992px){.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-size:17px}}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .manage-preferences-container[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;line-height:20px;font-size:16px}@media (min-width: 992px){.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .manage-preferences-container[_ngcontent-%COMP%]{line-height:22px;font-size:17px}}.account-invite[_ngcontent-%COMP%]   .invite-content[_ngcontent-%COMP%]   .manage-preferences-container[_ngcontent-%COMP%]   .manage-preferences-text[_ngcontent-%COMP%]{text-align:center;text-wrap:stable}"]}),e})();var mn=n(8214);function gn(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",19),l.\u0275\u0275text(1,"You don't have any addresses registered."),l.\u0275\u0275elementEnd())}function un(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",33),l.\u0275\u0275elementStart(1,"div",34),l.\u0275\u0275text(2),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",35),l.\u0275\u0275text(4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext().$implicit,t=l.\u0275\u0275nextContext(2);
1l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate1("",e.recipient," "),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(t.displayAddressMobile(e))}}function hn(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",37),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2).$implicit;l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(" "+e.address2)}}function fn(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",33),l.\u0275\u0275elementStart(1,"div",36),l.\u0275\u0275text(2),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",37),l.\u0275\u0275text(4),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(5,hn,2,1,"div",38),l.\u0275\u0275elementStart(6,"div",37),l.\u0275\u0275text(7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext().$implicit;l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.recipient),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.address1),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.address2),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.city+", "+e.postcode)}}function Cn(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",24),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit,n=l.\u0275\u0275nextContext(2);return"mobile"===n.device||"mobile-large"===n.device?n.toggleEditAddressMobile(t):null}),l.\u0275\u0275elementStart(1,"div",25),l.\u0275\u0275elementStart(2,"div",26),l.\u0275\u0275elementStart(3,"p",27),l.\u0275\u0275text(4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(5,un,5,2,"div",28),l.\u0275\u0275template(6,fn,8,4,"div",28),l.\u0275\u0275element(7,"i",29),l.\u0275\u0275elementStart(8,"div",30),l.\u0275\u0275elementStart(9,"button",31),l.\u0275\u0275listener("click",function(t){const n=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(2).openDeletePopup(t,n)}),l.\u0275\u0275text(10,"Delete"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(11,"button",32),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(2).desktopAddressEdit(t)}),l.\u0275\u0275text(12,"Edit"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate(n.returnInitials(e.firstname,e.surname)),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","mobile"===n.device||"mobile-large"===n.device),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","tablet"===n.device||"desktop"===n.device||"desktop-large"===n.device)}}function xn(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",20),l.\u0275\u0275elementStart(1,"div",21),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().toggleNewAddress()}),l.\u0275\u0275elementStart(2,"div",22),l.\u0275\u0275elementStart(3,"div",4),l.\u0275\u0275text(4,"+"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"p",5),l.\u0275\u0275text(6,"Add new address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(7,Cn,13,3,"div",23),l.\u0275\u0275pipe(8,"gridFilter"),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(7),l.\u0275\u0275property("ngForOf",l.\u0275\u0275pipeBind2(8,1,e.directSendAddresses,e.searchText))}}const _n=function(e){return{active:e}};let Pn=(()=>{class e{constructor(e,t,n,i,r,o,a){this.elementRef=e,this.ShareData=t,this.Notification=n,this.UserUtils=i,this.AccountAddressesUtils=r,this.AccountOverviewUtils=o,this.Analytics=a,this.addressSettings={},this.searchText="",this.editAddress=!1,this.newAddress=!1,this.options={editAddressFormVisible:!1,editAddressObj:{country_code:""},editAddressIndex:null,deleteAddressVisible:!1,deleteAddressId:null,deleteAddressIndex:null,addressFormVisible:!1,countries:null}}ngOnChanges(e){if(e.formData&&e.formData.currentValue){let t=e.formData.currentValue;switch(e.formData.currentValue.type){case"new":this.addNewAddress(t.payload);break;case"update":this.saveAddress(t.payload,t.id);break;case"delete":this.deleteAddress(t.id)}}}ngOnInit(){this.device=this.ShareData.getProperty("device"),this.event=this.ShareData.listen("device-change",e=>{this.device=e}),this._init()}ngOnDestroy(){this.event.unsubscribe()}_init(){this.profile&&(this.profile.addresses.map(e=>{let t=e.recipient.split(" ");e.firstname=t[0],e.surname=t[1]}),this.directSendAddresses=this.getDirectSendAddresses())}saveAddress(e,t){this.AccountAddressesUtils.editAddress(t,e).then(e=>{this.profile.addresses.some((n,i)=>{if(n.id===t)return this.profile.addresses[i]=e,!0}
1),this._init(),this.Notification.success("Your address was successfully updated!")}).catch(e=>{this.ShareData.trigger("showError","updateAddressError")})}deleteAddress(e){this.deleteAddressPopupVisible=!1,this.UserUtils.deleteAddress(e).then(t=>{this.profile.addresses.some((t,n)=>{if(t.id===e)return this.profile.addresses.splice(n,1),!0}),this._init(),this.Notification.success("addressDeleteSuccess")}).catch(e=>{this.Notification.warning(e.data.code),console.log(e)})}toggleNewAddress(){this.update.next(["newAddressDesktop"])}toggleNewAddressMobile(){this.update.next(["new address"])}desktopAddressEdit(e){this.update.next(["editAddressDesktop",e])}toggleEditAddressMobile(e){this.update.next(["address",e])}showSearch(){this.update.next(["addressSearch",this.profile.addresses]),this.customEvent()}addNewAddress(e){this.UserUtils.postNewAddress(e).then(e=>{this.Notification.success("Your address was successfully added!"),this.profile.addresses.push(e),this._init()}).catch(e=>{this.Notification.error(e.data.code)})}_cancelLoop(){clearInterval(this.profileCheck)}returnInitials(e,t){return this.AccountOverviewUtils.returnInitials(e,t)}displayAddressMobile(e){return this.AccountAddressesUtils.displayAddressMobile(e)}getDirectSendAddresses(){return this.profile.addresses.filter(e=>e.source&&"HOME_FILL"!==e.source.origin&&"BILLING_ADDRESS"!==e.source.origin||e.address_types&&-1==e.address_types.indexOf("DELIVERY_ADDRESS_HOME_FILL")&&-1==e.address_types.indexOf("BILLING_ADDRESS"))}customEvent(){this.Analytics.customEvent("Profile Address Search","Click","None")}openDeletePopup(e,t){e.stopPropagation(),this.addressIdToDelete=t.id,this.deleteAddressPopupVisible=!0}closeDeletePopup(){this.deleteAddressPopupVisible=!1}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(m.P),l.\u0275\u0275directiveInject(u.f),l.\u0275\u0275directiveInject(_e.g),l.\u0275\u0275directiveInject(g.e),l.\u0275\u0275directiveInject(O.c))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-address"]],inputs:{show:"show",countries:"countries",update:"update",formData:"formData",profile:"profile"},features:[l.\u0275\u0275NgOnChangesFeature],decls:29,vars:8,consts:[[1,"account-address","content"],[1,"main-content"],[1,"add-address-container",3,"click"],[1,"inner-button","text-center"],[1,"plus-icon"],[1,"w700"],[1,"my-address-title"],[1,"search-icon",3,"p","className","click"],["class","no-addresses",4,"ngIf"],["class","people-addresses-container",4,"ngIf"],[1,"update-form","card-delete",3,"ngClass"],[1,"update-form-inner","active",3,"clickOutside"],[1,"cross-container",3,"click"],[3,"p"],[1,"question"],[1,"delete-buttons"],["href","javascript:;",1,"btn-thor-white",3,"click"],["href","javascript:;",1,"btn-thor-orange",3,"click"],[1,"note"],[1,"no-addresses"],[1,"people-addresses-container"],[1,"desktop-add-address",3,"click"],[1,"inner-items"],["class","addresses",3,"click",4,"ngFor","ngForOf"],[1,"addresses",3,"click"],[1,"address-container"],[1,"profile-image"],[1,"initials","w700"],["class","address-details",4,"ngIf"],[1,"mdi","mdi-chevron-right","mobile"],[1,"account-buttons","desktop-version"],[1,"btn-thor-white",3,"click"],[1,"btn-thor-white","edit",3,"click"],[1,"address-details"],[1,"block","w700","name"],[1,"block","address"],[1,"block","w700"],[1,"block"],["class","block",4,"ngIf"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275elementStart(2,"div",2),l.\u0275\u0275listener("click",function(){return t.toggleNewAddressMobile()}),l.\u0275\u0275elementStart(3,"div",3),l.\u0275\u0275elementStart(4,"div",4),l.\u0275\u0275text(5,"+ "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"span",5),l.\u0275\u0275text(7,"Add new address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"div",6),l.\u0275\u0275elementStart(9,"h4"),l.\u0275\u0275text(10,"My addresses"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(11,"thor-ico",7),l.\u0275\u0275listener("click",function(){return t.showSearch()}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(12,gn,2,0,"div",8),l.\u0275\u0275template(13,xn,9,4,"div",9),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(14,"div",10),l.\u0275\u0275elementStart(15,"div",11),l.\u0275\u0275listener("clickOutside",function(){return t.closeDeletePopup()}),l.\u0275\u0275elementStart(16,"div",12),l.\u0275\u0275listener("click",function(){return t.closeDeletePopup()}),l.\u0275\u0275element(17,"thor-ico",13),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(18,"p",14),l.\u0275\u0275text(19,"Are you sure you want to delete this address?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(20,"div",15),l.\u0275\u0275elementStart(21,"a",16),l.\u0275\u0275listener("click",function(){return t.deleteAddress(t.addressIdToDelete)}),l.\u0275\u0275text(22,"Yes"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(23,"a",17),l.\u0275\u0275listener("click",function(){return t.closeDeletePopup()}),l.\u0275\u0275text(24,"No"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(25,"p",18),l.\u0275\u0275elementStart(26,"strong"),l.\u0275\u0275text(27,"Note: "),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(28,"This action cannot be undone."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(11),l.\u0275\u0275property("p","search")("className","account-address-no-bar"),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!t.profile.addresses.length),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.profile.addresses.length),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(6,_n,t.deleteAddressPopupVisible)),l.\u0275\u0275advance(3),l.\u0275\u0275property("p","cross"))},directives:[Pe.n,i.O5,i.mk,Oe.L,i.sg],pipes:[mn.N],styles:[".account-address[_ngcontent-%COMP%]{padding:0 20px}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]{padding:0 10px}}@media (min-width: 992px){.account-address[_ngcontent-%COMP%]{padding:0 25px}}.account-address[_ngcontent-%COMP%]   .add-address-container[_ngcontent-%COMP%]{margin:10px auto 40px;text-align:center;border-radius:3px;border:solid 1px #ff6900;height:50px;vertical-align:middle;line-height:50px;cursor:pointer}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .add-address-container[_ngcontent-%COMP%]{display:none}}.account-address[_ngcontent-%COMP%]   .add-address-container[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#ff6900;font-size:16px}.account-address[_ngcontent-%COMP%]   .my-address-title[_ngcontent-%COMP%]{margin:15px 0 20px;position:relative}.account-address[_ngcontent-%COMP%]   .my-address-title[_ngcontent-%COMP%]   h4[_ng
1content-%COMP%]{font-size:22px}@media (min-width: 375px){.account-address[_ngcontent-%COMP%]   .my-address-title[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:24px}}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .my-address-title[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:30px}}.account-address[_ngcontent-%COMP%]   .my-address-title[_ngcontent-%COMP%]   .search-icon[_ngcontent-%COMP%]{cursor:pointer}@media (min-width: 576px){.account-address[_ngcontent-%COMP%]   .my-address-title[_ngcontent-%COMP%]   .search-icon[_ngcontent-%COMP%]{display:none}}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .desktop-add-address[_ngcontent-%COMP%]{display:none;cursor:pointer}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .desktop-add-address[_ngcontent-%COMP%]{display:inline-block;width:250px;height:230px;border-radius:3px;border:solid 1px #ff6900;background-color:#fff;position:relative;margin-right:3%}}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .desktop-add-address[_ngcontent-%COMP%]   .inner-items[_ngcontent-%COMP%]{text-align:center}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .desktop-add-address[_ngcontent-%COMP%]   .inner-items[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px;margin-top:110px;text-align:center;position:absolute;left:24%;top:15%;color:#ff6900}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .desktop-add-address[_ngcontent-%COMP%]   .inner-items[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{position:absolute;left:39%;top:30%}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .desktop-add-address[_ngcontent-%COMP%]   .inner-items[_ngcontent-%COMP%]   .plus-icon[_ngcontent-%COMP%]{width:58px;height:58px;line-height:58px;font-size:43px;font-weight:100;background-color:#ff6900;color:#fff;border-radius:140px;display:inline-block;margin-top:29%;margin-left:2%}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]{width:250px;display:inline-block;vertical-align:top;margin-right:3%}}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .account-buttons.desktop-version[_ngcontent-%COMP%]{display:none}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .account-buttons.desktop-version[_ngcontent-%COMP%]{display:inline-block}}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .account-buttons.desktop-version[_ngcontent-%COMP%]   .btn-thor-white[_ngcontent-%COMP%]{width:39%;font-size:14px;margin:0 5%;height:30px;line-height:29px}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;margin:0 0 30px;cursor:pointer}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]{cursor:auto}}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]{display:block;width:250px;height:230px;border-radius:3px;border:solid 1px #000;background-color:#fff}}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]{margin:.8% 4% 0 0;border-radius:50%;width:60px;height:60px;background:#c8c8c8;text-align:center}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]{margin:2% 7% 0 71%}}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]   .initials[_ngcontent-%COMP%]{color:#fff;line-height:62px;font-size:24px}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .address-detail
1s[_ngcontent-%COMP%]{padding:5px 0 0;display:inline-block;line-height:1.31;width:55%}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .address-details[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{display:block;overflow:hidden;text-overflow:ellipsis;max-width:22ch;white-space:nowrap}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .address-details[_ngcontent-%COMP%]   .addresss[_ngcontent-%COMP%]{font-size:14px}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .address-details[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{line-height:1.25;white-space:normal;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .address-details[_ngcontent-%COMP%]{padding:0;margin-left:8%;font-size:16px;width:85%}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .address-details[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{line-height:1.5;max-width:16ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .mdi-chevron-right[_ngcontent-%COMP%]{font-size:34px;color:#ff6900;width:9px;height:16px;position:absolute;left:90%;top:33%}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .mdi-chevron-right[_ngcontent-%COMP%]{display:none}}@media (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%]{text-align:center;width:100%}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:0;width:47%}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%]   .btn-thor-white[_ngcontent-%COMP%]{margin-right:5%}}@media (min-width: 769px) and (min-width: 769px){.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%]   .btn-thor-white[_ngcontent-%COMP%]{position:absolute;top:180px;left:7px}.account-address[_ngcontent-%COMP%]   .people-addresses-container[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%]   .btn-thor-white.edit[_ngcontent-%COMP%]{left:120px}}.account-address[_ngcontent-%COMP%]   .editFormContainer[_ngcontent-%COMP%], .account-address[_ngcontent-%COMP%]   .newFormContainer[_ngcontent-%COMP%]{position:relative}.account-address[_ngcontent-%COMP%]   .editFormContainer[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%], .account-address[_ngcontent-%COMP%]   .newFormContainer[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{padding-top:20px;margin-bottom:15px}.account-address[_ngcontent-%COMP%]   .editFormContainer[_ngcontent-%COMP%]   .cross[_ngcontent-%COMP%], .account-address[_ngcontent-%COMP%]   .newFormContainer[_ngcontent-%COMP%]   .cross[_ngcontent-%COMP%]{position:absolute;width:30px;left:95%;top:.5%}.account-address[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%]{text-align:center;width:100%}.account-address[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:0;width:47%}.account-address[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%]   .btn-thor-white[_ngcontent-%COMP%]{margin-right:5%}"]}),e})();function On(e){let t=(0,M.jT)(e);return e=>t(...function(e){return(0,M.OL)(e,["reminder_occasion","reminder_type"],["reminder_date","reminder_date"],["reminder_set","notice_period"])}(e))}const Mn=(0,M.jT)("Reminder Add Clicked"),vn=On("Reminder Saved"),bn=On("Reminder Shop Clicked"),yn=On("Reminder Edit Clicked"),wn=On("Reminder Deleted");var Sn=n(62538),kn=n(45701),En=n(16199),In=n(33907);function Dn(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",8),l.\u0275\u0275elementStart(1,"div",9),l.\u0275\u0275elementStart(2,"h6",3),l.\u0275\u0275elementStart(3,"span"),l.\u0275\u0275text(4,"You currently have no reminders!\xa0\xa0"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"a",10),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).toggleNewReminder()}),l.\u0275\u0275text(6," Create your first reminder"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"div",11),l.\u0275\u0275element(8,"img",12),l.\u0275\u0275elementStart(9,"h5",13),l.\u0275\u0275text(10,"No reminders set!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(11,"p"),l.\u0275\u0275text(12,"Set your first reminder and never miss a birthday or other occasion again."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(13,"div",14),l.\u0275\u0275elementStart(14,"primary-button",15),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).toggleNewReminder()}),l.\u0275\u0275text(15,"Create a reminder"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}}function An(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",16),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).toggleNewReminder()}),l.\u0275\u0275elementStart(1,"span",17),l.\u0275\u0275text(2,"Create new reminder"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",18),l.\u0275\u0275text(4,"+"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}}function Fn(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",19),l.\u0275\u0275elementStart(1,"h4"),l.\u0275\u0275text(2,"My Reminders"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"thor-ico",20),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).showSearch()}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}2&e&&(l.\u0275\u0275advance(3),l.\u0275\u0275property("p","search")("className","account-address-no-bar"))}function jn(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",39),l.\u0275\u0275elementStart(1,"h5",40),l.\u0275\u0275text(2),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext().$implicit,t=l.\u0275\u0275nextContext(5);l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(t.returnInitials(e))}}const Un=function(e){return["/cards/",e]};function Vn(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"li",27),l.\u0275\u0275elementStart(1,"div",28),l.\u0275\u0275elementStart(2,"div",29),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(5).editReminder(t)}),l.\u0275\u0275element(3,"thor-ico",30),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"div",31),l.\u0275\u0275elementStart(5,"a",32),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(5).segmentReminderShopClicked(t)}),l.\u0275\u0275text(6,"Shop card"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"div",33),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(5).editReminderDesktop(t)}),l.\u0275\u0275text(8,"Edit"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(9,"p",34),l.\u0275\u0275text(10),l.\u0275\u0275pipe(11,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(12,jn,3,1,"div",35),l.\u0275\u0275elementStart(13,"h5",36),l.\u0275\u0275text(14),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(15,"p",37),l.\u0275\u0275text(16),l.\u0275\u0275pipe(17,"addApostrophe"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(18,"p",38),l.\u0275\u0275text(19),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(5);l.\u0275\u0275advance(5),l.\u0275\u0275property("routerLink",l.\u0275\u0275pureFunction1(11,Un,n.hyphenateShopLink(e.reminder_type))),l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(11,6,e.reminder_date,"EEEE d MMMM")),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf","ANNIVERSARY"===e.reminder_type||"BIRTHDAY"===e.reminder_type),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.reminder_recipient.name),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind1(17,9,n.returnReminderType(e))),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate1("",e.notice_period," days before")}}function Nn(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"ul",24),l.\u0275\u0275elementStart(1,"p",25),l.\u0275\u0275text(2),l.\u0275\u0275pipe(3,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(4,Vn,20,13,"li",26),l.\u0275\u0275pipe(5,"gridFilter"),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(4);l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(3,2,e[0].reminder_date,"MMMM")),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngForOf",l.\u0275\u0275pipeBind2(5,5,e,n.searchText))}}function Tn(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div"),l.\u0275\u0275template(1,Nn,6,8,"ul",23),l.\u0275\u0275pipe(2,"gridFilter"),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(1),l.\u0275\u0275property("ngForOf",l.\u0275\u0275pipeBind2(2,1,e,n.searchText))}}function Rn(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",21),l.\u0275\u0275template(1,Tn,3,4,"div",22),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275property("ngForOf",e.years)}}function Ln(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",1),l.\u0275\u0275elementStart(1,"div",2),l.\u0275\u0275elementStart(2,"h5",3),l.\u0275\u0275text(3,"Reminders"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"p"),l.\u0275\u0275text(5,"Never miss a birthday, anniversary, or any occasion again! Create a reminder, we'll contact you with enough time to order the perfect card."),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(6,Dn,16,0,"div",4),l.\u0275\u0275template(7,An,5,0,"div",5),l.\u0275\u0275template(8,Fn,4,2,"div",6),l.\u0275\u0275template(9,Rn,2,1,"div",7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(6),l.\u0275\u0275property("ngIf",!e.reminders.length),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.reminders.length),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.reminders.length),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.reminders.length)}}let zn=(()=>{class e{constructor(e,t,n,i,r,o,a,s,c){this.elementRef=e,this.ShareData=t,this.Notification=n,this.UserUtils=i,this.RemindersUtils=r,this.Analytics=o,this.AccountOverviewUtils=a,this.FacebookTwitterPixel=s,this.SegmentService=c}ngOnInit(){this.searchText="",this.reminders||this.update.next(["updateReminders"])}ngOnChanges(e){if(e.formData&&e.formData.currentValue){let t=e.formData.currentValue;switch(e.formData.currentValue.type){case"new":this.saveNewReminder(t.payload);break;case"update":this.updateReminder(t.payload);break;case"delete":this.deleteReminder(t.payload)}}e.reminders&&e.reminders.currentValue&&(this.reminders=e.reminders.currentValue)}ngOnDestroy(){}reminderChecks(e){return e.reminder_recipient.address&&!e.reminder_recipient.address.recipient&&(e.reminder_recipient.address.recipient=e.reminder_recipient.name),e.reminder_recipient.address&&!e.reminder_recipient.address.address1&&delete e.reminder_recipient.address,e}saveNewReminder(e){let t=this.reminderChecks(e);this.RemindersUtils.createReminder(t).then(e=>{var t=e;t.address_enabled=null!==e.reminder_recipient.address,this.reminders.push(t),this.Notification.success("Reminder successfully created!"),this.FacebookTwitterPixel.customFbEvent("CreateNewReminder",{}),this.Analytics.customEvent("User","Create Reminder","None"),this.UserUtils.getReminders().then(e=>{this.UserUtils.reminders=e.reminders,this.update.next(["updateReminders"])}),this.ShareData.trigger("updateHeaderReminders")}).catch(e=>{console.log(e),this.ShareData.trigger("showError","reminderCreateError")})}updateReminder(e){let t=this.reminderChecks(e);this.RemindersUtils.editReminder(t,t.id).then(e=>{this.Notification.success("Reminder successfully updated!"),this.UserUtils.getReminders().then(e=>{this.UserUtils.reminders=e.reminders,this.update.next(["updateReminders"])}),this.ShareData.trigger("updateHeaderReminders")}).catch(e=>{console.log(e),this.Notification.error("reminderUpdateError")})}deleteReminder(e){this.RemindersUtils.deleteReminder(e.id).then(e=>{this.Notification.success("Your reminder was successfully deleted!"),this.UserUtils.getReminders().then(e=>{this.UserUtils.reminders=e.reminders,this.update.next(["updateReminders"])}),this.ShareData.trigger("updateHeaderReminders")}).catch(e=>{console.log(e),this.ShareData.trigger("showError","reminderDeleteError")})}editReminder(e){this.update.next(["reminder",e]),this.SegmentService.trackCustom(yn(e))}editReminderDesktop(e){this.update.next(["reminderDesktop",e]),this.SegmentService.trackCustom(yn(e))}showSearch(){this.update.next(["remindersSearch",this.years]),this.customEvent()}toggleNewReminder(){this.update.next("mobile"===this.device||"mobile-large"===this.device?["new reminder"]:["newReminderDesktop"]),this.SegmentService.trackCustom(Mn())}toggleNewReminderDesktop(){this.update.next(["newReminderDesktop"])}displayReminderName(e){if(e)return this.RemindersUtils.displayReminderName(e)}hyphenateShopLink(e){return"OTHER"===e?"":"VALENTINES_DAY"===e?"valentines":e.replace("_","-").toLowerCase()}returnInitials(e){let t,n=e.reminder_recipient.name.split(" ");return t=n[1]?n[1]:null,this.AccountOverviewUtils.returnInitials(n[0],t)}returnReminderType(e){return e.reminder_type.charAt(0)+e.reminder_type.slice(1).toLowerCase().replace(/_/g," ")}customEvent(){this.Analytics.customEvent("Profile Reminders Search","Click","None")}segmentReminderShopClicked(e){this.SegmentService.trackCustom(bn(e))}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(m.P),l.\u0275\u0275directiveInject(u.f),l.\u0275\u0275directiveInject(Sn.P),l.\u0275\u0275directiveInject(O.c),l.\u0275\u0275directiveInject(g.e),l.\u0275\u0275directiveInject(kn.f),l.\u0275\u0275directiveInject(M.BP))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-reminders"]],inputs:{reminders:"reminders",years:"years",update:"update",formData:"formData",device:"device"},features:[l.\u0275\u0275NgOnChangesFeature],decls:1,vars:1,consts:[["class","account-reminders content",4,"ngIf"],[1,"account-reminders","content"],[1,"reminders"],[1,"w500"],["class","NoReminders",4,"ngIf"],["class","add-reminder-container","data-test-id","createNewReminder",3,"click",4,"ngIf"],["class","my-reminders-title",4,"ngIf"],["class","reminders mb",4,"ngIf"],[1,"NoReminders"],[1,"NoReminders__Copy"],[1,"orange",3,"click"],[1,"NoReminders__Borders","text-center"],["imgSrc","img/action/reminder-illustration.jpg"],[1,"sm","w500"],[1,"NoReminders__Borders__Button"],[3,"click"],["data-test-id","createNewReminder",1,"add-reminder-container",3,"click"],[1,"button-text"],[1,"plus-icon"],[1,"my-reminders-title"],[1,"search-icon",3,"p",
1"className","click"],[1,"reminders","mb"],[4,"ngFor","ngForOf"],["class","no-list",4,"ngFor","ngForOf"],[1,"no-list"],[1,"year-titles","tab-item-12","w500"],["class","reminder-list contact-item des-lg-item-4 tab-item-6 mob-item-12",4,"ngFor","ngForOf"],[1,"reminder-list","contact-item","des-lg-item-4","tab-item-6","mob-item-12"],["data-test-id","reminder",1,"box"],[1,"icon",3,"click"],["p","pencil","className","orange"],[1,"buttons"],[1,"shop-card","thor-btn","orange-btn","md",3,"routerLink","click"],[1,"edit","btn-thor-white","md",3,"click"],[1,"date"],["class","profile-image",4,"ngIf"],[1,"name"],[1,"reminder-type"],[1,"days"],[1,"profile-image"],[1,"initials","w900"]],template:function(e,t){1&e&&l.\u0275\u0275template(0,Ln,10,4,"div",0),2&e&&l.\u0275\u0275property("ngIf",t.reminders)},directives:[i.O5,M.t1,En.K,Pe.n,i.sg,r.yS],pipes:[mn.N,i.uU,In.A],styles:[".account-reminders[_ngcontent-%COMP%]{margin:auto;padding:0 20px}@media (min-width: 769px){.account-reminders[_ngcontent-%COMP%]{padding:0 10px}}@media (min-width: 992px){.account-reminders[_ngcontent-%COMP%]{padding:0 25px}}.account-reminders[_ngcontent-%COMP%]   .NoReminders__Copy[_ngcontent-%COMP%]{margin-bottom:45px}.account-reminders[_ngcontent-%COMP%]   .NoReminders__Copy[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{line-height:1.7}.account-reminders[_ngcontent-%COMP%]   .NoReminders__Copy[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font:inherit}.account-reminders[_ngcontent-%COMP%]   .NoReminders__Copy[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{white-space:nowrap;font:inherit}.account-reminders[_ngcontent-%COMP%]   .NoReminders__Borders[_ngcontent-%COMP%]{border:1px dashed #607D8B;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:5px;padding:30px 10px 60px}.account-reminders[_ngcontent-%COMP%]   .NoReminders__Borders[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin:auto auto 20px;width:60%;max-width:285px}.account-reminders[_ngcontent-%COMP%]   .NoReminders__Borders[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin-bottom:25px}.account-reminders[_ngcontent-%COMP%]   .NoReminders__Borders__Button[_ngcontent-%COMP%]{width:171px;margin:auto}.account-reminders[_ngcontent-%COMP%]   .my-reminders-title[_ngcontent-%COMP%]{margin:15px 0 20px;position:relative}.account-reminders[_ngcontent-%COMP%]   .my-reminders-title[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:24px}@media (min-width: 769px){.account-reminders[_ngcontent-%COMP%]   .my-reminders-title[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:30px}}.account-reminders[_ngcontent-%COMP%]   .my-reminders-title[_ngcontent-%COMP%]   .search-icon[_ngcontent-%COMP%]{cursor:pointer}@media (min-width: 576px){.account-reminders[_ngcontent-%COMP%]   .my-reminders-title[_ngcontent-%COMP%]   .search-icon[_ngcontent-%COMP%]{display:none}}.account-reminders[_ngcontent-%COMP%]   .add-reminder-container[_ngcontent-%COMP%]{margin-bottom:40px;text-align:center;border-radius:3px;border:dashed 1px #ff6900;padding:20px;width:100%;font-size:15px;cursor:pointer}.account-reminders[_ngcontent-%COMP%]   .add-reminder-container[_ngcontent-%COMP%]   .button-text[_ngcontent-%COMP%]{font-size:20px;color:#ff6900}.account-reminders[_ngcontent-%COMP%]   .add-reminder-container[_ngcontent-%COMP%]   .plus-icon[_ngcontent-%COMP%]{margin-right:0;margin-left:10px;vertical-align:baseline;vertical-align:initial}@media (min-width: 840px){.account-reminders[_ngcontent-%COMP%]   .add-reminder-container[_ngcontent-%COMP%]{width:350px}}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin-top:20px}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .year-titles[_ngcontent-%COMP%]{font-size:18px}@media (min-width: 840px){.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .year-titles[_ngcontent-%COMP%]{font-size:22px}}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]{height:145px;margin-bottom:25px}@media (min-width: 450px){.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]{width:335px}}@media (min-width: 769px){.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]{width:335px;height:200px;display:inline-block;margin-right:3%;margin-bottom:5%;vertical-align:top}}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;border:1px solid black;border-radius:3px;margin-bottom:23px;padding:14px 10px 10px}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:28px;height:18px;float:right;margin-right:-11px}@media (min-width: 840px){.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:none}}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]{display:block;border-radius:50%;width:60px;height:60px;text-align:center;background:#c8c8c8;position:absolute;
1left:78%;top:4%}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]   .initials[_ngcontent-%COMP%]{color:#fff;margin-top:16px}}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .shop-card[_ngcontent-%COMP%]{position:absolute;top:72%;left:53%;border-radius:3px;width:43%;font-weight:500;padding:6px 16px}@media (min-width: 840px){.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .shop-card[_ngcontent-%COMP%]{top:75%;left:54%;width:144px;height:30px;line-height:17px}}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .edit[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .edit[_ngcontent-%COMP%]{display:block;position:absolute;width:145px;height:30px;border-radius:3px;line-height:30px;text-align:center;top:75%}}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-size:16px;margin-bottom:4px}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{max-width:18ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}@media (min-width: 840px){.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{width:210px}}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .reminder-type[_ngcontent-%COMP%]{font-weight:700;margin-top:-11px;font-size:15px}.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .days[_ngcontent-%COMP%]{position:absolute;top:77%}@media (min-width: 840px){.account-reminders[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .days[_ngcontent-%COMP%]{top:49.5%}}"]}),e})();var Bn=n(57266),qn=n(90071),Hn=n(43188),$n=n(88345);function Yn(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",37),l.\u0275\u0275elementStart(1,"h4",38),l.\u0275\u0275text(2),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.returnInitials(e.reminder))}}const Gn=function(e){return{active:e}};function Xn(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"a",39),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(2).updateOccasion(t)}),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(2,Gn,n.details.reminder.reminder_type==e.val)),l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e.name)}}function Wn(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"p",40),l.\u0275\u0275text(1),l.\u0275\u0275pipe(2,"date"),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(2,1,e.details.reminder.reminder_date,"d MMMM yyyy"))}}function Qn(e,t){1&e&&(l.\u0275\u0275elementStart(0,"p",40),l.\u0275\u0275text(1,"Add date"),l.\u0275\u0275elementEnd())}function Jn(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"option",64),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(4);l.\u0275\u0275property("value",e.key)("selected",n.details.reminder.reminder_recipient.address.country_code===e.key),l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e.label)}}
1const Zn=function(e){return{invalid:e}};function Kn(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",47),l.\u0275\u0275elementStart(1,"h5"),l.\u0275\u0275text(2,"Address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"form",48,49),l.\u0275\u0275elementStart(5,"p",16),l.\u0275\u0275elementStart(6,"label",50),l.\u0275\u0275text(7,"Address Line 1 "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"input",51),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).details.reminder.reminder_recipient.address.address1=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(9,"p",16),l.\u0275\u0275elementStart(10,"label",52),l.\u0275\u0275text(11,"Address Line 2"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(12,"input",53),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).details.reminder.reminder_recipient.address.address2=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(13,"p",54),l.\u0275\u0275elementStart(14,"label",55),l.\u0275\u0275text(15,"Address Line 3"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(16,"input",56),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).details.reminder.reminder_recipient.address.address3=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(17,"p",16),l.\u0275\u0275elementStart(18,"label",57),l.\u0275\u0275text(19,"City"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(20,"input",58),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).details.reminder.reminder_recipient.address.city=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(21,"p",16),l.\u0275\u0275elementStart(22,"label",59),l.\u0275\u0275text(23,"Postcode"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(24,"input",60),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).details.reminder.reminder_recipient.address.postcode=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(25,"p",54),l.\u0275\u0275elementStart(26,"label",61),l.\u0275\u0275text(27,"Country "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(28,"select",62),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).details.reminder.reminder_recipient.address.country_code=t}),l.\u0275\u0275template(29,Jn,2,3,"option",63),l.\u0275\u0275pipe(30,"orderBy"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275reference(4),t=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(5),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(14,Zn,t.invalidInput(t.details.reminder.reminder_recipient.address.address1)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.reminder.reminder_recipient.address.address1),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(16,Zn,t.invalidInput(t.details.reminder.reminder_recipient.address.address2)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.reminder.reminder_recipient.address.address2),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngModel",t.details.reminder.reminder_recipient.address.address3),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(18,Zn,t.invalidInput(t.details.reminder.reminder_recipient.address.city)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.reminder.reminder_recipient.address.city),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(20,Zn,t.invalidInput(t.details.reminder.reminder_recipient.address.postcode)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.reminder.reminder_recipient.address.postcode),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngModel",t.details.reminder.reminder_recipient.address.country_code),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngForOf",l.\u0275\u0275pipeBind2(30,11,t.countries,"label"))}}function ei(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",65),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).addressTrigger=!0}),l.\u0275\u0275elementEnd()}}function ti(e,t){if(1&e&&(l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275template(1,Kn,31,22,"div",41),l.\u0275\u0275template(2,ei,1,0,"div",42),l.\u0275\u0275elementStart(3,"p",43),l.\u0275\u0275elementStart(4,"label",44),l.\u0275\u0275text(5,"Add Address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(6,"input",45),l.\u0275\u0275element(7,"i",46),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementContainerEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","tablet"===e.device||"desktop"===e.device||"desktop-large"===e.device),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","mobile"===e.device||"mobile-large"===e.device),l.\u0275\u0275advance(4),l.\u0275\u0275property("disabled",!0)("value",e.displayAddress())}}const ni=function(e){return{disabled:e}};function ii(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",66),l.\u0275\u0275elementStart(1,"button",67),l.\u0275\u0275listener("click",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).openDeletePopup(t)}),l.\u0275\u0275text(2,"Delete reminder"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"button",68),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).updateReminder()}),l.\u0275\u0275text(4,"Save reminder"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275property("disabled",!e.formValidation())("ngClass",l.\u0275\u0275pureFunction1(2,ni,!e.formValidation()))}}function ri(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",66),l.\u0275\u0275elementStart(1,"button",69),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).saveNewReminder()}),l.\u0275\u0275text(2,"Save reminder"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275property("disabled",!e.formValidation())("ngClass",l.\u0275\u0275pureFunction1(2,ni,!e.formValidation()))}}const oi=function(e,t){return{disabled:e,invalid:t}};function ai(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",2),l.\u0275\u0275elementStart(1,"div",3),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeForm()}),l.\u0275\u0275element(2,"i",4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",5),l.\u0275\u0275elementStart(4,"div",6),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeForm()}),l.\u0275\u0275element(5,"thor-ico",7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"div",8),l.\u0275\u0275template(7,Yn,3,1,"div",9),l.\u0275\u0275elementStart(8,"h5",10),l.\u0275\u0275text(9),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(10,"form",11,12),l.\u0275\u0275elementStart(12,"h6",13),l.\u0275\u0275text(13,"Occasion"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(14,"div",14),l.\u0275\u0275template(15,Xn,2,4,"a",15),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(16,"p",16),l.\u0275\u0275elementStart(17,"label",17),l.\u0275\u0275text(18,"Name"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(19,"input",18),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.reminder.reminder_recipient.name=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(20,"div",19),l.\u0275\u0275elementStart(21,"label",20),l.\u0275\u0275text(22,"Date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(23,"datepicker",21),l.\u0275\u0275listener("emitDate",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().changeReminderDate(t)}),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(24,Wn,3,4,"p",22),l.\u0275\u0275template(25,Qn,2,0,"p",22),l.\u0275\u0275element(26,"div",23),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(27,"div",24),l.\u0275\u0275elementStart(28,"label",25),l.\u0275\u0275text(29,"Remind me"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(30,"thor-list",26),l.\u0275\u0275listener("modelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().details.reminder.notice_period=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(31,ti,8,4,"ng-container",27),l.\u0275\u0275template(32,ii,5,4,"div",28),l.\u0275\u0275template(33,ri,3,4,"div",28),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(34,"div",29),l.\u0275\u0275elementStart(35,"div",30),l.\u0275\u0275listener("clickOutside",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeDeletePopup()}),l.\u0275\u0275elementStart(36,"div",31),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeDeletePopup()}),l.\u0275\u0275element(37,"thor-ico",7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(38,"p",32),l.\u0275\u0275text(39,"Are you sure you want to delete this reminder?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(40,"div",33),l.\u0275\u0275elementStart(41,"a",34),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().deleteReminder()}),l.\u0275\u0275text(42,"Yes"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(43,"a",35),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().closeDeletePopup()}),l.\u0275\u0275text(44,"No"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(45,"p",36),l.\u0275\u0275elementStart(46,"strong"),l.\u0275\u0275text(47,"Note: "),l.\u0275\u0275elementEnd(),l.\u0275\u0275text(48,"This action cannot be undone."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(49,"p",36),l.\u0275\u0275text(50,"Please allow a few days for these changes to be reflected in your account"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275reference(11),t=l.\u0275\u0275nextContext();l.\u0275\u0275advance(5),l.\u0275\u0275property("p","cancel"),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",t.reminder&&("ANNIVERSARY"===t.reminder.reminder_type||"BIRTHDAY"===t.reminder.reminder_type)),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(t.displayReminderName(t.reminder)),l.\u0275\u0275advance(6),l.\u0275\u0275property("ngForOf",t.reminderTypes),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(21,Zn,t.invalidInput(t.details.reminder.reminder_recipient.name)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.details.reminder.reminder_recipient.name),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction2(23,oi,t.disableDatepicker,!t.disableDatepicker&&t.invalidInput(t.details.reminder.reminder_date)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("type","hide-field")("startDate",t.minDate)("date",t.details.reminder.reminder_date)("disabled",t.disableDatepicker)("placeholder","Add date"),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.details.reminder.reminder_date),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!t.disableDatepicker&&!t.details.reminder.reminder_date),l.\u0275\u0275advance(5),l.\u0275\u0275property("model",t.details.reminder.notice_period)("list",t.noticePeriods),l.\u0275\u0275advance(1),l.\u0275\u0275property("featureFlagDisabled","TSN-513"),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","reminder"===t.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","new reminder"===t.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(26,Gn,t.deleteReminderPopupVisible)),l.\u0275\u0275advance(3),l.\u0275\u0275property("p","cross")}}function si(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275elementStart(1,"div",3),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).addressTrigger=!1}),l.\u0275\u0275element(2,"i",4),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(3,"account-edit-address",71),l.\u0275\u0275elementContainerEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275property("address",e.details.reminder.reminder_recipient.address)("countries",e.countries)("reminder",!0)("reminderObs",e.reminderAddressCall)}}function ci(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",70),l.\u0275\u0275template(1,si,4,4,"ng-container",27),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(1),l.\u0275\u0275property("featureFlagDisabled","TSN-513"))}let di=(()=>{class e{constructor(e,t,n,i,r,o,a,c){this.elementRef=e,this.RemindersUtils=t,this.GeneralUtils=n,this.AccountAddressesUtils=i,this.AccountOverviewUtils=r,this.SegmentService=o,this.WebPusService=a,this.shareData=c,this.listenComponent=new s.y(e=>{this.reminderAddressCall=e}),this.details={reminder:{}},this.addressTrigger=!1,this.noticePeriods=this.RemindersUtils.initNoticePeriods(),this.reminderTypes=this.RemindersUtils.initReminderTypes(),this.defaultDate=(new Date).toJSON().split("T")[0],this.deleteReminderPopupVisible=!1,this.disableDatepicker=!1}ngOnInit(){this.today=this.GeneralUtils.getToday(),this.minDate=new Date,this.minDate.setDate(this.minDate.getDate());let e=this.reminderTypes[0];this.reminder&&(this.details.reminder=(0,xe.Z)(this.reminder),this.type="reminder",this.details.reminder.reminder_recipient.address||(this.details.reminder.reminder_recipient.address=this.AccountAddressesUtils.initEmptyAddressObj()),this.details.reminder.reminder_recipient.address.recipient=this.details.reminder.reminder_recipient.name,e=this.reminderTypes.find(e=>e.val===this.reminder.reminder_type),this.disableDatepicker=e.disableDatepicker),this.listenComponent.subscribe(e=>{e.address?this.copyAddress(e.address):this.addressTrigger=!1})}ngAfterViewInit(){}
1ngOnChanges(e){e.reminder&&(e.reminder.currentValue||(this.type="new reminder",this.details.reminder=this.RemindersUtils.initNewContactObject(this.today),this.details.reminder.reminder_recipient.address.recipient=this.details.reminder.reminder_recipient.name))}ngOnDestroy(){}deleteReminder(){this.deleteReminderPopupVisible=!1,this.update.next(["passFormData",{payload:this.details.reminder,type:"delete"}]),this.SegmentService.trackCustom(wn(this.details.reminder))}updateReminder(){this.update.next(["passFormData",{payload:this.details.reminder,type:"update"}]),this.SegmentService.trackCustom(vn(this.details.reminder))}saveNewReminder(){this.update.next(["passFormData",{payload:this.details.reminder,type:"new"}]),this.SegmentService.trackCustom(vn(this.details.reminder)),this.WebPusService.triggerPrompt()}closeForm(){this.update.next(["closeForm"])}copyAddress(e){this.details.reminder.reminder_recipient.address=e,this.addressTrigger=!1}displayReminderName(e){return e?this.RemindersUtils.displayReminderName(e):"New Reminder"}displayAddress(){let e=this.details.reminder.reminder_recipient.address;return e&&e.recipient&&e.address1?e.recipient+", "+e.address1:"Add Address"}validDate(){return this.disableDatepicker||!!this.details.reminder.reminder_date}formValidation(){let e=this.elementRef.nativeElement.getElementsByTagName("form");return e.length>1&&!this.dirtyCheck(e)?e[0].checkValidity()&&e[1].checkValidity()&&this.validDate():e[0].checkValidity()&&this.validDate()}dirtyCheck(e){return[...e[1]].slice(0,5).every(e=>!e.value)}invalidInput(e){return this.AccountOverviewUtils.invalidInput(e)}returnInitials(e){let t,n=e.reminder_recipient.name.split(" ");return t=n[1]?n[1]:null,this.AccountOverviewUtils.returnInitials(n[0],t)}openDeletePopup(e){e.stopPropagation(),this.deleteReminderPopupVisible=!0}closeDeletePopup(){this.deleteReminderPopupVisible=!1}changeReminderDate(e){e&&(e=this.GeneralUtils.dateToString(e),this.details.reminder.reminder_date=e)}updateOccasion({val:e,disableDatepicker:t,date:n}){this.details.reminder.reminder_type=e,this.disableDatepicker=t,this.details.reminder.reminder_date=n||null}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(Sn.P),l.\u0275\u0275directiveInject(P.w),l.\u0275\u0275directiveInject(_e.g),l.\u0275\u0275directiveInject(g.e),l.\u0275\u0275directiveInject(M.BP),l.\u0275\u0275directiveInject(Bn.A),l.\u0275\u0275directiveInject(p.u))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-edit-reminder"]],inputs:{update:"update",reminder:"reminder",countries:"countries",device:"device"},features:[l.\u0275\u0275NgOnChangesFeature],decls:2,vars:2,consts:[["class","account-edit-reminder",4,"ngIf"],["class","address-form",4,"ngIf"],[1,"account-edit-reminder"],[1,"cancel-icon",3,"click"],[1,"mdi","mdi-chevron-left"],[1,"reminder-content","content"],[1,"cancel-icon-desktop",3,"click"],[3,"p"],[1,"form-header-details"],["class","profile-image",4,"ngIf"],[1,"center","title"],["name","AccountReminderForm","novalidate",""],["AccountReminderForm","ngForm"],[1,"lg","w700","titel"],[1,"occasions-content"],["class","occasion",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"thor-input","new-input",3,"ngClass"],["for","name"],["type","text","required","","placeholder","Name","id","name","name","name","maxlength","50","text-filtering","",3,"ngModel","ngModelChange"],["datepicker-toggle","",1,"thor-input","new-input","date",3,"ngClass"],["for","date",1,"added-inline-padding"],[3,"type","startDate","date","disabled","placeholder","emitDate"],["class","format-date",4,"ngIf"],[1,"icon"],[1,"thor-input","new-input","remind-me"],["for","list"],["className","new show-options","name","list",3,"model","list","modelChange"],[4,"featureFlagDisabled"],["class","account-buttons",4,"ngIf"],[1,"update-form","card-delete",3,"ngClass"],[1,"update-form-inner","active",3,"clickOutside"],[1,"cross-container",3,"click"],[1,"question"],[1,"delete-buttons"],["href","javascript:;",1,"btn-thor-white",3,"click"],["href","javascript:;
1",1,"btn-thor-orange",3,"click"],[1,"note"],[1,"profile-image"],[1,"initials"],[1,"occasion",3,"ngClass","click"],[1,"format-date"],["class","add-address-desktop",4,"ngIf"],["class","add-address",3,"click",4,"ngIf"],[1,"thor-input","new-input","address-display"],["for","add address"],["type","text","required","","placeholder","Add address","id","address","name","address","max-length","0","text-filtering","",3,"disabled","value"],[1,"mdi","mdi-chevron-right","mobile"],[1,"add-address-desktop"],["name","AccountAddressForm","novalidate",""],["AccountAddressForm","ngForm"],["for","addressLine1"],["type","text","required","","placeholder","Add address","id","addressLine1","name","addressLine1","max-length","50","text-filtering","",3,"ngModel","ngModelChange"],["for","addressLine2"],["type","text","placeholder","Add address","id","addressLine2","name","addressLine2","max-length","50","text-filtering","",3,"ngModel","ngModelChange"],[1,"thor-input","new-input"],["for","addressLine3"],["type","text","placeholder","Add address","id","addressLine3","name","addressLine3","max-length","50","text-filtering","",3,"ngModel","ngModelChange"],["for","city"],["type","text","required","","placeholder","Add city","id","city","name","city","max-length","50","text-filtering","",3,"ngModel","ngModelChange"],["for","postcode"],["type","text","required","","placeholder","Add postcode","id","postcode","name","postcode","max-length","50","text-filtering","",3,"ngModel","ngModelChange"],["for","newAddressCountry"],["id","newAddressCountry","name","newAddressCountry",3,"ngModel","ngModelChange"],["required","",3,"value","selected",4,"ngFor","ngForOf"],["required","",3,"value","selected"],[1,"add-address",3,"click"],[1,"account-buttons"],[1,"btn-thor-white","large",3,"click"],[1,"btn-thor-orange",3,"disabled","ngClass","click"],[1,"btn-thor-orange","new-address",3,"disabled","ngClass","click"],[1,"address-form"],[3,"address","countries","reminder","reminderObs"]],template:function(e,t){1&e&&(l.\u0275\u0275template(0,ai,51,28,"div",0),l.\u0275\u0275template(1,ci,2,1,"div",1)),2&e&&(l.\u0275\u0275property("ngIf",!t.addressTrigger),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.addressTrigger))},directives:[i.O5,Pe.n,ve._Y,ve.JL,ve.F,i.sg,i.mk,ve.Fj,ve.Q7,ve.nD,ve.JJ,ve.On,qn.W,Hn.a,$n.X,M.oT,Oe.L,ve.EJ,ve.YN,ve.Kr,Be],pipes:[i.uU,Se.d],styles:["@media (min-width: 840px){.account-edit-reminder[_ngcontent-%COMP%]{padding-top:50px;width:725px;margin:0 auto}}.account-edit-reminder[_ngcontent-%COMP%]   .cancel-icon[_ngcontent-%COMP%]{position:absolute;top:15px;font-size:35px;left:13px}@media (min-width: 840px){.account-edit-reminder[_ngcontent-%COMP%]   .cancel-icon[_ngcontent-%COMP%]{display:none}}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .cancel-icon-desktop[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .cancel-icon-desktop[_ngcontent-%COMP%]{display:block;position:absolute;font-size:25px;width:25px;margin-top:6px}}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .form-header-details[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .form-header-details[_ngcontent-%COMP%]{display:block;margin-bottom:23px}}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .form-header-details[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .form-header-details[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]{display:block;margin:0 auto 12px;border-radius:50%;width:90px;height:90px;background:#c8c8c8;text-align:center}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .form-header-details[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]   .initials[_ngcontent-%COMP%]{color:#fff;line-height:93px}}@media (min-width: 840px){.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .titel[_ngcontent-%COMP%]{display:none}}@media (min-width: 840px){.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{width:45%;margin-right:10%;display:inline-block;vertical-align:top}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{padding-bottom:5px;padding-top:6px}}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:12px;height:12px;display:block;position:absolute;right:18px;top:29px;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:none;transition-property:none;-webkit-transition-property:initial;transition-property:initial;border:solid 2.8px #ff6900;border-bottom:none;border-left:none;-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(45deg);transform:rotate(45deg)}@media (min-width: 840px){.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{top:29px}}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]   .icon.open[_ngcontent-%COMP%]{-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:none;transition-property:none;-webkit-transition-property:initial;transition-property:initial;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transform:rotate(135deg);transform:rotate(135deg)}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .remind-me[_ngcontent-%COMP%]{display:inline-block;width:100%}@media (min-width: 840px){.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .remind-me[_ngcontent-%COMP%]{width:45%}}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .occasions-content[_ngcontent-%COMP%]{margin-bottom:10px}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .occasions-content[_ngcontent-%COMP%]   .occasion[_ngcontent-%COMP%]{border-radius:3px;border:solid 1px #000;background-color:#fff;font-size:16px;display:inline-block;padding:7px;margin:0 7px 8px 0}@media (min-width: 769px){.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .occasions-content[_ngcontent-%COMP%]   .occasion[_ngcontent-%COMP%]{margin:0 11px 8px 0}}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .occasions-content[_ngcontent-%COMP%]   .occasion[_ngcontent-%COMP%]:last-child{margin-right:0}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .occasions-content[_ngcontent-%COMP%]   .occasion.active[_ngcontent-%COMP%]{background-color:#ff6900;color:#fff;border-color:#ff6900}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .thor-input[_ngcontent-%COMP%]   .mdi-chevron-right[_ngcontent-%COMP%]{font-size:34px;color:#ff6900;right:4px;top:16px}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%]{margin-top:30px}.account-edit-reminder[_ngcontent-%COMP%]   .reminder-content[_ngcontent-%COMP%]   .add-address[_ngcontent-%COMP%]   .address-display[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{max-width:29ch;overflow:hidden;text-overflow:ellipsis}.address-form[_ngcontent-%COMP%]   .cancel-icon[_ngcontent-%COMP%]{position:absolute;top:15px;font-size:35px;left:13px}@media (min-width: 840px){.address-form[_ngcontent-%COMP%]   .cancel-icon[_ngcontent-%COMP%]{display:none}}"]}),e})();function li(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",10),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(3).editAddress(t)}),l.\u0275\u0275elementStart(1,"div",11),l.\u0275\u0275elementStart(2,"div",12),l.\u0275\u0275elementStart(3,"h5",13),l.\u0275\u0275text(4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",14),l.\u0275\u0275elementStart(6,"div",15),l.\u0275\u0275text(7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"div",16),l.\u0275\u0275text(9),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(10,"div",17),l.\u0275\u0275element(11,"i",18),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate(n.returnInitials(e.firstname,e.surname)),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate1("",e.re
1cipient," "),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(n.displayAddressMobile(e))}}function pi(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",8),l.\u0275\u0275template(1,li,12,3,"div",9),l.\u0275\u0275pipe(2,"gridFilter"),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275property("ngForOf",l.\u0275\u0275pipeBind2(2,1,e.data,e.searchText))}}function mi(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"li",26),l.\u0275\u0275elementStart(1,"div",27),l.\u0275\u0275elementStart(2,"div",28),l.\u0275\u0275listener("click",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext(5).editReminder(t)}),l.\u0275\u0275element(3,"thor-ico",29),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"p",30),l.\u0275\u0275text(5),l.\u0275\u0275pipe(6,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"h5",31),l.\u0275\u0275text(8),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(9,"p",32),l.\u0275\u0275text(10),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(5);l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(6,3,e.reminder_date,"EEEE d MMMM")),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(n.displayReminderName(e)),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate1("",e.notice_period," days before")}}function gi(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"ul",23),l.\u0275\u0275elementStart(1,"h4",24),l.\u0275\u0275text(2),l.\u0275\u0275pipe(3,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(4,mi,11,6,"li",25),l.\u0275\u0275pipe(5,"gridFilter"),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(4);l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(3,2,e[0].reminder_date,"MMMM yyyy")),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngForOf",l.\u0275\u0275pipeBind2(5,5,e,n.searchText))}}function ui(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div"),l.\u0275\u0275template(1,gi,6,8,"ul",22),l.\u0275\u0275pipe(2,"gridFilter"),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit,n=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(1),l.\u0275\u0275property("ngForOf",l.\u0275\u0275pipeBind2(2,1,e,n.searchText))}}function hi(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",19),l.\u0275\u0275elementStart(1,"div",20),l.\u0275\u0275template(2,ui,3,4,"div",21),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(2),l.\u0275\u0275property("ngForOf",e.data)}}function fi(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",5),l.\u0275\u0275template(1,pi,3,4,"div",6),l.\u0275\u0275template(2,hi,3,1,"div",7),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","addressSearch"==e.type&&e.searchText),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","remindersSearch"==e.type&&e.searchText)}}let Ci=(()=>{class e{constructor(e,t,n,i){this.elementRef=e,this.reminderUtils=t,this.AccountAddressesUtils=n,this.AccountOverviewUtils=i,this.searchText=""}ngOnInit(){}ngOnDestroy(){}displayReminderName(e){return this.reminderUtils.displayReminderName(e)}editReminder(e){this.update.next(["reminder",e])}editAddress(e){this.update.next(["address",e])}displayAddressMobile(e){return this.AccountAddressesUtils.displayAddressMobile(e)}returnInitials(e,t){return this.AccountOverviewUtils.returnInitials(e,t)}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(Sn.P),l.\u0275\u0275directiveInject(_e.g),l.\u0275\u0275directiveInject(g.e))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-search"]],inputs:{data:"data",type:"type",update:"update"},decls:5,vars:5,consts:[[1,"account-search"],[1,"address-search"],["type","text","data-hj-suppress","",1,"--no-global",3,"ngModel","placeholder","ngModelChange"],[1,"search-icon",3,"p","className"],["class","container",4,"ngIf"],[1,"container"],["class","address-wrapper",4,"ngIf"],["class","reminders-wrapper",4,"ngIf"],[1,"address-wrapper"],["class","addresses",3,"click",4,"ngFor","ngForOf"],[1,"addresses",3,"click"],[1,"address-container"],[1,"profile-image"],[1,"initials","w900"],[1,"address-detail
1s"],[1,"block","w700","name"],[1,"block","address"],[1,"chevron-container"],[1,"mdi","mdi-chevron-right","mobile"],[1,"reminders-wrapper"],[1,"reminders","mb"],[4,"ngFor","ngForOf"],["class","no-list",4,"ngFor","ngForOf"],[1,"no-list"],[1,"tab-item-12","w500"],["class","reminder-list contact-item des-lg-item-4 tab-item-6 mob-item-12",4,"ngFor","ngForOf"],[1,"reminder-list","contact-item","des-lg-item-4","tab-item-6","mob-item-12"],[1,"box"],[1,"icon",3,"click"],["p","pencil","className","orange"],[1,"date"],[1,"name"],[1,"days"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275elementStart(2,"input",2),l.\u0275\u0275listener("ngModelChange",function(e){return t.searchText=e}),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(3,"thor-ico",3),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(4,fi,3,2,"div",4),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(2),l.\u0275\u0275propertyInterpolate("placeholder","remindersSearch"==t.type?"Search Reminders":"Search people"),l.\u0275\u0275property("ngModel",t.searchText),l.\u0275\u0275advance(1),l.\u0275\u0275property("p","search")("className","account-address"),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.data))},directives:[ve.Fj,ve.JJ,ve.On,Pe.n,i.O5,i.sg],pipes:[mn.N,i.uU],styles:['.account-search[_ngcontent-%COMP%]   .address-search[_ngcontent-%COMP%]{position:relative;margin:25px 0 12px}.account-search[_ngcontent-%COMP%]   .address-search[_ngcontent-%COMP%]   input.address-search-bar[_ngcontent-%COMP%]{height:40px;background-color:#8e8e931f;width:100%;border:0;font-size:14px;padding:0 0 0 9px}.account-search[_ngcontent-%COMP%]   .address-search[_ngcontent-%COMP%]   input.address-search-bar[_ngcontent-%COMP%]::-webkit-input-placeholder{font-size:14px;font-family:"Roboto";color:#99999e}.account-search[_ngcontent-%COMP%]   .address-search[_ngcontent-%COMP%]   input.address-search-bar[_ngcontent-%COMP%]::-moz-placeholder{font-size:14px;font-family:"Roboto";color:#99999e}.account-search[_ngcontent-%COMP%]   .address-search[_ngcontent-%COMP%]   input.address-search-bar[_ngcontent-%COMP%]::-ms-input-placeholder{font-size:14px;font-family:"Roboto";color:#99999e}.account-search[_ngcontent-%COMP%]   .address-search[_ngcontent-%COMP%]   input.address-search-bar[_ngcontent-%COMP%]::placeholder{font-size:14px;font-family:"Roboto";color:#99999e}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .address-wrapper[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;margin:0 0 30px;cursor:pointer}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .address-wrapper[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]{margin:2.5% 4% 0 0;border-radius:50%;width:70px;height:70px;background:#c8c8c8;text-align:center}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .address-wrapper[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .profile-image[_ngcontent-%COMP%]   .initials[_ngcontent-%COMP%]{margin-top:20px;color:#fff}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .address-wrapper[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .address-details[_ngcontent-%COMP%]{display:inline-block;line-height:1.31;width:55%;margin-top:13px}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .address-wrapper[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .address-details[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{display:block;overflow:hidden;text-overflow:ellipsis;max-width:22ch;white-space:nowrap}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .address-wrapper[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .address-details[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{line-height:1.25;white-space:normal;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .address-wrapper[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .chevron-container[_ngcontent-%COMP%]{position:relative;
1left:3%}@media (min-width: 340px){.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .address-wrapper[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .chevron-container[_ngcontent-%COMP%]{left:7%}}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .address-wrapper[_ngcontent-%COMP%]   .addresses[_ngcontent-%COMP%]   .address-container[_ngcontent-%COMP%]   .chevron-container[_ngcontent-%COMP%]   .mdi-chevron-right[_ngcontent-%COMP%]{font-size:34px;color:#ff6900;margin:22px 0;position:absolute}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]{height:130px;margin-bottom:25px}@media (min-width: 450px){.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]{width:335px}}@media (min-width: 769px){.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]{width:335px;height:200px;display:inline-block;margin-right:3%;margin-bottom:5%;vertical-align:top}}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;border:1px solid black;border-radius:3px;margin-bottom:23px;padding:10px}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:28px;height:18px;float:right;margin-right:-11px}@media (min-width: 840px){.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{display:none}}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .shop-card[_ngcontent-%COMP%]{position:absolute;top:68%;left:60%;border-radius:3px}@media (min-width: 450px){.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .shop-card[_ngcontent-%COMP%]{left:64%}}@media (min-width: 840px){.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .shop-card[_ngcontent-%COMP%]{top:75%;left:54%;width:144px;height:30px;line-height:10px}}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .edit[_ngcontent-%COMP%]{display:none}@media (min-width: 840px){.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .edit[_ngcontent-%COMP%]{display:block;position:absolute;width:145px;height:30px;border-radius:3px;line-height:30px;text-align:center;top:75%}}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-size:16px;margin-bottom:6px}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:normal;width:100%}@media (min-width: 840px){.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{width:190px}}.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .days[_ngcontent-%COMP%]{position:absolute;top:75%}@media (min-width: 840px){.account-search[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]   .reminders[_ngcontent-%COMP%]   .reminder-list[_ngcontent-%COMP%]   .box[_ngcontent-%COMP%]   .days[_ngcontent-%COMP%]{top:55%}}']}),e})();function xi(e){return[...(0,M.OL)(e,["recipient_type","recipient_type"],["payment_method","payment_method_type"],["basket_size","order_size"],["orderId","id"],["final_cost","final_cost"],["order_status","status"]),...(0,M.OL)(e.costs,["discount_amount","discount_amount"],["discount_campaign","discount_campaign_name"],["discount_code","discount_code"],["basket_value","card_items"]),...(0,M.OL)(e.order_delivery,["dispatch_date","dispatch_date"],["est_arrival_date","estimated_earliest_arrival_date"])]}const _i=(0,M.jT)("Self Help Started"),Pi=(0,M.jT)("Need Help Viewed"),Oi=(0,M.jT)("Need Help Clicked"),Mi=(0,M.jT)("Amend Order Viewed"),vi=(0,M.jT)("Amend Order Clicked"),bi=(0,M.jT)("Delivery Address Updated"),yi=(0,M.jT)("Delivery Address Edit"),wi=(0,M.jT)("Delivery Address Confirmed"),Si=(0,M.jT)("Delivery Date Viewed"),ki=(0,M.jT)("Delivery Date Selected"),Ei=(0,M.jT)("Delivery Date Updated"),Ii=(0,M.jT)("Amend Message Viewed"),Di=(0,M.jT)("Amend Message Edit"),Ai=(0,M.jT)("Cancel Order Viewed"),Fi=(0,M.jT)("Cancel Order Selected"),ji=(0,M.jT)("Self Help Completed");var Ui=n(14905),Vi=n(98346),Ni=n(45835),Ti=n(33483),Ri=n(95510),Li=n(72795);function zi(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",25),l.\u0275\u0275elementStart(1,"h2",26),l.\u0275\u0275text(2,"All Sorted!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",27),l.\u0275\u0275text(4,"Thank you for amending your order!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}const Bi=function(e){return{order_id:e,source:"ACCOUNT"}},qi=function(e){return{order:e}},Hi=function(e){return{data:e}};function $i(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"a",28),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext();return t.customEvent(),t.trackSelfHelp(t.order)}),l.\u0275\u0275text(1,"Need help?"),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("routerLink","/account/needhelp")("queryParams",l.\u0275\u0275pureFunction1(3,Bi,e.order.id))("state",l.\u0275\u0275pureFunction1(7,Hi,l.\u0275\u0275pureFunction1(5,qi,e.order)))}}function Yi(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",29),l.\u0275\u0275elementStart(1,"div",7),l.\u0275\u0275text(2,"Tracking number"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",8),l.\u0275\u0275text(4),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate(e.order.tracking_number)}}const Gi=function(e){return{complete:e}};function Xi(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",30),l.\u0275\u0275elementStart(1,"a",7),l.\u0275\u0275element(2,"i",31),l.\u0275\u0275element(3,"i",32),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"p",33),l.\u0275\u0275text(5),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit;l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(2,Gi,"complete"==e.state)),l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate(e.name)}
1}function Wi(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"h6",46),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext().$implicit;l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e.item_options[0].name)}}function Qi(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",47),l.\u0275\u0275elementStart(1,"div",48),l.\u0275\u0275elementStart(2,"product-gallery-item",49),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext().$implicit;return l.\u0275\u0275nextContext().showProductInfo(t)}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext().$implicit;l.\u0275\u0275advance(2),l.\u0275\u0275property("animateCard",!1)("outerImage",e.firstProductItem.outerImage)("innerImage",e.firstProductItem.innerImage)("orientation",e.firstProductItem.orientation)("type",e.firstProductItem.type)("background",e.firstProductItem.background)("cardPositions",e.firstProductItem.cardPositions)("showExclusive",e.firstProductItem.showExclusive)("personalisation",e.firstProductItem.personalisation)}}function Ji(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",34),l.\u0275\u0275elementStart(1,"div",35),l.\u0275\u0275elementStart(2,"p",36),l.\u0275\u0275text(3),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(4,Wi,2,1,"h6",37),l.\u0275\u0275elementStart(5,"p",38),l.\u0275\u0275text(6),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"p",39),l.\u0275\u0275text(8),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(9,"div",40),l.\u0275\u0275template(10,Qi,3,9,"div",41),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(11,"div",42),l.\u0275\u0275elementStart(12,"div",43),l.\u0275\u0275element(13,"thor-heart",44),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(14,"a",45),l.\u0275\u0275listener("throttledClick",function(){const t=l.\u0275\u0275restoreView(e).$implicit;return l.\u0275\u0275nextContext().addToBasket(t)}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit;l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(e.typeTitle),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.multy_item_option),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate1("\xa3",e.cost,""),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate1("Qty: ",e.quantity,""),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",e.firstProductItem),l.\u0275\u0275advance(3),l.\u0275\u0275property("card",e.card)}}function Zi(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div"),l.\u0275\u0275text(1),l.\u0275\u0275elementEnd()),2&e){const e=t.$implicit;l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate(e)}}function Ki(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"p",53),l.\u0275\u0275text(1),l.\u0275\u0275elementStart(2,"span",54),l.\u0275\u0275text(3),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275textInterpolate1(" ",e.summary.discount_campaign_name,""),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate1("- \xa3",e.summary.discount_amount,"")}}function er(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",50),l.\u0275\u0275elementStart(1,"div",51),l.\u0275\u0275elementStart(2,"h5",52),l.\u0275\u0275text(3,"Order Summary"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"p",53),l.\u0275\u0275text(5),l.\u0275\u0275elementStart(6,"span",54),l.\u0275\u0275text(7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(8,Ki,4,2,"p",55),l.\u0275\u0275elementStart(9,"p",53),l.\u0275\u0275text(10,"Postage"),l.\u0275\u0275elementStart(11,"span",54),l.\u0275\u0275text(12),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(13,"p",56),l.\u0275\u0275text(14,"Total"),l.\u0275\u0275elementStart(15,"span",54),l.\u0275\u0275text(16),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate2("",e.order.cardsQuantity," card",e.order.cardsQuantity>1?"s":"",""),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate1("\xa3",e.summary.subtotal,""),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.summary.discount_amount),l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate1("\xa3",e.summary.delivery_cost,""),l.\u0275\u0275advance(4),l.\u0275\u0275textInterpolate1("\xa3",e.summary.final_cost,"")}}function tr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",57),l.\u0275\u0275elementStart(1,"a",58),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext();return t.customEvent(),t.trackSelfHelp(t.order)}),l.\u0275\u0275text(2,"Need help with this order?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("routerLink","/account/needhelp")("queryParams",l.\u0275\u0275pureFunction1(3,Bi,e.order.id))("state",l.\u0275\u0275pureFunction1(7,Hi,l.\u0275\u0275pureFunction1(5,qi,e.order)))}}const nr=function(e){return{mobile:e}},ir=function(e){return{width:e}};let rr=(()=>{class e{constructor(e,t,n,i,r,o,a,s,c,d,l,p,m,g,u){this.elementRef=e,this.GeneralUtils=t,this.BasketService=n,this.OrdersUtils=i,this.Analytics=r,this.ShareData=o,this.FacebookTwitterPixel=a,this.Notification=s,this.datePipe=c,this.UserUtils=d,this.productDetails=l,this.scrollLockService=p,this.router=m,this.SegmentService=g,this.Store=u,this.steps=[{name:"Placed",nameList:["Placed","Scheduled","Refunded","Please contact us"],step:1,state:"complete"},{name:"Processing",nameList:["Processing"],step:2,state:null},{name:"Dispatched",nameList:["Dispatched","Pre Dispatched"],step:3,state:null}],this.barWidth="0%",this.enableRemoveFormats=!1,this.typeTitle=e=>(e.variation?e.variation.name:"")||this.GeneralUtils.typeTitle(e.format)}ngOnInit(){this.amendSuccess&&this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","All Sorted!"])),this.Store.select("featureFlag","config","NEMO-216").pipe((0,o.P)(e=>"boolean"==typeof e)).subscribe(e=>{this.enableRemoveFormats=e})}ngOnChanges(e){e.data&&this.initItem()}ngOnDestroy(){this.scrollLockService.toggleScrollLock(!1)}initItem(){return(0,f.mG)(this,void 0,void 0,function*(){this.order=this.data[0],this.multiorder=this.data[1],this.mobile=!!this.data[2],this.scrollLockService.toggleScrollLock(!!this.data[2]),yield this.BasketService.isBasketReady(),this.order.cards.map(e=>{var t,n;const i=this.BasketService.getItemOption(e.item_options),r=this.BasketService.getVariation(e.format,e.item_options);e.multy_item_option=r.available_options>1,e.variation=r,e.item_option=i;const o=this.order.costs.card_items_costs.cards.find(t=>t.card_order_item_id===e.id);e.cost=null===(n=null===(t=null==o?void 0:o.cost)||void 0===t?void 0:t.amount)||void 0===n?void 0:n.toFixed(2),e.typeTitle=this.typeTitle(e),e.frontImage=e.image.medium,e.addressInfo=[],e.firstProductItem=this.BasketService.firstProductItem(e.variation,e.exclusive,e.frontImage,e.orientation,i,e.inner_back),this.order.cardsQuantity=this.order.cards.map(e=>e.quantity).reduce((e,t)=>
1e+t),this.order.addressInfo=this.addressFormation(this.order.delivery_address);let a=this.order.costs;this.summary={discount_campaign_name:a.discount_campaign_name||"Discount",subtotal:a.card_items_costs.amount.toFixed(2),delivery_cost:a.delivery_cost.final_amount?a.delivery_cost.final_amount.toFixed(2):a.delivery_cost.final_amount,discount_amount:a.discount_amount-a.delivery_discount?(a.discount_amount-a.delivery_discount).toFixed(2):0,discount:a.discount_amount,final_cost:a.final_cost.toFixed(2)}}),this.order.displayStatus=this.OrdersUtils.getOrderStatus(this.order.status,this.multiorder.status,this.order.order_delivery.dispatch_type),this.selectStep()})}showProductInfo(e){const{item_option:t,inner_back:n,frontImage:i,orientation:r}=e;this.productDetails.open({option:t,personalisation:n,outerImage:i,orientation:r})}selectStep(){this.steps.some((e,t)=>{const n=e.nameList.indexOf(this.order.displayStatus);if(n>=0)return this.steps.some((i,r)=>(i.state="complete",e.name=e.nameList[n],this.barWidth=t/(this.steps.length-1)*100+"%",r==t)),!0})||(this.steps[0].name=this.order.displayStatus)}currentStatus(e){this.barWidth=e/(this.steps.length-1)*100+"%",this.steps.map(t=>{switch(!0){case t.step-e-1<0:t.state="complete";break;case t.step-e-1==0:t.state="current";break;default:t.state=null}})}cancel(){this.router.navigate([],{queryParams:{order_id:null},queryParamsHandling:"merge",state:{data:{amendSuccess:!1}}}),this.update.next(["closeForm"])}addToBasket(e){e.card.approved_formats=this.enableRemoveFormats?null:["A5"],this.BasketService.addToBasket(e.card,"CART_ADD_SV",void 0,void 0).then(e=>{e&&this.ShareData.trigger("basketUpdate")}),this.UserUtils.getProfile().then(t=>{this.FacebookTwitterPixel.AddToCart(e.card,t.public_profile.profile_id)}),this.Notification.success("Successfully added to basket!")}addressFormation(e){return[e.recipient,[e.address1,e.address2,e.address3].filter(e=>e).join(", "),[e.city,e.postcode].filter(e=>e).join(", "),,e.state,e.country].filter(e=>e)}customEvent(){this.Analytics.customEvent("Orders Self Help","Click","None"),window.hj&&window.hj("tagRecording",["needhelp"])}trackSelfHelp(e){this.SegmentService.trackCustom(_i(...xi(e)))}displayDate(e){return this.datePipe.transform(e,"EEE, dd/MM/yy")}get estimatedDate(){const e=this.order.order_delivery.estimated_earliest_arrival_date,t=this.order.order_delivery.estimated_latest_arrival_date;return this.displayDate(e)+(e!=t?" - "+this.displayDate(t):"")}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(P.w),l.\u0275\u0275directiveInject(Ui.v),l.\u0275\u0275directiveInject(ht.P),l.\u0275\u0275directiveInject(O.c),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(kn.f),l.\u0275\u0275directiveInject(m.P),l.\u0275\u0275directiveInject(i.uU),l.\u0275\u0275directiveInject(u.f),l.\u0275\u0275directiveInject(Vi.T),l.\u0275\u0275directiveInject(Ni.X),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(M.BP),l.\u0275\u0275directiveInject(v.yh))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-edit-orders"]],inputs:{update:"update",data:"data",amendSuccess:"amendSuccess"},features:[l.\u0275\u0275NgOnChangesFeature],decls:48,vars:22,consts:[[1,"account-edit-orders"],[1,"cancel-icon",3,"ngClass","click"],[1,"mdi","mdi-chevron-left"],["class","amend-success",4,"ngIf"],[1,"order-content","content"],["class","need-help",3,"routerLink","queryParams","state","click",4,"ngIf"],[1,"order-id"],[1,"text-center"],[1,"h-id","text-center","w700"],[1,"text-center","date"],["class","tracking-id",4,"ngIf"],[1,"circle-steps-wrapper"],[1,"gray-line"],[1,"orange-line",3,"ngStyle"],[1,"circles"],["class","step",3,"ngClass",4,"ngFor","ngForOf"],[1,"grid-row"],[1,"tab-item-6","mob-item-12"],["class","items-content",4,"ngFor","ngForOf"],[1,"delivery-info"],[1,"info"],[1,"w700"],[4,"ngFor","ngForOf"],["class","order-summary",4,"ngIf"],["class","need-help-area text-center",4,"ngIf"],[1,"amend-success"],[1,"title"],[1,"success-text"],[1,"need-help",3,"routerLink","queryParams","state","click"],[1,"tracking-id"],[1,"step",3,"ngClass"],[1,"mdi","mdi-check","pending"],[1,"mdi","mdi-check","complete"],[1,"xs"],[1,"items-content"],[1,"card-type"],[1,"lg","w900"],["class","sm w700",4,"ngIf"],[1,"lg","price"],[1,"lg","quantity"],[1,"item-info","grid-row"],["class","mob-item-12",4,"ngIf"],[1,"options"],[1,"heart"],["className","orange",3,"card"],["prevent-double-click","","href","javascript:;",1,"quick-basket",3,"throttledClick"],[1,"sm","w700"],[1,"mob-item-12"],[1,"item-image"],[3,"animateCard","outerImage","innerImage","orientation","type","background","cardPositions","showExclusive","personalisation","click"],[1,"order-summary"],[1,"summary-content"],[1,"lg"],[1,"summary","lg"],[1,"w500"],["class","summary lg",4,"ngIf"],[1,"summary","lg","total"],[1,"need-help-area","text-center"],[1,"need-help-des","w700",3,"routerLink","queryParams","state","click"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275listener("click",function(){return t.cancel()}),l.\u0275\u0275element(2,"i",2),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(3,zi,5,0,"div",3),l.\u0275\u0275elementStart(4,"div",4),l.\u0275\u0275template(5,$i,2,9,"a",5),l.\u0275\u0275elementStart(6,"div",6),l.\u0275\u0275elementStart(7,"div",7),l.\u0275\u0275text(8,"Order number"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(9,"div",8),l.\u0275\u0275text(10),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(11,"div",9),l.\u0275\u0275text(12),l.\u0275\u0275pipe(13,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(14,Yi,5,1,"div",10),l.\u0275\u0275elementStart(15,"div",11),l.\u0275\u0275elementStart(16,"div",12),l.\u0275\u0275element(17,"div",13),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(18,"div",14),l.\u0275\u0275template(19,Xi,6,4,"div",15),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(20,"div",16),l.\u0275\u0275elementStart(21,"div",17),l.\u0275\u0275template(22,Ji,15,6,"div",18),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(23,"div",17),l.\u0275\u0275elementStart(24,"div",19),l.\u0275\u0275elementStart(25,"h5"),l.\u0275\u0275text(26,"Delivery Info"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(27,"div",20),l.\u0275\u0275elementStart(28,"div",21),l.\u0275\u0275text(29,"Recipient"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(30,"div"),l.\u0275\u0275text(31),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(32,"div",20),l.\u0275\u0275elementStart(33,"div",21),l.\u0275\u0275text(34,"Delivery address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(35,Zi,2,1,"div",22),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(36,"div",20),l.\u0275\u0275elementStart(37,"div",21),l.\u0275\u0275text(38,"Dispatch date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(39,"div"),l.\u0275\u0275text(40),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(41,"div",20),l.\u0275\u0275elementStart(42,"div",21),l.\u0275\u0275text(43,"Estimated delivery date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(44,"div"),l.\u0275\u0275text(45),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(46,er,17,6,"div",23),l.\u0275\u0275template(47,tr,3,9,"div",24),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(18,nr,t.mobile)),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",t.amendSuccess),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",t.mobile),l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate(t.order.human_readable_id),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(13,15,t.order.created,"dd MMM y")),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",t.order.tracking_number),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngStyle",l.\u0275\u0275pureFunction1(20,ir,t.barWidth)),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngForOf",t.steps),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngForOf",t.order.cards),l.\u0275\u0275advance(9),l.\u0275\u0275textInterpolate(t.order.delivery_address.recipient),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngForOf",t.order.addressInfo),l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate(t.displayDate(t.order.order_delivery.dispatch_date_real)),l.\u0275\u0275advance(5),l.\u0275\u0275textInterpolate(t.estimatedDate),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.summary),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!t.mobile))},directives:[i.mk,i.O5,i.PC,i.sg,r.yS,Ti.J,Ri.e,Li.p],pipes:[i.uU],styles:[".account-edit-orders[_ngcontent-%COMP%]{max-width:570px;margin:auto;padding:0 18px}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]{max-width:670px}}.account-edit-orders[_ngcontent-%COMP%]   .cancel-icon[_ngcontent-%COMP%]{top:15px;font-size:35px;left:13px}.account-edit-orders[_ngcontent-%COMP%]   .cancel-icon.mobile[_ngcontent-%COMP%]{position:absolute}.account-edit-orders[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:30px;padding-top:36px;text-align:center}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:42px}}.account-edit-orders[_ngcontent-%COMP%]   .success-text[_ngcontent-%COMP%]{text-align:center;font-size:16px;margin:15px 40px 36px}.account-edit-orders[_ngcontent-%COMP%]   .need-help[_ngcontent-%COMP%]{position:absolute;top:24px;right:20px;color:#ff6900}.account-edit-orders[_ngcontent-%COMP%]   .order-id[_ngcontent-%COMP%], .account-edit-orders[_ngcontent-%COMP%]   .tracking-id[_ngcontent-%COMP%]{line-height:1.2;margin-bottom:20px;margin-top:50px}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .order-id[_ngcontent-%COMP%], .account-edit-orders[_ngcontent-%COMP%]   .tracking-id[_ngcontent-%COMP%]{margin-top:0}}.account-edit-orders[_ngcontent-%COMP%]   .order-id[_ngcontent-%COMP%]   .h-id[_ngcontent-%COMP%], .account-edit-orders[_ngcontent-%COMP%]   .tracking-id[_ngcontent-%COMP%]   .h-id[_ngcontent-%COMP%]{font-size:24px}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .order-id[_ngcontent-%COMP%]   .text-center[_ngcontent-%COMP%], .account-edit-orders[_ngcontent-%COMP%]   .tracking-id[_ngcontent-%COMP%]   .text-center[_ngcontent-%COMP%]{font-size:16px}.account-edit-orders[_ngcontent-%COMP%]   .order-id[_ngcontent-%COMP%]   .text-center.date[_ngcontent-%COMP%], .account-edit-orders[_ngcontent-%COMP%]   .tracking-id[_ngcontent-%COMP%]   .text-center.date[_ngcontent-%COMP%]{font-size:14px}}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]{position:relative;margin:0 auto 48px}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]{margin-bottom:40px}}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .gray-line[_ngcontent-%COMP%]{position:absolute;width:100%;top:10px;left:0px;height:1px;background-color:#c8c8c8;z-index:-1}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .gray-line[_ngcontent-%COMP%]   .orange-line[_ngcontent-%COMP%]{background-color:#ff6900;height:1px;display:block}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;display:-webkit-box;display:-ms-flexbox;display:flex}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step[_ngcontent-%COMP%]{position:relative}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:inline-block;height:20px;width:20px;background-color:#fff;border:1px solid #c8c8c8;border-radius:50%;cursor:default}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:#c8c8c8;display:none;font-size:17px}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   .pending[_ngcontent-%COMP%]{display:inline-block}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{text-align:center;position:absolute;white-space:nowrap;margin-top:8px;left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%)}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step[_ngcontent-%COMP%]:first-child   p[_ngcontent-%COMP%]{left:0%;-webkit-transform:none;transform:none}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step[_ngcontent-%COMP%]:last-child   p[_ngcontent-%COMP%]{left:auto;right:0;-webkit-transform:none;transform:none}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step.complete[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{cursor:pointer;background-color:#ff6900;border-color:#ff6900}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step.complete[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   .pending[_ngcontent-%COMP%]{display:none}.account-edit-orders[_ngcontent-%COMP%]   .circle-steps-wrapper[_ngcontent-%COMP%]   .circles[_ngcontent-%COMP%]   .step.complete[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   .complete[_ngcontent-%COMP%]{display:inline-block;color:#fff}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .card-type[_ngcontent-%COMP%]{margin-bottom:12px}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .card-type[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-bottom:0}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .card-type[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:14px}}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .card-type[_ngcontent-%COMP%]   p.price[_ngcontent-%COMP%]{display:inline-block}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .card-type[_ngcontent-%COMP%]   p.quantity[_ngcontent-%COMP%]{float:right}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .card-type[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{margin-bottom:0}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]{padding-right:8px}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]   img.cardimage[_ngcontent-%COMP%]{width:143px;height:202px;-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.5);box-shadow:0 2px 4px #00000080}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .item-image.pack-of-4[_ngcontent-%COMP%]{width:50%;display:inline-block}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .item-text[_ngcontent-%COMP%]{padding-left:6px;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .item-text.pack-of-4[_ngcontent-%COMP%]{width:50%;display:inline-block}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .options[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;padding:20px 0}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .options[_ngcontent-%COMP%]   .quick-basket[_ngcontent-%COMP%]{background-image:url(https://images-fe.thortful.com/svg/basket2.svg);background-size:cover;height:19px;width:20px;
1display:block;margin-right:auto}.account-edit-orders[_ngcontent-%COMP%]   .items-content[_ngcontent-%COMP%]   .options[_ngcontent-%COMP%]   .heart[_ngcontent-%COMP%]{width:22px;height:20px;margin-left:auto;margin-right:30px}.account-edit-orders[_ngcontent-%COMP%]   .delivery-info[_ngcontent-%COMP%]{margin-top:30px}.account-edit-orders[_ngcontent-%COMP%]   .delivery-info[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{margin-bottom:18px}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .delivery-info[_ngcontent-%COMP%]{margin-left:35px}}.account-edit-orders[_ngcontent-%COMP%]   .delivery-info[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{line-height:1.4;margin-bottom:15px}.account-edit-orders[_ngcontent-%COMP%]   .delivery-info[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%] > .w700[_ngcontent-%COMP%]{margin-bottom:4px;font-size:17px}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .delivery-info[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%] > .w700[_ngcontent-%COMP%]{font-size:16px;margin-bottom:0}}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .delivery-info[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{font-size:16px}}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .delivery-info[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{margin-bottom:21px}}.account-edit-orders[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]{margin-top:15px;background-color:#f5f5f5;padding:22px 39px 32px}@media (min-width: 769px){.account-edit-orders[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]{margin-top:30px;margin-bottom:60px}}.account-edit-orders[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]   .summary-content[_ngcontent-%COMP%]{max-width:260px;margin:auto}.account-edit-orders[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]   .summary[_ngcontent-%COMP%]{margin:0;line-height:1.37}.account-edit-orders[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]   .summary[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{float:right}.account-edit-orders[_ngcontent-%COMP%]   .order-summary[_ngcontent-%COMP%]   .summary.total[_ngcontent-%COMP%]{margin-top:10px}.account-edit-orders[_ngcontent-%COMP%]   .need-help-area[_ngcontent-%COMP%]{margin-bottom:45px}.account-edit-orders[_ngcontent-%COMP%]   .need-help-area[_ngcontent-%COMP%]   .need-help-des[_ngcontent-%COMP%]{font-size:16px;color:#ff6900}"]}),e})();var or=n(95955);function ar(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"account-buttons",22),l.\u0275\u0275listener("clickEvent",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).accountMenuButtonClicked(t)}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("buttonsData",e.buttonsData)}}function sr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"account-buttons",23),l.\u0275\u0275listener("clickEvent",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).accountMenuButtonClicked(t)}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("buttonsData",e.buttonsData)}}function cr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",24),l.\u0275\u0275elementStart(1,"a",25),l.\u0275\u0275text(2,"Customer FAQs"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"a",26),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).userLogout()}),l.\u0275\u0275text(4,"Sign out"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}}function dr(e,t){1&e&&l.\u0275\u0275element(0,"account-xtrathortful")}function lr(e,t){if(1&e&&(l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275template(1,dr,1,0,"account-xtrathortful",16),l.\u0275\u0275elementContainerEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.xtrathortful.show)}}function pr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"account-details",27),l.\u0275\u0275listener("profileChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).profile=t}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("className",e.details.type)("profile",e.profile)("update",e.componentCall)("formData",e.edit.data)("device",e.device)("countries",e.countries)}}function mr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"account-orders",29),l.\u0275\u0275listener("dataChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).orders.data=t}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("data",e.orders.data)("update",e.componentCall)}}function gr(e,t){if(1&e&&(l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275template(1,mr,1,2,"account-orders",28),l.\u0275\u0275elementContainerEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.orders.show)}}function ur(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",31),l.\u0275\u0275text(1,"Sorry, we're having trouble loading your order history right now, please try again later"),l.\u0275\u0275elementEnd())}function hr(e,t){if(1&e&&(l.\u0275\u0275elementContainerStart(0),l.\u0275\u0275template(1,ur,2,0,"div",30),l.\u0275\u0275elementContainerEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.orders.show)}}function fr(e,t){1&e&&l.\u0275\u0275element(0,"account-drafts")}function Cr(e,t){1&e&&l.\u0275\u0275element(0,"account-payment")}function xr(e,t){if(1&e&&l.\u0275\u0275element(0,"account-credits",32),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("credits",e.profile.profile_credits.amount_available)}}function _r(e,t){1&e&&l.\u0275\u0275element(0,"account-contact")}function Pr(e,t){if(1&e&&l.\u0275\u0275element(0,"account-invite",33),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("profile",e.profile)}}function Or(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"account-address",34),l.\u0275\u0275listener("profileChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).profile=t}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("countries",e.countries)("profile",e.profile)("update",e.componentCall)("formData",e.edit.data)}}function Mr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"account-reminders",35),l.\u0275\u0275listener("remindersChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).remindersData=t}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("reminders",e.remindersData)("update",e.componentCall)("formData",e.edit.data)("years",e.years)("device",e.device)}}function vr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",45),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).edit.show=!1}),l.\u0275\u0275element(1,"thor-ico",46),l.\u0275\u0275elementEnd()}}function br(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"account-edit-details",47),l.\u0275\u0275listener("profileChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).profile=t}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("profile",e.profile)("title",e.edit.title)("billingAddress",e.edit.billing)("update",e.componentCall)("countries",e.countries)}}function yr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"account-edit-address",48),l.\u0275\u0275listener("profileChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).profile=t}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("profile",e.profile)("address",e.edit.data)("update",e.componentCall)("countries",e.countries)}}function wr(e,t){if(1&e&&l.\u0275\u0275element(0,"account-edit-reminder",49),2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("device",e.device)("reminder",e.edit.data)("countries",e.countries)("update",e.componentCall)}}function Sr(e,t){if(1&e&&l.\u0275\u0275element(0,"account-search",50),2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("type",e.edit.type)("data",e.edit.data)("update",e.componentCall)}}function kr(e,t){if(1&e&&l.\u0275\u0275element(0,"account-edit-orders",51),2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("data",e.edit.data)("update",e.componentCall)("amendSuccess",e.edit.amendSuccess)}}function Er(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",36),l.\u0275\u0275elementStart(1,"div",37),l.\u0275\u0275elementStart(2,"div",38),l.\u0275\u0275text(3),l.\u0275\u0275template(4,vr,2,0,"div",39),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(5,br,1,5,"account-edit-details",40),l.\u0275\u0275template(6,yr,1,4,"account-edit-address",41),l.\u0275\u0275template(7,wr,1,4,"account-edit-reminder",42),l.\u0275\u0275template(8,Sr,1,3,"account-search",43),l.\u0275\u0275template(9,kr,1,3,"account-edit-orders",44),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(e.edit.title),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","reminder"!==e.edit.type&&"order"!==e.edit.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","details"==e.edit.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","address"==e.edit.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","reminder"==e.edit.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","addressSearch"==e.edit.type||"remindersSearch"==e.edit.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","order"==e.edit.type)}}const Ir=function(e){return{"smaller-padding":e}};function Dr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",5),l.\u0275\u0275elementStart(1,"div",6),l.\u0275\u0275elementStart(2,"div",7),l.\u0275\u0275elementStart(3,"account-info",8),l.\u0275\u0275listener("profileChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().profile=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(4,ar,1,1,"account-buttons",9),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",10),l.\u0275\u0275template(6,sr,1,1,"account-buttons",11),l.\u0275\u0275template(7,cr,5,0,"div",12),l.\u0275\u0275template(8,lr,2,1,"ng-container",13),l.\u0275\u0275template(9,pr,1,6,"account-details",14),l.\u0275\u0275template(10,gr,2,1,"ng-container",15),l.\u0275\u0275template(11,hr,2,1,"ng-container",13),l.\u0275\u0275template(12,fr,1,0,"account-drafts",16),l.\u0275\u0275template(13,Cr,1,0,"account-payment",16),l.\u0275\u0275template(14,xr,1,1,"account-credits",17),l.\u0275\u0275template(15,_r,1,0,"account-contact",16),l.\u0275\u0275template(16,Pr,1,1,"account-invite",18),l.\u0275\u0275template(17,Or,1,4,"account-address",19),l.\u0275\u0275template(18,Mr,1,5,"account-reminders",20),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(19,Er,10,7,"div",21),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(2),l.\u0275\u0275property("ngClass",e.info.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("show",e.info.show)("type",e.info.type)("profile",e.profile),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","header"==e.options.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(20,Ir,e.profileHomeCheck())),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","main"==e.options.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","main"==e.options.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("featureFlag","WAL-1461"),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.details.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("featureFlagDisabled","TS-220"),l.\u0275\u0275advance(1),l.\u0275\u0275property("featureFlag","TS-220"),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.drafts.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.payment.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.credits.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.contact.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.invite.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.address.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.reminders.show),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.edit.show)}}function Ar(e,t){if(1&e&&l.\u0275\u0275element(0,"account-edit-reminder",52),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("device",e.device)("reminder",e.edit.data)("countries",e.countries)("update",e.componentCall)}}function Fr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"account-edit-address",53),l.\u0275\u0275listener("profileChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext().profile=t}),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("profile",e.profile)("address",e.edit.data)("update",e.componentCall)("countries",e.countries)}}function jr(e,t){if(1&e&&l.\u0275\u0275element(0,"account-edit-orders",54),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("data",e.edit.data)("update",e.componentCall)("amendSuccess",e.edit.amendSuccess)}}let Ur=(()=>{class e{constructor(e,t,n,i,r,a,c,d,l,p,m,g,u,h,f){this.elementRef=e,this.ShareData=t,this.Notification=n,this.AccountOverviewUtils=i,this.router=r,this.route=a,this.UserUtils=c,this.ProfileUtils=d,this.photoCardApi=l,this.accountDraftsService=p,this.GeneralUtils=m,this.Analytics=g,this.assetsStore=u,this.Store=h,this.thortfulSubscription=f,this.type="",this.userLoggedIn=!1,this.info={show:!1,type:this.t
1ype},this.options={show:!1},this.xtrathortful={show:!1},this.details={show:!1},this.orders={show:!1,data:{groupedOrders:[],page:0,totalPages:0}},this.payment={show:!1},this.credits={show:!1},this.contact={show:!1},this.invite={show:!1},this.address={show:!1},this.reminders={show:!1},this.drafts={show:!1},this.edit={show:!1,type:""},this.addressEditDesktop=!1,this.addressNewDesktop=!1,this.addressObj={},this.isUserSubscribed=!1,this.listenComponent=new s.y(e=>{this.componentCall=e}),this.components=["details","orders","drafts","payment","credits","reminders","invite","address","contact"],this.headerHight=0,this.headerTranslate=0,this.scrollOffset=0,this.latestReminders=[],this.countries=[],this.buttonsData=[{text:"Personal Details",img:this.assetsStore.getImageUrl("/img/action/accountbuttonsuser.svg"),imgActive:this.assetsStore.getImageUrl("/img/action/accountbuttonsuserwhite.svg"),href:"/account/overview"},{text:"Orders",img:this.assetsStore.getImageUrl("/img/action/accountbuttonslist.svg"),imgActive:this.assetsStore.getImageUrl("/img/action/accountbuttonslistwhite.svg"),href:"/account/orders"},{text:"Reminders",img:this.assetsStore.getImageUrl("/img/action/reminder-calendar.svg"),imgActive:"",href:"/account/reminders",count:0},{text:"Photo Card Drafts",img:this.assetsStore.getImageUrl("/img/action/accountbuttonsdrafts.svg"),imgActive:this.assetsStore.getImageUrl("/img/action/accountbuttonsdraftswhite.svg"),href:"/account/drafts",count:0},{text:"Addresses",img:this.assetsStore.getImageUrl("/img/action/accountbuttonslocation.svg"),imgActive:this.assetsStore.getImageUrl("/img/action/accountbuttonslocationwhite.svg"),href:"/account/addresses"},{text:"Payment Methods",img:this.assetsStore.getImageUrl("/img/action/accountbuttonscard.svg"),imgActive:this.assetsStore.getImageUrl("/img/action/accountbuttonscardwhite.svg"),href:"/account/payment-methods"},{text:"Credits",img:this.assetsStore.getImageUrl("/img/action/accountbuttonscredits.svg"),imgActive:this.assetsStore.getImageUrl("/img/action/accountbuttonscreditswhite.svg"),href:"/account/credit"},{text:"Invite Friends",img:this.assetsStore.getImageUrl("/img/action/accountbuttonsshare.svg"),imgActive:this.assetsStore.getImageUrl("/img/action/accountbuttonssharewhite.svg"),href:"/account/mention-me"},{text:"Contact Us",img:this.assetsStore.getImageUrl("/img/action/accountbuttonsheadset.svg"),imgActive:this.assetsStore.getImageUrl("/img/action/accountbuttonsheadsetwhite.svg"),href:"/account/contact"}],this.appPromoBanner={desktop:{image:"img/banners/app-promo-banner-desktop-bau.jpg",name:"Account page promo - web"},android:{image:"img/banners/app-promo-banner-android-bau.jpg",name:"Account page promo - android",url:"https://link-app.thortful.com/ztJf/lud3t0fv"},ios:{image:"img/banners/app-promo-banner-ios-bau.jpg",name:"Account page promo - ios",url:"https://link-app.thortful.com/ztJf/lud3t0fv"}},this.isUserSubscribed=this.thortfulSubscription.userIsSubscribed(),this.Store.select("featureFlag","config","WAL-1461").pipe((0,o.P)(e=>"boolean"==typeof e)).subscribe(e=>{e&&(this.buttonsData.unshift({text:"Subscription",img:this.assetsStore.getImageUrl("/img/hosted/xtrathortful-logo-creamy-bg.png"),imgActive:this.assetsStore.getImageUrl("/img/hosted/xtrathortful-logo-creamy-bg.png"),href:"/account/xtrathortful"}),this.components.unshift("xtrathortful"))})}ngOnInit(){(0,d.s0)({page_type:"account"}),this.event=this.ShareData.listen("getProfileSuccess",e=>{this.profileInit(e)}),this.router.events.pipe((0,a.h)(e=>e instanceof r.m2)).subscribe(e=>{this.checkPath()}),this.event2=this.ShareData.getObservable("updateHeaderReminders").subscribe(()=>{var e;const t=(null===(e=this.UserUtils.latestReminders)||void 0===e?void 0:e.length)||0;this.updateButtonsValues("Reminders","count",t)}),this.device=this.ShareData.getProperty("device"),this.typeSwitch(),this.event3=this.ShareData.listen("device-change",e=>{this.device=e,this.typeSwitch(),this.closeEditForms()}),this.event4=this.accountDraftsService.draftsLength.subscribe(e=>{this.updateButtonsValues("Drafts","count",e)});let e=this.ShareData.getProperty("profile");this.profileInit(e),this.latestReminders=this.UserUtils.latestReminders,this.listenComponent.subscribe(e=>{var t,n,i,r;switch(e[0]){case"details":this.edit.type="details",this.edit.title="Your info",this.edit.show=!0,this.edit.billing=e[1];break;case"address":case"new address":this.edit.type="address",this.edit.title="Address",this.edit.show=!0,this.edit.data=e[1]?e[1]:null;break;case"reminder":this.edit.title="Reminder",this.edit.type="reminder",this.edit.show=!0,this.edit.data=e[1]?e[1]:null;break;case"new reminder":this.edit.title="New Reminder",this.edit.type="reminder",this.edit.show=!0,this.edit.data=e[1]?e[1]:null;break;case"closeForm":this.edit.show=!1,this.edit.type=null;break;case"passFormData":this.edit.show=!1,this.edit.data=e[1],("reminderDesktop"==this.edit.type||"addressDesktop"==this.edit.type)&&(this.edit.type=null);break;case"passOverlayData":case"passDesktopAddressData":case"passDesktopUpdateAddress":case"passDesktopDeleteAddress":this.edit.data=e[1];break;case"reminderDesktop":this.edit.title="Reminder",this.edit.type="reminderDesktop",this.edit.data=e[1]?e[1]:null;break;case"newReminderDesktop":this.edit.title="New Reminder",this.edit.type="reminderDesktop",this.edit.data=null;break;case"editAddressDesktop":case"newAddressDesktop":this.edit.title="Address",this.edit.type="addressDesktop",this.edit.data=e[1]?e[1]:null;break;case"remindersSearch":this.edit.show=!0,this.edit.title="Reminders",this.edit.type="remindersSearch",this.edit.data=e[1];break;case"addressSearch":this.edit.show=!0,this.edit.title="Addresses",this.edit.type="addressSearch",this.edit.data=e[1];break;case"updateReminders":this._loopRemindersCheck();break;case"orderDesktop":this.edit.title="",this.edit.show=!1,this.edit.type="orderDesktop",this.edit.data=e[1],this.edit.amendSuccess=null===(n=null===(t=null==history?void 0:history.state)||void 0===t?void 0:t.data)||void 0===n?void 0:n.amendSuccess;break;case"order":this.edit.title="",this.edit.show=!0,this.edit.type="order",this.edit.data=e[1],this.edit.amendSuccess=null===(r=null===(i=null==history?void 0:history.state)||void 0===i?void 0:i.data)||void 0===r?void 0:r.amendSuccess;break;case"drafts":this.edit.title="",this.edit.show=!0,this.edit.type="drafts",this.edit.data=e[1]}}),this._setConfig(),this._loopRemindersCheck()}ngOnDestroy(){this.event.unsubscribe(),this.event2.unsubscribe(),this.event3.unsubscribe(),this.event4.unsubscribe()}profileInit(e){e&&e.contact?(this.checkPath(),this.userLoggedIn=!0,this.profile=e,this.getDrafts()):this.userLoggedIn=!1}checkPath(){let e="";
1switch(this.route.snapshot.url.map(t=>{e+=e?"/"+t.path:t.path}),this.info.show=!0,this.options.show="header",this.edit.data=null,this.edit.type=null,this.components.map(e=>this[e].show=!1),e){case"xtrathortful":this.showComponent("xtrathortful");break;case"overview":this.showComponent("details");break;case"orders":this.showComponent("orders");break;case"drafts":this.showComponent("drafts");break;case"payment-methods":this.showComponent("payment");break;case"credit":this.showComponent("credits");break;case"reminders":this.showComponent("reminders");break;case"mention-me":this.showComponent("invite");break;case"addresses":this.showComponent("address");break;case"contact":this.showComponent("contact");break;default:this.options.show="main"}}showComponent(e){this.components.map(t=>{this[t].show=t==e})}typeSwitch(){switch(this.device){case"tablet":case"desktop":case"desktop-large":this.info.type="type-B";break;default:this.info.type="type-A"}}_setConfig(){this.GeneralUtils.serviceOptions.then(e=>{this._createCountriesArray(e.delivery_countries)}).catch(e=>{e.data.status&&500===e.data&&this.Notification.error("serverError")})}_createCountriesArray(e){for(let t in e)this.countries.push({key:t,label:e[t]})}getDrafts(){this.accountDraftsService.refreshDrafts().catch(e=>{console.log("drafts not found")})}updateProfileName(){this.ProfileUtils.putEditableContent(this.details).then(e=>{e&&this.Notification.success("profileUpdateSuccess")}).catch(e=>{this.ShareData.trigger("showError","profileUpdateError")})}_loopRemindersCheck(){this.userLoggedIn&&this.UserUtils.getReminders().then(e=>{this.UserUtils.reminders=e.reminders,this._getReminders(!0)})}last(e){return e[e.length-1]}_getReminders(e){this.remindersData=[];var t=[];this.UserUtils.reminders.map((e,n)=>{e.address_enabled=null!==e.reminder_recipient.address,e.additional_info_visible=!1,e.editing_enabled=!1,0===n||this.last(this.last(this.last(t))).reminder_date.slice(0,4)!=e.reminder_date.slice(0,4)?t.push([[e]]):this.last(this.last(this.last(t))).reminder_date.slice(0,-3)!=e.reminder_date.slice(0,-3)?this.last(t).push([e]):this.last(this.last(t)).push(e),this.remindersData.push(e)}),this.years=t}closeEditForms(){Object.keys(this.edit).forEach(e=>this.edit[e]=null)}profileHomeCheck(){return"/account"===this.router.url}updateButtonsValues(e,t,n){const i=this.buttonsData.find(t=>t.text==e);i&&(i[t]=n)}userLogout(){this.ShareData.trigger("logoutUser")}accountMenuButtonClicked(e){this.customEvent(e.text),e.href===this.router.url&&this.router.navigate(["/account"])}customEvent(e){this.Analytics.customEvent("Profile Navigation","Click",e),"Orders"===e&&window.hj&&window.hj("tagRecording",["orders"])}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(m.P),l.\u0275\u0275directiveInject(g.e),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(u.f),l.\u0275\u0275directiveInject(h.R),l.\u0275\u0275directiveInject(c.b),l.\u0275\u0275directiveInject(_),l.\u0275\u0275directiveInject(P.w),l.\u0275\u0275directiveInject(O.c),l.\u0275\u0275directiveInject(M.WR),l.\u0275\u0275directiveInject(v.yh),l.\u0275\u0275directiveInject(b._))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-page"]],features:[l.\u0275\u0275ProvidersFeature([c.b])],decls:5,vars:4,consts:[["class","account-page",4,"ngIf"],["title","Account","body","Please log in to view your account info"],["scroll-to-top","",3,"device","reminder","countries","update",4,"ngIf"],["scroll-to-top","",3,"profile","address","update","countries","profileChange",4,"ngIf"],["scroll-to-top","",3,"data","update","amendSuccess",4,"ngIf"],[1,"account-page"],[1,"account-header"],[1,"header-content",3,"ngClass"],[3,"show","type","profile","profileChange"],["buttonType","header",3,"buttonsData","clickEvent",4,"ngIf"],[1,"account-content",3,"ngClass"],["buttonType","main",3,"buttonsData","clickEvent",4,"ngIf"],["class","footer",4,"ngIf"],[4,"featureFlag"],[3,"className","profile","update","formData","device","countries","profileChange",4,"ngIf"],[4,"featureFlagDisabled"],[4,"ngIf"],[3,"credits",4,"ngIf"],[3,"profile",4,"ngIf"],[3,"countries","profile","update","formData","profileChange",4,"ngIf"],[3,"reminders","update","formData","years","device","remindersChange",4,"ngIf"],["class","account-edit-form",4,"ngIf"],["buttonType","header",3,"buttonsData","clickEvent"],["buttonType","main",3,"buttonsData","clickEvent"],[1,"footer"],["routerLink","/help/customer-faqs",1,"faqs"],["href","javascript:;",1,"logout",3,"click"],[3,"className","profile","update","formData","device","countries","profileChange"],[3,"data","update","dataChange",4,"ngIf"],[3,"data","update","dataChange"],["class","content text-center",4,"ngIf"],[1,"content","text-center"],[3,"credits"],[3,"profile"],[3,"countries","profile","update","formData","profileChange"],[3,"reminders","update","formData","years","device","remindersChange"],[1,"account-edit-form"],[1,"edit-content"],[1,"edit-title","w700","text-center"],["class","icon",3,"click",4,"ngIf"],[3,"profile","title","billingAddress","update","countries","profileChange",4,"ngIf"],[3,"profile","address","update","countries","profileChange",4,"ngIf"],[3,"device","reminder","countries","update",4,"ngIf"],[3,"type","data","update",4,"ngIf"],[3,"data","update","amendSuccess",4,"ngIf"],[1,"icon",3,"click"],["p","cancel"],[3,"profile","title","billingAddress","update","countries","profileChange"],[3,"profile","address","update","countries","profileChange"],[3,"device","reminder","countries","update"],[3,"type","data","update"],[3,"data","update","amendSuccess"],["scroll-to-top","",3,"device","reminder","countries","update"],["scroll-to-top","",3,"profile","address","update","countries","profileChange"],["scroll-to-top","",3,"data","update","amendSuccess"]],template:function(e,t){1&e&&(l.\u0275\u0275template(0,Dr,20,22,"div",0),l.\u0275\u0275element(1,"logged-out-user",1),l.\u0275\u0275template(2,Ar,1,4,"account-edit-reminder",2),l.\u0275\u0275template(3,Fr,1,4,"account-edit-address",3),l.\u0275\u0275template(4,jr,1,3,"account-edit-orders",4)),2&e&&(l.\u0275\u0275property("ngIf",t.userLoggedIn&&"reminderDesktop"!==t.edit.type&&"addressDesktop"!==t.edit.type&&"orderDesktop"!==t.edit.type),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf","reminderDesktop"==t.edit.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","addressDesktop"==t.edit.type),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","orderDesktop"==t.edit.type))},directives:[i.O5,y.n,i.mk,D,M.Hl,M.oT,A.C,r.yS,Ce,gt,Nt,$t,en,rn,sn,pn,Pn,zn,Pe.n,Qe,Be,di,Ci,rr,or.p],styles:[".account-page[_ngcontent-%COMP%]   .container-wrapper[_ngcontent-%COMP%]{margin-bottom:16px}@media (min-width: 840px){.account-page[_ngcontent-%COMP%]   .container-wrapper[_ngcontent-%COMP%]{padding:0 24px}}.account-page[_ngcontent-%COMP%]   .account-header[_ngcontent-%COMP%]{left:0;right:0;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.account-page[_ngcontent-%COMP%]   .account-header[_ngcontent-%COMP%]   .header-content[_ngcontent-%COMP%]{position:relative}.account-page[_ngcontent-%COMP%]   .account-header[_ngcontent-%COMP%]   .header-content.type-B[_ngcontent-%COMP%]{margin-top:20px}.account-page[_ngcontent-%COMP%]   .account-content[_ngcontent-%COMP%]{padding:30px 0 50px}@media (min-width: 840px){.account-page[_ngcontent-%COMP%]   .account-content[_ngcontent-%COMP%]{padding:40px 0 50px}}.account-page[_ngcontent-%COMP%]   .account-content.smaller-padding[_ngcontent-%COMP%]{padding:10px 20px 30px}.account-page[_ngcontent-%COMP%]   .account-content[_ngcontent-%COMP%]   .footer[_ngcontent-%COMP%]{text-align:center;margin-top:25px}.account-page[_ngcontent-%COMP%]   .account-content[_ngcontent-%COMP%]   .footer[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:block;font-weight:500;margin-bottom:12px}@media (min-width: 840px){.account-page[_ngcontent-%COMP%]   .account-content[_ngcontent-%COMP%]   .footer[_ngcontent-%COMP%]{display:none}}.account-page[_ngcontent-%COMP%]   .account-edit-form[_ngcontent-%COMP%]{position:fixed;height:100vh;width:100vw;overflow-y:scroll;overflow-x:hidden;top:0;left:0;background-color:#fff;z-index:23;-webkit-overflow-scrolling:touch;padding-bottom:134px}.account-page[_ngcontent-%COMP%]   .account-edit-form[_ngcontent-%COMP%]   .edit-content[_ngcontent-%COMP%]{padding:0 20px}.account-page[_ngcontent-%COMP%]   .account-edit-form[_ngcontent-%COMP%]   .edit-content[_ngcontent-%COMP%]   .edit-title[_ngcontent-%COMP%]{font-size:24px;padding:20px 0}.account-page[_ngcontent-%COMP%]   .account-edit-form[_ngcontent-%COMP%]   .edit-content[_ngcontent-%COMP%]   .edit-title[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{width:24px;float:right}"]}),e})();var Vr=n(2477);const Nr=["btnContainer"],Tr=["btn"];function Rr(e,t){if(1&e&&l.\u0275\u0275element(0,"thor-breadcrumbs",13),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("segments",e.breadcrumbSegments)}}const Lr=function(){return{source:null}},zr=function(e){return{order:e}},Br=function(e){return{data:e}};function qr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",14,8),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2);return t.hotjarTag("amendorder"),t.track(2,"Amend")}),l.\u0275\u0275elementStart(2,"h6",9),l.\u0275\u0275text(3,"Amend"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("routerLink","/account/amend")("queryParamsHandling","merge")("queryParams",l.\u0275\u0275pureFunction0(4,Lr))("state",l.\u0275\u0275pureFunction1(7,Br,l.\u0275\u0275pureFunction1(5,zr,e.order)))}}function Hr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",1),l.\u0275\u0275elementStart(1,"div",2),l.\u0275\u0275template(2,Rr,1,1,"thor-breadcrumbs",3),l.\u0275\u0275elementStart(3,"h2",4),l.\u0275\u0275text(4,"Need help?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",5,6),l.\u0275\u0275elementStart(7,"div",7,8),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext();return t.hotjarTag("notarrived"),t.track(1,"Order has not arrived")}),l.\u0275\u0275elementStart(9,"h6",9),l.\u0275\u0275text(10,"Order has not arrived"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(11,qr,4,9,"div",10),l.\u0275\u0275elementStart(12,"div",11,8),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext();return t.hotjarTag("cancelorder"),t.track(3,"Cancel order")}),l.\u0275\u0275elementStart(14,"h6",9),l.\u0275\u0275text(15,"Cancel order"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(16,"div",12,8),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext();return t.hotjarTag("contactus"),t.track(4,"Other")}),l.\u0275\u0275elementStart(18,"h6",9),l.\u0275\u0275text(19,"Other"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!e.isMobile),l.\u0275\u0275advance(5),l.\u0275\u0275property("routerLink","/account/notarrived")("queryParamsHandling","merge")("state",l.\u0275\u0275pureFunction1(13,Br,l.\u0275\u0275pureFunction1(11,zr,e.order))),l.\u0275\u0275advance(4),l.\u0275\u0275property("featureFlag","amend"),l.\u0275\u0275advance(1),l.\u0275\u0275property("routerLink",e.isOrderSubscription?"/info/help/contact-us":"/account/cancel")("queryParamsHandling","merge")("queryParams",l.\u0275\u0275pureFunction0(15,Lr))("state",l.\u0275\u0275pureFunction1(18,Br,l.\u0275\u0275pureFunction1(16,zr,e.order))),l.\u0275\u0275advance(4),l.\u0275\u0275property("routerLink","/contactus")("state",l.\u0275\u0275pureFunction1(22,Br,l.\u0275\u0275pureFunction1(20,zr,e.order)))}}let $r=(()=>{class e{constructor(e,t,n,i,r,o){var a,s;this.ShareData=e,this.route=t,this.router=n,this.OrdersUtils=i,this.SegmentService=r,this.thortfulSubscription=o,this.isOrderSubscription=!1,this.breadcrumbSegments=[{label:"Home",url:"/"},{label:"Account",url:"/account"},{label:"Orders",url:"/account/orders"},{label:"Need Help",queryParamsHandling:"merge"}],this.orderFromState=(0,M.$s)(this.router.getCurrentNavigation(),"extras.state.data.order"),this.isOrderSubscription=!!(null===(s=null===(a=this.orderFromState)||void 0===a?void 0:a.cards)||void 0===s?void 0:s.some(e=>{var t,n,i;return(null!==(t=e.format)&&void 0!==t?t:"").toLowerCase()===(null===(i=null===(n=this.thortfulSubscription.subscriptionItemOption)||void 0===n?void 0:n.format)||void 0===i?void 0:i.toLowerCase())}))}ngOnInit(){if(this.isMobile=this.ShareData.getProperty("device").indexOf("mobile")>=0,this.orderFromState){if(this.orderFromState.format.includes("XTRATHORTFUL"))return void this.router.navigate(["/info/help/contact-us"]);this.order=this.orderFromState,this.SegmentService.trackCustom(Pi(...xi(this.order)))}
1else{const e=this.route.snapshot.queryParamMap.get("order_id");this.OrdersUtils.getOrderById(e).then(e=>{e.format.includes("XTRATHORTFUL")?this.router.navigate(["/info/help/contact-us"]):(this.order=e,this.SegmentService.trackCustom(Pi(...xi(this.order))))})}this.order||this.router.navigate(["/info/help/contact-us"]),this.event1=this.ShareData.listen("device-change",e=>{this.isMobile=e.indexOf("mobile")>=0})}ngAfterViewInit(){!this.order||this.buttons.length%2==0&&(this.buttons.forEach(e=>e.nativeElement.classList.add("two-rows")),this.buttonContainer.nativeElement.classList.add("two-rows"))}track(e,t){this.SegmentService.trackCustom(Oi(...xi(this.order),["option_position_index",e],["option_text",t]))}hotjarTag(e){window.hj&&window.hj("tagRecording",[e])}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(ht.P),l.\u0275\u0275directiveInject(M.BP),l.\u0275\u0275directiveInject(b._))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["need-help"]],viewQuery:function(e,t){if(1&e&&(l.\u0275\u0275viewQuery(Nr,5),l.\u0275\u0275viewQuery(Tr,5)),2&e){let e;l.\u0275\u0275queryRefresh(e=l.\u0275\u0275loadQuery())&&(t.buttonContainer=e.first),l.\u0275\u0275queryRefresh(e=l.\u0275\u0275loadQuery())&&(t.buttons=e)}},decls:1,vars:1,consts:[["class","content",4,"ngIf"],[1,"content"],[1,"breadcrumbs"],[3,"segments",4,"ngIf"],[1,"title"],[1,"buttons-container"],["btnContainer",""],[1,"button","selfhelp",3,"routerLink","queryParamsHandling","state","click"],["btn",""],[1,"button-text"],["class","button contactus",3,"routerLink","queryParamsHandling","queryParams","state","click",4,"featureFlag"],[1,"button","selfhelp",3,"routerLink","queryParamsHandling","queryParams","state","click"],[1,"button","contactus",3,"routerLink","state","click"],[3,"segments"],[1,"button","contactus",3,"routerLink","queryParamsHandling","queryParams","state","click"]],template:function(e,t){1&e&&l.\u0275\u0275template(0,Hr,20,24,"div",0),2&e&&l.\u0275\u0275property("ngIf",t.order)},directives:[i.O5,r.rH,M.Hl,Vr.n],styles:[".title[_ngcontent-%COMP%]{font-size:30px;padding-top:36px;text-align:center}@media (min-width: 769px){.title[_ngcontent-%COMP%]{font-size:36px}}.breadcrumbs[_ngcontent-%COMP%]{padding-top:0;padding-left:0}@media (min-width: 769px){.breadcrumbs[_ngcontent-%COMP%]{padding-top:19px;padding-left:4px}}.buttons-container[_ngcontent-%COMP%]{text-align:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}@media (min-width: 769px){.buttons-container[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:62px auto 0}}@media (min-width: 769px){.buttons-container.two-rows[_ngcontent-%COMP%]{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{text-align:center;margin:30px;cursor:pointer;position:relative;height:60px;border:1px solid black;border-radius:3px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 769px){.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{height:70px;width:300px;margin:0 0 40px}}@media (min-width: 992px){.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{width:365px}}@media (min-width: 769px){.buttons-container[_ngcontent-%COMP%]   .button.two-rows[_ngcontent-%COMP%]{margin:0 25px 40px}}.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]:hover{border:1px solid #ff6900;background-color:#ff6900}.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]   .button-text[_ngcontent-%COMP%]{text-align:center;vertical-align:center;font-size:18px;-ms-flex-item-align:center;align-self:center;margin-bottom:0}.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]:hover{color:#fff}"],data:{animation:[]}}),e})();var Yr=n(74124);function Gr(e,t){1&e&&(l.\u0275\u0275elementStart(0,"a",3),l.\u0275\u0275text(1,"Need help?"),l.\u0275\u0275elementEnd())}function Xr(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",4),l.\u0275\u0275text(1,"Need help? "),l.\u0275\u0275elementStart(2,"a",5),l.\u0275\u0275text(3,"Contact us"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}let Wr=(()=>{class e{constructor(e){this.ShareData=e}ngOnInit(){this.isMobile=this.ShareData.getProperty("device").indexOf("mobile")>=0,this.event1=this.ShareData.listen("device-change",e=>{this.isMobile=e.indexOf("mobile")>=0})}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(p.u))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["need-help-link"]],decls:3,vars:2,consts:[[1,"need-help-wrapper"],["class","need-help","href","/contactus",4,"ngIf"],["class","need-help-desktop",4,"ngIf"],["href","/contactus",1,"need-help"],[1,"need-help-desktop"],["href","/contactus",1,"contact-us"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275template(1,Gr,2,0,"a",1),l.\u0275\u0275template(2,Xr,4,0,"div",2),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.isMobile),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!t.isMobile))},directives:[i.O5],styles:[".need-help-wrapper[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.need-help[_ngcontent-%COMP%]{font-weight:bold;font-size:16px;color:#ff6900;text-align:center;-ms-flex-item-align:end;align-self:flex-end;margin-bottom:30px}.need-help-desktop[_ngcontent-%COMP%]{font-size:16px;text-align:center;margin:40px auto}.need-help-desktop[_ngcontent-%COMP%]   .contact-us[_ngcontent-%COMP%]{font-weight:bold;color:#ff6900}"],data:{animation:[]}}),e})();function Qr(e,t){if(1&e&&l.\u0275\u0275element(0,"thor-breadcrumbs",4),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("segments",e.breadcrumbSegments)}}function Jr(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",9),l.\u0275\u0275elementStart(1,"h2",10),l.\u0275\u0275text(2,"Do you want to cancel this order?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",11),l.\u0275\u0275text(4,"If you cancel your order, we will not dispatch this and you will be refunded; this action is non-reversible."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",12),l.\u0275\u0275elementStart(6,"div",13),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2);return t.back(),t.track(!1)}),l.\u0275\u0275text(7,"No"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"div",14),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2);return t.cancelOrder(),t.track(!0)}),l.\u0275\u0275text(9,"Yes"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}}function Zr(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",15),l.\u0275\u0275elementStart(1,"h2",10),l.\u0275\u0275text(2,"Sorry!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",11),l.\u0275\u0275text(4,"Unfortunately, since your order has already been printed, we are unable to cancel it. Because we print on demand, we always endeavour to get our orders processed and sent off as quickly and efficie
1ntly as possible, and it looks like we weren\u2019t able to catch your order in time."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}function Kr(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",16),l.\u0275\u0275elementStart(1,"h2",10),l.\u0275\u0275text(2,"All sorted!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",11),l.\u0275\u0275text(4,"Your order has now been cancelled and we have sent you an email confirming your refund."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}function eo(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",5),l.\u0275\u0275template(1,Jr,10,0,"div",6),l.\u0275\u0275template(2,Zr,5,0,"div",7),l.\u0275\u0275template(3,Kr,5,0,"div",8),l.\u0275\u0275element(4,"need-help-link"),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!("PAID"!==e.orderStatus&&"PAYMENT_PENDING"!==e.orderStatus||e.cancellationFailure||e.cancellationSuccess)),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","PAID"!==e.orderStatus&&"PAYMENT_PENDING"!==e.orderStatus||e.cancellationFailure),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.cancellationSuccess)}}let to=(()=>{class e{constructor(e,t,n,i,r,o,a,s){this.renderer=e,this.OrdersUtils=t,this.route=n,this.router=i,this.SelfHelpService=r,this.ShareData=o,this.SegmentService=a,this.thortfulSubscription=s,this.loaded=!1,this.cancellationSuccess=!1,this.cancellationFailure=!1,this.isOrderSubscription=!1,this.breadcrumbSegments=[{label:"Home",url:"/"},{label:"Account",url:"/account"},{label:"Orders",url:"/account/orders"},{label:"Need Help",url:"/account/needhelp",queryParamsHandling:"merge"},{label:"Cancel",url:"/account/cancel",queryParamsHandling:"merge"}]}ngOnInit(){this.isMobile=this.ShareData.getProperty("device").indexOf("mobile")>=0,this.event1=this.ShareData.listen("device-change",e=>{this.isMobile=e.indexOf("mobile")>=0}),this.orderId=this.route.snapshot.queryParamMap.get("order_id"),this.OrdersUtils.getOrderById(this.orderId).then(e=>{var t;this.order=e,this.isOrderSubscription=!!(null===(t=null==e?void 0:e.cards)||void 0===t?void 0:t.some(e=>{var t,n,i;return(null!==(t=e.format)&&void 0!==t?t:"").toLowerCase()===(null===(i=null===(n=this.thortfulSubscription.subscriptionItemOption)||void 0===n?void 0:n.format)||void 0===i?void 0:i.toLowerCase())})),this.orderStatus=e.status,this.SegmentService.trackCustom(Ai(...xi(this.order))),"REFUNDED"===this.orderStatus||"STOPPED"===this.orderStatus||"PARTIALLY_REFUNDED"===this.orderStatus?this.goToContactUs():this.isOrderSubscription?this.goToNewContactUs():(this.loaded=!0,"PAID"!==this.orderStatus&&"PAYMENT_PENDING"!==this.orderStatus&&this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","Sorry!"])))}).catch(()=>{this.goToContactUs()})}goToContactUs(){this.router.navigate(["/contactus"],{replaceUrl:!0})}goToNewContactUs(){this.router.navigate(["/info/help/contact-us"],{replaceUrl:!0})}cancelOrder(){this.SelfHelpService.cancelOrder(this.orderId).then(()=>{this.cancellationSuccess=!0,this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","All sorted!"]))}).catch(e=>{"This order is not eligible for self-help cancel: not supported in current order status"===e.error.message?(this.cancellationFailure=!0,this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","Sorry!"]))):this.goToContactUs()})}track(e){this.SegmentService.trackCustom(Fi(...xi(this.order),["cancel_order",e]))}back(){history.back()}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(l.Renderer2),l.\u0275\u0275directiveInject(ht.P),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(Yr.g),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(M.BP),l.\u0275\u0275directiveInject(b._))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["cancel"]],decls:4,vars:2,consts:[[1,"content"],[1,"breadcrumbs"],[3,"segments",4,"ngIf"],["class","cancel-wrapper",4,"ngIf"],[3,"segments"],[1,"cancel-wrapper"],["class","confirm-cancellation",4,"ngIf"],["class","no-cancellation",4,"ngIf"],["class","cancellation-success",4,"ngIf"],[1,"confirm-cancellation"],[1,"title"],[1,"cancel-text"],[1,"button-row"],[1,"button","no",3,"click"],[1,"button","yes",3,"click"],[1,"n
1o-cancellation"],[1,"cancellation-success"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275template(2,Qr,1,1,"thor-breadcrumbs",2),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(3,eo,5,3,"div",3),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!t.isMobile),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.loaded))},directives:[i.O5,Vr.n,Wr],styles:[".breadcrumbs[_ngcontent-%COMP%]{padding-top:0;padding-left:0}@media (min-width: 769px){.breadcrumbs[_ngcontent-%COMP%]{padding-top:19px;padding-left:4px}}.cancel-wrapper[_ngcontent-%COMP%]{max-width:540px;margin:0 auto}.cancel-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:30px;padding-top:36px;text-align:center}@media (min-width: 769px){.cancel-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:42px}}.cancel-wrapper[_ngcontent-%COMP%]   .confirm-cancellation[_ngcontent-%COMP%]{min-height:68vh}.cancel-wrapper[_ngcontent-%COMP%]   .cancel-text[_ngcontent-%COMP%]{text-align:center;line-height:32px;font-size:16px;margin:15px 40px 36px;line-height:1.44;font-weight:normal}.cancel-wrapper[_ngcontent-%COMP%]   .button-row[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cancel-wrapper[_ngcontent-%COMP%]   .button-row[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{width:125px;height:50px;color:#fff;background:#ff6900;padding:15px 0 13px;margin:14px 11px 11px 0;border-radius:4px;border:solid 1.5px #ff6900;font-size:16px;font-weight:normal;text-align:center;cursor:pointer}"],data:{animation:[]}}),e})();function no(e,t){if(1&e&&l.\u0275\u0275element(0,"thor-breadcrumbs",10),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("segments",e.breadcrumbSegments)}}const io=function(){return{source:null}};let ro=(()=>{class e{constructor(e,t,n,i,r){this.ShareData=e,this.router=t,this.route=n,this.SegmentService=i,this.OrdersUtils=r,this.breadcrumbSegments=[{label:"Home",url:"/"},{label:"Account",url:"/account"},{label:"Orders",url:"/account/orders"},{label:"Need Help",url:"/account/needhelp",queryParamsHandling:"merge"}],this.orderFromState=(0,M.$s)(this.router.getCurrentNavigation(),"extras.state.data.order")}ngOnInit(){if(this.isMobile=this.ShareData.getProperty("device").indexOf("mobile")>=0,this.event1=this.ShareData.listen("device-change",e=>{this.isMobile=e.indexOf("mobile")>=0}),this.orderFromState)this.order=this.orderFromState,this.SegmentService.trackCustom(Mi(...xi(this.order)));else{const e=this.route.snapshot.queryParamMap.get("order_id");this.OrdersUtils.getOrderById(e).then(e=>{this.order=e,this.SegmentService.trackCustom(Mi(...xi(this.order)))})}}track(e,t){this.SegmentService.trackCustom(vi(...xi(this.order),["option_position_index",e],["option_text",t]))}hotjarTag(e){window.hj&&window.hj("tagRecording",[e])}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(M.BP),l.\u0275\u0275directiveInject(ht.P))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["amend"]],decls:18,vars:9,consts:[[1,"content"],[1,"breadcrumbs"],[3,"segments",4,"ngIf"],[1,"title"],[1,"buttons-container"],["routerLink","/account/amend/address","queryParamsHandling","merge",1,"button","delivery-address",3,"queryParams","click"],[1,"button-text"],["routerLink","/account/amend/delivery-date","queryParamsHandling","merge",1,"button","delivery-date",3,"queryParams","click"],["routerLink","/account/amend/message","queryParamsHandling","merge",1,"button","delivery-date",3,"queryParams","click"],["routerLink","/account/amend/other","queryParamsHandling","merge",1,"button","other",3,"queryParams","click"],[3,"segments"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275template(2,no,1,1,"thor-breadcrumbs",2),l.\u0275\u0275elementStart(3,"h2",3),l.\u0275\u0275text(4,"Amend order"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",4),l.\u0275\u0275elementStart(6,"div",5),l.\u0275\u0275listener("click",function(){return t.hotjarTag("amendaddress"),t.track(1,"Address")}),l.\u0275\u0275elementStart(7,"h6",6),l.\u0275\u0275text(8,"Delivery Address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(9,"div",7),l.\u0275\u0275listener("click",function(){return t.hotjarTag("deliverydate"),t.track(2,"Delivery Date")}),l.\u0275\u0275elementStart(10,"h6",6),l.\u0275\u0275text(11,"Delivery Date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(12,"div",8),l.\u0275\u0275listener("click",function(){return t.hotjarTag("message"),t.track(3,"Message")}),l.\u0275\u0275elementStart(13,"h6",6),l.\u0275\u0275text(14,"Message"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(15,"div",9),l.\u0275\u0275listener("click",function(){return t.hotjarTag("contactus"),t.track(4,"Other")}),l.\u0275\u0275elementStart(16,"h6",6),l.\u0275\u0275text(17,"Other "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!t.isMobile),l.\u0275\u0275advance(4),l.\u0275\u0275property("queryParams",l.\u0275\u0275pureFunction0(5,io)),l.\u0275\u0275advance(3),l.\u0275\u0275property("queryParams",l.\u0275\u0275pureFunction0(6,io)),l.\u0275\u0275advance(3),l.\u0275\u0275property("queryParams",l.\u0275\u0275pureFunction0(7,io)),l.\u0275\u0275advance(3),l.\u0275\u0275property("queryParams",l.\u0275\u0275pureFunction0(8,io)))},directives:[i.O5,r.rH,Vr.n],styles:[".title[_ngcontent-%COMP%]{font-size:30px;padding-top:36px;text-align:center}@media (min-width: 769px){.title[_ngcontent-%COMP%]{font-size:36px}}.breadcrumbs[_ngcontent-%COMP%]{padding-top:0;padding-left:0}@media (min-width: 769px){.breadcrumbs[_ngcontent-%COMP%]{padding-top:19px;padding-left:4px}}.buttons-container[_ngcontent-%COMP%]{text-align:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}@media (min-width: 769px){.buttons-container[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:62px auto 0}}.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{text-align:center;margin:30px;cursor:pointer;position:relative;height:60px;border:1px solid black;border-radius:3px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 769px){.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{height:70px;width:300px;margin:0 25px 40px}}@media (min-width: 992px){.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{width:365px}}.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]:hover{border:1px solid #ff6900;background-color:#ff6900}.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]   .button-text[_ngcontent-%COMP%]{text-align:center;vertical-align:center;font-size:18px;-ms-flex-item-align:center;align-self:center;margin-bottom:0}.buttons-container[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]:hover{color:#fff}"],data:{animation:[]}}),e})();function oo(e,t){if(1&e&&l.\u0275\u0275element(0,"thor-breadcrumbs",6),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275property("segments",e.breadcrumbSegments)}}function ao(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",7),l.\u0275\u0275elementStart(1,"div",8),l.\u0275\u0275elementStart(2,"h2",9),l.\u0275\u0275text(3,"Sorry!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"div",10),l.\u0275\u0275text(5,"Unfortunately, since your order has already been printed, we are unable to cancel it. Because we print on demand, we always endeavour to get our orders processed and sent off as quickly and efficie
1ntly as possible, and it looks like we weren\u2019t able to catch your order in time."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}function so(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",23),l.\u0275\u0275elementStart(1,"p",24),l.\u0275\u0275text(2,"A label will be added to the envelope"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",25),l.\u0275\u0275elementStart(4,"datepicker",26),l.\u0275\u0275listener("emitDate",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).labelDeliverySet(t)}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"p",27),l.\u0275\u0275text(6),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"div",28),l.\u0275\u0275element(8,"img",29),l.\u0275\u0275elementStart(9,"div",30),l.\u0275\u0275text(10,"Edit"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(4),l.\u0275\u0275property("type","hide-field")("startDate",e.scheduleDate)("date",e.labelDate),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate(e.labelDate)}}function co(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"a",31),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).removeLabel()}),l.\u0275\u0275text(1,"Remove Label"),l.\u0275\u0275elementEnd()}}function lo(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"a",31),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).addLabel()}),l.\u0275\u0275text(1,"Add Label "),l.\u0275\u0275elementEnd()}}function po(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",11),l.\u0275\u0275elementStart(1,"div",12),l.\u0275\u0275elementStart(2,"h2",9),l.\u0275\u0275text(3,"Delivery date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(4,"div",13),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).track("viewed")}),l.\u0275\u0275elementStart(5,"div",14),l.\u0275\u0275elementStart(6,"datepicker",15),l.\u0275\u0275listener("emitDate",function(t){l.\u0275\u0275restoreView(e);const n=l.\u0275\u0275nextContext(2);return n.scheduleDeliverySet(t),n.track("selected")}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(7,"img",16),l.\u0275\u0275elementStart(8,"h4",17),l.\u0275\u0275text(9),l.\u0275\u0275pipe(10,"date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(11,so,11,4,"div",18),l.\u0275\u0275elementStart(12,"div",19),l.\u0275\u0275template(13,co,2,0,"a",20),l.\u0275\u0275template(14,lo,2,0,"a",20),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(15,"div",21),l.\u0275\u0275elementStart(16,"button",22),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2);return t.updateDeliveryDate(),t.hotjarTag("deliverydate"),t.track("updated")}),l.\u0275\u0275text(17,"Update delivery date"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(6),l.\u0275\u0275property("type","hide-field")("disableDates",e.disabledDays)("startDate",e.calendarMin)("maxDate",e.deliveryMaxDate()),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(l.\u0275\u0275pipeBind2(10,8,e.scheduleDate,"d MMMM yyyy")),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",e.displayDeliveryLabel),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",e.displayDeliveryLabel),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.displayDeliveryLabel)}}function mo(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",1),l.\u0275\u0275elementStart(1,"div",2),l.\u0275\u0275template(2,oo,1,1,"thor-breadcrumbs",3),l.\u0275\u0275template(3,ao,6,0,"div",4),l.\u0275\u0275template(4,po,18,11,"div",5),l.\u0275\u0275element(5,"need-help-link"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!e.isMobile),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","PAID"!==e.orderStatus&&"PAYMENT_PENDING"!==e.orderStatus||e.amendFailure&&!e.changeDeliveryDate),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",("PAID"===e.orderStatus||"PAYMENT_PENDING"===e.orderStatus)&&!e.amendFailure)}}let go=(()=>{class e{constructor(e,t,n,i,r,o,a,s,c){this.datePipe=e,this.ShareData=t,this.BasketService=n,this.OrdersUtils=i,this.route=r,this.router=o,this.GeneralUtils=a,this.SelfHelpService=s,this.SegmentService=c,this.loaded=!1,this.amendFailure=!1,this.changeDeliveryDate=!1,this.dpdFormats=["FLOWER","VALENTINES_FLOWERS","MOTHERSDAY_FLOWERS","A5_WINE","A5_SPARKLING_WINE","A5_SPIRITS","XMAS_TREE"],this.displayDeliveryLabel=!1,this.dpdHolidays=[],this.royalMailHolidays=[],this.breadcrumbSegments=[{label:"Home",url:"/"},{label:"Account",url:"/account"},{label:"Orders",url:"/account/orders"},{label:"Need Help",url:"/account/needhelp",queryParamsHandling:"merge"},{label:"Delivery Date",url:"/account/amend/delivery-date",queryParamsHandling:"merge"}],this.disabledDays=e=>this.individualDpdItemCheck()?this.dpdDisabledDays(e):this.royalMailDisabledDays(e)}ngOnInit(){this.isMobile=this.ShareData.getProperty("device").indexOf("mobile")>=0,this.getOrderInfo(),this.getHolidayInformation()}
1getOrderInfo(){this.orderId=this.route.snapshot.queryParamMap.get("order_id"),this.OrdersUtils.getOrderById(this.orderId).then(e=>{var t;this.order=e,this.orderStatus=e.status,this.orderOptions=e.order_options,this.loaded=!0,this.getEarliestAvailableDeliveryDate(this.order.delivery_address,[null===(t=this.order)||void 0===t?void 0:t.cards[0].format]),"REFUNDED"===this.orderStatus||"STOPPED"===this.orderStatus||"PARTIALLY_REFUNDED"===this.orderStatus?this.goToContactUs():(this.loaded=!0,"PAID"!==this.orderStatus&&"PAYMENT_PENDING"!==this.orderStatus&&this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","Sorry!"])))})}scheduleDeliverySet(e){if(e){const t=e.setTime(e.getTime()-60*e.getTimezoneOffset()*1e3);this.scheduleDate=new Date(t).toISOString().slice(0,10)}}labelDeliverySet(e){this.labelDate="Do not open until "+this.datePipe.transform(this.GeneralUtils.dateToString(e),"d MMMM yyyy"),this.setMessageSticker(e)}setMessageSticker(e){this.message_sticker="Do not open until "+this.datePipe.transform(e,"d MMMM yyyy")}getEarliestAvailableDeliveryDate(e,t){this.BasketService.arrivaldateRequest(e,void 0,t).then(e=>{this.calendarMin=new Date(e.estimated_latest_arrival_date),this.scheduleDate=this.calendarMin.toISOString().slice(0,10)})}removeLabel(){this.displayDeliveryLabel=!1,this.labelDate="",this.message_sticker=""}addLabel(){this.labelDate="Do not open until "+this.datePipe.transform(this.scheduleDate,"d MMMM yyyy"),this.displayDeliveryLabel=!0,this.setMessageSticker(this.scheduleDate)}updateDeliveryDate(){this.SelfHelpService.amendDeliveryDate(this.orderId,this.scheduleDate,this.message_sticker).then(()=>{this.router.navigate(["account/orders"],{queryParams:{order_id:this.orderId},state:{data:{amendSuccess:!0}}})}).catch(e=>{"This order is not eligible for self-help amend: not supported in current order status"===e.error.message?this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","Sorry!"])):this.goToContactUs()})}getHolidayInformation(){this.GeneralUtils.serviceOptions.then(e=>{const{date_information:t}=e;this.dpdHolidays=t.holidays.filter(e=>!!e.dpd_applicable).map(e=>this.convertDate(e.date)),this.royalMailHolidays=t.holidays.filter(e=>!!e.royal_mail_applicable).map(e=>this.convertDate(e.date))})}dpdDisabledDays(e){return 0===e.getDay()||1===e.getDay()||this.dpdHolidays.includes(e.getTime())}royalMailDisabledDays(e){return 0===e.getDay()||this.royalMailHolidays.includes(e.getTime())}individualDpdItemCheck(){var e;const t=null===(e=this.order)||void 0===e?void 0:e.cards[0].format;return this.dpdFormats.includes(t)}convertDate(e){const t=new Date(e).toDateString();return new Date(t).getTime()}goToContactUs(){this.router.navigate(["/contactus"],{replaceUrl:!0})}deliveryMaxDate(){}hotjarTag(e){window.hj&&window.hj("tagRecording",[e])}track(e){switch(e){case"viewed":this.SegmentService.trackCustom(Si(...xi(this.order)));break;case"selected":this.SegmentService.trackCustom(ki(...xi(this.order)));break;case"updated":this.SegmentService.trackCustom(Ei(...xi(this.order)))}}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(i.uU),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(Ui.v),l.\u0275\u0275directiveInject(ht.P),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(P.w),l.\u0275\u0275directiveInject(Yr.g),l.\u0275\u0275directiveInject(M.BP))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["delivery-date"]],decls:1,vars:1,consts:[["class","content",4,"ngIf"],[1,"content"],[1,"breadcrumbs"],[3,"segments",4,"ngIf"],["class","cancel-wrapper",4,"ngIf"],["class","delivery-wrapper",4,"ngIf"],[3,"segments"],[1,"cancel-wrapper"],[1,"no-cancellation"],[1,"title"],[1,"cancel-text"],[1,"delivery-wrapper"],[1,"delivery-date"],["datepicker-toggle","",1,"schedule-delivery",3,"click"],[1,"calendar-container"],[3,"type","disableDates","startDate","maxDate","emitDate"],["imgSrc","svg/delivery-date-calendar.svg",1,"cursor-pointer"],[1,"sm","w700","orange","cursor-pointer"],["class","delivery-label","datepicker-toggle","",4,"ngIf"],[1,"label-container"],["class","orange",3,"click",4,"ngIf"],[1,"account-buttons"],[1,"btn-thor-orange","new-address",3,"click"],["datepicker-toggle","",1,"delivery-label"],[1,"lg"],[1,"label-box"],[3,"type","startDate","date","emitDate"],[1,"label-date"],[1,"icon"],["imgSrc","img/action/calendar_label.png"],[1,"label"],[1,"orange",3,"click"]],template:function(e,t){1&e&&l.\u0275\u0275template(0,mo,6,3,"div",0),2&e&&l.\u0275\u0275property("ngIf",t.loaded)},directives:[i.O5,Wr,Vr.n,qn.W,Hn.a,M.t1],pipes:[i.uU],styles:[".title[_ngcontent-%COMP%]{font-size:30px;padding-top:36px;text-align:center}@media (min-width: 769px){.title[_ngcontent-%COMP%]{font-size:36px}}.breadcrumbs[_ngcontent-%COMP%]{padding-top:0;padding-left:0}@media (min-width: 769px){.breadcrumbs[_ngcontent-%COMP%]{padding-top:19px;padding-left:4px}}.cancel-wrapper[_ngcontent-%COMP%]{margin:0 auto;min-height:68vh;padding:0 10%}@media (min-width: 840px){.cancel-wrapper[_ngcontent-%COMP%]{min-height:auto;padding:0 20%}}.cancel-wrapper[_ngcontent-%COMP%]   .cancel-text[_ngcontent-%COMP%]{text-align:center;font-size:16px;line-height:1.44;font-weight:normal}.delivery-wrapper[_ngcontent-%COMP%]{max-width:320px;min-width:320px;margin:0 auto;min-height:68vh}@media (min-width: 769px){.delivery-wrapper[_ngcontent-%COMP%]{min-height:auto}}.delivery-wrapper[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%]{padding-top:40px}@media (min-width: 769px){.delivery-wrapper[_ngcontent-%COMP%]   .account-buttons[_ngcontent-%COMP%]{width:320px}}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]{max-width:600px;text-align:center}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date.custom-label[_ngcontent-%COMP%]{margin-bottom:50px}@media (min-width: 769px){.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date.custom-label[_ngcontent-%COMP%]{padding-bottom:50px}}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .schedule-delivery[_ngcontent-%COMP%]{margin-top:50px}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .schedule-delivery[_ngcontent-%COMP%]   .cursor-pointer[_ngcontent-%COMP%]{cursor:pointer}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .schedule-delivery[_ngcontent-%COMP%]   .vday-flowers[_ngcontent-%COMP%]{padding-bottom:20px}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .schedule-delivery[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{padding-bottom:20px}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .schedule-delivery[_ngcontent-%COMP%]   .calendar-container[_ngcontent-%COMP%]{position:relative;max-width:300px;margin:auto;padding-bottom:0}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .schedule-delivery[_ngcontent-%COMP%]   .calendar-container[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]{position:absolute;max-height:0;left:0}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .schedule-delivery[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{margin-bottom:28px;font-size:22px}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]{margin:36p
1x 18px}@media (min-width: 769px){.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]{margin:36px auto 16px;width:320px}}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]   .label-box[_ngcontent-%COMP%]{position:relative;border:1px solid #979797;text-align:left;padding:14px 35px 14px 8px;cursor:pointer}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]   .label-box.centered[_ngcontent-%COMP%]{text-align:center;padding:14px 8px}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]   .label-box.centered[_ngcontent-%COMP%]   .label-date[_ngcontent-%COMP%]{font-size:16px;font-weight:700}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]   .label-box[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{height:0;position:absolute}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]   .label-box[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]   .label-box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{position:absolute;right:9px;top:5px}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]   .label-box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%], .delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]   .label-box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:22px;margin-left:2px}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label[_ngcontent-%COMP%]   .label-box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{line-height:.5;color:#ff6900;font-size:14px}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label.custom[_ngcontent-%COMP%]{width:auto;max-width:380px;margin:-16px auto 18px}@media (min-width: 769px){.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label.custom[_ngcontent-%COMP%]{margin-top:-29px;margin-bottom:20px}}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .delivery-label.custom[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:1.43;letter-spacing:normal;margin:0}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .sticker[_ngcontent-%COMP%]{width:130px;margin:auto auto 33px}@media (min-width: 769px){.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .sticker[_ngcontent-%COMP%]{margin-bottom:35px}}.delivery-wrapper[_ngcontent-%COMP%]   .delivery-date[_ngcontent-%COMP%]   .sticker[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%}"],data:{animation:[]}}),e})();function uo(e,t){if(1&e&&l.\u0275\u0275element(0,"thor-breadcrumbs",30),2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("segments",e.breadcrumbSegments)}}const ho=function(){return{source:null}},fo=function(e){return{invalid:e}},Co=function(e){return{disabled:e}};function xo(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",5),l.\u0275\u0275elementStart(1,"div",6),l.\u0275\u0275template(2,uo,1,1,"thor-breadcrumbs",7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"h2",8),l.\u0275\u0275text(4,"Delivery Address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",9),l.\u0275\u0275elementStart(6,"span"),l.\u0275\u0275text(7,"If the country on the delivery address is incorrect, please "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(8,"a",10),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).hotjarTag("cancelorder")}),l.\u0275\u0275text(9,"cancel "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(10,"span"),l.\u0275\u0275text(11,"this order and you can process a new one."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(12,"div",11),l.\u0275\u0275elementStart(13,"form",12,13),l.\u0275\u0275listener("change",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).track("edit")}),l.\u0275\u0275elementStart(15,"p",14),l.\u0275\u0275elementStart(16,"label",15),l.\u0275\u0275text(17,"Name"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(18,"input",16),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).orderAddress.recipient=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(19,"p",14),l.\u0275\u0275elementStart(20,"label",17),l.\u0275\u0275text(2
11,"Address Line 1 "),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(22,"input",18),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).orderAddress.address1=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(23,"p",19),l.\u0275\u0275elementStart(24,"label",20),l.\u0275\u0275text(25,"Address Line 2"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(26,"input",21),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).orderAddress.address2=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(27,"p",19),l.\u0275\u0275elementStart(28,"label",22),l.\u0275\u0275text(29,"Address Line 3"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(30,"input",23),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).orderAddress.address3=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(31,"p",14),l.\u0275\u0275elementStart(32,"label",24),l.\u0275\u0275text(33,"City"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(34,"input",25),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).orderAddress.city=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(35,"p",14),l.\u0275\u0275elementStart(36,"label",26),l.\u0275\u0275text(37,"Postcode"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(38,"input",27),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).orderAddress.postcode=t}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(39,"div",28),l.\u0275\u0275elementStart(40,"button",29),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2);return t.postcodeCheck(t.order.cards,t.orderAddress),t.track("updated")}),l.\u0275\u0275text(41,"Update address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275reference(14),t=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!t.isMobile),l.\u0275\u0275advance(6),l.\u0275\u0275property("routerLink","/account/cancel")("queryParamsHandling","merge")("queryParams",l.\u0275\u0275pureFunction0(16,ho)),l.\u0275\u0275advance(7),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(17,fo,t.invalidInput(t.orderAddress.recipient)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.orderAddress.recipient),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(19,fo,t.invalidInput(t.orderAddress.address1)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.orderAddress.address1),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngModel",t.orderAddress.address2),l.\u0275\u0275advance(4),l.\u0275\u0275property("ngModel",t.orderAddress.address3),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(21,fo,t.invalidInput(t.orderAddress.city)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.orderAddress.city),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngClass",l.\u0275\u0275pureFunction1(23,fo,t.invalidInput(t.orderAddress.postcode)&&!e.pristine)),l.\u0275\u0275advance(3),l.\u0275\u0275property("ngModel",t.orderAddress.postcode),l.\u0275\u0275advance(2),l.\u0275\u0275property("disabled",!t.formValidation())("ngClass",l.\u0275\u0275pureFunction1(25,Co,!t.formValidation()))}}function _o(e,t){if(1&e&&l.\u0275\u0275element(0,"thor-breadcrumbs",30),2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("segments",e.breadcrumbSegments)}}function Po(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",31),l.\u0275\u0275elementStart(1,"div",6),l.\u0275\u0275template(2,_o,1,1,"thor-breadcrumbs",7),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",32),l.\u0275\u0275elementStart(4,"h2",8),l.\u0275\u0275text(5,"Sorry!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(6,"div",33),l.\u0275\u0275text(7," Unfortunately, since your order has already been printed, we are unable to amend it. Because we print on demand, we always endeavour to get our orders processed and sent off as quickly and efficie
1ntly as possible, and it looks like we weren\u2019t able to catch your order in time."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!e.isMobile)}}function Oo(e,t){if(1&e&&l.\u0275\u0275element(0,"thor-breadcrumbs",30),2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275property("segments",e.breadcrumbSegments)}}function Mo(e,t){1&e&&l.\u0275\u0275element(0,"br")}function vo(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",34),l.\u0275\u0275elementStart(1,"div",6),l.\u0275\u0275template(2,Oo,1,1,"thor-breadcrumbs",7),l.\u0275\u0275elementStart(3,"h2",8),l.\u0275\u0275text(4,"Delivery Address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",9),l.\u0275\u0275text(6,"Is this address correct?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(7,"div",35),l.\u0275\u0275elementStart(8,"div",36),l.\u0275\u0275elementStart(9,"span"),l.\u0275\u0275elementStart(10,"i",37),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2);return t.confirmAddress=!1,t.track("edit")}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(11,"br"),l.\u0275\u0275elementStart(12,"span",38),l.\u0275\u0275text(13),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(14,"br"),l.\u0275\u0275elementStart(15,"span"),l.\u0275\u0275text(16),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(17,"br"),l.\u0275\u0275elementStart(18,"span"),l.\u0275\u0275text(19),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(20,Mo,1,0,"br",39),l.\u0275\u0275elementStart(21,"span"),l.\u0275\u0275text(22),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(23,"br"),l.\u0275\u0275elementStart(24,"span"),l.\u0275\u0275text(25),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(26,"div",28),l.\u0275\u0275elementStart(27,"button",40),l.\u0275\u0275listener("click",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2);return t.updateAddress(),t.track("confirmed")}),l.\u0275\u0275text(28,"Confirm delivery address"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!e.isMobile),l.\u0275\u0275advance(11),l.\u0275\u0275textInterpolate(e.orderAddress.recipient),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate2("",e.orderAddress.address1,", ",e.orderAddress.address2,""),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(e.orderAddress.address3),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.orderAddress.address3),l.\u0275\u0275advance(2),l.\u0275\u0275textInterpolate2("",e.orderAddress.city,", ",e.orderAddress.postcode,""),l.\u0275\u0275advance(3),l.\u0275\u0275textInterpolate(e.orderAddress.country)}}function bo(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",1),l.\u0275\u0275template(1,xo,42,27,"div",2),l.\u0275\u0275template(2,Po,8,1,"div",3),l.\u0275\u0275template(3,vo,29,9,"div",4),l.\u0275\u0275element(4,"need-help-link"),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!("PAID"!==e.orderStatus&&"PAYMENT_PENDING"!==e.orderStatus||e.amendFailure||e.confirmAddress)),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","PAID"!==e.orderStatus&&"PAYMENT_PENDING"!==e.orderStatus||e.amendFailure&&!e.confirmAddress),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.confirmAddress)}}let yo=(()=>{class e{constructor(e,t,n,i,r,o,a,s,c,d){this.ShareData=e,this.route=t,this.OrdersUtils=n,this.AccountOverviewUtils=i,this.elementRef=r,this.SelfHelpService=o,this.router=a,this.BasketService=s,this.Notification=c,this.SegmentService=d,this.amendFailure=!1,this.loaded=!1,this.confirmAddress=!1,this.breadcrumbSegments=[{label:"Home",url:"/"},{label:"Account",url:"/account"},{label:"Orders",url:"/account/orders"},{label:"Need Help",url:"/account/needhelp",queryParamsHandling:"merge"}
1,{label:"Delivery Address",url:"/account/amend/address",queryParamsHandling:"merge"}],this.postcodeCheck=(e,t)=>{const n=e.map(({format:e})=>e);this.BasketService.postcodeCheck(n,t.postcode).then(({results:e})=>{const t=e.find(({valid:e})=>!e);t?this.showPopup(t.error_message):(window.scroll(0,0),this.confirmAddress=!0)}).catch(e=>{this.ShareData.trigger("showError","serverError")})},this.showPopup=e=>{this.ShareData.trigger("popupOpen",{type:"callToAction",title:e.title,bodyText:e.body,button:"Ok!",onBtnClick:this.closePopup,onBackgroundClick:this.closePopup})},this.closePopup=()=>{this.ShareData.trigger("popupClose")}}ngOnInit(){this.isMobile=this.ShareData.getProperty("device").indexOf("mobile")>=0,this.deviceChangeEvent=this.ShareData.listen("device-change",e=>{this.isMobile=e.indexOf("mobile")>=0}),this.orderId=this.route.snapshot.queryParamMap.get("order_id"),this.OrdersUtils.getOrderById(this.orderId).then(e=>{this.orderStatus=e.status,"REFUNDED"===this.orderStatus||"STOPPED"===this.orderStatus||"PARTIALLY_REFUNDED"===this.orderStatus?this.goToContactUs():(this.order=e,this.orderAddress=(0,xe.Z)(this.order.delivery_address),this.loaded=!0),"PAID"!==this.orderStatus&&"PAYMENT_PENDING"!==this.orderStatus&&this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","Sorry!"]))})}invalidInput(e){return this.AccountOverviewUtils.invalidInput(e)}formValidation(){return this.elementRef.nativeElement.getElementsByTagName("form")[0].checkValidity()}updateAddress(){this.SelfHelpService.amendAddress(this.orderId,this.orderAddress).then(()=>{this.router.navigate(["account/orders"],{queryParams:{order_id:this.orderId},state:{data:{amendSuccess:!0}}}),this.Notification.success("Address succesfully updated")}).catch(e=>{"This order is not eligible for self-help amend: not supported in current order status"===e.error.message?(this.amendFailure=!0,this.confirmAddress=!1,this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","Sorry!"]))):this.goToContactUs()})}goToContactUs(){this.router.navigate(["/contactus"],{replaceUrl:!0})}hotjarTag(e){window.hj&&window.hj("tagRecording",[e])}track(e){switch(e){case"edit":this.SegmentService.trackCustom(yi(...xi(this.order)));break;case"updated":this.SegmentService.trackCustom(bi(...xi(this.order)));break;case"confirmed":this.SegmentService.trackCustom(wi(...xi(this.order)))}}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(ht.P),l.\u0275\u0275directiveInject(g.e),l.\u0275\u0275directiveInject(l.ElementRef),l.\u0275\u0275directiveInject(Yr.g),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(Ui.v),l.\u0275\u0275directiveInject(m.P),l.\u0275\u0275directiveInject(M.BP))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["address"]],decls:1,vars:1,consts:[["class","content",4,"ngIf"],[1,"content"],["class","amend-form-wrapper",4,"ngIf"],["class","no-amend",4,"ngIf"],["class","confirm-address-wrapper",4,"ngIf"],[1,"amend-form-wrapper"],[1,"breadcrumbs"],[3,"segments",4,"ngIf"],[1,"title"],[1,"subtitle"],[1,"cancel",3,"routerLink","queryParamsHandling","queryParams","click"],[1,"amend-address-form"],["name","AmendAddressForm","novalidate","",3,"change"],["AmendAddressForm","ngForm"],[1,"thor-input","new-input",3,"ngClass"],["for","firstName"],["type","text","required","","placeholder","Name","id","name","name","name","maxlength","25","text-filtering","",3,"ngModel","ngModelChange"],["for","addressLine1"],["type","text","required","","placeholder","Add address","id","addressLine1","name","addressLine1","max-length","50","text-filtering","",3,"ngModel","ngModelChange"],[1,"thor-input","new-input"],["for","addressLine2"],["type","text","placeholder","Add address","id","addressLine2","name","addressLine2","text-filtering","",3,"ngModel","ngModelChange"],["for","addressLine3"],["type","text","placeholder","Add address","id","addressLine3","name","addressLine3","text-filtering","",3,"ngModel","ngModelChange"],["for","city"],["type","text","required","","placeholder","Add city","id","city","name","city","max-length","20","text-filtering","",3,"ngModel","ngModelChange"],["for","postcode"],["type","text","required","","placeholder","Add postcode","id","postcode","name","postcode","max-length","10","text-filtering","",3,"ngModel","ngModelChange"],[1,"account-buttons"],[1,"btn-thor-orange","new-address",3,"disabled","ngClass","click"],[3,"segments"],[1,"n
1o-amend"],[1,"no-amend-text-wrapper"],[1,"no-amend-text"],[1,"confirm-address-wrapper"],[1,"confirm-address"],[1,"confirm-address-box"],[1,"mdi","mdi-pencil",3,"click"],[1,"name"],[4,"ngIf"],[1,"btn-thor-orange","new-address",3,"click"]],template:function(e,t){1&e&&l.\u0275\u0275template(0,bo,5,3,"div",0),2&e&&l.\u0275\u0275property("ngIf",t.loaded)},directives:[i.O5,Wr,r.yS,ve._Y,ve.JL,ve.F,i.mk,ve.Fj,ve.Q7,ve.nD,ve.JJ,ve.On,Vr.n],styles:[".title[_ngcontent-%COMP%]{font-size:30px;padding-top:36px;text-align:center}@media (min-width: 769px){.title[_ngcontent-%COMP%]{font-size:36px}}.subtitle[_ngcontent-%COMP%]{font-size:12px;padding:0 10%;text-align:center}@media (min-width: 769px){.subtitle[_ngcontent-%COMP%]{font-size:16px;padding:0 20%}}.subtitle[_ngcontent-%COMP%]   .cancel[_ngcontent-%COMP%]{font-size:12px;color:#ff6900}@media (min-width: 769px){.subtitle[_ngcontent-%COMP%]   .cancel[_ngcontent-%COMP%]{font-size:16px}}.breadcrumbs[_ngcontent-%COMP%]{padding-top:0;padding-left:0}@media (min-width: 769px){.breadcrumbs[_ngcontent-%COMP%]{padding-top:19px;padding-left:4px}}.amend-address-form[_ngcontent-%COMP%]{padding:20px 20px 0}@media (min-width: 769px){.amend-address-form[_ngcontent-%COMP%]{padding:30px 0 0;width:320px;margin:0 auto}}.confirm-address[_ngcontent-%COMP%]{padding:0 20px}@media (min-width: 769px){.confirm-address[_ngcontent-%COMP%]{padding:40px 0;width:320px;margin:0 auto}}.confirm-address[_ngcontent-%COMP%]   .confirm-address-box[_ngcontent-%COMP%]{border:1px solid black;padding:17px;border-radius:3px;margin-top:18px;margin-bottom:66px}.confirm-address[_ngcontent-%COMP%]   .confirm-address-box[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-weight:bold;margin-top:16px}.confirm-address[_ngcontent-%COMP%]   .confirm-address-box[_ngcontent-%COMP%]   i.mdi[_ngcontent-%COMP%]{float:right;width:16.6px;height:16.5px;color:#ff6900;cursor:pointer}.no-amend-text-wrapper[_ngcontent-%COMP%]{margin:0 auto;text-align:center;min-height:68vh;padding:0 10%}@media (min-width: 769px){.no-amend-text-wrapper[_ngcontent-%COMP%]{min-height:auto;padding:0 20%}}.no-amend-text-wrapper[_ngcontent-%COMP%]   .no-amend-text[_ngcontent-%COMP%]{font-size:16px;line-height:1.44;font-weight:normal}"]}),e})();function wo(e,t){if(1&e&&l.\u0275\u0275element(0,"thor-breadcrumbs",4),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("segments",e.breadcrumbSegments)}}function So(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",10),l.\u0275\u0275elementStart(1,"h2",11),l.\u0275\u0275text(2,"Amend"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",12),l.\u0275\u0275text(4,"Let us know what you'd like to change and we will get back to you via email shortly!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",13),l.\u0275\u0275elementStart(6,"div",14),l.\u0275\u0275elementStart(7,"div",15),l.\u0275\u0275elementStart(8,"div",16),l.\u0275\u0275text(9),l.\u0275\u0275element(10,"br"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(11,"textarea",17),l.\u0275\u0275listener("ngModelChange",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).text=t})("ngModelChange",function(){l.\u0275\u0275restoreView(e);const t=l.\u0275\u0275nextContext(2);return t.text.length?t.textError=!1:""}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(12,"div",18),l.\u0275\u0275elementStart(13,"a",19),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(2).submitForm()}),l.\u0275\u0275text(14,"Submit"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(9),l.\u0275\u0275textInterpolate1("Order ",e.order.human_readable_id," has been stopped and an amendment has been requested"),l.\u0275\u0275advance(2),l.\u0275\u0275property("ngModel",e.text)}}function ko(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",20),l.\u0275\u0275elementStart(1,"h2",21),l.\u0275\u0275text(2,"Thank you!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",22),l.\u0275\u0275text(4,"We'll get back to you shortly."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}function Eo(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",23),l.\u0275\u0275elementStart(1,"h2",21),l.\u0275\u0275text(2,"Sorry!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",24),l.\u0275\u0275text(4,"Unfortunately, since your order has already been printed, we are unable to amend it. Because we print on demand, we always endeavour to get our orders processed and sent off as quickly and efficie
1ntly as possible, and it looks like we weren\u2019t able to catch your order in time."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}function Io(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",5),l.\u0275\u0275elementStart(1,"div",6),l.\u0275\u0275template(2,So,15,2,"div",7),l.\u0275\u0275template(3,ko,5,0,"div",8),l.\u0275\u0275template(4,Eo,5,0,"div",9),l.\u0275\u0275elementEnd(),l.\u0275\u0275element(5,"need-help-link"),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",e.showForm&&("PAID"===e.orderStatus||"PAYMENT_PENDING"===e.orderStatus)),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",!e.showForm&&e.amendSuccess),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","PAID"!==e.orderStatus&&"PAYMENT_PENDING"!==e.orderStatus)}}let Do=(()=>{class e{constructor(e,t,n,i,r,o){this.OrdersUtils=e,this.route=t,this.router=n,this.SelfHelpService=i,this.ShareData=r,this.Notification=o,this.loaded=!1,this.amendSuccess=!1,this.showForm=!0,this.text="",this.breadcrumbSegments=[{label:"Home",url:"/"},{label:"Account",url:"/account"},{label:"Orders",url:"/account/orders"},{label:"Need Help",url:"/account/needhelp",queryParamsHandling:"merge"}]}ngOnInit(){this.isMobile=this.ShareData.getProperty("device").indexOf("mobile")>=0,this.deviceChangeEvent=this.ShareData.listen("device-change",e=>{this.isMobile=e.indexOf("mobile")>=0}),this.orderId=this.route.snapshot.queryParamMap.get("order_id"),this.OrdersUtils.getOrderById(this.orderId).then(e=>{this.order=e,this.loaded=!0,this.orderStatus=e.status,"REFUNDED"===this.orderStatus||"STOPPED"===this.orderStatus||"PARTIALLY_REFUNDED"===this.orderStatus?this.goToContactUs():this.loaded=!0})}goToContactUs(){this.router.navigate(["/contactus"],{replaceUrl:!0})}submitForm(){var e,t="Order ID: "+this.order.human_readable_id+"<br>Amount paid: \xa3"+this.order.final_cost+"<br>Order dispatched on: "+this.order.order_delivery.dispatch_date+"<br><br><br>My order has been stopped and I would like to amend it, please look into this.<br>"+this.text;t=t.split("\n").join("<br>"),this.text&&this.text.length>0?this.SelfHelpService.stopOrder(this.order.id).then(()=>this.SelfHelpService.sendSelfHelpTicket(this.order.buyer_id,t,"Amending my order - please help!").then(e=>
1{e?(this.showForm=!1,this.amendSuccess=!0):this.goToContactUs()})).catch(()=>{this.goToContactUs()}):(!this.text||(null===(e=this.text)||void 0===e?void 0:e.length)<1)&&this.Notification.error("Amend form cannot be empty")}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(ht.P),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(Yr.g),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(m.P))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["other"]],decls:4,vars:2,consts:[[1,"content"],[1,"breadcrumbs"],[3,"segments",4,"ngIf"],["class","loaded",4,"ngIf"],[3,"segments"],[1,"loaded"],[1,"other-wrapper"],["class","form",4,"ngIf"],["class","thankyou",4,"ngIf"],["class","no-amend",4,"ngIf"],[1,"form"],[1,"title","amend-title"],[1,"text"],[1,"text-center"],[1,"text-form"],[1,"textborder"],[1,"pretext","textarea"],["name","information","rows","10",1,"textarea","lg",3,"ngModel","ngModelChange"],[1,"btn-wrapper"],[1,"send-btn",3,"click"],[1,"thankyou"],[1,"title"],[1,"ty-text"],[1,"no-amend"],[1,"sorry-text"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275template(2,wo,1,1,"thor-breadcrumbs",2),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(3,Io,6,3,"div",3),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!t.isMobile),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.loaded))},directives:[i.O5,Vr.n,Wr,ve.Fj,ve.JJ,ve.On],styles:['.breadcrumbs[_ngcontent-%COMP%]{padding-top:0;padding-left:0}@media (min-width: 769px){.breadcrumbs[_ngcontent-%COMP%]{padding-top:19px;padding-left:4px}}.text-form[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;margin-top:36px;text-align:center}@media (min-width: 576px){.text-form[_ngcontent-%COMP%]{width:100%;padding:0 50px;margin-top:41px}}@media (min-width: 769px){.text-form[_ngcontent-%COMP%]{width:650px;padding:0;margin-top:41px}}.text-form[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{text-align:left;position:relative;font-family:"Roboto";font-weight:700;font-size:16px;clear:both;margin-bottom:0!important}.text-form[_ngcontent-%COMP%]   .textborder[_ngcontent-%COMP%]{border:solid 1px #4a4a4a;border-radius:3px}.text-form[_ngcontent-%COMP%]   .textborder[_ngcontent-%COMP%]   .pretext[_ngcontent-%COMP%]{float:left;padding:12px 0 0 12px;color:#9e9e9e;text-align:left}.text-form[_ngcontent-%COMP%]   .textborder[_ngcontent-%COMP%]   .textarea[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border-style:none;border-color:transparent}@media (min-width: 576px){.text-form[_ngcontent-%COMP%]   .textborder[_ngcontent-%COMP%]{width:100%}}@media (min-width: 769px){.text-form[_ngcontent-%COMP%]   .textborder[_ngcontent-%COMP%]{width:650px}}.other-wrapper[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:0 auto;min-height:68vh;padding:0 10%}@media (min-width: 840px){.other-wrapper[_ngcontent-%COMP%]{min-height:auto;padding:0 20%}}.other-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:30px;padding-top:20px;margin:0 24px 17px;text-align:center}@media (min-width: 769px){.other-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:42px;padding-top:36px}}.other-wrapper[_ngcontent-%COMP%]   .btn-wrapper[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 25%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.other-wrapper[_ngcontent-%COMP%]   .btn-wrapper[_ngcontent-%COMP%]   .send-btn[_ngcontent-%COMP%]{margin-top:30px;margin-bottom:20px;font-weight:bold;font-size:16px;text-align:center;background:#ff6900;color:#fff;padding:15px;border-radius:3px;position:relative;width:100%}@media (min-width: 769px){.other-wrapper[_ngcontent-%COMP%]   .btn-wrapper[_ngcontent-%COMP%]   .send-btn[_ngcontent-%COMP%]{margin-bottom:0}}.other-wrapper[_ngcontent-%COMP%]   .thankyou[_ngcontent-%COMP%]{text-align:center;line-height:32px;font-size:16px;line-height:1.44;font-weight:normal;min-height:68vh;padding:0 10%;margin-bottom:0}@media (min-width: 769px){.other-wrapper[_ngcontent-%COMP%]   .thankyou[_ngcontent-%COMP%]{padding:0 20%;min-height:auto;margin-bottom:30px}}.other-wrapper[_ngcontent-%COMP%]   .thankyou[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:30px;padding-top:20px;margin:0 24px 17px;text-align:center}@media (min-width: 769px){.other-wrapper[_ngcontent-%COMP%]   .thankyou[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:42px;padding-top:36px}}.other-wrapper[_ngcontent-%COMP%]   .no-amend[_ngcontent-%COMP%]{text-align:center;font-size:16px;line-height:1.44;font-weight:normal;min-height:68vh;padding:0 10%}@media (min-width: 769px){.other-wrapper[_ngcontent-%COMP%]   .no-amend[_ngcontent-%COMP%]{padding:0 20%;min-height:auto}}'],data:{animation:[]}}),e})();var Ao=n(43354),Fo=n(11481);function jo(e,t){if(1&e&&l.\u0275\u0275element(0,"thor-breadcrumbs",4),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275property("segments",e.breadcrumbSegments)}}function Uo(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",12),l.\u0275\u0275elementStart(1,"thor-text",13),l.\u0275\u0275listener("onTextConfirm",function(t){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).amendPersonalisation(t)}),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(1),l.\u0275\u0275property("currentSettings",e.card)("isAmend",!0)("showMessage",!1)("hideUpd
1ateButton",!1)}}function Vo(e,t){if(1&e){const e=l.\u0275\u0275getCurrentView();l.\u0275\u0275elementStart(0,"div",14),l.\u0275\u0275elementStart(1,"div",15),l.\u0275\u0275text(2,"Is this message correct?"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",16),l.\u0275\u0275element(4,"thor-personalisation",17),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",18),l.\u0275\u0275elementStart(6,"div",19),l.\u0275\u0275listener("click",function(){return l.\u0275\u0275restoreView(e),l.\u0275\u0275nextContext(3).edit()}),l.\u0275\u0275text(7,"Edit message"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd()}if(2&e){const e=l.\u0275\u0275nextContext(3);l.\u0275\u0275advance(4),l.\u0275\u0275property("personalisation",e.card.inner_back)("orientation",e.card.orientation)}}function No(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",8),l.\u0275\u0275elementStart(1,"h2",9),l.\u0275\u0275text(2,"Message"),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(3,Uo,2,4,"div",10),l.\u0275\u0275template(4,Vo,8,2,"div",11),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext(2);l.\u0275\u0275advance(3),l.\u0275\u0275property("ngIf",e.editClicked),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",e.preview)}}function To(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",20),l.\u0275\u0275elementStart(1,"h2",9),l.\u0275\u0275text(2,"Sorry!"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"div",21),l.\u0275\u0275text(4,"Unfortunately, since your order has already been printed, we are unable to amend it. Because we print on demand, we always endeavour to get our orders processed and sent off as quickly and efficiently as possible, and it looks like we weren\u2019t able to catch your order in time."),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())}function Ro(e,t){if(1&e&&(l.\u0275\u0275elementStart(0,"div",5),l.\u0275\u0275template(1,No,5,2,"div",6),l.\u0275\u0275template(2,To,5,0,"div",7),l.\u0275\u0275element(3,"need-help-link"),l.\u0275\u0275elementEnd()),2&e){const e=l.\u0275\u0275nextContext();l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",("PAID"===e.orderStatus||"PAYMENT_PENDING"===e.orderStatus)&&!e.amendMessageFailure),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf","PAID"!==e.orderStatus&&"PAYMENT_PENDING"!==e.orderStatus||e.amendMessageFailure)}}let Lo=(()=>{class e{constructor(e,t,n,i,r,o){this.OrdersUtils=e,this.route=t,this.router=n,this.SelfHelpService=i,this.ShareData=r,this.SegmentService=o,this.loaded=!1,this.preview=!0,this.editClicked=!1,this.amendMessageFailure=!1,this.breadcrumbSegments=[{label:"Home",url:"/"},{label:"Account",url:"/account"},{label:"Orders",url:"/account/orders"},{label:"Need Help",url:"/account/needhelp",queryParamsHandling:"merge"},{label:"Message",url:"/account/amend/message",queryParamsHandling:"merge"}]}ngOnInit(){this.isMobile=this.ShareData.getProperty("device").indexOf("mobile")>=0,this.deviceChangeEvent=this.ShareData.listen("device-change",e=>{this.isMobile=e.indexOf("mobile")>=0}),this.orderId=this.route.snapshot.queryParamMap.get("order_id"),this.OrdersUtils.getOrderById(this.orderId).then(e=>{this.order=e,this.orderStatus=e.status,this.card=this.order.cards[0],this.SegmentService.trackCustom(Ii(...xi(this.order))),"REFUNDED"===this.orderStatus||"STOPPED"===this.orderStatus||"PARTIALLY_REFUNDED"===this.orderStatus?this.goToContactUs():this.order.cards.length>1?this.goToOther():(this.loaded=!0,"PAID"!==this.orderStatus&&"PAYMENT_PENDING"!==this.orderStatus&&this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","Sorry!"])))}).catch(()=>{this.goToContactUs()})}goToContactUs(){this.router.navigate(["/contactus"],{replaceUrl:!0})}goToOther(){this.router.navigate(["/account/amend/other"],{queryParamsHandling:"merge"})}amendPersonalisation(e){this.SelfHelpService.amendMessage(this.orderId,e.text_customisation_request,this.card.id).then(()=>{this.router.navigate(["account/orders"],{queryParams:{order_id:this.orderId},state:{data:{amendSuccess:!0}}})}).catch(e=>{"This order is not eligible for self-help amend: not supported in current order status"===e.error.message?(this.amendMessageFailure=!0,this.SegmentService.trackCustom(ji(...xi(this.order),["final_stage_message","Sorry!"]))):this.goToContactUs()})}edit(){this.editClicked=!0,this.preview=!1,this.SegmentService.trackCustom(Di(...xi(this.order)))}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(ht.P),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(r.F0),l.\u0275\u0275directiveInject(Yr.g),l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(M.BP))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["message"]],decls:4,vars:2,consts:[[1,"content"],[1,"breadcrumbs"],[3,"segments",4,"ngIf"],["class","message-wrapper",4,"ngIf"],[3,"segments"],[1,"message-wrapper"],["class","edit-message",4,"ngIf"],["class","no-amend",4,"ngIf"],[1,"edit-message"],[1,"title"],["class","editable",4,"ngIf"],["class","personalisation-preview",4,"ngIf"],[1,"editable"],[3,"currentSettings","isAmend","showMessage","hideUpdateButton","onTextConfirm"],[1,"personalisation-preview"],[1,"text"],[1,"preview"],[3,"personalisation","orientation"],[1,"btn-wrapper"],[1,"edit-btn",3,"click"],[1,"n
1o-amend"],[1,"sorry-text"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"div",1),l.\u0275\u0275template(2,jo,1,1,"thor-breadcrumbs",2),l.\u0275\u0275elementEnd(),l.\u0275\u0275template(3,Ro,4,2,"div",3),l.\u0275\u0275elementEnd()),2&e&&(l.\u0275\u0275advance(2),l.\u0275\u0275property("ngIf",!t.isMobile),l.\u0275\u0275advance(1),l.\u0275\u0275property("ngIf",t.loaded))},directives:[i.O5,Vr.n,Wr,Ao.V,Fo.R],styles:[".breadcrumbs[_ngcontent-%COMP%]{padding-top:0;padding-left:0}@media (min-width: 769px){.breadcrumbs[_ngcontent-%COMP%]{padding-top:19px;padding-left:4px}}.message-wrapper[_ngcontent-%COMP%]{max-width:900px;margin:0 auto}.message-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:30px;padding-top:36px;text-align:center}@media (min-width: 769px){.message-wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:42px}}.message-wrapper[_ngcontent-%COMP%]   .edit-message[_ngcontent-%COMP%]{min-height:68vh}.message-wrapper[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]{padding:0 25%}.message-wrapper[_ngcontent-%COMP%]   .editable[_ngcontent-%COMP%]{padding:30px 50px}.message-wrapper[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{text-align:center;margin-bottom:30px}.message-wrapper[_ngcontent-%COMP%]   .btn-wrapper[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 25%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 769px){.message-wrapper[_ngcontent-%COMP%]   .btn-wrapper[_ngcontent-%COMP%]{padding:0}}.message-wrapper[_ngcontent-%COMP%]   .btn-wrapper[_ngcontent-%COMP%]   .edit-btn[_ngcontent-%COMP%]{margin:30px 0;font-weight:bold;font-size:16px;text-align:center;background:#ff6900;color:#fff;width:100%;padding:15px;border-radius:3px;position:relative}@media (min-width: 769px){.message-wrapper[_ngcontent-%COMP%]   .btn-wrapper[_ngcontent-%COMP%]   .edit-btn[_ngcontent-%COMP%]{color:#ff6900;background:#ffffff;margin:30px 0 0}}.message-wrapper[_ngcontent-%COMP%]   .no-amend[_ngcontent-%COMP%]{text-align:center;font-size:16px;line-height:1.44;font-weight:normal;min-height:68vh;padding:0 10%}@media (min-width: 769px){.message-wrapper[_ngcontent-%COMP%]   .no-amend[_ngcontent-%COMP%]{padding:0 20%;min-height:auto}}"],data:{animation:[]}}),e})();var zo=n(13486);let Bo=(()=>{class e{constructor(e,t){this.Authentication=e,this.router=t}canActivate(e){if(this.Authentication.isFullUserLoggedIn())return(0,zo.of)(!0);{const t=e.data.redirectUrl,n=[];let i=e;for(;i;)n.unshift(...i.url.map(e=>e.path)),i=i.parent;const r="/"+n.filter(e=>e).join("/");return(0,zo.of)(this.router.createUrlTree([t],{queryParams:"/account/sign-in"===t?{redirectTo:r}:{}}))}}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275inject(ut.Vy),l.\u0275\u0275inject(r.F0))},e.\u0275prov=l.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac}),e})();const qo=[{path:"notarrived",loadChildren:()=>Promise.all([n.e(6382),n.e(3364)]).then(n.bind(n,93364)).then(e=>e.NotArrivedModule)},{path:"needhelp",component:$r,canActivate:[Bo],data:{type:"website",reloadOnSearch:!1,currency:!1,appLinks:!0,shareLocation:!1,redirectUrl:"/info/help/contact-us"}},{path:"sign-in",component:(()=>{class e{constructor(e,t,n){this.ShareData=e,this.route=t,this.router=n}ngOnInit(){this.authOpen(!1),this.loginSuccessListener=this.ShareData.listen("loginSuccess",()=>{const e=this.route.snapshot.queryParamMap.get("redirectTo");e&&this.router.navigate([e])})}ngOnDestroy(){this.loginSuccessListener&&this.loginSuccessListener.unsubscribe()}authOpen(e){this.ShareData.trigger("openAuth",e)}}return e.\u0275fac=function(t){return new(t||e)(l.\u0275\u0275directiveInject(p.u),l.\u0275\u0275directiveInject(r.gz),l.\u0275\u0275directiveInject(r.F0))},e.\u0275cmp=l.\u0275\u0275defineComponent({type:e,selectors:[["account-sign-in"]],decls:8,vars:0,consts:[[1,"account-sign-in"],[1,"buttons"],[1,"signin-button",3,"click"]],template:function(e,t){1&e&&(l.\u0275\u0275elementStart(0,"div",0),l.\u0275\u0275elementStart(1,"h1"),l.\u0275\u0275text(2,"Account"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(3,"p"),l.\u0275\u0275text(4,"Please log in to view your account info"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementStart(5,"div",1),l.\u0275\u0275elementStart(6,"div",2),l.\u0275\u0275listener("click",function(){return t.authOpen(!1)}),l.\u0275\u0275text(7,"SIGN IN / JOIN"),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd(),l.\u0275\u0275elementEnd())},styles:['.account-sign-in[_ngcontent-%COMP%]{text-align:center;min-height:400px;padding:40px 20px 0}.account-sign-in[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-family:"Roboto";font-weight:700;font-size:36px;margin-bottom:18px}@media (min-width: 450px){.account-sign-in[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:48px}}.account-sign-in[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-family:"Roboto";font-weight:400;font-size:16px;margin-bottom:10px}.account-sign-in[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]{margin-top:20px;padding:0 4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 450px){.account-sign-in[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]{padding:0}}.account-sign-in[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .signin-button[_ngcontent-%COMP%]{cursor:pointer;width:100%;height:40px;background-color:#fff;border:solid 1px #000000;margin:0 20px 10px;padding:11px;font-family:"Roboto";font-weight:700;font-size:16px;text-align:center}.account-sign-in[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .signin-button[_ngcontent-%COMP%]:focus{outline:none}@media all and (min-width: 320px) and (max-width: 359px){.account-sign-in[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .signin-button[_ngcontent-%COMP%]{font-size:15px}}@media (min-width: 450px){.account-sign-in[_ngcontent-%COMP%]   .buttons[_ngcontent-%COMP%]   .signin-button[_ngcontent-%COMP%]{margin-left:10px;width:250px}}']}
1),e})(),data:{type:"website",reloadOnSearch:!1,currency:!1,appLinks:!0,shareLocation:!1}},{path:"cancel",component:to,data:{type:"website",reloadOnSearch:!1,currency:!1,appLinks:!0,shareLocation:!1}},{path:"amend",canActivate:[M.Qt,Bo],component:ro,data:{featureFlag:"amend",redirectUrl:"/info/help/contact-us"}},{path:"amend/address",canActivate:[M.Qt,Bo],component:yo,data:{featureFlag:"amend",redirectUrl:"/info/help/contact-us"}},{path:"amend/delivery-date",canActivate:[M.Qt,Bo],component:go,data:{featureFlag:"amend",redirectUrl:"/info/help/contact-us"}},{path:"amend/other",canActivate:[M.Qt,Bo],component:Do,data:{featureFlag:"amend",redirectUrl:"/info/help/contact-us"}},{path:"amend/message",canActivate:[M.Qt,Bo],component:Lo,data:{featureFlag:"amend",redirectUrl:"/info/help/contact-us"}},{path:"**",component:Ur,canActivate:[Bo],data:{type:"website",currency:!1,appLinks:!0,redirectUrl:"/account/sign-in"}}];let Ho=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=l.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=l.\u0275\u0275defineInjector({imports:[[r.Bz.forChild(qo)],r.Bz]}),e})();var $o=n(16151),Yo=n(5185),Go=n(54270),Xo=n(53740),Wo=n(62014),Qo=n(69676),Jo=n(64337),Zo=n(90113),Ko=n(75685),ea=n(47294),ta=n(82487),na=n(87217),ia=n(82272),ra=n(67328),oa=n(42067),aa=n(24319),sa=n(91062),ca=n(15768),da=n(84215),la=n(37921),pa=n(60845),ma=n(7811),ga=n(10895),ua=n(23040),ha=n(30878),fa=n(13899),Ca=n(6422),xa=n(51466),_a=n(17445),Pa=n(34586),Oa=n(61270),Ma=n(71695);let va=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=l.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=l.\u0275\u0275defineInjector({providers:[_,c.b,Yr.g,Bo],imports:[[i.ez,ve.u5,$o.r,Ho,Yo.R,Go.B,Xo.o,Wo.V,Qo.Y,Jo.u,Zo.C,Ko.c,ea.w,ta.w,na._,ia.D,ra.S,oa.ResetPasswordModule,aa.L,sa.l,ca.I,da.Z,la.e,pa.J,M.VV.forRoot(["page-not-found"]),ma.W,ga.h,ua.X,Ca.W,ha.j,fa.g,xa.F,_a.a,Pa.f,Oa.x,Ma.m,i.ez]]}),e})()},21773:function(e,t,n){n.d(t,{b:function(){return s}});var i=n(85572),r=n(62415),o=n(38592),a=n(36951);let s=(()=>{class e{constructor(e,t){this.apiService=e,this.endpoints=t,this.computeDraftName=e=>`${e}_${Math.round(1e8*Math.random())}.png`}withJSONBlob(e){return new Blob([JSON.stringify(e)],{type:"application/json"})}fetchTemplate(e){return this.apiService.request(new URL(e,window.location.origin+this.endpoints.card+"/").href)}generateLocalDraft(e,t){return(0,i.mG)(this,void 0,void 0,function*(){const n=yield this.fetchTemplate(t);return{draft_id:e,draft_is_local:!0,profile_id:null,card_template_id:t,card_template:n,completed_template_image:null,draft_original_images:[],draft_cropped_images:[],template_cut_locations:n.template_cut_locations}})}createDraft(e){e.length>24&&(e=e.substring(e.length-24));const t=new FormData;return t.append("draft_request_model",this.withJSONBlob({card_template_id:e})),this.apiService.request(this.endpoints.templateDraft,{method:"POST",data:t,dataFormat:"multipart"})}fetchDraft(e){if(!e)throw new Error("Cannot fetch draft without draftId");return this.apiService.request(this.endpoints.templateDraftById(e))}deleteDraft(e){return this.apiService.request(this.endpoints.templateDraftById(e),{method:"DELETE"})}fetchDrafts(e=!0){return(0,i.mG)(this,void 0,void 0,function*(){return(yield this.apiService.request(this.endpoints.templateDraft,{cache:e}))||[]})}updateCroppedImageDataForSlot(e,t,n){const i=new FormData;return i.append("template_cut_location_id",t),i.append("cropped_image",n,this.computeDraftName(t)),this.apiService.request(this.endpoints.templateDraftById(e),{method:"PUT",data:i,dataFormat:"multipart",reportProgress:!0,observe:"events"},!0)}updateOriginalImageMetadata(e,t,n){return this.apiService.request(this.endpoints.templateDraftOriginalImage(e)(t),{method:"PUT",data:this.withJSONBlob(n),dataFormat:"json",observe:"events",reportProgress:!0},!0)}pushPhotoToDraftPhotoLibrary(e,t,n=[]){const i=new FormData;return i.append("original_image",t),i.append("draft_original_image_metadata",this.withJSONBlob(n)),this.apiService.request(this.endpoints.templateDraftById(e),{method:"PUT",data:i,dataFormat:"multipart"})}uploadOriginalPhoto(e,t,n=[]){const i=new FormData;return i.append("original_image",t),i.append("draft_original_image_metadata",this.withJSONBlob(n)),this.apiService.request(this.endpoints.templateDraftById(e),{method:"PUT",data:i,dataFormat:"multipart",observe:"events",reportProgress:!0},!0)}}return e.\u0275fac=function(t){return new(t||e)(r.\u0275\u0275inject(o.V),r.\u0275\u0275inject(a.F))},e.\u0275prov=r.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac}),e})()},6422:function(e,t,n){n.d(t,{W:function(){return o}});var i=n(92674),r=n(62415);let o=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=r.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=r.\u0275\u0275defineInjector({imports:[[i.ez]]}),e})()},33483:function(e,t,n){n.d(t,{J:function(){return O}});var i=n(62415),r=n(95410),o=n(70013),a=n(19956),s=n(6650),c=n(17291),d=n(68076),l=n(25801),p=n(6686),m=n(64084),g=n(37403),u=n(57266),h=n(2063),f=n(17419),C=n(92674);function x(e,t){if(1&e&&i.\u0275\u0275element(0,"img",3),2&e){const e=i.\u
10275\u0275nextContext();i.\u0275\u0275property("imgSrc",e.heartFull)}}function _(e,t){if(1&e&&i.\u0275\u0275element(0,"img",4),2&e){const e=i.\u0275\u0275nextContext();i.\u0275\u0275property("imgSrc",e.heartEmpty)}}function P(e,t){if(1&e&&i.\u0275\u0275element(0,"img",4),2&e){const e=i.\u0275\u0275nextContext();i.\u0275\u0275property("imgSrc",e.heartOutline)}}let O=(()=>{class e{constructor(e,t,n,r,o,a,c,d,l,p){this.ShareData=e,this.Analytics=t,this.Notification=n,this.ListModal=r,this.Authentication=o,this.SegmentService=a,this.UserUtils=c,this.WebPushService=d,this.cardActionsService=l,this.Store=p,this.experiment=!1,this.color="",this.triggerNewCardActionEvent=!1,this.savedToFavorites=new i.EventEmitter,this.Store.select("featureFlag","config","WEB-2469").pipe((0,s.P)(e=>"boolean"==typeof e)).subscribe(e=>{this.triggerNewCardActionEvent=e})}ngOnInit(){"orange"==this.className&&(this.color="-orange")}ngOnDestroy(){}isInList(){return this.ListModal.isInList(this.card.card_id)}isCreator(){return!(!this.Authentication.isFullUserLoggedIn()||!localStorage.getItem("profileId")||this.card.owner.id!==localStorage.getItem("profileId"))}addCardToListButton(){if(!this.wait){if(this.profile&&this.isCreator()){this.ShareData.trigger("openListModal",this.card),this.wait=!1;const e=this.isInList()?"Manage Card Unsaved":"Manage Card Save";return void this.sendCreatorSaveSegmentEvent(e,this.card)}if(this.wait=!0,this.ListModal.isInList(this.card.card_id))return void this.deleteCardFromList();this.addCardToList()}}addCardToList(){this.ListModal.addCardToList(this.card.card_id,void 0).then(e=>{this.savedToFavorites.emit(!0),this.addCardToListAnalytics(e.listId),this.WebPushService.triggerPrompt()}).catch(e=>{console.log(e),this.ShareData.trigger("showError","cardAddError")})}deleteCardFromList(){this.ListModal.deleteCardFromList(this.card.card_id,void 0).then(e=>{this.savedToFavorites.emit(!1),this.deleteCardFromListAnalytics(e.listId),this.Analytics.customEvent("Card","Unfavourite",this.card.card_id)}).catch(e=>{console.log(e),this.ShareData.trigger("showError","cardDeleteError")})}addCardToListAnalytics(e){this.hideToast||this.Notification.success("Card saved");var t="EXPLORE_QUERY",n=r.g.Main.prevSearchId;localStorage.getItem("profileId")&&this.card.owner.id===localStorage.getItem("profileId")&&(t="OWNER",n=this.card.owner.id);let i={source:t,sourceId:n};this.triggerNewCardActionEvent?this.cardActionsService.trackPreCheckout("ADD_CARD_TO_LIST",this.card.id,t,n):this.Analytics.thorAnalyticsEvent("ADD_CARD_TO_LIST",this.card,i),this.Analytics.customEvent("Card","Favourite",this.card.card_id),this.SegmentService.track((0,o.Ag)(...(0,o.xo)(this.card),["button_position",this.buttonPosition],["card_product_type",this.card.price_class])),this.bloomreachSaveProduct(this.card),this.wait=!1}deleteCardFromListAnalytics(e){e&&(this.Analytics.thorAnalyticsEvent("DELETE_CARD_FROM_LIST",this.card,{source:"CARD_LIST",sourceId:e}),this.SegmentService.track((0,o.P3)(...(0,o.xo)(this.card),["button_position",this.buttonPosition]))),this.wait=!1}get heartFull(){return`/svg/heart-full${this.color}.svg`}get heartEmpty(){return`/svg/heart-empty${this.color}.svg`}get heartOutline(){return"/svg/heart_outline_orange.svg"}sendCreatorSaveSegmentEvent(e,t){const{public_profile:n}=this.UserUtils.fullProfile,[i,r]=t.categories,{exclusive:o,visibility:a,creator_id:s,id:c,tags:d}=t,{title:l,description:p}=t.description;this.SegmentService.trackCustom({name:e,data:{product_id:c,product_url:window.location.origin+"/card/"+t.id,creator_id:s,creator_location:n.location,creator_name:n.nickname,product_exclusive_status:o,card_visibility:a,card_title:l,card_description:p,card_occassion_1:i,card_occassion_2:r,card_tags:d}})}bloomreachSaveProduct(e){var t,n,i,r,o,s,c,d;const l=`${window.location.origin}/card/${e.id}`,p={card_id:e.id,creator_id:null===(t=e.owner)||void 0===t?void 0:t.id,creator_name:null===(i=null===(n=e.owner)||void 0===n?void 0:n.public_profile)||void 0===i?void 0:i.nickname,card_image:e.displayImage||(null===(r=e.image)||void 0===r?void 0:r.medium),occasion:null===(o=e.classification)||void 0===o?void 0:o.categories,product_id:"A5",product_rude_status:(null===(c=null===(s=e.classification)||void 0===s?void 0:s.tags)||void 0===c?void 0:c.indexOf("rude"))>-1||!1,product_url:l,tags:null===(d=e.classification)||void 0===d?void 0:d.tags,card_price_class:e.price_class};(0,a.dU)("product_saved",p)}}return e.\u0275fac=function(t){return new(t||e)(i.\u0275\u0275directiveInject(c.u),i.\u0275\u0275directiveInject(d.c),i.\u0275\u0275directiveInject(l.P),i.\u0275\u0275directiveInject(p.a),i.\u0275\u0275directiveInject(m.Vy),i.\u0275\u0275directiveInject(o.BP),i.\u0275\u0275directiveInject(g.f),i.\u0275\u0275directiveInject(u.A),i.\u0275\u0275directiveInject(h.I),i.\u0275\u0275directiveInject(f.yh))},e.\u0275cmp=i.\u0275\u0275defineComponent({type:e,selectors:[["thor-heart"]],inputs:{card:"card",hideToast:"hideToast",profile:"profile",buttonPosition:"buttonPosition",className:"className",experiment:"experiment"},outputs:{savedToFavorites:"savedToFavorites"},decls:4,vars:4,consts:[["data-test-id","saveCardIcon","data-cy","favourite-card",1,"heart-wrapper",3,"ngClass","click"],["alt","heart showing card already in saved list, click to unsave card",3,"imgSrc",4,"ngIf"],["alt","heart showing card not in saved list, click to save",3,"imgSrc",4,"ngIf"],["alt","heart showing card already in saved list, click to unsave card",3,"imgSrc"],["alt","heart showing card not in saved list, click to save",3,"imgSrc"]],template:function(e,t){1&e&&(i.\u0275\u0275elementStart(0,"div",0),i.\u0275\u0275listener("click",function(){return t.addCardToListButton()}),i.\u0275\u0275template(1,x,1,1,"img",1),i.\u0275\u0275template(2,_,1,1,"img",2),i.\u0275\u0275template(3,P,1,1,"img",2),i.\u0275\u0275elementEnd()),2&e&&(i.\u0275\u0275property("ngClass",t.className),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",t.isInList()),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!t.isInList()&&!t.experiment),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!t.isInList()&&t.experiment))},directives:[C.mk,C.O5,o.t1],styles:[".heart-wrapper[_ngcontent-%COMP%]{width:16px;height:14px}.heart-wrapper.orange[_ngcontent-%COMP%]{width:100%;height:100%}.heart-wrapper.type-2[_ngcontent-%COMP%]{height:20px;width:24px}.heart-wrapper.type-3[_ngcontent-%COMP%]{height:22px;width:22px}.heart-wrapper.type-4[_ngcontent-%COMP%]{height:28px;width:28px}.heart-wrapper.type-5[_ngcontent-%COMP%]{height:16px;width:16px}.heart-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%}"]}),e})()},55519:function(e,t,n){n.d(t,{t:function(){return c}});var i=n(62415),r=n(17291),o=n(38592),a=n(36951),s=n(37403);let c=(()=>{class e{constructor(e,t,n,i){this.ShareData=e,this.Api=t,this.Endpoint=n,this.UserUtils=i,this.localpaymentMethods=[],this.ShareData.listen("logoutSuccess",()=>{this.localpaymentMethods=[]})}getPaymentMethods(){return this.localpaymentMethods.length?Promise.resolve(this.localpaymentMethods):this.UserUtils.getPaymentMethods()}refreshPaymentMethod(){return this.UserUtils.getPaymentMethods().then(e=>{this.localpaymentMethods=e})}setLocalpaymentMethods(e){this.localpaymentMethods=e}deletePaymentMechanism(e){return this.Api.request(this.Endpoint.deletePaymentMech+"/"+e,{method:"DELETE"})}}return e.\u0275fac=function(t){return new(t||e)(i.\u0275\u0275inject(r.u),i.\u0275\u0275inject(o.V),i.\u0275\u0275inject(a.F),i.\u0275\u0275inject(s.f))},e.\u0275prov=i.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},2477:function(e,t,n){n.d(t,{n:function(){return s}});var i=n(62415),r=n(92674),o=n(13074);function a(e,t){if(1&e&&(i.\u0275\u0275elementStart(0,"a",2),i.\u0275\u0275text(1),i.\u0275\u0275elementEnd()),2&e){const e=t.$implicit;i.\u0275\u0275property("routerLink",e.url)("queryParamsHandling",e.queryParamsHandling),i.\u0275\u0275advance(1),i.\u0275\u0275textInterpolate(e.label)}}let s=(()=>{class e{constructor(){this.segments=[]}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.\u0275\u0275defineComponent({type:e,selectors:[["thor-breadcrumbs"]],inputs:{segments:"segments"},decls:2,vars:1,consts:[[1,"Breadcrumbs"],["class","Breadcrumbs__Segment",3,"routerLink","queryParamsHandling",4,"ngFor","ngForOf"],[1,"Breadcrumbs__Segment",3,"routerLink","queryParamsHandling"]],template:function(e,t){1&e&&(i.\u0275\u0275elementStart(0,"div",0),i.\u0275\u0275template(1,a,2,3,"a",1),i.\u0275\u0275elementEnd()),2&e&&(i.\u0275\u0275advance(1),i.\u0275\u0275property("ngForOf",t.segments))},directives:[r.sg,o.yS],styles:['.Breadcrumbs__Segment[_ngcontent-%COMP%]{font-size:11px;text-transform:capitalize}@media (min-width: 768px){.Breadcrumbs__Segment[_ngcontent-%COMP%]{font-size:12px}}.Breadcrumbs__Segment[_ngcontent-%COMP%]:not(:last-of-type):after{content:"/";margin:0 .25em}']}),e})()}}]);

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.