1import{a as Zt}from"./chunk-PCX6H5VR.js";import{a as ee}from"./chunk-ERYHRG5M.js";import{a as te}from"./chunk-HFBJDQH5.js";import{a as ze}from"./chunk-3TDLAT73.js";import{a as qt}from"./chunk-5CW47RS7.js";import{a as Ft,b as Ge,c as Jt,e as Ye}from"./chunk-44PVQP2C.js";import{a as Ee,c as Kt}from"./chunk-BJEOJPIG.js";import{a as Ht}from"./chunk-J7RCMM6B.js";import{a as Gt}from"./chunk-G3YL5X2W.js";import{a as Xt}from"./chunk-TZ7I27FW.js";import{a as Ve}from"./chunk-6BISTV5S.js";import{a as Z}from"./chunk-KLQHSRJU.js";import{a as Le}from"./chunk-PKJ7OSK4.js";import{a as X}from"./chunk-QIANHNZ3.js";import{a as zt}from"./chunk-O3IZFT57.js";import{d as Fe}from"./chunk-7JK4YU6H.js";import{a as Qt}from"./chunk-G3ECJIDT.js";import{a as Me}from"./chunk-ZHKSWNGL.js";import{b as Yt}from"./chunk-AC6523UJ.js";import{a as Wt}from"./chunk-T44COPIH.js";import{a as Re}from"./chunk-4FOGNY7N.js";import{a as Pe}from"./chunk-DDRMLQGP.js";import{a as Vt}from"./chunk-FTBCFQJG.js";import{A as De}from"./chunk-2X62MTQM.js";import{b as M}from"./chunk-LWUUEIQO.js";import{b as Te}from"./chunk-ZFUIHNPN.js";import{a as x}from"./chunk-KJIUKXJ4.js";import{d as ke,g as q}from"./chunk-KPFW5WDZ.js";import{a as jt}from"./chunk-L2XAKF7E.js";import{a as xe}from"./chunk-SCJMMS4R.js";import{a as Ae,c as Ie,d as It}from"./chunk-NKZ7GERH.js";import{a as Ce}from"./chunk-NYVODJB2.js";import{Aa as Lt,Ba as je,Lg as Nt,Og as Ot,Pg as $t,Xb as w,Xc as le,Zc as kt,ad as Tt,bd as Dt,cd as Rt,db as Et,dd as Mt,ed as Pt,fd as Bt,wd as Ut}from"./chunk-JWTTV2TH.js";import{A as Ct,aa as xt,wa as J,z as wt,za as At}from"./chunk-WFKL35DD.js";import{Aa as bt,Ha as ht,Pa as G,Q as ut,X as z,Y as ft,Ya as yt,Za as Y,_ as gt,ac as St,bd as Q,ec as W,fa as vt,vd as K,wd as _t}from"./chunk-DM3NC7AB.js";import{$b as D,$c as H,Ac as st,Ad as R,Bb as ne,Bc as c,Bd as pt,Cc as s,Ce as dt,Db as re,Dc as l,Ec as g,Ee as F,Fa as be,Hd as u,Ic as U,Id as v,Ja as k,Jb as r,Jc as N,Jd as ce,K as E,Ld as V,Mc as I,Oe as we,Pc as y,Qa as b,Ra as h,Rc as m,Sc as ct,Tc as lt,Vb as ot,Vc as ye,Wa as tt,Wb as a,Wc as O,X as T,Xc as $,a as A,aa as He,ac as he,be as Se,dd as j,e as B,ec as nt,ed as d,fb as it,fc as L,fd as ae,ga as et,gd as C,td as se,uc as S,ve as _e,w as Xe,wc as _,x as ve,y as Ze,yc as rt,ye as mt,zc as at}from"./chunk-WVBH4ZDA.js";var ci=["content"],li=["*"];function pi(i,t){if(i&1){let e=I();s(0,"div",4)(1,"h3",5),d(2),l(),s(3,"button",6),y("click",function(){let o=b(e).$implicit;return h(o.dismiss("Cross click"))}),g(4,"app-amor-icon",7),l()(),s(5,"div",8),lt(6),g(7,"div",9),l()}if(i&2){let e=m();r(),c("id",e.drawerId),r(),C(" ",e.drawerHeading," "),r(2),c("icon",e.isUKSite?"fa-UK-Cross-stroke":"fa-Close")}}var ie=class i extends Me{constructor(){super(...arguments);this.offCanvasService=k(De);this.myAccountService=k(te);this.eventService=k(Y);this.translation=k(Q);this.taggingEventRegistrationService=k(q)}open(e){this.translation.translate("adobeStrings.headerMyAccount").pipe(T(1)).subscribe(n=>{this.eventService.dispatch(this.taggingEventRegistrationService.ctaEvent(n,void 0,"other"),ke)}),super.open(e)}openDrawer(){this.open(this.contentTemplate),this.myAccountService.closeMADrawerSubject.next(!1)}slideout(){this.myAccountService.closeMADrawerSubject.next(!0),super.slideout()}ngOnInit(){this.myAccountService.closeMADrawerSubject.subscribe(e=>{e&&this.closeDrawer()})}closeDrawer(){this.offCanvasService.dismiss("Cross click")}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=it(i)))(o||i)}})()}static{this.\u0275cmp=D({type:i,selectors:[["my-account-drawer"]],viewQuery:function(n,o){if(n&1&&ye(ci,5),n&2){let f;O(f=$())&&(o.contentTemplate=f.first)}},standalone:!1,features:[nt],ngContentSelectors:li,decls:7,vars:4,consts:[["content",""],["amorButton",""],[1,"testFormButtonCenter",3,"click","buttonSize","buttonPrimary","ngClass"],[1,"sr-only"],[1,"offcanvas-header"],[1,"modal-title","h3-bold","header-revamp-drawer",3,"id"],["type","button","aria-label","Close",1,"btn-amor","close-drawer",3,"click"],[3,"icon"],[1,"offcanvas-body","body-one"],[1,"text-end"]],template:function(n,o){if(n&1){let f=I();ct(),L(0,pi,8,3,"ng-template",null,0,V),s(2,"app-amor-button",2,1),y("click",function(){b(f);let oe=H(1);return h(o.open(oe))}),d(4),s(5,"span",3),d(6," This Action will open drawer"),l()()}n&2&&(r(2),c("buttonSize",o.buttonSize.large)("buttonPrimary",!0)("ngClass",o.customClass),r(2),C(" ",o.buttonText," "))},dependencies:[_e,M,x],styles:[`@keyframes slideInLeft{0%{left:-100%}to{left:0}}@keyframes slideInRight{0%{right:-100%}to{right:0}}@keyframes slideOutLeft{0%{left:0}to{left:-100%}}@keyframes slideOutRight{0%{right:0}to{right:-100%}}@keyframes slideInBottom{0%{bottom:-100%}to{bottom:0}}@keyframes slideOutBottom{0%{bottom:0}to{bottom:-100%}}.offcanvas.show{position:fixed;transform:none;visibility:visible;top:0;width:468px;bottom:0;z-index:9999;display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);background-clip:padding-box;outline:0;transition:transform .5s ease-in-out;background-color:#fff}@media(max-width:768px){.offcanvas.show{width:336px}}@media(max-width:320px){.offcanvas.show{width:100%}}
1.offcanvas.show.offcanvas-start{left:0;animation:slideInLeft .5s ease-in}.offcanvas.show.offcanvas-start.slideout-right{animation:slideOutRight .5s ease-in;right:-100%}.offcanvas.show.offcanvas-start.slideout-left{animation:slideOutLeft .5s ease-in;left:-100%}.offcanvas.show.offcanvas-end{right:0;animation:slideInRight .5s ease-in}.offcanvas.show.offcanvas-end.slideout-right{animation:slideOutRight .5s ease-in;right:-100%}.offcanvas.show.offcanvas-end.slideout-left{animation:slideOutLeft .5s ease-in;left:-100%}.offcanvas.show.offcanvas-bottom{inset:auto 0 0;width:100%;max-width:100%;height:auto;max-height:90vh;animation:slideInBottom .35s ease-in}.offcanvas.show.offcanvas-bottom.slideout-bottom{animation:slideOutBottom .35s ease-in;bottom:-100%}.offcanvas.show.offcanvas-bottom .offcanvas-header{margin-right:0}.offcanvas.show .offcanvas-header .modal-title.h4-bold{margin:0}.offcanvas.show .offcanvas-header{padding:16px 24px 0;margin-bottom:16px;margin-right:30px}@media(max-width:768px){.offcanvas.show .offcanvas-header{padding:16px 16px 0}}.offcanvas.show .offcanvas-header button.close-drawer{background:transparent;border-radius:50px;height:44px;width:44px;margin-top:-14px;margin-right:-5px;padding:5px;position:absolute;top:22px;right:15px;cursor:pointer;border:0;opacity:1;-webkit-appearance:none;margin-bottom:0}.offcanvas.show .offcanvas-header button.close-drawer app-amor-icon{display:block;background-color:#f8f8f8;border-radius:55px;height:34px;width:34px}.offcanvas.show .offcanvas-header button.close-drawer app-amor-icon span{position:relative;top:5px}.offcanvas.show .offcanvas-header{display:flex}.offcanvas.show .offcanvas-body{padding:0 24px 16px;overflow-y:auto}@media(max-width:768px){.offcanvas.show .offcanvas-body{padding:0 16px 16px}}.offcanvas.show .offcanvas-body .pick-location-selected{font-family:Open Sans Bold,Arial Bold,sans-serif}.offcanvas.show .offcanvas-body .pick-location-selected .fa-Location:before{font-size:16px}.offcanvas.show .offcanvas-body .inline-accordion.pickup-store-choose .accordion{padding-bottom:0;padding-left:0}@media(max-width:768px){.offcanvas.show .offcanvas-body .inline-accordion.pickup-store-choose .accordion app-amor-form-input .form-input-group .input-label{font-size:12px}}@media(max-width:320px){.offcanvas.show .offcanvas-body .inline-accordion.pickup-store-choose .accordion app-amor-form-input .form-input-group .input-label{font-size:12px}}.offcanvas.show .offcanvas-body .inline-accordion.pickup-store-choose .use-my-location-link.new-loc{padding-bottom:0}.offcanvas.show .offcanvas-body .inline-accordion.pickup-store-choose .accordion-button{padding:20px 0 15px}.offcanvas.show .offcanvas-body .use-my-location-link.new-loc .signet-mark{vertical-align:middle}.offcanvas.show .offcanvas-body .use-my-location-link.new-loc .signet-mark .fa-Geolocation:before{width:16px;height:16px;display:inline-block;font-size:16px}.offcanvas.show .offcanvas-body .border-line-h{position:relative;top:80px;width:100%;height:2px;left:5px;opacity:80%;z-index:0;background-color:#ccc;border:1px}.offcanvas.show .offcanvas-body .checkout-flyout-design button#useMyLocationLink{text-transform:capitalize;text-decoration:underline;color:#323232}@media(max-width:768px){.offcanvas.show .offcanvas-body .cart-flyout-desgn form .select-store-form-group.size-new app-amor-form-input .form-input-group .form-input .input-label,.offcanvas.show .offcanvas-body .checkout-flyout-design form .select-store-form-group.size-new app-amor-form-input .form-input-group .form-input .input-label{font-size:14px}.offcanvas.show .offcanvas-body .cart-flyout-desgn form .select-store-form-group.size-new app-amor-form-input .form-input-group .form-input.form-filled .input-label,.offcanvas.show .offcanvas-body .cart-flyout-desgn form .select-store-form-group.size-new app-amor-form-input .form-input-group .form-input .input-field:focus+.input-label,.offcanvas.show .offcanvas-body .checkout-flyout-design form .select-store-form-group.size-new app-amor-form-input .form-input-group .form-input.form-filled .input-label,.offcanvas.show .offcanvas-body .checkout-flyout-design form .select-store-form-group.size-new app-amor-form-input .form-input-group .form-input .input-field:focus+.input-label{font-size:10px;line-height:15px}.offcanvas.show .offcanvas-body .cart-flyout-desgn form .select-store-form-group.size-new app-amor-form-input .form-input-group .form-input .input-label{right:10px}.offcanvas.show .offcanvas-body .checkout-flyout-design form .select-store-form-group.size-new app-amor-form-input .form-input-group .form-input .input-label{right:9px}}.offcanvas.show .offcanvas-body .cart-flyout-design button#useMyLocationLink{color:#323232}.offcanvas.show .offcanvas-body .cart-flyout-design button#useMyLocationLink:hover,.offcanvas.show .offcanvas-body .cart-flyout-design button#useMyLocationLink:focus{text-decoration:underline}.offcanvas.show .offcanvas-body button#useMyLocationLink{background:0 0;padding:0;letter-spacing:0;line-height:inherit;box-shadow:none;border:none;color:#323232;text-decoration:underline}.offcanvas.show .offcanvas-body button#bopisUseMyLocationLink{background:0 0;padding:0;letter-spacing:0;line-height:21px;box-shadow:none;border:none}.offcanvas.show .offcanvas-body button#bopisUseMyLocationLink:hover,.offcanvas.show .offcanvas-body button#bopisUseMyLocationLink:focus{text-decoration:underline}.offcanvas.show .offcanvas-body .metro-bopis-form-group{margin-top:15px}.offcanvas.show .offcanvas-body .metro-bopis-form-group .input-container{width:297px;margin-right:-5px;margin-top:-5px;padding-left:5px;padding-right:5px;padding-top:5px;position:relative;float:left;
1width:65%}@media(max-width:768px){.offcanvas.show .offcanvas-body .metro-bopis-form-group .input-container{width:55%}}@media(max-width:320px){.offcanvas.show .offcanvas-body .metro-bopis-form-group .input-container{width:55%}}.offcanvas.show .offcanvas-body .metro-bopis-form-group .input-container{margin-bottom:30px}.offcanvas.show .offcanvas-body .metro-bopis-form-group .input-container .form-input-group .form-input .input-field{width:100%;margin-right:20px}.offcanvas.show .offcanvas-body .metro-bopis-form-group .input-container .form-input-group .form-input .input-label{font-weight:400}.offcanvas.show .offcanvas-body .metro-bopis-form-group .amor-lookup-button{float:right;top:-56px}.offcanvas.show .offcanvas-body .metro-bopis-form-group .amor-lookup-button #amor-lookup-btn{height:56px}.offcanvas.show .offcanvas-body .metro-bopis-form-group .amor-lookup-button #amor-lookup-btn .btn-amor.btn-primary-amor.btn-lg{padding:16px 28px;color:#000;background-color:#fff;border:1px solid #000000}.offcanvas.show .offcanvas-body .metro-look-up-error,.offcanvas.show .offcanvas-body .metro-lookup-error{display:inline-block}.offcanvas.show .offcanvas-body app-metro-bopis-store-find{display:flex;position:relative;top:20px;left:5px;width:100%}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul{list-style:none}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li{top:20px;height:auto;position:relative}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info{padding-left:32px;width:100%;display:inline-block;vertical-align:middle;padding-top:10px}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details{display:flex;margin-left:2px;width:100%}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance{display:inline-flex;width:100%}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance .store-finder-navigation-list-distance{width:fit-content}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance app-amor-accordion{width:50%;padding-left:15px}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance app-amor-accordion .accordion .accordion-item{border:none}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance app-amor-accordion .accordion .accordion-item .accordion-header{text-decoration:underline}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance app-amor-accordion .accordion .accordion-item .accordion-header button{padding:0;width:auto;margin-left:10px;margin-top:-2px}@media(max-width:767px){.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance app-amor-accordion .accordion .accordion-item .accordion-header button{margin-left:0}}
1.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance app-amor-accordion .accordion .accordion-item .accordion-header button app-amor-icon{display:none}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance app-amor-accordion .accordion .accordion-item .accordion-header button h4{position:relative;top:-6px}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance app-amor-accordion .accordion .accordion-item .accordion-body{left:-68px;margin-top:5px;display:block;width:100%;position:relative}.offcanvas.show .offcanvas-body app-metro-bopis-store-find .metro-bopis-store-container .metro-bopis-set-my-store-container ul li .store-finder-navigation-list-entry-info .metro-bopis-store-details .metro-bopis-store-distance app-amor-accordion .accordion .accordion-item .accordion-body .col-xs-6{width:100%;padding-left:0}.offcanvas.show .offcanvas-body .buttonSelectStoreLink button{background:0 0;width:auto;height:40px;letter-spacing:0;line-height:21px;box-shadow:none;border:none;text-decoration:underline;padding:0 15px 0 0;text-align:left;font-size:14px;text-transform:none}.offcanvas.show .offcanvas-body .buttonSelectStoreLink button:hover,.offcanvas.show .offcanvas-body .buttonSelectStoreLink button:active,.offcanvas.show .offcanvas-body .buttonSelectStoreLink button:active:focus{outline:0!important;text-decoration:underline}.offcanvas.show .offcanvas-body .shop-these-stores-btn{position:relative;margin-top:30px;margin-left:15%}.offcanvas.show .offcanvas-body .cancel-btn-div{text-align:center;margin-top:16px;margin-left:15%}.offcanvas.show .offcanvas-body .cancel-btn button{position:relative;text-align:center;cursor:pointer;margin-top:16px;text-transform:none;background:0 0;padding:0;letter-spacing:0;line-height:24px;box-shadow:none;border:none;text-decoration:underline;font-size:16px;width:auto;height:auto;left:20%;right:20%}.offcanvas.show .offcanvas-body .select-store-form-group{margin-bottom:10px;display:flex;justify-content:space-between;gap:16px}.offcanvas.show .offcanvas-body .select-store-form-group .form-input-group .form-input{display:block}.offcanvas.show .offcanvas-body .select-store-form-group .form-input-group .form-input input{width:100%}.offcanvas.show .offcanvas-body .select-store-form-group .error-group{margin-left:-5px;margin-right:-5px;margin-top:-5px;padding-left:5px;padding-right:5px;padding-top:5px;position:relative;width:75%}.offcanvas.show .offcanvas-body .select-store-form-group .error-group .control-label{color:gray}.offcanvas.show .offcanvas-body .select-store-form-group .error-group .input-container{position:relative;padding-left:2px;padding-right:2px}.offcanvas.show .offcanvas-body .select-store-form-group .error-group .input-container .form-input{display:block}.offcanvas.show .offcanvas-body .select-store-form-group .error-group .input-container .select-store-form-control{height:56px;width:100%;display:block;padding:6px 0 6px 5px;background-color:#fff;background-image:none;color:#323232;font-size:13px;line-height:1.42857143;box-shadow:none;border:1px solid #cccccc;border-radius:4px}@media(max-width:768px){.offcanvas.show .offcanvas-body .select-store-form-group .error-group .input-container .storelocator-zip-textbox{font-size:16px}}.offcanvas.show .offcanvas-body .select-store-form-group .error-group .input-container input::placeholder{color:#ccc}.offcanvas.show .offcanvas-body .select-store-form-group .amor-lookup-button #amor-lookup-btn{height:56px;width:auto}.offcanvas-backdrop.fade.show{position:fixed;top:0;left:0;z-index:1040;width:100%;height:100%;background-color:#000;opacity:40%}@media(max-width:320px){.size-new app-amor-form-input .form-input-group .input-label{font-size:10px}}@media(max-width:768px){.size-new app-amor-form-input .form-input-group .input-label{font-size:10px}} 2`],encapsulation:2})}};var bi=i=>({userName:i}),hi=i=>({currentTier:i}),yi=i=>({bannerName:i}),Si=(i,t)=>({userName:i,siteName:t});function _i(i,t){if(i&1&&(s(0,"div",0)(1,"app-amor-message-banner",14)(2,"span"),d(3),u(4,"cxTranslate"),l()()()),i&2){let e=m(3);r(),c("bannerType",e.bannerType.success)("liveAlert",!0)("closeButton",!0),r(2),C(" ",ce(4,4,"myAccount.myAccountRevamp.vaultRewards.vaultRewardsSuccessMsg",R(7,yi,e.rewardsSiteName))," ")}}function wi(i,t){if(i&1&&(s(0,"span"),g(1,"img",15),l()),i&2){let e=m(3);r(),c("src",se("",e.SHARED_ASSET_PATH,"/sapphire_gem_icon-01.svg"),re)}}function Ci(i,t){if(i&1&&(s(0,"span"),g(1,"img",16),l()),i&2){let e=m(3);r(),c("src",se("",e.SHARED_ASSET_PATH,"/ruby_gem_icon-01-01.svg"),re)}}function xi(i,t){if(i&1&&(s(0,"span"),g(1,"img",17),l()),i&2){let e=m(3);r(),c("src",se("",e.SHARED_ASSET_PATH,"/emerald_gem_icon-01-01.svg"),re)}}function Ai(i,t){if(i&1&&(s(0,"span"),g(1,"img",18),l()),i&2){let e=m(3);r(),c("src",se("",e.SHARED_ASSET_PATH,"/diamond_gem_icon-01-01.svg"),re)}}function Ii(i,t){if(i&1&&(S(0,_i,5,9,"div",0),s(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),d(6),u(7,"cxTranslate"),l(),s(8,"div",6),d(9),u(10,"cxTranslate"),l()(),s(11,"div",7)(12,"h4",8),d(13),s(14,"span",9),d(15," gems"),l()(),g(16,"app-amor-icon",10),l(),s(17,"cx-generic-link",11),d(18),u(19,"cxTranslate"),l()(),s(20,"div",12)(21,"div",13),S(22,wi,2,2,"span"),S(23,Ci,2,2,"span"),S(24,xi,2,2,"span"),S(25,Ai,2,2,"span"),l()()()()),i&2){let e=m(2);_(e.shouldShowSuccessMessage?0:-1),r(6),ae(ce(7,11,"myAccount.welcomeText",R(19,bi,e.firstName))),r(3),ae(ce(10,14,"myAccount.currentTierText",R(21,hi,e.currentTier))),r(4),ae(e.gemCount),r(3),c("icon","fa-Diamond"),r(),c("url",e.rewardsPagePath),r(),ae(v(19,17,"myAccount.viewRewards")),r(4),_(e.tier==="SAPPHIRE"?22:-1),r(),_(e.tier==="RUBY"?23:-1),r(),_(e.tier==="EMERALD"?24:-1),r(),_(e.tier==="DIAMOND"?25:-1)}}function Li(i,t){if(i&1&&(S(0,Ii,26,23),u(1,"async")),i&2){let e=m();_(v(1,1,e.snapshotResponse$)?0:-1)}}function Ei(i,t){if(i&1){let e=I();s(0,"div",19)(1,"div"),g(2,"p",20),u(3,"cxTranslate"),s(4,"p",21),d(5),u(6,"cxTranslate"),l(),s(7,"div",22)(8,"app-amor-button",23),y("buttonClick",function(){b(e);let o=m(3);return h(o.rewardsPage(!0))}
2),d(9),u(10,"cxTranslate"),l(),s(11,"div",24),g(12,"span",25),u(13,"cxTranslate"),l()()()()}if(i&2){let e=m(3);r(2),c("innerHTML",ce(3,5,"myAccount.myAccountRevamp.vaultRewards.rewardsWelcomeText",pt(14,Si,e.firstName,e.rewardsSiteName)),ne),r(3),C(" ",v(6,8,"myAccount.myAccountRevamp.vaultRewards.rewardsStartEarningText")),r(3),c("isLoading",e.isLoading),r(),C(" ",v(10,10,"myAccount.myAccountRevamp.vaultRewards.joinNow")," "),r(3),c("innerHTML",v(13,12,"myAccount.myAccountRevamp.vaultRewards.disclaimerText"),ne)}}function ki(i,t){if(i&1&&(S(0,Ei,14,17,"div",19),u(1,"async")),i&2){let e=m(2);_(v(1,1,e.siteLoyaltyEnabled$)?0:-1)}}function Ti(i,t){if(i&1&&S(0,ki,2,3),i&2){let e=m();_(!e.isSiteUk&&e.site!==e.SITEID.PEOPLES?0:-1)}}var Be=class i{constructor(t,e,n,o,f,P,oe,me,de,ue,fe){this.siteService=t;this.rewardsPageService=e;this.signetUserService=n;this.accountPersonalDetailsService=o;this.loggerService=f;this.router=P;this.cd=oe;this.eventService=me;this.taggingEvent=de;this.headerService=ue;this.myAccountService=fe;this.subscriptions$=new A;this.isSiteUk=!1;this.baseSiteSubscription=new A;this.rewardsPagePath=le;this.SHARED_ASSET_PATH=Et;this.snapshotResponse$=new B("");this.isNotLoyaltyEnrolled=!1;this.isLoading=!1;this.rewardsSiteName="";this.rewardsTcPath=Lt.termsandConditions;this.userProfileDetails$=this.signetUserService.getUserObs().pipe(E(t=>!!t));this.shouldShowSuccessMessage=!1;this.showBanner=!0;this.bannerType=Te;this.revampDrawer=Fe.REVAMP_DRAWER;this.myAccountSource=Fe.MY_ACCOUNT;this.SITEID=w;this.siteLoyaltyEnabled$=this.accountPersonalDetailsService.siteLoyaltyEnabled$}ngOnInit(){this.getSnapshotData(),this.headerService.openDrawerButton$.subscribe(o=>{o.clicked&&this.shouldShowSuccessMessage&&(this.shouldShowSuccessMessage=!1,this.cd.detectChanges())}),this.accountPersonalDetailsService.updateSource$.subscribe(o=>{o?.shouldUpdate&&o?.updateSource===this.revampDrawer&&(this.getSnapshotData(),this.loyaltyChecks=!0)}),this.accountPersonalDetailsService.isLoyaltyChecks$.subscribe(o=>{this.loyaltyChecks=o}),this.baseSiteSubscription=this.siteService.getActive().subscribe(o=>{this.site=o,this.rewardsSiteName=Xt[o],(this.site===w.EJ||this.site===w.HS)&&(this.isSiteUk=!0)});let t=this.userProfileDetails$.subscribe(o=>{this.firstName=o.firstName}),e=this.accountPersonalDetailsService.userDetails$.pipe().subscribe(o=>{o?.firstName&&(this.firstName=o.firstName)}),n=this.myAccountService.closeMADrawerSubject.subscribe(o=>{o&&this.shouldShowSuccessMessage&&(this.shouldShowSuccessMessage=!1)});this.subscriptions$.add(t),this.subscriptions$.add(e),this.subscriptions$.add(n)}getSnapshotData(){this.rewardsPageService.getSnapshotData().subscribe(t=>{t&&(this.snapshotResponse$.next(`${t?.gemCount} ${t?.tier}`),this.gemCount=this.formatNumber(t.gemCount),this.tier=t.tier,this.currentTier=t.tier.charAt(0).toUpperCase()+t.tier.slice(1).toLowerCase(),this.cd.detectChanges())})}formatNumber(t){let e=t.toString(),n=e.substring(e.length-3),o=e.substring(0,e.length-3),f=o.replace(/\B(?=(\d{2})+(?!\d))/g,",")+(o?",":"")+n;return parseFloat(f.replace(/,/g,""))}loyaltyEnroll(){if(!this.isLoading)try{this.isLoading=!0,this.loggerService.log("[app-my-account-loyalty-dashboard]: loyaltyEnroll - Fetching initial state");let t=this.rewardsPageService.enrolLoyaltyUser().subscribe({next:e=>{this.handleEnrollmentResponse(e)},error:e=>{this.handleEnrollmentError(e)}});this.subscriptions$.add(t),this.logJoinNowEvent()}catch(t){this.loggerService.error("[app-my-account-loyalty-dashboard]: enroll user error in API response:",t),this.isLoading=!1}}handleEnrollmentResponse(t){t?.isLoyaltyEnrolled||t?.isEnrolled?(this.loyaltyChecks=!0,this.getSnapshotData(),this.accountPersonalDetailsService.sendUpdateSource(this.myAccountSource,!0),this.shouldShowSuccessMessage=!0,this.loggerService.log("[app-my-account-loyalty-dashboard]: User successfully enrolled in loyalty program")):this.loggerService.log("[app-my-account-loyalty-dashboard]: Enroll call failed"),this.isLoading=!1,this.cd.detectChanges()}handleEnrollmentError(t){this.loggerService.error("[app-my-account-loyalty-dashboard]: Error in enrolLoyaltyUser",t),this.isLoading=!1}logJoinNowEvent(){this.eventService.dispatch(this.taggingEvent.ctaEvent("My Account|Loyalty Rewards Program|Join Now","","other"),ke)}rewardsPage(t){t?this.loyaltyEnroll():this.router.navigate([le])}ngOnDestroy(){this.subscriptions$.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(a(G),a(Le),a(X),a(Z
2),a(ht),a(z),a(Se),a(Y),a(q),a(Pe),a(te))}}static{this.\u0275cmp=D({type:i,selectors:[["app-my-account-loyalty-dashboard"]],standalone:!1,decls:2,vars:1,consts:[[1,"message-banner-loyalty-container","amor-container"],[1,"amor-container","my-account-loyalty"],[1,"my-account-drawer-loyalty-section"],[1,"inner-loyalty-section","col-sm-10","col-xs-10"],[1,"welcome-text-container"],[1,"loyalty-section-welcome-text","body-one"],[1,"loyalty-status-section","body-two"],[1,"loyalty-gems-count-section"],[1,"h4-bold"],[1,"sr-only"],["aria-hidden","true",3,"icon"],[1,"loyalty-view-rewards-section","body-one",3,"url"],[1,"tier-image-section","col-sm-2","col-xs-2"],[1,"tier-image"],[3,"bannerType","liveAlert","closeButton"],["alt","Sapphire status",1,"current-tier-image",3,"src"],["alt","Ruby status",1,"current-tier-image",3,"src"],["alt","Emerald status",1,"current-tier-image",3,"src"],["alt","Diamond status",1,"current-tier-image",3,"src"],[1,"amor-container","non-loyalty-section"],[1,"body-one","loyalty-section-welcome-text",3,"innerHTML"],[1,"body-two","start-earning"],[1,"join-now-button"],[3,"buttonClick","isLoading"],[1,"loyalty-terms-link","body-five"],[3,"innerHTML"]],template:function(e,n){e&1&&S(0,Li,2,3)(1,Ti,1,1),e&2&&_(!n.isSiteUk&&n.loyaltyChecks?0:1)},dependencies:[J,Re,x,M,F,K],encapsulation:2})}};var Bi=i=>({display:i});function Ui(i,t){if(i&1&&(s(0,"li",3),g(1,"app-amor-icon",9),s(2,"cx-generic-link",10),g(3,"span",11),u(4,"async"),l()()),i&2){let e=t.$implicit;c("ngStyle",R(6,Bi,e.visible==="true"?"":"none")),r(),c("icon",e.iconClassName),r(),c("url",e.href??""),r(),c("innerHTML",v(4,4,e.title),ne)}}function Ni(i,t){if(i&1){let e=I();g(0,"app-my-account-loyalty-dashboard"),s(1,"div",0)(2,"div",1)(3,"ul",2),at(4,Ui,5,8,"li",3,rt),l(),s(6,"div",4)(7,"span",5)(8,"cx-generic-link",6),d(9),u(10,"cxTranslate"),l()()(),s(11,"div",7)(12,"cx-generic-link",8),y("click",function(o){b(e);let f=m();return h(f.logoutUser(o))}),d(13,"Sign Out"),l()()()()}if(i&2){let e=m();r(4),st(e.myAccountDrawerLinks),r(4),c("url",e.payMyBillUrl),r(),C(" ",v(10,5,"myAccount.myAccountRevampDrawer.payMyBill")," "),r(3),j("btn-secondary-amor btn-amor"),c("url","/logout")}}var Ue=class i{constructor(t,e,n,o,f,P,oe,me,de,ue,fe,$e){this.siteService=t;this.authService=e;this.translation=n;this._offCanvasService=o;this.loggerService=f;this.router=P;this.localStorageService=oe;this.cartSyncEventService=me;this.myAccountService=de;this.baseSiteCommonDataService=ue;this.signetUserService=fe;this.accountPersonalDetailsService=$e;this.myAccountDrawerLinks=[];this.isSiteUk=!1;this.baseSiteSubscription=new A;this.routeSubscription=new A;this.userLoginStatusSubscription=new A;this.signetCommonDataSubscription=new A;this.subscriptions$=new A;this.ctaEventData=new tt;this.displayLogInMsg="displayLogInMsg";this.userProfileDetails$=this.signetUserService.getUserObs().pipe(E(t=>!!t));this.myOrderTitle=this.translation.translate("myAccount.myAccountRevampDrawer.myOrdersHeader")}get offCanvasService(){return this._offCanvasService}set offCanvasService(t){this._offCanvasService=t}ngOnInit(){this.baseSiteSubscription=this.siteService.get(this.siteId).subscribe(f=>{this.site=f?.uid,(this.site===w.EJ||this.site===w.HS)&&(this.isSiteUk=!0),this.myAccountDrawerLinks=[{title:this.translation.translate("myAccount.myAccountRevampDrawer.MyAccountTitle"),href:Bt,iconClassName:"fa-Account",visible:"true"},{title:this.translation.translate("myAccount.vaultRewardsText"),href:le,iconClassName:"fa-Diamond",visible:this.isLoyaltyDashboardEnabled&&this.isLoyaltyEnabled&&this.isLoyaltyProfile?"true":"false"},{title:this.myOrderTitle,href:kt,iconClassName:"fa-Package",visible:"true"},{title:this.translation.translate("myAccount.myAccountRevampDrawer.FavoritesTitle"),href:this.site==="peoples"?Dt:Tt,iconClassName:"fa-Favorite-Unselected",visible:"true"},{title:this.translation.translate("myAccount.myAccountRevampDrawer.paymentMethodsTitle"),href:Ut,iconClassName:"fa-CreditCard",visible:"true"},{title:this.translation.translate("myAccount.myAccountRevampDrawer.PreferenceHeader"),href:Rt,iconClassName:"fa-Checkmark-Circle",visible:this.site!==w.BANTER&&this.site!==w.PEOPLES?"true":"false"},{title:this.translation.translate("myAccount.myAccountRevampDrawer.personalDetailsTitle"),href:Mt,iconClassName:"fa-Review",visible:"true"},{title:this.translation.translate("myAccount.myAccountRevampDrawer.MyItemsHeader"),href:Pt,iconClassName:"fa-Ring",visible:"true"}]}),this.routeSubscription=this.router.events.pipe(E(f=>f instanceof ut)).subscribe(()=>{this.emitCloseDrawer()});let t=this.baseSiteCommonDataService.getSignetBaseSiteCommonData().pipe(E(Boolean)),e=this.userProfileDetails$,n=ve([t,e]).subscribe(([f,P])=>{this.isLoyaltyEnabled=f.isLoyaltyEnabled,this.isLoyaltyDashboardEnabled=f.loyaltyDashboardEnabled,this.isLoyaltyProfile=!!P.loyaltyProfileId,this.loyaltyChecks=!!this.isLoyaltyEnabled&&!!this.isLoyaltyDashboardEnabled&&!!this.isLoyaltyProfile,this.accountPersonalDetailsService.siteLoyaltyEnabled.next(!!this.isLoyaltyEnabled),this.accountPersonalDetailsService.isLoyaltyChecks.next(this.loyaltyChecks),this.updateV
2aultRewardsVisibility()});this.subscriptions$.add(n);let o=this.accountPersonalDetailsService.updateSource$.subscribe(f=>{f?.shouldUpdate&&(this.isLoyaltyProfile=!0,this.updateVaultRewardsVisibility())});this.subscriptions$.add(this.routeSubscription),this.subscriptions$.add(o)}logoutUser(t){t.stopPropagation(),t.preventDefault(),this.emitCloseDrawer(),this.authService.coreLogout().then(()=>this.router.navigateByUrl("/logout")).catch(n=>this.loggerService.error("User Logout Unsuccessfull",n)),this.localStorageService.removeItem("isRegisteredUser"),this.localStorageService.removeItem(Ae.DELIVERY_ACTIVE_FLAG),this.localStorageService.removeItem(Ie);let e=this.localStorageService.getItem("saveForLater");e!=null&&this.localStorageService.removeItem("saveForLater"),this.cartSyncEventService.cartSyncInProgress$.next(!1),this.localStorageService.removeItem(this.displayLogInMsg)}emitCloseDrawer(){this.myAccountService.closeMADrawerSubject.next(!0)}get payMyBillUrl(){return this.site===w.KAY||this.site===w.KAY_OUTLET?Ot:this.site===w.JARED?$t:Nt}updateVaultRewardsVisibility(){let t=this.myAccountDrawerLinks[1];t&&(t.visible=this.isLoyaltyDashboardEnabled&&this.isLoyaltyEnabled&&this.isLoyaltyProfile?"true":"false")}ngOnDestroy(){this.emitCloseDrawer(),this.subscriptions$.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(a(G),a(W),a(Q),a(De),a(Ce),a(z),a(xe),a(Ee),a(te),a(Vt),a(X),a(Z
2))}}static{this.\u0275cmp=D({type:i,selectors:[["app-my-account-revamp"]],inputs:{siteId:"siteId"},outputs:{ctaEventData:"ctaEventData"},standalone:!1,decls:1,vars:1,consts:[[1,"amor-container"],[1,"my-account-revamp-drawer"],[1,"nav","nav-pills","secondary-nav","my-account-revamp-drawer-border"],[3,"ngStyle"],[1,"pay-my-bill-container"],[1,"_payMyBillUrl"],[1,"body-one","paybill-link-css",3,"url"],[1,"signout-button"],[3,"click","url"],[3,"icon"],[1,"body-one","navigation-links-styles",3,"url"],[3,"innerHTML"]],template:function(e,n){e&1&&S(0,Ni,14,7),e&2&&_(n.isSiteUk?-1:0)},dependencies:[dt,J,x,Be,F,K],encapsulation:2})}};var $i=["loginDrawer"],Hi=i=>({"mobile-my-account-wrapper":i});function ji(i,t){i&1&&g(0,"app-amor-icon",12),i&2&&c("icon","fa-Account")}function Vi(i,t){if(i&1&&(s(0,"my-account-drawer",14),g(1,"app-my-account-revamp"),l()),i&2){let e=t;c("direction","right")("drawerId","my-account-drawer")("buttonText",e)("drawerHeading",e)("customClass","my-account-drawer-button")}}function Fi(i,t){if(i&1&&(U(0),s(1,"div",13),g(2,"app-amor-icon",12),S(3,Vi,2,5,"my-account-drawer",14),u(4,"async"),l(),N()),i&2){let e,n=m(3);r(2),c("icon","fa-Account"),r(),_((e=v(4,2,n.userName$))?3:-1,e)}}function zi(i,t){i&1&&g(0,"cx-page-slot",15)}function Gi(i,t){if(i&1){let e=I();U(0),s(1,"ul",6)(2,"li",7)(3,"a",8),L(4,ji,1,1,"app-amor-icon",9),s(5,"span"),d(6,"My Account"),l()()(),s(7,"li",10)(8,"cx-generic-link",11),y("click",function(o){b(e);let f=m(2);return h(f.logoutUser(o))}),d(9),u(10,"cxTranslate"),l()()(),L(11,Fi,5,4,"ng-container",5)(12,zi,1,0,"ng-template",null,1,V),N()}if(i&2){let e=H(13),n=m().ngIf;r(),c("ngClass",R(11,Hi,!n.isUkSite)),r(2),c("routerLink","my-account"),r(),c("ngIf",!n.isUkSite),r(4),j("btn-secondary-amor btn-amor"),c("url","/logout"),r(),C(" ",v(10,9,"login.hamburgerSignout")," "),r(2),c("ngIf",!n.isUkSite)("ngIfElse",e)}}function Yi(i,t){i&1&&(s(0,"span",17),g(1,"app-amor-icon",18),l()),i&2&&(r(),c("icon","fa-UK-User icon-inline")("ariaHidden",!0))}function Wi(i,t){i&1&&g(0,"app-amor-icon",18),i&2&&c("icon","fa-Account login-link-icon hidden-sm hidden-xs")("ariaHidden",!0)}function Qi(i,t){if(i&1&&(s(0,"app-amor-message-banner",24),d(1),u(2,"cxTranslate"),u(3,"cxTranslate"),u(4,"cxTranslate"),l()),i&2){let e=m(5);c("bannerType",e.bannerType.error)("liveAlert",!0)("closeButton",!1),r(),C(" ",e.fbLoginErrorMsg?v(2,4,"login.loginToExistingAccountErrorMsgFB"):e.googleLoginErrorMsg?v(3,6,"login.loginToExistingAccountErrorMsgGoogle"):v(4,8,"login.invalidMessage")," ")}}function Ki(i,t){if(i&1){let e=I();U(0),s(1,"app-amor-login-drawer",19,3),u(3,"cxTranslate"),y("backClick",function(){b(e);let o=m(4);return h(o.closeResetPasswordScreen())})("click",function(){b(e);let o=m(4);return h(o.openDrawer(o.signInText))}),L(4,Qi,5,10,"app-amor-message-banner",20),s(5,"app-iframe-login-wrapper",21),y("loaded",function(){b(e);let o=m(4);return h(o.isIframeLoaded=!0)}),l()(),s(6,"span",22),d(7,"\xA0/\xA0"),l(),s(8,"app-amor-login-drawer",23,3),y("backClick",function(){b(e);let o=m(4);return h(o.closeResetPasswordScreen())})("click",function(){b(e);let o=m(4);return h(o.openDrawer(o.createAccountText))}),s(10,"app-iframe-login-wrapper",21),y("loaded",function(){b(e);let o=m(4);return h(o.isIframeLoaded=!0)}),l()(),N()}if(i&2){let e=m(4);r(),c("isLoginDrawerEnabled",e.enableLoginDrawer)("drawerHeading",e.drawerHeading)("direction","right")("drawerId","signin-account-drawer")("customClass","sign-in-button body-one")("buttonText",v(3,15,"login.signInTabHeader"))("showBackButton",e.isResetPasswordScreen),r(3),c("ngIf",e.invalidMsg&&e.showTabs),r(4),c("isLoginDrawerEnabled",e.enableLoginDrawer)("drawerHeading",e.drawerHeading)("direction","right")("drawerId","signin-account-drawer")("buttonText",e.createAccountText)("showBackButton",e.isResetPasswordScreen)("customClass","create-account-button body-one")}}function Ji(i,t){if(i&1){let e=I();s(0,"span",25)(1,"cx-generic-link",26),u(2,"cxTranslate"),y("click",function(){b(e);let o=m(4);return h(o.signInCreateAccount(!1))}),d(3,"Sign In"),l(),s(4,"span",27),d(5,"\xA0\xA0/\xA0\xA0"),l(),s(6,"cx-generic-link",28),u(7,"cxTranslate"),y("click",function(){b(e);let o=m(4);return h(o.signInCreateAccount(!0))}),d(8,"Create Account"),l()(),s(9,"span",25)(10,"cx-generic-link",29),y("click",function(){b(e);let o=m(4);return h(o.signInCreateAccount(!1))}
2),d(11,"Sign In"),l(),s(12,"cx-generic-link",11),u(13,"cxTranslate"),y("click",function(){b(e);let o=m(4);return h(o.signInCreateAccount(!0))}),d(14,"Create Account"),l()()}if(i&2){let e=m(3).ngIf;c("ngClass",e.isUkSite?"":"hidden-sm hidden-xs"),r(),c("url",v(2,9,"header.links.signInURL")),r(5),c("url",v(7,11,"header.links.createAnAccountURL")),r(3),c("ngClass",e.isUkSite?"hidden":"hidden-lg hidden-md"),r(),j("btn-amor btn-primary-amor login-link-mobile"),r(2),j("btn-secondary-amor btn-amor createAccount-link-mobile"),c("url",v(13,13,"header.links.createAnAccountURL"))}}function qi(i,t){if(i&1&&(U(0),s(1,"ul")(2,"li",16),S(3,Yi,2,2,"span",17)(4,Wi,1,2,"app-amor-icon",18),L(5,Ki,11,17,"ng-container",5)(6,Ji,15,15,"ng-template",null,2,V),l()(),N()),i&2){let e=H(7),n=m(3);r(3),_(n.isUkSite?3:4),r(2),c("ngIf",n.enableLoginDrawer)("ngIfElse",e)}}function Xi(i,t){if(i&1&&L(0,qi,8,3,"ng-container",4),i&2){let e=m().ngIf;c("ngIf",e.userStatus==="ANONYMOUS")}}function Zi(i,t){if(i&1&&(U(0),L(1,Gi,14,13,"ng-container",5)(2,Xi,1,1,"ng-template",null,0,V),N()),i&2){let e=t.ngIf,n=H(3);r(),c("ngIf",e.userStatus==="AUTHENTICATED")("ngIfElse",n)}}var Ne=class i{constructor(t,e,n,o,f,P,oe,me,de,ue,fe,$e,Je,qe,p,ge,eo,to,io,oo,no,ro,ao){this.authService=t;this.baseSiteService=e;this.loggerService=n;this.winRef=o;this.socialLinkButtonsService=f;this.logintemplateService=P;this.router=oe;this.renderer=me;this.signInAccountService=de;this.eventService=ue;this.taggingEventRegistrationService=fe;this.hamburgerMenuService=$e;this.localStorageService=Je;this.sessionStorageService=qe;this.cartSyncEventService=p;this.userService=ge;this.headerService=eo;this.rewardsPageService=to;this.accountPersonalDetailsService=io;this.favService=oo;this.translation=no;this.routingService=ro;this.cdr=ao;this.subscriptions$=new A;this.internalState$=new B(null);this.createAccountText="";this.state$=new B(Ve.buildState());this.isLoginPage=!1;this.isUkSite=!1;this.isSocialBtnShow$=new B(!1);this.showTabs=!1;this.signInText="";this.showTabs1=!1;this.drawerHeading="";this.isResetPasswordScreen=!1;this.invalidMsg=!1;this.bannerType=Te;this.userName$=new B("");this.displayLogInMsg="displayLogInMsg";this.isHamburgerMenuOpen=!1;this.iframeService=k(Ft);this.customLoginFormComponentService=k(Kt);this.isIframeLoaded=!1;this.dataListTwoSigin=[{title:this.getTranslationText("login.signInTabHeader"),content:Ye},{title:this.getTranslationText("login.createAccountTabHeader"),content:Ge}]}getTranslationText(t){let e="",n=this.translation.translate(t).pipe(T(1)).subscribe(o=>{e=o});return this.subscriptions$.add(n),e}ngOnInit(){this.router.url===je.LOGIN_PAGE_URL&&(this.isLoginPage=!0);let t=this.userService.getUserObs().subscribe(p=>{p?.firstName&&p?.lastName&&this.userName$.next(`${p?.firstName} ${p?.lastName}`)}),e=this.accountPersonalDetailsService.userDetails$.pipe().subscribe(p=>{p?.firstName&&p?.lastName&&this.userName$.next(`${p?.firstName} ${p?.lastName}`)});this.subscriptions$.add(t),this.subscriptions$.add(e);let n=this.logintemplateService.createAcctButtonCLicked.subscribe(p=>{p&&(this.drawerHeading=this.createAccountText,this.cdr.detectChanges())});this.subscriptions$.add(n);let o=this.logintemplateService.signInAcctButtonCLicked.subscribe(p=>{p&&this.translation.translate("login.loginCreateAccountHeading").pipe(T(1)).subscribe(ge=>{this.drawerHeading=ge,this.cdr.detectChanges()})});this.subscriptions$.add(this.logintemplateService.resetPasswordButtonCLicked.pipe(E(p=>p)).subscribe(()=>{this.translation.translate("login.forgotPasswordLabels.resetPasswordModalTitleUS").pipe(T(1)).subscribe(p=>{this.drawerHeading=p,this.cdr.detectChanges()})})),this.subscriptions$.add(o);let f=this.baseSiteService.getActive(),P=this.authService.isUserLoggedIn(),me=Ve.buildInitConfigObservable(f,P).pipe(He(this.currInitConfigIsSameAsPrev)).subscribe({next:p=>this.initStateWithConfig(p),error:p=>this.handleInitError(p)});this.subscriptions$.add(me);let de=ve([this.translation.translate("login.createAccount"),this.translation.translate("login.signInTabHeader")]).pipe(T(1)).subscribe(([p,ge])=>{this.createAccountText=p,this.signInText=ge,this.dataListTwoSigin=[{title:this.signInText,content:Ye},{title:this.createAccountText,content:Ge}]});this.subscriptions$.add(de);let{EJ:ue,HS:fe}=w;this.subscription=this.baseSiteService.getActive().pipe(Ze(p=>(this.site=p,this.isUkSite=this.site===fe||this.site===ue,this.baseSiteService.get(p))),et()).subscribe(p=>{this.enableLoginDrawer=p?.signetSiteProperties?.enableLoginDrawerFeature}),this.subscriptions$.add(this.subscription);let $e=this.socialLinkButtonsService.fbSubject.subscribe({next:p=>{this.isSocialBtnShow$.next(p)},error:()=>{}});this.subscriptions$.add($e);let Je=this.signInAccountService.getIsResetPasswordScreen().subscribe(p=>{this.isResetPasswordScreen=p});this.subscriptions$.add(Je);let qe=this.logintemplateService.isDrawerClosed$.subscribe(p=>{p&&(this.isIframeLoaded=!1)});this.subscriptions$.add(qe),this.hamburgerMenuService.isExpanded.subscribe(p=>{this.isHamburgerMenuOpen=p}),this.listenClickEvent(),this.listenFavClickEvent(),this.rewardsPageService.loginDrawer$.subscribe(p=>{this.openDrawer(p)})}ngOnDestroy(){this.subscriptions$.unsubscribe()}initStateWithConfig(t){if(this.winRef.isBrowser()){let e=this.state$.getValue(),{EJ:n,HS:o}=w;e.isUkSite=t.siteId===o||t.siteId===n,e.userStatus=t.userIsLoggedIn?"AUTHENTICATED":"ANONYMOUS",this.state$.next(e)}}handleInitError(t){this.loggerService.error("Error in CustomLoginComponent",t)}currInitConfigIsSameAsPrev(t,e){return t.siteId===e.siteId&&t.userIsLoggedIn===e.userIsLoggedIn}distinctStateChanges(){return He((t,e)=>this.statesAreEqual(t,e))}statesAreEqual(t,e){return t===void 0&&e===void 0?!0:t===void 0||e===void 0?!1:t.userStatus===e.userStatus&&t.isUkSite===e.isUkSite&&t.accountDropdownIsActive===e.accountDropdownIsActive}logoutUser(t){t.stopPropagation(),t.preventDefault(),this.authService.coreLogout().then(()=>this.router.navigateByUrl("/logout")).catch(n=>this.loggerService.error("User Logout Unsuccessfull",n)),this.localStorageService.removeItem("isRegisteredUser"),this.localStorageService.removeItem(It),this.localStorageService.removeItem(Ae.DELIVERY_ACTIVE_FLAG),this.localStorageService.removeItem(Ie);let e=this.localStorageService.getItem("saveForLater");e!=null&&this.localStorageService.removeItem("saveForLater"),this.cartSyncEventService.cartSyncInProgress$.next(!1),this.localStorageService.removeItem(this.displayLogInMsg)}openDrawer(t){if(this.localStorageService.removeItem("isRegisteredUser"),this.isHamburgerMenuOpen&&this.hamburgerMenuService.toggle(
2),this.triggerDrawer&&this.triggerDrawer.open,t===this.signInText){if(this.logintemplateService.setCreateAcct(3),this.showTabs=!0,this.sessionStorageService.removeItem("createAccountNavigation"),this.isLoginPage){let e=this.renderer.selectRootElement('[id^="scroll-tabs-swiper-"][id$="0"]');e.click(),this.renderer.setProperty(e,"textContent",this.signInText)}}else{if(this.showTabs1=!0,this.sessionStorageService.removeItem("createAccountNavigation"),this.sessionStorageService.setItem("createAccountNavigation",!0),this.isLoginPage){let e=this.renderer.selectRootElement('[id^="scroll-tabs-swiper-"][id$="1"]');e.click(),this.renderer.setProperty(e,"textContent",this.createAccountText)}this.drawerHeading=this.createAccountText,this.logintemplateService.setCreateAcct(1)}(this.router.url===je.LOGIN_PAGE_URL&&t===this.createAccountText||t===this.createAccountText)&&this.eventService.dispatch(this.taggingEventRegistrationService.registrationStart(),ze)}ngAfterViewInit(){let t=this.logintemplateService.triggerInvalidErrorBanner.pipe(E(e=>e!==void 0),Xe(e=>e)).subscribe({next:e=>{if(this.invalidMsg=!0,this.googleLoginErrorMsg="",this.fbLoginErrorMsg="",e.message.includes("Facebook")){this.fbLoginErrorMsg=e.message;return}if(e.message.includes("Google")){this.googleLoginErrorMsg=e.message;return}e.message.includes("Invalid")||(this.invalidMsg=!1)}});this.subscriptions$.add(t)}triggerEvent(t){t==="Create Account"&&this.eventService.dispatch(this.taggingEventRegistrationService.registrationStart(),ze)}listenClickEvent(){this.headerService.openDrawerButton$.subscribe(t=>{t.clicked&&!t.isAnonymousUser&&!this.headerService.isUserIconClicked?this.myAccountDrawer.openDrawer():t.clicked&&t.isAnonymousUser&&!this.headerService.isUserIconClicked&&this.enableLoginDrawer&&(this.customloginDrawer.openLoginDrawer(),this.openDrawer("Sign In")),this.headerService.isUserIconClicked=!0})}listenFavClickEvent(){this.favService.openDrawerFavButton$.subscribe(t=>{this.openDrawer(t)})}signInCreateAccount(t){this.logintemplateService.setVar(t),this.sessionStorageService.removeItem("createAccountNavigation"),this.sessionStorageService.setItem("createAccountNavigation",t),this.routingService.go({cxRoute:"login"})}closeResetPasswordScreen(){this.signInAccountService.setIsResetPasswordScreen(!1),this.translation.translate("login.loginCreateAccountHeading").pipe(T(1)).subscribe(t=>{this.drawerHeading=t,this.cdr.detectChanges()}),this.logintemplateService.showSignInFormInIframes()}static{this.\u0275fac=function(e){return new(e||i)(a(W),a(G),a(Ce),a(bt),a(Ht),a(Gt),a(z),a(ot),a(Jt),a(Y),a(q),a(xt),a(xe),a(jt),a(Ee),a(X),a(Pe),a(Le),a(Z),a(zt),a(Q),a(St),a(Se))}}static{this.\u0275cmp=D({type:i,selectors:[["app-custom-login"]],viewQuery:function(e,n){if(e&1&&ye(ie,5)(ee,5)($i,5),e&2){let o;O(o=$())&&(n.myAccountDrawer=o.first),O(o=$())&&(n.customloginDrawer=o.first),O(o=$())&&(n.triggerDrawer=o)}},standalone:!1,decls:2,vars:3,consts:[["login",""],["UKCustomMyAcc",""],["signInCreateAccLinks",""],["loginDrawer",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"hidden-lg","hidden-md",3,"ngClass"],[1,"mobile-my-account-links"],[1,"my-acc-option","body-one",3,"routerLink"],[3,"icon",4,"ngIf"],[1,"mobile-my-account-links","signout-option"],[3,"click","url"],[3,"icon"],[1,"my-account-desktop-link","hidden-sm","hidden-xs"],[3,"direction","drawerId","buttonText","drawerHeading","customClass"],["id","account-nav","position","HeaderLinks",1,"hidden-sm","hidden-xs"],[1,"login-list-item"],[1,"signet-mark"],[3,"icon","ariaHidden"],[3,"backClick","click","isLoginDrawerEnabled","drawerHeading","direction","drawerId","customClass","buttonText","showBackButton"],[3,"bannerType","liveAlert","closeButton",4,"ngIf"],[3,"loaded"],[1,"seperator","hidden-sm","hidden-xs"],[3,"backClick","click","isLoginDrawerEnabled","drawerHeading","direction","drawerId","buttonText","showBackButton","customClass"],[3,"bannerType","liveAlert","closeButton"],[3,"ngClass"],[1,"sidebar-login","body-two",3,"click","url"],[1,"seperator"],[1,"create-account-link","body-two",3,"click","url"],[3,"click"]],template:function(e,n){e&1&&(L(0,Zi,4,2,"ng-container",4),u(1,"async")),e&2&&c("ngIf",v(1,1,n.state$))},dependencies:[_e,mt,wt,ft,J,Re,x,ie,ee,Zt,Ue,F,K],encapsulation:2})}};var Oe=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=he({type:i})}static{this.\u0275inj=be({imports:[we,M,x]})}};var ri=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=he({type:i})}static{this.\u0275inj=be({providers:[W,vt({cmsComponents:{LoginComponent:{component:Ne}}})],imports:[we,_t,Ct,qt,gt,At,Yt,Qt,Wt,Me,x,M,Oe,ee]})}};var ai=class extends yt{};export{Ue as a,ri as b,ai as c};
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.